@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;600;700;800&display=swap');

:root {
  color-scheme: light;
  --paper: #f8f6f2;
  --ink: #1c2422;
  --muted: #535e59;
  --line: #e1e4dd;
  --accent: #a91d36;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: #181717;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, p { margin: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.shell { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.top, .foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 49px;
  padding: 7px 14px;
  border-radius: 12px;
  background: #fff;
}
.brand { display: inline-flex; }
.brand img { display: block; width: clamp(105px, 13vw, 150px); height: auto; }
.top { margin-top: 12px; }
.shop { font-size: .79rem; font-weight: 600; }
.shop:hover, .brand:hover { color: var(--accent); }
.campaign {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-block: 12px;
  padding: 8px clamp(14px, 3vw, 30px);
  border-radius: 14px;
  background: #fff;
}
.campaign-action { display: inline-block; margin-top: 8px; font-size: .8rem; font-weight: 700; }
.campaign-action:hover { text-decoration: underline; text-underline-offset: .2em; }
.campaign-action span, .shop span { color: var(--accent); }
.campaign-art { flex: 0 0 clamp(98px, 13vw, 150px); aspect-ratio: 1.35; overflow: hidden; }
.campaign-art img { display: block; width: 100%; height: auto; margin-top: -4%; }
.campaign h1 {
  font-size: clamp(2.4rem, 6vw, 4.3rem);
  line-height: 1;
  letter-spacing: -.055em;
  font-weight: 700;
}
.offer-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: .83rem;
}
.offer-tools select {
  min-height: 36px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}
#offer-count { color: var(--muted); }
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  scroll-margin-top: 12px;
}
.tile {
  display: grid;
  grid-template-rows: 1.5rem 1.8rem 2.75rem 1.7rem auto;
  align-items: center;
  justify-items: center;
  min-width: 0;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  text-align: center;
}
a.tile:hover, a.tile:focus-visible { border-color: #9aaba0; }
.category { color: var(--muted); font-size: .71rem; line-height: 1.08; font-weight: 600; }
.title { font-size: clamp(1.0625rem, 1.95vw, 1.45rem); line-height: 1.1; font-weight: 800; }
.discount {
  color: var(--accent);
  font-size: clamp(1.8rem, 3.1vw, 2.4rem);
  line-height: 1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.discount-qualifier { font-size: max(.75rem, .52em); font-weight: 600; }
.detail { color: var(--muted); font-size: .77rem; line-height: 1.15; }
.action {
  padding: .38rem .75rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: .78rem;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
}
.tile:hover .action { background: #394740; }
.placeholder {
  grid-template: 1fr / 1fr;
  min-height: 70px;
  background: #272424;
  border-color: #494141;
  color: #ded7d7;
  font-size: .82rem;
  font-weight: 600;
}
.highlight {
  grid-column: 1 / -1;
  grid-template: repeat(3, auto) / minmax(0, 1fr);
  gap: 6px;
  padding: 16px 12px;
  background: #4e1d28;
  border-color: #74414b;
  color: #fff;
}
.highlight h2 { font-size: 1.15rem; }
.highlight .detail { color: #f5dce1; }
.highlight .discount { color: #ffb6c5; font-size: clamp(1.8rem, 3.3vw, 2.45rem); }
.preview { padding-block: 12px; color: #d4cccd; font-size: .75rem; text-align: center; }
.foot { margin-bottom: 12px; }
.foot img { width: 104px; }
.offer-tools, #offer-count { color: #fff; }
@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .shell { width: calc(100% - 24px); }
  .campaign { padding: 8px 12px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tile { grid-template-rows: 1.25rem 1.35rem 2.05rem 1.65rem auto; border-radius: 13px; padding-block: 8px; }
  .category, .detail { font-size: .68rem; }
  .discount { font-size: clamp(1.38rem, 5.8vw, 1.75rem); }
  .action { font-size: .75rem; }
  .placeholder { grid-template: 1fr / 1fr; min-height: 58px; }
  .highlight { grid-template: repeat(3, auto) / minmax(0, 1fr); padding-block: 12px; }
}

@media (max-width: 360px) {
  .campaign h1 { font-size: 1.85rem; }
  .title { font-size: 1rem; }
}

.offer-logo { display: block; height: 40px; width: auto; max-width: 100%; object-fit: contain; }
@media (max-width: 680px) { .offer-logo { height: 31px; } }
