/* ==========================================================================
   DMRTOYS · Figuras de colección retro y actuales
   Paleta del logo: amarillo · rojo · azul · negro
   Mobile-first. Breakpoints: 640px (tablet), 900px (desktop), 1200px (wide)
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Colores del logo */
  --yellow: #ffd60a;
  --yellow-2: #ffe55c;
  --red: #e30022;
  --red-2: #ff2d4b;
  --blue: #1e4fa3;
  --blue-2: #2f6fe0;
  --blue-deep: #0e2a5e;
  --sale: #3ddc84;               /* precio en oferta */
  --ink: #0a0b0f;               /* negro (contornos y texto sobre amarillo) */

  /* Fondos */
  --bg: #0d0f14;
  --bg-2: #11141b;
  --surface: #171b25;
  --surface-2: #202533;
  --line: #2c3345;
  --line-soft: #1f2431;

  /* Texto */
  --text: #fffaf0;
  --muted: #b8c0d6;
  --faint: #7a8399;

  --wa: #25d366;
  --wa-ink: #062b14;

  /* Estados de conservación */
  --st-mint: var(--yellow);
  --st-moc: #7fb2ff;
  --st-exc: #ffffff;
  --st-used: #a9b1c6;

  /* Tipografía (la display imita el estilo del logo) */
  --font-display: "Luckiest Guy", "Arial Black", Impact, sans-serif;
  --font-head: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Space Mono", ui-monospace, Consolas, monospace;

  /* Forma y movimiento */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --pop: 4px 4px 0 var(--ink);               /* sombra "juguete" sólida */
  --shadow: 0 12px 30px -12px rgba(0, 0, 0, .7);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 72px;
  --gutter: 16px;
  /* contorno negro para títulos tipo logo */
  --stroke: 2px 2px 0 var(--ink), -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink), 0 2px 0 var(--ink), 2px 0 0 var(--ink), 0 -2px 0 var(--ink), -2px 0 0 var(--ink);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.no-scroll { overflow: hidden; }
/* margen para los anclas por el header fijo (en las secciones y no en html: con scroll-padding
   en html, el navegador movía la página al borrar en el buscador, que está dentro del header) */
section[id], footer[id] { scroll-margin-top: calc(var(--header-h) + 64px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-head); font-weight: 800; line-height: 1.1; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--yellow); color: var(--ink); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--yellow); color: var(--ink); font-weight: 700; }
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.icon { width: 20px; height: 20px; flex: none; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border-radius: 999px; border: 2.5px solid transparent;
  font-family: var(--font-head); font-weight: 800; font-size: 16px; line-height: 1.1;
  transition: transform .15s var(--ease), background-color .2s, box-shadow .15s, border-color .2s, color .2s;
  white-space: nowrap;
}
.btn--lg { min-height: 54px; padding: 14px 26px; font-size: 18px; }
.btn--block { width: 100%; }
.btn--yellow { background: var(--yellow); color: var(--ink); border-color: var(--ink); box-shadow: var(--pop); }
.btn--yellow:hover { background: var(--yellow-2); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn--yellow:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn--ghost { border-color: currentColor; color: var(--text); background: rgba(10, 11, 15, .25); }
.btn--ghost:hover { color: var(--yellow); }
.btn--wa { background: var(--wa); color: var(--wa-ink); border-color: var(--ink); box-shadow: var(--pop); }
.btn--wa:hover { background: #3be07a; transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn--wa:disabled { background: var(--surface-2); color: var(--faint); border-color: var(--line); box-shadow: none; cursor: not-allowed; transform: none; }
.btn--text { min-height: 40px; padding: 8px 10px; border: 0; color: var(--muted); font-family: var(--font-body); font-weight: 500; font-size: 15px; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line); }
.btn--text:hover { color: var(--yellow); text-decoration-color: currentColor; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  color: var(--text); transition: background-color .2s, color .2s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .12); color: var(--yellow); }

.eyebrow {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--yellow);
}

/* ---------- Header (azul, como el contorno del logo) ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, var(--blue), #1a448d);
  border-bottom: 4px solid var(--ink);
}
.header__bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "menu brand cart" "search search search";
  align-items: center;
  column-gap: 8px; row-gap: 10px;
  padding-block: 8px 12px;
}
.header__menu { grid-area: menu; margin-left: -8px; }
.brand { grid-area: brand; display: inline-flex; align-items: center; justify-self: start; min-height: 44px; }
.brand__logo { display: none; height: 46px; width: auto; transition: transform .25s var(--ease); }
.brand:hover .brand__logo { transform: rotate(-3deg) scale(1.04); }
.brand.has-logo .brand__logo { display: block; }
.brand.has-logo .brand__word { display: none; }
.brand__word { font-family: var(--font-display); font-size: 28px; color: var(--yellow); text-shadow: var(--stroke); letter-spacing: .02em; }
.brand__word span { color: var(--red); }

.nav {
  position: fixed; left: 0; right: 0; top: var(--nav-top, 64px);
  display: grid; padding: 8px var(--gutter) 20px;
  background: var(--blue-deep); border-bottom: 4px solid var(--ink);
  box-shadow: var(--shadow);
  transform: translateY(-8px); opacity: 0; visibility: hidden;
  transition: opacity .2s, transform .25s var(--ease), visibility .2s;
}
.nav.is-open { transform: none; opacity: 1; visibility: visible; }
.nav a { padding: 14px 4px; border-bottom: 1px solid rgba(255, 255, 255, .12); font-family: var(--font-head); font-weight: 700; font-size: 18px; }
.nav a:hover { color: var(--yellow); }

.search {
  grid-area: search;
  display: flex; align-items: center;
  height: 46px; border-radius: 999px;
  background: var(--bg-2); border: 2.5px solid var(--ink);
  transition: box-shadow .2s;
}
.search:focus-within { box-shadow: 0 0 0 3px var(--yellow); }
.search__scope {
  height: 100%; padding: 0 28px 0 16px; border: 0; border-right: 2px solid var(--ink);
  border-radius: 999px 0 0 999px;
  background: var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a0b0f' stroke-width='3'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 12px;
  appearance: none; -webkit-appearance: none;
  font-size: 13px; font-weight: 700; color: var(--ink); cursor: pointer;
}
.search__scope option { background: var(--surface); color: var(--text); }
.search__input {
  flex: 1; min-width: 0; height: 100%; padding: 0 12px;
  border: 0; background: transparent; outline: none; font-size: 15px;
}
.search__input::placeholder { color: var(--faint); }
.search__input::-webkit-search-cancel-button { filter: grayscale(1) brightness(1.6); }
.search__btn { display: grid; place-items: center; width: 46px; height: 100%; color: var(--muted); }
.search__btn:hover { color: var(--yellow); }

.cart-btn {
  grid-area: cart; position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 14px 0 12px; border-radius: 999px;
  background: var(--yellow); color: var(--ink); border: 2.5px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--font-head); font-weight: 800; font-size: 16px;
  transition: transform .15s var(--ease), box-shadow .15s;
}
.cart-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.cart-btn__label { display: none; }
.cart-btn__count {
  display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px;
  border-radius: 999px; background: var(--red); color: #fff; border: 2px solid var(--ink);
  font: 700 12px/1 var(--font-mono);
}
.cart-btn.bump { animation: bump .45s var(--ease); }
@keyframes bump { 30% { transform: scale(1.12) rotate(-4deg); } 60% { transform: scale(.96); } }

/* ---------- Hero: cielo azul con nubes ---------- */
.hero {
  position: relative; overflow: hidden;
  padding-top: 40px;
  background: linear-gradient(180deg, var(--blue-2) 0%, var(--blue) 55%, var(--blue-deep) 100%);
}
.hero__clouds { position: absolute; inset: 0; pointer-events: none; }
.cloud {
  position: absolute; width: 220px; height: 70px; border-radius: 999px;
  background: #fff; opacity: .16; filter: blur(1px);
}
.cloud::before, .cloud::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.cloud::before { width: 100px; height: 100px; left: 34px; top: -50px; }
.cloud::after { width: 70px; height: 70px; left: 112px; top: -32px; }
.cloud--1 { left: -60px; top: 40px; }
.cloud--2 { right: -40px; top: 120px; transform: scale(1.3); }
.cloud--3 { left: 40%; top: 360px; transform: scale(.8); opacity: .1; }
.cloud--4 { left: 8%; bottom: 60px; transform: scale(.9); opacity: .08; }

.hero__grid { position: relative; display: grid; gap: 40px; padding-bottom: 52px; }
.hero__copy .eyebrow { color: var(--yellow); text-shadow: 1px 1px 0 var(--ink); }
.hero__title {
  margin-top: 14px;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(42px, 11.5vw, 84px); line-height: .98; letter-spacing: .01em;
  color: var(--yellow);
  text-shadow: var(--stroke), 5px 6px 0 var(--ink);
}
/* "retro y actuales" sobre una banda roja como la base del logo */
.hero__title em {
  display: inline-block; margin-top: 10px; padding: .12em .32em .02em;
  font-style: normal; font-size: .62em;
  background: var(--red); border: 4px solid var(--ink); border-radius: 10px;
  box-shadow: 6px 6px 0 var(--ink);
  transform: rotate(-2deg);
}
.hero__lead { margin-top: 24px; max-width: 34em; color: #e6eeff; font-size: 17px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero__ctas .btn { flex: 1 1 auto; }
.hero__facts {
  display: flex; flex-wrap: wrap; gap: 10px 22px;
  margin: 28px 0 0; padding: 0; list-style: none;
  color: #d4e0ff; font-size: 14px;
}
.hero__facts li::before { content: "★"; margin-right: 8px; color: var(--yellow); }
.hero__facts strong { color: #fff; font-weight: 700; }

/* proximamente.html: título + recuadro "te avisamos por WhatsApp" */
.hero--proximo .hero__grid { padding-bottom: 44px; }
.hero--proximo .hero__title { font-size: clamp(38px, 9.5vw, 72px); }
.aviso-box {
  align-self: center; padding: 22px;
  background: var(--bg-2); border: 3px solid var(--ink); border-radius: var(--radius-lg);
  box-shadow: 6px 6px 0 var(--ink);
}
.aviso-box h2 { font-family: var(--font-display); font-weight: 400; font-size: 26px; color: var(--yellow); text-shadow: var(--stroke); }
.aviso-box p { margin-top: 10px; color: var(--muted); }
.aviso-box .btn { width: 100%; margin-top: 18px; }
.aviso-box small { display: block; margin-top: 12px; color: var(--faint); font-size: 13px; }

/* Vitrina de piezas destacadas */
.hero__lado { display: grid; gap: 30px; justify-items: center; }
.vitrina__titulo {
  padding: 6px 18px 4px; border-radius: var(--radius-sm); transform: rotate(-2deg);
  background: var(--red); color: var(--yellow); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  font: 400 clamp(30px, 7vw, 46px)/1.1 var(--font-display); letter-spacing: .04em; text-transform: uppercase; text-shadow: 2px 2px 0 var(--ink);
  transition: transform .2s var(--ease);
}
.vitrina__titulo:hover { transform: rotate(0) scale(1.05); }
.hero__lado .hero__vitrina { width: 100%; }
.hero__vitrina {
  position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  align-items: end; min-height: 220px;
}
.showcase {
  position: relative; display: block; text-align: left;
  border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.showcase:nth-child(1) { transform: rotate(-4deg) translateY(8px); }
.showcase:nth-child(2) { transform: translateY(-14px); z-index: 1; }
.showcase:nth-child(3) { transform: rotate(4deg) translateY(8px); }
.showcase:hover { transform: translateY(-22px) rotate(0); box-shadow: 8px 10px 0 var(--ink); z-index: 2; }
.showcase img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--surface-2); }
.showcase__tag {
  position: absolute; left: 6px; right: 6px; bottom: 6px;
  padding: 5px 8px; border-radius: var(--radius-sm);
  background: var(--yellow); color: var(--ink); border: 2px solid var(--ink);
  font-size: 11px; line-height: 1.3;
}
.showcase__tag b { display: block; font-family: var(--font-mono); font-size: 12px; }
.showcase__tag span { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; font-weight: 500; }

.hero__marquee {
  position: relative; overflow: hidden;
  border-block: 4px solid var(--ink);
  background: var(--red); color: var(--yellow);
  font: 400 18px/1 var(--font-display); letter-spacing: .06em; text-transform: uppercase;
  text-shadow: 2px 2px 0 var(--ink);
}
.marquee__track { display: flex; gap: 28px; width: max-content; padding: 13px 0 10px; animation: marquee 38s linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Secciones ---------- */
.section { padding-block: 64px; }
.section__head { margin-bottom: 28px; }
.section__head--row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; }
.section__title {
  margin-top: 8px;
  font-family: var(--font-display); font-weight: 400; letter-spacing: .01em;
  font-size: clamp(32px, 7vw, 52px); line-height: 1;
  color: var(--text); text-shadow: 3px 3px 0 var(--blue);
}

/* ---------- Franquicias ---------- */
.section--franq { background: var(--bg-2); border-bottom: 4px solid var(--ink); }
.franq { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.franq__item {
  position: relative; display: flex; flex-direction: column; overflow: hidden; text-align: left;
  border-radius: var(--radius); border: 3px solid var(--ink); background: var(--surface);
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.franq__item:hover { transform: translate(-2px, -3px); box-shadow: 6px 7px 0 var(--ink); }
.franq__item img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--surface-2); transition: transform .5s var(--ease); }
.franq__item:hover img { transform: scale(1.06); }
/* logos: se ven enteros (sin recorte) sobre fondo negro */
.franq__item img.franq__logo { object-fit: contain; background: #000; padding: 8%; }
.franq__label { display: grid; gap: 0; padding: 7px 9px 8px; border-top: 3px solid var(--ink); }
.franq__name { font-family: var(--font-head); font-weight: 800; font-size: 14px; line-height: 1.15; }
.franq__count { font: 400 10.5px var(--font-mono); opacity: .8; }
/* las etiquetas alternan los tres colores del logo */
.franq__item:nth-child(3n+1) .franq__label { background: var(--yellow); color: var(--ink); }
.franq__item:nth-child(3n+2) .franq__label { background: var(--red); color: #fff; }
.franq__item:nth-child(3n) .franq__label { background: var(--blue); color: #fff; }

/* ---------- Categorías ---------- */
.cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cat {
  position: relative; display: grid; gap: 10px; align-content: start;
  min-height: 150px; padding: 18px; text-align: left;
  border-radius: var(--radius); border: 2px solid var(--line);
  background: var(--surface);
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
}
.cat:hover { transform: translate(-2px, -3px); border-color: var(--ink); box-shadow: 6px 6px 0 var(--blue); }
.cat__avatar { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; border: 3px solid var(--ink); box-shadow: 0 0 0 3px var(--yellow); background: var(--surface-2); }
.cat:nth-child(3n+2) .cat__avatar { box-shadow: 0 0 0 3px var(--red); }
.cat:nth-child(3n) .cat__avatar { box-shadow: 0 0 0 3px var(--blue-2); }
.cat__avatar img { width: 100%; height: 100%; object-fit: cover; }
.cat__name { font-family: var(--font-head); font-size: 19px; font-weight: 800; line-height: 1.1; }
.cat__count { font: 400 12px var(--font-mono); color: var(--faint); }

/* ---------- Catálogo: chips y filtros ---------- */
/* min-height: al buscar con pocos resultados la página no se achica de golpe (evita saltos de scroll) */
.section--catalog { background: var(--bg); border-top: 1px solid var(--line-soft); min-height: 100vh; }
.results { font: 400 13px var(--font-mono); color: var(--muted); }

.chips {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 14px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
}
.chips::-webkit-scrollbar { display: none; }
/* en pantallas grandes las categorías bajan de renglón: se ven todas sin tener que deslizar */
@media (min-width: 640px) {
  .chips { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; }
}
.chip {
  flex: none; height: 40px; padding: 0 16px; border-radius: 999px;
  border: 2px solid var(--line); background: var(--surface);
  font-family: var(--font-head); font-size: 15px; font-weight: 700; color: var(--muted);
  transition: all .15s;
}
.chip:hover { color: var(--text); border-color: var(--faint); }
.chip[aria-pressed="true"] { background: var(--yellow); border-color: var(--ink); color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }

.filters {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; align-items: end;
  padding: 14px; margin-bottom: 24px;
  border-radius: var(--radius); background: var(--surface); border: 2px solid var(--line-soft);
}
.field { display: grid; gap: 4px; min-width: 0; }
.field span { font: 700 11px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.field select {
  width: 100%; height: 42px; padding: 0 32px 0 12px;
  border-radius: var(--radius-sm); border: 2px solid var(--line);
  background: var(--bg-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffd60a' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 12px;
  appearance: none; -webkit-appearance: none; font-size: 14px; cursor: pointer;
}
.field select:hover, .field select:focus { border-color: var(--yellow); outline: none; }
.field select option { background: var(--surface); }
.filters .btn--text { grid-column: 1 / -1; justify-self: start; }

/* ---------- Novedades ---------- */
.section--novedades .section__head { align-items: end; }
/* en celular se muestran 6 novedades para que la sección no quede tan larga */
@media (max-width: 639px) { .grid--novedades > .card:nth-child(n+7) { display: none; } }

/* ---------- Tarjetas de producto ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.card {
  position: relative; display: flex; flex-direction: column;
  border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 2px solid var(--line);
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
  animation: cardIn .45s var(--ease) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(14px); } }
.card:hover { transform: translate(-2px, -3px); border-color: var(--ink); box-shadow: 6px 6px 0 var(--blue); }
.card__media { position: relative; display: block; width: 100%; aspect-ratio: 1; overflow: hidden; background: var(--surface-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), opacity .4s; }
.card__media img + img { position: absolute; inset: 0; opacity: 0; }
.card:hover .card__media img:first-child { transform: scale(1.05); }
.card:hover .card__media img + img { opacity: 1; }
.card__photos {
  position: absolute; right: 8px; bottom: 8px;
  padding: 3px 8px; border-radius: 999px;
  background: rgba(10, 11, 15, .85); font: 700 11px var(--font-mono); color: var(--text);
}
.card__flags { position: absolute; left: 8px; top: 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.card__body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 12px; }
.card__meta { font: 400 11px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.card__title { font-family: var(--font-head); font-size: 16px; font-weight: 700; line-height: 1.2; text-align: left; }
.card__title:hover { color: var(--yellow); }
.card__foot { display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding-top: 6px; }
.card__foot .btn { width: 100%; min-height: 42px; padding: 8px 12px; font-size: 15px; white-space: normal; box-shadow: 3px 3px 0 var(--ink); }
.card__flags .badge { font-size: 9.5px; padding: 2px 6px; }
.card__buy { display: flex; }
.card__foot .card__buy { width: 100%; }
/* Selector de cantidad en la tarjeta: mismo diseño que el del carrito (− 2 +) */
.card__buy .qty--card { width: 100%; height: 42px; justify-content: space-between; border-color: var(--yellow); }
.card__buy .qty--card button { width: 42px; height: 100%; color: var(--yellow); }
.card__buy .qty--card button:hover:not(:disabled) { color: var(--yellow-2); background: rgba(255, 214, 10, .1); }
.card__buy .qty--card .icon { width: 18px; height: 18px; }
.card__buy .qty--card output { flex: 1; font-size: 16px; color: var(--text); }
.card__foot .btn.is-added { background: var(--surface-2); color: var(--yellow); border-color: var(--yellow); box-shadow: none; }

.price { font: 700 18px var(--font-mono); color: var(--yellow); letter-spacing: -.02em; }
.price--lg { font-size: 30px; }
/* Oferta: precio nuevo en verde, el anterior tachado y el % en rojo */
.precios { display: flex; flex-direction: column; gap: 2px; line-height: 1.15; }
.price--oferta { color: var(--sale); }
.precio-antes { display: flex; align-items: center; gap: 8px; font: 400 14px var(--font-mono); color: var(--faint); }
.precio-antes .off { padding: 2px 7px; border-radius: 6px; background: var(--red); color: #fff; font: 700 13px var(--font-body); text-decoration: none; }
.price--lg + .precio-antes { font-size: 17px; }
.price--lg + .precio-antes .off { font-size: 15px; }

/* ---------- Badges ---------- */
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 6px;
  font: 700 10.5px/1.4 var(--font-mono); letter-spacing: .05em; text-transform: uppercase;
  border: 1.5px solid currentColor; background: rgba(10, 11, 15, .85);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--mint { color: var(--st-mint); }
.badge--moc { color: var(--st-moc); }
.badge--blister { color: #5fe08a; }
.badge--bolsa { color: #ffa94d; }
.badge--exc { color: var(--st-exc); }
.badge--used { color: var(--st-used); }
.badge--era { color: var(--muted); border-color: var(--line); }
.badge--era::before { display: none; }
.badge--limited { color: var(--yellow); background: var(--red); border: 2px solid var(--ink); }
.badge--oferta { color: var(--ink); background: var(--sale); border: 2px solid var(--ink); }
.badge--ultima { color: #fff; background: var(--red); border: 2px solid var(--ink); }
.badge--ultima::before { background: var(--yellow); }
.badge--llegada { color: var(--ink); background: var(--yellow); border: 2px solid var(--ink); }
.badge--llegada::before { background: var(--red); }
.badge--agotado { color: #fff; background: var(--ink); border: 2px solid var(--red); }
.badge--agotado::before { background: var(--red); }
.card.is-agotado .card__media img { filter: grayscale(.85); opacity: .7; }
.btn--yellow:disabled { background: var(--surface-2); color: var(--faint); border-color: var(--line); box-shadow: none; cursor: not-allowed; transform: none; }
.badge--limited::before { content: "★"; width: auto; height: auto; background: none; font-size: 10px; }

/* ---------- Estado vacío ---------- */
.empty { padding: 48px 20px; text-align: center; border: 2px dashed var(--line); border-radius: var(--radius-lg); color: var(--muted); }
.empty__title { margin-bottom: 6px; font-family: var(--font-head); font-weight: 800; font-size: 22px; color: var(--text); }
.empty__ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }

/* ---------- Paginación del catálogo ---------- */
.pag { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 32px; }
.pag:empty { display: none; }
.pag button { min-width: 40px; height: 40px; padding: 0 10px; border: 2px solid transparent; border-radius: 10px; background: none; color: var(--muted); font: 700 16px var(--font-body); cursor: pointer; transition: color .15s, border-color .15s; }
.pag button:hover { color: var(--text); border-color: var(--line); }
.pag__num[aria-current="page"] { color: var(--ink); background: var(--yellow); border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.pag__gap { color: var(--muted); padding: 0 4px; }

/* ---------- Footer ---------- */
.footer { padding-top: 56px; background: var(--blue-deep); border-top: 4px solid var(--ink); }
.footer__grid { display: grid; gap: 36px; padding-bottom: 40px; }
.footer__logo { width: 170px; height: auto; }
.footer__brand p { max-width: 32em; margin-top: 14px; color: #c9d6f5; font-size: 15px; }
.footer__col { display: grid; align-content: start; gap: 10px; }
/* categorías del footer en varias columnas para que no quede tan largo */
#footerCategorias { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
@media (min-width: 360px) { #footerCategorias { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 14px; } }
#footerCategorias h4 { grid-column: 1 / -1; }
.footer__col h4 { margin-bottom: 4px; font: 700 12px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--yellow); }
.footer__col a { color: #c9d6f5; font-size: 15px; width: fit-content; }
.footer__col a:hover { color: #fff; }
.footer__note { color: #8fa3cf; font-size: 13px; }
.socials { display: flex; gap: 10px; margin-top: 20px; }
.socials a {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  border: 2.5px solid var(--ink); background: var(--yellow); color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .15s var(--ease), box-shadow .15s, background-color .2s;
}
.socials a:nth-child(2) { background: var(--red); color: #fff; }
.socials a:nth-child(3) { background: var(--blue-2); color: #fff; }
.socials a:nth-child(4) { background: var(--wa); color: var(--wa-ink); }
.socials a:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.footer__bottom { display: grid; gap: 4px; padding-block: 20px 96px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 13px; color: #8fa3cf; }

/* ---------- WhatsApp flotante ---------- */
.wa-fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
  background: var(--wa); color: var(--wa-ink); border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .2s var(--ease);
}
.wa-fab .icon { width: 28px; height: 28px; }
.wa-fab:hover { transform: scale(1.08) rotate(-6deg); }

/* ---------- Dialogs (modal y carrito) ---------- */
dialog { padding: 0; border: 0; color: var(--text); background: transparent; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(5, 8, 20, .75); backdrop-filter: blur(4px); }

/* Modal de producto: pantalla completa en mobile, centrado en desktop */
.modal { width: 100%; height: 100%; margin: 0; }
.modal[open] { animation: modalIn .3s var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: translateY(24px); } }
.modal__inner { position: relative; height: 100%; overflow-y: auto; background: var(--bg-2); }
.modal__close { position: absolute; right: 10px; top: 10px; z-index: 3; background: var(--yellow); color: var(--ink); border: 2.5px solid var(--ink); }
.modal__close:hover { background: var(--yellow-2); color: var(--ink); }

.gallery { background: var(--surface); }
/* touch-action: none → los gestos (zoom, pellizco, deslizar) los maneja script.js */
.gallery__stage { position: relative; aspect-ratio: 1; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; cursor: zoom-in; background: #fff; }
.gallery__stage.is-zoomed { cursor: zoom-out; }
.gallery__img {
  width: 100%; height: 100%; object-fit: contain; background: var(--surface-2);
  transform-origin: center; will-change: transform;
  transition: transform .25s var(--ease), opacity .2s;
  animation: fadeIn .3s;
  -webkit-user-drag: none;
}
.gallery__img.sin-transicion { transition: none; }
.gallery__img.entra-der { animation: entraDer .3s var(--ease); }
.gallery__img.entra-izq { animation: entraIzq .3s var(--ease); }
@keyframes fadeIn { from { opacity: .3; } }
@keyframes entraDer { from { opacity: 0; transform: translateX(60px); } }
@keyframes entraIzq { from { opacity: 0; transform: translateX(-60px); } }

.gallery__zoombtn {
  position: absolute; right: 12px; bottom: 12px;
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--yellow); color: var(--ink); border: 2.5px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
}
.gallery__zoombtn:hover { background: var(--yellow-2); }
.gallery__hint {
  position: absolute; left: 50%; top: 12px; translate: -50% 0;
  max-width: calc(100% - 120px); padding: 4px 12px; border-radius: 999px;
  background: rgba(10, 11, 15, .72); color: #fff; font-size: 12px; text-align: center; line-height: 1.3; white-space: nowrap;
  pointer-events: none; transition: opacity .25s;
  animation: hintOut .4s 3.5s forwards;   /* se oculta solo a los 3,5 s */
}
@keyframes hintOut { to { opacity: 0; visibility: hidden; } }
.gallery__stage.is-zoomed .gallery__hint,
.gallery__stage.is-zoomed .gallery__nav { opacity: 0; pointer-events: none; }
.hint--mouse { display: none; }
@media (hover: hover) and (pointer: fine) {
  .hint--mouse { display: inline; }
  .hint--touch { display: none; }
}
.gallery__nav {
  position: absolute; top: 50%; translate: 0 -50%;
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(10, 11, 15, .8); color: var(--text); border: 2px solid var(--line);
  transition: background-color .2s, color .2s;
}
.gallery__nav:hover { background: var(--yellow); color: var(--ink); border-color: var(--ink); }
.gallery__nav--prev { left: 10px; }
.gallery__nav--next { right: 10px; }
.gallery__nav[hidden] { display: none; }
.gallery__counter {
  position: absolute; left: 12px; bottom: 12px; padding: 4px 10px; border-radius: 999px;
  background: rgba(10, 11, 15, .85); font: 700 12px var(--font-mono);
}
.gallery__thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; scrollbar-width: thin; }
.gallery__thumbs:empty { display: none; }
.thumb {
  flex: none; width: 64px; height: 64px; border-radius: var(--radius-sm); overflow: hidden;
  border: 3px solid transparent; opacity: .55; transition: opacity .2s, border-color .2s;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Fotos reales de producto (fondo blanco): se muestran completas, sin recortar.
   Los placeholders (data-fallback) mantienen su estilo oscuro. */
img[data-pid]:not([data-fallback]) { object-fit: contain; background: #fff; }
.thumb:hover { opacity: .9; }
.thumb[aria-current="true"] { border-color: var(--yellow); opacity: 1; }

.detail { display: flex; flex-direction: column; gap: 14px; padding: 22px var(--gutter) 32px; }
.detail .eyebrow { padding-right: 48px; }
.detail__title { font-size: clamp(26px, 6vw, 36px); }
.detail__desc { color: var(--muted); }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 0; margin: 0; border-top: 1px solid var(--line-soft); }
.specs dt, .specs dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.specs dt { padding-right: 18px; font: 700 11px/2 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.detail__buy { display: grid; gap: 12px; margin-top: 4px; }
.detail__buy .btn { white-space: normal; text-align: center; }

/* Carrito como panel lateral */
.drawer { width: 100%; max-width: 440px; height: 100%; margin: 0 0 0 auto; }
.drawer[open] { animation: drawerIn .35s var(--ease); }
@keyframes drawerIn { from { transform: translateX(100%); } }
.drawer__inner {
  display: flex; flex-direction: column; height: 100%;
  background: var(--bg-2); border-left: 4px solid var(--ink);
}
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 20px; background: var(--blue); border-bottom: 4px solid var(--ink); }
.drawer__head h3 { font-family: var(--font-display); font-weight: 400; font-size: 28px; color: var(--yellow); text-shadow: var(--stroke); letter-spacing: .02em; }

.cart-list { flex: 1; overflow-y: auto; margin: 0; padding: 8px 20px; list-style: none; }
.cart-item { display: grid; grid-template-columns: 72px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.cart-item img { width: 72px; height: 72px; border-radius: var(--radius-sm); border: 2px solid var(--ink); object-fit: cover; background: var(--surface-2); }
.cart-item__name { font-family: var(--font-head); font-weight: 700; font-size: 15px; line-height: 1.25; }
.cart-item__meta { margin-top: 2px; font: 400 11px var(--font-mono); color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
.cart-item__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.cart-item__price { font: 700 15px var(--font-mono); color: var(--yellow); }
.qty { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 999px; }
.qty button { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--muted); }
.qty button:hover:not(:disabled) { color: var(--yellow); }
.qty button:disabled { opacity: .35; cursor: not-allowed; }
.qty .icon { width: 16px; height: 16px; }
.qty output { min-width: 26px; text-align: center; font: 700 14px var(--font-mono); }
.cart-item__remove { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--faint); }
.cart-item__remove:hover { color: var(--red-2); background: rgba(227, 0, 34, .14); }
.cart-item__remove .icon { width: 18px; height: 18px; }

.cart-empty { flex: 1; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 40px 20px; color: var(--muted); text-align: center; }
.cart-empty[hidden] { display: none; }
.cart-empty__icon { width: 56px; height: 56px; color: var(--line); }

.drawer__foot { display: grid; gap: 12px; padding: 16px 20px 20px; border-top: 3px solid var(--ink); background: var(--surface); }
.drawer__foot[hidden] { display: none; }
.cart-total { display: flex; align-items: baseline; justify-content: space-between; }
.cart-total span { font-family: var(--font-head); font-size: 20px; font-weight: 800; }
.cart-total small { font: 400 12px var(--font-mono); color: var(--faint); }
.cart-total strong { font: 700 26px var(--font-mono); color: var(--yellow); }
.cart-note { font-size: 13px; color: var(--faint); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 88px; z-index: 300;
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 999px;
  background: var(--yellow); color: var(--ink); border: 2.5px solid var(--ink);
  box-shadow: var(--pop); font-family: var(--font-head); font-weight: 800; font-size: 15px;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .3s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   ≥ 640px · Tablet
   ========================================================================== */
@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .hero__ctas .btn { flex: 0 0 auto; }
  .franq { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .franq__name { font-size: 16px; }
  .cats { grid-template-columns: repeat(3, 1fr); }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .card__body { padding: 14px; }
  .card__title { font-size: 17px; }
  .filters { grid-template-columns: repeat(4, 1fr); }
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__bottom { grid-auto-flow: column; justify-content: space-between; padding-bottom: 24px; }
  .cart-btn__label { display: inline; }

  /* Modal centrado tipo tarjeta */
  .modal { width: min(1040px, calc(100% - 48px)); height: auto; max-height: calc(100% - 48px); margin: auto; border-radius: var(--radius-lg); overflow: hidden; }
  .modal__inner { max-height: calc(100vh - 48px); border: 4px solid var(--ink); border-radius: var(--radius-lg); }
}

/* ==========================================================================
   ≥ 900px · Desktop
   ========================================================================== */
@media (min-width: 900px) {
  :root { --header-h: 84px; }
  section[id], footer[id] { scroll-margin-top: calc(var(--header-h) + 16px); }
  .header__bar {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    grid-template-areas: "brand nav search cart";
    column-gap: 24px; min-height: var(--header-h); padding-block: 8px;
  }
  .header__menu { display: none; }
  .brand__logo { height: 62px; }
  .nav {
    position: static; display: flex; gap: 2px; padding: 0;
    background: none; border: 0; box-shadow: none;
    transform: none; opacity: 1; visibility: visible;
  }
  .nav a { position: relative; padding: 8px 10px; border: 0; font-size: 16px; color: #fff; }
  .nav a::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 3px; border-radius: 2px; background: var(--yellow); transform: scaleX(0); transition: transform .2s var(--ease); }
  .nav a:hover { color: var(--yellow); }
  .nav a:hover::after { transform: scaleX(1); }
  .search { max-width: 440px; justify-self: end; width: 100%; }

  .hero { padding-top: 72px; }
  .hero__grid { grid-template-columns: 1.1fr .9fr; align-items: center; gap: 56px; padding-bottom: 88px; }
  .hero__vitrina { gap: 16px; }
  .hero__grid--vitrina .hero__vitrina { gap: 22px; }
  .hero__title { font-size: min(84px, 7.2vw); }
  .showcase__tag { font-size: 12px; }

  .section { padding-block: 96px; }
  .section__head { margin-bottom: 36px; }
  .franq { grid-template-columns: repeat(5, 1fr); gap: 18px; }
  .cats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
  .cat { min-height: 190px; padding: 22px; }

  .filters { grid-template-columns: repeat(4, 1fr) auto; padding: 16px; }
  .filters .btn--text { grid-column: auto; justify-self: end; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .card__foot { flex-direction: row; align-items: center; justify-content: space-between; }
  .card__foot .btn { width: auto; }
  .card__foot .card__buy { width: auto; }
  .card__foot .qty--card { width: 128px; }

  .modal__inner { display: grid; grid-template-columns: 1.05fr 1fr; overflow: hidden; }
  .gallery { display: flex; flex-direction: column; min-height: 0; border-right: 4px solid var(--ink); }
  .gallery__stage { flex: 1; aspect-ratio: auto; min-height: 420px; }
  .detail { min-width: 0; padding: 40px 36px; overflow-y: auto; max-height: calc(100vh - 56px); }

  .footer__grid { grid-template-columns: 1.4fr .8fr 1.8fr 1.1fr; }
  .footer__brand { grid-column: auto; }
  .wa-fab { right: 24px; bottom: 24px; }
}

@media (min-width: 1200px) {
  /* pantallas anchas: el footer usa más ancho y cada categoría entra en un solo renglón */
  .footer .container { max-width: 1520px; }
  .footer__grid { grid-template-columns: minmax(260px, 1.2fr) auto auto minmax(220px, 1fr); column-gap: clamp(32px, 4vw, 72px); }
  #footerCategorias { grid-template-columns: repeat(3, max-content); column-gap: 40px; }
  #footerCategorias a { white-space: nowrap; }
  .grid { grid-template-columns: repeat(4, 1fr); }
  .hero__grid--vitrina { grid-template-columns: 1.1fr 1fr; gap: 48px; }
  .hero__grid--vitrina .hero__facts { flex-wrap: nowrap; gap: 10px 18px; white-space: nowrap; }
}

/* Respeta usuarios que prefieren menos movimiento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Producto sin precio: se consulta por WhatsApp */
.price--consultar { font-size: 0.8em; white-space: nowrap; }

/* Links legales del pie */
.footer__legal a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.footer__legal a:hover { color: var(--yellow); }
