/* DigiChollo: la etiqueta de oferta como identidad.
   Papel azulado, tinta índigo, pegatinas amarillas con el precio. */
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
:root {
  --paper: #F3F4FA;
  --card: #FFFFFF;
  --ink: #1C1E45;
  --muted: #565A7E;
  --line: #D8DAEA;
  --brand: #2B2D6E;
  --sticker: #FFD23F;
  --sticker-ink: #1C1E45;
  --red: #C81E35;
  --focus: #2B2D6E;
  --radius: 12px;
  --wide: 75%;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #13142B;
    --card: #1C1E3E;
    --ink: #ECEDF8;
    --muted: #A9ACCB;
    --line: #2F3263;
    --brand: #8E92FF;
    --red: #FF5C70;
    --focus: #FFD23F;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  background: var(--paper);
  color: var(--ink);
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-stretch: var(--wide); line-height: 1.1; margin: 0; }
s { color: var(--muted); font-size: .85em; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 10; }

/* ---------- Cabecera y pie ---------- */
header.site {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px;
  max-width: 1120px; margin: 0 auto; padding: 18px 16px;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 850; font-stretch: var(--wide); font-size: 1.6rem; letter-spacing: -.01em;
  color: var(--ink); text-decoration: none;
}
.logo__mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
  background: var(--sticker); color: var(--sticker-ink); font-weight: 900; font-size: 1.3rem;
  transform: rotate(-6deg);
}
header.site nav { display: flex; gap: 6px; flex-wrap: wrap; }
header.site nav a {
  padding: 6px 12px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600;
}
header.site nav a:hover { background: var(--line); }
header.site nav a[aria-current] { background: var(--ink); color: var(--paper); }
header.site nav .tg { color: var(--brand); }

footer.site { border-top: 1px solid var(--line); margin-top: 64px; }
.foot { max-width: 72ch; margin: 0 auto; padding: 24px 16px 40px; color: var(--muted); font-size: .875rem; }
.foot__links { display: flex; gap: 20px; }

main { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* ---------- Bloques ---------- */
.intro { max-width: 46rem; padding: 24px 0 8px; }
.intro h1 { font-size: clamp(2rem, 6vw, 3.6rem); font-weight: 850; letter-spacing: -.02em; }
.intro p { color: var(--muted); font-size: 1.1rem; margin: 12px 0 0; }

.block { margin-top: 48px; }
.block__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.block__head h2 { font-size: 1.75rem; font-weight: 800; }
.block__head a { font-weight: 600; white-space: nowrap; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a {
  padding: 6px 14px; border: 1.5px solid var(--line); border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; background: var(--card);
}
.chips a:hover { border-color: var(--ink); }
.shortcuts { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.shortcuts h2 { font-size: 1.3rem; margin-bottom: 12px; }

.empty { color: var(--muted); padding: 24px; border: 1.5px dashed var(--line); border-radius: var(--radius); }
.ad { margin: 32px 0; }

/* ---------- La pegatina de precio (el elemento protagonista) ---------- */
.tag {
  position: relative; display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 10px;
  margin: 0; padding: 8px 14px 8px 22px;
  background: var(--sticker); color: var(--sticker-ink);
  border-radius: 4px 10px 10px 4px;
  transform: rotate(-2deg);
  box-shadow: 0 1px 0 rgba(28, 30, 69, .25);
}
.tag::before { /* agujero de la etiqueta */
  content: ""; position: absolute; left: 8px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px;
  border-radius: 50%; background: var(--paper);
}
.tag__price { font-weight: 900; font-stretch: 70%; font-size: 1.5rem; line-height: 1; font-variant-numeric: tabular-nums; }
.tag__pct {
  background: #C81E35; color: #fff; font-weight: 800; font-size: .85rem; /* fijo: va sobre el amarillo */
  padding: 2px 6px; border-radius: 4px;
}
.tag s { color: var(--sticker-ink); opacity: .7; font-size: .8rem; }
.tag__price, .tag s, .tag__pct { white-space: nowrap; }

/* ---------- Juegos gratis ---------- */
.frees { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.free {
  display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.free__img img { width: 100%; height: auto; aspect-ratio: 16 / 7.5; object-fit: cover; background: var(--line); }
.free__body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px; flex: 1; }
.free__title { font-size: 1.3rem; font-weight: 800; }
.free__where { margin: 0; color: var(--muted); font-size: .9rem; }
.free__time { margin: 0; font-size: .9rem; font-weight: 600; }
.free .btn { margin-top: auto; align-self: stretch; }

.hero { margin-top: 24px; }
.hero__lead { margin: 0 0 12px; font-weight: 600; color: var(--muted); }
.free--big { border-width: 2px; border-color: var(--ink); }
.free--big .free__title { font-size: clamp(1.8rem, 4.5vw, 2.8rem); font-weight: 850; }
.free--big .tag__price { font-size: 2.2rem; }
@media (min-width: 760px) {
  .free--big { flex-direction: row; }
  .free--big .free__img { flex: 1.5; }
  .free--big .free__img img { height: 100%; aspect-ratio: auto; min-height: 300px; }
  .free--big .free__body { flex: 1; padding: 28px; gap: 12px; }
  .free--big .btn { align-self: flex-start; padding-inline: 28px; }
}

/* ---------- Lista de ofertas ---------- */
.rows { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.row + .row { border-top: 1px solid var(--line); }
.row__link {
  display: grid; grid-template-columns: 120px 1fr auto; align-items: center; gap: 16px;
  padding: 12px 20px 12px 12px; color: inherit; text-decoration: none;
}
.row__link:hover .row__title { text-decoration: underline; }
.row__img { width: 120px; height: 56px; object-fit: cover; border-radius: 6px; background: var(--line); }
.row__main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row__title { font-weight: 700; font-size: 1.05rem; }
.row__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); font-size: .85rem; }
.row__meta img { width: 16px; height: 16px; display: inline; margin-right: -6px; }
.row .tag { justify-content: flex-end; }
@media (max-width: 600px) {
  .row__link { grid-template-columns: 80px 1fr; padding: 12px; gap: 6px 12px; }
  .row__img { width: 80px; height: 40px; }
  .row .tag { grid-column: 2; justify-self: start; flex-wrap: nowrap; padding: 6px 12px 6px 20px; }
  .row .tag__price { font-size: 1.3rem; }
  .row__title { font-size: 1rem; }
}

/* ---------- Filtros ---------- */
.filters {
  display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 24px 0 8px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.filters input, .filters select {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 42px;
}
.filters label:first-child { grid-column: 1 / -1; }
@media (min-width: 900px) { .filters label:first-child { grid-column: span 2; } }
.filters__count { color: var(--muted); font-weight: 600; margin: 8px 0; }

/* ---------- Botones ---------- */
.btn {
  display: inline-block; text-align: center; padding: 11px 18px; border-radius: 8px;
  background: var(--ink); color: var(--paper); font: inherit; font-weight: 700; text-decoration: none;
  border: 0; cursor: pointer;
}
.btn:hover { background: var(--brand); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); margin-top: 8px; }

/* ---------- Legales ---------- */
.legal { max-width: 70ch; padding-top: 24px; }
.legal h1 { font-size: 2.4rem; margin-bottom: 16px; }
.legal h2 { font-size: 1.3rem; margin: 28px 0 8px; }
