/* =============================================================================
   SILLORNO — hoja de estilos única
   1 Tokens · 2 Reset · 3 Utilidades · 4 Tipografía · 5 Componentes
   6 Header · 7 Hero · 8 Categorías · 9 Catálogo · 10 Ficha · 11 Carrito
   12 Combos · 13 Editorial e info · 14 Footer · 15 Animaciones · 16 Responsive
   ========================================================================== */

/* ============================================================  1. TOKENS  */
:root {
  /* Fondo: negro cálido con matiz vino. Nunca #000 puro. */
  --bg:        #17110E;
  --bg-2:      #1C1512;
  --bg-3:      #241B17;
  --bg-4:      #2C211C;

  /* Texto: crema, nunca blanco puro sobre oscuro */
  --cream:     #F2EBE4;
  --cream-2:   #D4C8C0;
  --cream-3:   #9A8B85;

  /* Acento: terracota, el mismo tono que la foto del hero */
  --wine-deep: #4A2A18;
  --wine:      #A8603A;
  --wine-lift: #C17847;
  --wine-soft: #D6A684;

  --gold:      #C9A87C;
  --ok:        #7FA37F;
  --warn:      #C9A15B;

  /* Alias del acento del hero — mismo color que --wine, se usan por separado
     porque nacieron en el mockup del hero antes de unificar la paleta. */
  --rust:      var(--wine);
  --rust-soft: var(--wine-soft);

  --line:      rgba(242, 235, 228, .10);
  --line-2:    rgba(242, 235, 228, .20);

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --wrap: 1320px;
  --pad: clamp(1.15rem, 4vw, 3rem);
  --header-h: 62px;
  --radius: 3px;

  /* Le avisa al navegador que el sitio es oscuro: así las barras de scroll,
     los desplegables nativos y los diálogos usan sus colores oscuros. */
  color-scheme: dark;
}

/* =============================================================  2. RESET  */
*, *::before, *::after { box-sizing: border-box; margin: 0; }

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.65;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

/* El atributo hidden tiene que ganarle a cualquier display que pongamos abajo */
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font: inherit; color: inherit; }
p { text-wrap: pretty; }

svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

::selection { background: var(--wine); color: var(--cream); }

:focus-visible {
  outline: 2px solid var(--wine-soft);
  outline-offset: 3px;
  border-radius: 2px;
}

/* =========================================================  3. UTILIDADES */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 999;
  padding: .7rem 1.1rem; background: var(--cream); color: var(--bg);
  font-weight: 500; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

.noscript {
  padding: 1.5rem; margin: 1rem; text-align: center;
  border: 1px solid var(--line-2); background: var(--bg-3);
}

/* ========================================================  4. TIPOGRAFÍA  */
.kicker {
  font-size: .68rem; font-weight: 500; letter-spacing: .22em;
  text-transform: uppercase; color: var(--cream-3);
}

.sec-head { margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.sec-head .kicker { margin-bottom: .9rem; }

.sec-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.sec-title em { font-style: italic; color: var(--wine-soft); }

/* ======================================================  5. COMPONENTES  */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .82rem 1.5rem;
  font-size: .84rem; font-weight: 500; letter-spacing: .04em;
  border-radius: var(--radius);
  transition: background .35s var(--ease-out), color .35s var(--ease-out),
              border-color .35s var(--ease-out), transform .35s var(--ease-out);
  text-align: center;
}
.btn:active { transform: scale(.985); }

.btn-primary { background: var(--wine); color: var(--cream); }
.btn-primary:hover { background: var(--wine-lift); }

.btn-ghost { border: 1px solid var(--line-2); color: var(--cream); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(242, 235, 228, .09); border-color: var(--cream-3); }

.btn-line { border: 1px solid var(--line-2); color: var(--cream-2); }
.btn-line:hover { border-color: var(--cream-3); color: var(--cream); background: var(--bg-4); }

.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn:disabled:active { transform: none; }

.btn-wa { width: 100%; padding-block: 1rem; }
.ico-wa { width: 18px; height: 18px; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  color: var(--cream-2);
  transition: background .3s var(--ease-out), color .3s var(--ease-out);
}
.icon-btn:hover { background: var(--bg-4); color: var(--cream); }
.icon-btn svg { width: 20px; height: 20px; }

.pill {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px;
  padding-inline: 5px; border-radius: 999px;
  background: var(--wine); color: var(--cream);
  font-size: .65rem; font-weight: 600;
}

.tag {
  display: inline-block; padding: .2rem .55rem;
  font-size: .64rem; letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid var(--line-2); color: var(--cream-3); border-radius: 2px;
}

/* Puntos de color de cada producto */
.dots { display: flex; gap: 5px; flex-wrap: wrap; }
.dots i {
  width: 13px; height: 13px; border-radius: 50%;
  border: 1px solid rgba(242, 235, 228, .3);
  display: block;
}

/* Swatches de color clickeables (cambian la foto de la ficha) */
.swatches { display: flex; gap: .6rem; flex-wrap: wrap; }
.swatch {
  position: relative; width: 30px; height: 30px; border-radius: 50%;
  background: var(--sw, #888);
  border: 1px solid rgba(242, 235, 228, .35);
  cursor: pointer; padding: 0;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.swatch:hover { transform: scale(1.08); }
/* Un color que tiene foto propia muestra un puntito para invitar a tocarlo */
.swatch.has-foto::after {
  content: ""; position: absolute; inset: auto 2px 2px auto;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--cream); box-shadow: 0 0 0 1.5px var(--bg-2);
}
.swatch.is-active {
  box-shadow: 0 0 0 2px var(--bg-2), 0 0 0 4px var(--wine-soft);
}
.swatch.is-active::after { background: var(--wine-soft); }

/* Indicador de stock */
.stock { display: inline-flex; align-items: center; gap: .4rem; font-size: .74rem; color: var(--cream-3); }
.stock::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.stock.is-agotado::before { background: var(--cream-3); }

/* Últimas unidades: se destaca como etiqueta para meter urgencia de compra */
.stock.is-ultimas {
  padding: .22rem .55rem;
  border-radius: 2px;
  background: var(--wine);
  color: var(--cream);
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  font-size: .66rem;
}
.stock.is-ultimas::before { display: none; }

/* ============================================================  6. HEADER */
.header {
  position: sticky; top: 0; z-index: 100;
  isolation: isolate;   /* fuerza su propio contexto de apilado: nada de
                           atrás (como la lista de filtros al scrollear)
                           puede terminar pintado por encima del header */
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: background .4s var(--ease-out), border-color .4s var(--ease-out),
              backdrop-filter .4s var(--ease-out);
}
.header.is-stuck {
  /* Sólido, sin transparencia: con alpha (aunque sea .96) más blur, en
     algunos navegadores el contenido que scrollea atrás (los filtros del
     catálogo) puede alcanzar a verse un instante durante el scroll rápido. */
  background: rgb(13, 10, 11);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}
/* En celular el header NUNCA es transparente, ni siquiera sobre el hero
   (a diferencia de desktop, donde sí se pidió ese efecto). */
@media (max-width: 719px) {
  .header {
    background: rgb(13, 10, 11);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom-color: var(--line);
  }
}

.header-inner {
  max-width: var(--wrap); margin-inline: auto;
  padding-inline: var(--pad);
  min-height: var(--header-h);
  display: flex; align-items: center; gap: .5rem;
}

.brand { display: flex; align-items: center; gap: .55rem; line-height: 1; margin-right: auto; }
/* El logo nuevo es un ícono de línea en crema: flota directo sobre el
   header, sin el chip circular que necesitaba la ilustración vieja. */
.brand-mark {
  flex: 0 0 auto; width: 42px; height: 42px;
  display: grid; place-items: center;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-txt { display: flex; flex-direction: column; }
.brand-word {
  font-family: var(--serif); font-size: 1.42rem; font-weight: 500;
  letter-spacing: .13em; text-transform: uppercase;
}
.brand-sub {
  font-family: var(--serif); font-style: italic;
  font-size: .72rem; letter-spacing: .05em; text-transform: none;
  color: var(--wine-soft); margin-top: 1px;
}

.header-nav { display: none; gap: 1.6rem; margin-inline: auto; }
.header-nav a {
  position: relative; font-size: .82rem; color: var(--cream-2);
  padding-block: .4rem; transition: color .3s var(--ease-out);
}
.header-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--wine-soft);
  transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease-out);
}
.header-nav a:hover { color: var(--cream); }
.header-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.header-actions { display: flex; align-items: center; gap: .15rem; }
.header-burger { margin-left: -8px; }

.cart-btn { position: relative; }
.cart-badge {
  position: absolute; top: 2px; right: 1px;
  min-width: 17px; height: 17px; padding-inline: 4px;
  display: grid; place-items: center; border-radius: 999px;
  background: var(--wine); color: var(--cream);
  font-size: .62rem; font-weight: 600; line-height: 1;
}

/* Menú desplegable de categorías (celular) */
.navsheet {
  position: fixed; inset: var(--header-h) 0 auto 0; z-index: 99;
  background: var(--bg-2); border-bottom: 1px solid var(--line);
  transform: translateY(-8px); opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
}
.navsheet.is-open { transform: none; opacity: 1; pointer-events: auto; }
.navsheet nav { display: flex; flex-direction: column; padding: .5rem var(--pad) 1.2rem; }
.navsheet a {
  padding: .85rem 0; border-bottom: 1px solid var(--line);
  font-size: .95rem; color: var(--cream-2);
}
.navsheet a:last-child { border-bottom: 0; }

/* ==============================================================  7. HERO */
.hero {
  position: relative;
  /* El header es transparente arriba de todo: para que se vea la foto (y no
     el fondo negro de la página) detrás suyo, el hero sube y ocupa también
     el espacio que reserva el header en el flujo normal. */
  margin-top: calc(-1 * var(--header-h));
  /* En celular, 100svh a secas: que cubra la pantalla entera siempre, sin
     importar si el navegador muestra u oculta la barra de direcciones. */
  min-height: 100svh;
  display: flex; align-items: flex-end;
  padding: 0 0 clamp(2.5rem, 7vw, 5rem);
  overflow: hidden;
}
/* A partir de acá (tablet/desktop) el hero vuelve a dejar el pequeño aire
   de siempre debajo, como en el diseño original. */
@media (min-width: 720px) {
  .hero { min-height: calc(88svh + var(--header-h)); }
}
.hero-media { position: absolute; inset: 0; }
.hero-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 24%;
  filter: brightness(1.14) saturate(.94) contrast(1.04);
}
/* A partir de acá entra la foto de desktop (ver el <source> en el HTML) */
@media (min-width: 720px) {
  .hero-media img { object-position: 44% 28%; }
}

.hero-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 0%, transparent 56%, rgba(16, 11, 9, .82) 100%);
}
/* En celular el texto queda más abajo y sobre una zona más clara de la
   foto: el velo tiene que ser más fuerte para que siga leyéndose bien. */
@media (max-width: 719px) {
  .hero-veil {
    background:
      linear-gradient(180deg, rgba(10, 7, 6, .25) 0%, transparent 22%, transparent 42%, rgba(10, 7, 6, .95) 100%),
      linear-gradient(90deg, rgba(10, 7, 6, .45) 0%, transparent 55%);
  }
}

.hero-inner {
  position: relative;
  width: 100%; max-width: var(--wrap); margin-inline: auto;
  padding-inline: var(--pad);
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--sans); font-size: .78rem; font-weight: 700;
  letter-spacing: .08em; color: var(--rust-soft);
}
.hero-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rust); flex: none; }
.hero-title {
  font-family: var(--sans); font-weight: 700;
  font-size: clamp(2.2rem, 6.4vw, 4rem);
  line-height: 1.06; letter-spacing: -0.02em;
  margin: .7rem 0 0; max-width: 16ch;
}
.hero-rule {
  display: block; width: 74px; height: 3px; margin: 1.3rem 0 1.5rem;
  background: var(--rust);
}
.hero-sub {
  max-width: 44ch; color: var(--cream-2);
  font-size: clamp(.95rem, 1.5vw, 1.08rem);
}
/* En celular los dos botones van apilados; en desktop, botón + link en fila */
.hero-cta { display: grid; gap: 1rem; max-width: 300px; align-items: center; }
@media (min-width: 540px) {
  .hero-cta { display: flex; flex-wrap: wrap; max-width: none; }
}
.hero-link {
  font-family: var(--sans); font-size: .92rem; font-weight: 600; color: var(--cream);
  display: inline-flex; align-items: center; gap: .4rem;
  transition: color .3s var(--ease-out);
}
.hero-link:hover { color: var(--rust-soft); }
.hero-link span { transition: transform .3s var(--ease-out); }
.hero-link:hover span { transform: translateX(3px); }

/* ========================================================  8. CATEGORÍAS */
.cats {
  position: relative; z-index: 2;
  padding-block: clamp(1.8rem, 5vw, 2.8rem);
  scroll-margin-top: var(--header-h);
}
/* Encabezado "Recorré la casa / Elegí tu rincón" */
.cats-head {
  padding-inline: var(--pad); max-width: var(--wrap); margin-inline: auto;
  margin-bottom: 1.1rem;
}
.cats-head .overline {
  font-family: var(--sans); font-size: .72rem; font-weight: 600;
  letter-spacing: .24em; text-transform: uppercase; color: var(--gold);
  margin-bottom: .35rem;
}
.cats-head .sec-title {
  font-family: var(--serif); font-size: clamp(1.7rem, 6vw, 2.3rem);
  font-weight: 300; line-height: 1.05; color: var(--cream);
}
.cats-head .sec-title em { font-style: italic; color: var(--cream); }
.cats-head-link { display: none; }

/* Categorías como banners horizontales apilados (foto + título + subtítulo) */
.cats-list {
  display: flex; flex-direction: column; gap: .8rem;
  padding-inline: var(--pad); max-width: var(--wrap); margin-inline: auto;
}
.cat-banner {
  position: relative; display: block; width: 100%;
  height: clamp(110px, 30vw, 150px);
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
  transition: border-color .4s var(--ease-out);
}
.cat-banner img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: saturate(.85) brightness(.66);
  transition: transform .8s var(--ease-out), filter .5s var(--ease-out);
}
.cat-banner::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(13,10,11,.9) 0%, rgba(13,10,11,.55) 42%, rgba(13,10,11,.1) 100%);
}
.cat-banner-txt {
  position: absolute; z-index: 2; left: clamp(1rem, 5vw, 1.5rem);
  top: 50%; transform: translateY(-50%); text-align: left;
}
.cat-banner-name {
  display: block; font-family: var(--serif);
  font-size: clamp(1.5rem, 6vw, 1.9rem); font-weight: 500;
  color: var(--cream); line-height: 1.05;
}
/* Subtítulo de categoría desactivado: en el banner mobile se pidió mostrar
   solo el nombre. Queda el dato en el manifest por si se quiere reactivar. */
.cat-banner-sub { display: none; }
.cat-banner:hover { border-color: var(--line-2); }
.cat-banner:hover img { transform: scale(1.05); filter: saturate(1) brightness(.72); }
.cat-banner.is-active { border-color: var(--gold); }
.cat-banner.is-active img { filter: saturate(1) brightness(.78); }

/* DESKTOP (≥720px): seis tarjetas parejas (5 categorías + Sets) en una
   grilla de 3x2, todas del mismo tamaño. "Ver todo" deja de ser un tile y
   pasa a ser un link junto al título. */
@media (min-width: 720px) {
  .cats-head {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
  }
  .cats-head-link {
    display: inline-flex; align-items: center; gap: .4rem;
    font-family: var(--sans); font-size: .88rem; font-weight: 600; color: var(--cream);
    white-space: nowrap; padding-bottom: .3rem;
    transition: color .3s var(--ease-out);
  }
  .cats-head-link span { transition: transform .3s var(--ease-out); }
  .cats-head-link:hover { color: var(--rust-soft); }
  .cats-head-link:hover span { transform: translateX(3px); }

  .cats-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, clamp(220px, 22vw, 300px));
    gap: .5rem;
  }
  .cat-banner { height: auto; }
  .cat-banner::after { background: linear-gradient(180deg, transparent 45%, rgba(16, 11, 9, .88) 100%); }
  .cat-banner-txt { left: 0; right: 0; top: auto; bottom: 0; transform: none; padding: 1.1rem 1.2rem; }
  .cat-banner-txt::before {
    content: ""; display: block; width: 30px; height: 3px; margin-bottom: .55rem;
    background: var(--rust);
  }
  .cat-banner-name {
    font-family: var(--sans); font-size: .92rem; font-weight: 700; line-height: 1.2;
  }
  .cat-banner-sub { display: none; }
  .cat-banner.is-active { border-color: var(--wine-soft); }

  /* El tile "Ver todo" se reemplaza por el link de arriba */
  .cat-all { display: none; }
}

/* ==========================================================  9. CATÁLOGO */
.catalogo { padding-block: clamp(2rem, 5vw, 4rem) clamp(3rem, 7vw, 6rem); scroll-margin-top: var(--header-h); }

.toolbar {
  display: grid; grid-template-columns: 1fr auto; gap: .6rem;
  align-items: center; margin-bottom: 1.6rem;
}

.search { position: relative; grid-column: 1 / -1; }
.search svg {
  position: absolute; left: .95rem; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: var(--cream-3); pointer-events: none;
}
.search input {
  width: 100%; padding: .82rem 2.6rem;
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: var(--radius); font-size: .9rem; font-weight: 300;
  transition: border-color .3s var(--ease-out), background .3s var(--ease-out);
}
.search input::placeholder { color: var(--cream-3); }
.search input:focus { outline: none; border-color: var(--wine-soft); background: var(--bg-4); }
.search input::-webkit-search-cancel-button { display: none; }
.search-clear {
  position: absolute; right: .5rem; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%; font-size: 1.3rem; line-height: 1;
  color: var(--cream-3);
}
.search-clear:hover { color: var(--cream); background: var(--bg-4); }

.filters-btn { padding-block: .8rem; }
.filters-btn svg { width: 16px; height: 16px; }

.sortwrap { position: relative; }
.sortwrap select {
  appearance: none; -webkit-appearance: none;
  padding: .82rem 2.3rem .82rem 1rem;
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: var(--radius); font-size: .82rem; cursor: pointer;
  width: 100%;
}
.sortwrap::after {
  content: ""; position: absolute; right: 1rem; top: 50%;
  width: 7px; height: 7px; border-right: 1.5px solid var(--cream-3);
  border-bottom: 1.5px solid var(--cream-3);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.sortwrap select:focus { outline: none; border-color: var(--wine-soft); }
.sortwrap option { background: var(--bg-3); color: var(--cream); }

.catalogo-body { display: block; }

/* --- Filtros --- */
.filtros {
  position: fixed; inset: auto 0 0 0; z-index: 130;
  max-height: 86svh; display: flex; flex-direction: column;
  background: var(--bg-2); border-top: 1px solid var(--line-2);
  border-radius: 14px 14px 0 0;
  transform: translateY(101%);
  transition: transform .42s var(--ease-out);
  visibility: hidden;
}
.filtros.is-open { transform: none; visibility: visible; }

.filtros-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem var(--pad) .7rem; border-bottom: 1px solid var(--line);
}
.filtros-head h3 { font-family: var(--serif); font-size: 1.4rem; font-weight: 500; }
.filtros-body { flex: 1; overflow-y: auto; padding: .5rem var(--pad) 1rem; }
.filtros-foot {
  display: flex; gap: .6rem; padding: .9rem var(--pad);
  padding-bottom: max(.9rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--bg-2);
}
.filtros-foot .btn { flex: 1; }

.fgroup { padding-block: 1.1rem; border-bottom: 1px solid var(--line); }
.fgroup:last-child { border-bottom: 0; }
.fgroup h4 {
  font-size: .68rem; font-weight: 500; letter-spacing: .18em;
  text-transform: uppercase; color: var(--cream-3); margin-bottom: .85rem;
}
.fopts { display: flex; flex-direction: column; gap: .1rem; }

.fopt {
  display: flex; align-items: center; gap: .65rem;
  padding: .42rem 0; cursor: pointer; font-size: .88rem; color: var(--cream-2);
  transition: color .25s var(--ease-out);
}
.fopt:hover { color: var(--cream); }
.fopt input { position: absolute; opacity: 0; width: 0; height: 0; }
.fopt .box {
  flex: 0 0 auto; width: 17px; height: 17px; border-radius: 2px;
  border: 1px solid var(--line-2); display: grid; place-items: center;
  transition: background .25s var(--ease-out), border-color .25s var(--ease-out);
}
.fopt .box::after {
  content: ""; width: 9px; height: 5px;
  border-left: 1.7px solid var(--cream); border-bottom: 1.7px solid var(--cream);
  transform: rotate(-45deg) scale(0); transform-origin: center;
  transition: transform .25s var(--ease-out); margin-top: -2px;
}
.fopt input:checked + .box { background: var(--wine); border-color: var(--wine); }
.fopt input:checked + .box::after { transform: rotate(-45deg) scale(1); }
.fopt input:focus-visible + .box { outline: 2px solid var(--wine-soft); outline-offset: 2px; }
.fopt .n { margin-left: auto; font-size: .74rem; color: var(--cream-3); }

/* Rango de precio */
.frange { padding-top: .3rem; }
.frange-val {
  display: flex; justify-content: space-between;
  font-size: .8rem; color: var(--cream-2); margin-bottom: .7rem;
}
.frange input[type="range"] {
  width: 100%; appearance: none; -webkit-appearance: none;
  height: 2px; background: var(--line-2); border-radius: 2px; cursor: pointer;
}
.frange input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--wine-lift); border: 2px solid var(--cream); cursor: pointer;
}
.frange input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--wine-lift); border: 2px solid var(--cream); cursor: pointer;
}

/* --- Resultados --- */
.resultados-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem;
  margin-bottom: 1.1rem; min-height: 26px;
}
.count { font-size: .8rem; color: var(--cream-3); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .3rem .6rem; border-radius: 999px;
  background: var(--bg-4); border: 1px solid var(--line);
  font-size: .74rem; color: var(--cream-2);
  transition: border-color .25s var(--ease-out);
}
.chip:hover { border-color: var(--cream-3); }
.chip span { font-size: 1rem; line-height: .6; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(.7rem, 2vw, 1.4rem) clamp(.7rem, 1.6vw, 1.1rem);
}

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  text-align: left; width: 100%;
  transition: border-color .4s var(--ease-out), transform .4s var(--ease-out),
              box-shadow .4s var(--ease-out);
}
.card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 -70px 60px -60px rgba(168, 96, 58, 0);
  transition: box-shadow .5s var(--ease-out);
}
.card:hover { border-color: var(--line-2); transform: translateY(-4px); box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .9); }
.card:hover::after { box-shadow: inset 0 -70px 60px -60px rgba(168, 96, 58, .55); }

.card-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg-4); }
.card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease-out), filter .5s var(--ease-out);
}
.card:hover .card-media img { transform: scale(1.06); filter: saturate(1.08); }

.card-flags { position: absolute; top: .55rem; left: .55rem; display: flex; flex-direction: column; gap: .3rem; }
.flag {
  padding: .22rem .5rem; font-size: .6rem; letter-spacing: .12em;
  text-transform: uppercase; border-radius: 2px;
  background: rgba(13, 10, 11, .78); color: var(--cream-2);
  backdrop-filter: blur(4px);
}
.flag.is-wine { background: var(--wine); color: var(--cream); }

.card-body { padding: .8rem .85rem 1rem; display: flex; flex-direction: column; flex: 1; gap: .38rem; }
.card-cat { font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--cream-3); }
.card-name { font-size: .95rem; font-weight: 500; line-height: 1.25; }
.card-spec { font-size: .74rem; color: var(--cream-3); line-height: 1.4; }
.card-foot { margin-top: auto; padding-top: .6rem; display: flex; align-items: flex-end; justify-content: space-between; gap: .5rem; }
.card-price { display: flex; flex-direction: column; line-height: 1.2; }
.card-price small { font-size: .64rem; color: var(--cream-3); }
.card-price strong { font-size: 1.02rem; font-weight: 500; font-variant-numeric: tabular-nums; }

.card-add {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg-4); border: 1px solid var(--line-2); color: var(--cream);
  transition: background .3s var(--ease-out), border-color .3s var(--ease-out), transform .3s var(--ease-out);
}
.card-add svg { width: 16px; height: 16px; }
.card-add:hover { background: var(--wine); border-color: var(--wine); transform: scale(1.08); }

.card.is-hidden { display: none; }

.vacio { padding: 3.5rem 1rem; text-align: center; color: var(--cream-3); }
.vacio-title { font-family: var(--serif); font-size: 1.5rem; color: var(--cream); margin-bottom: .4rem; }
.vacio .btn { margin-top: 1.2rem; }

/* ==========================================  10. FICHA DE PRODUCTO (dialog) */
.sheet, .drawer {
  padding: 0; border: 0; background: transparent;
  /* Sin esto el navegador pinta el texto del diálogo en negro:
     los <dialog> no heredan el color del body. */
  color: var(--cream);
  max-width: 100%; max-height: 100%;
  width: 100%; height: 100%;
  opacity: 0; transition: opacity .3s var(--ease-out);
  overflow: hidden;
}
.sheet[open], .drawer[open] { display: flex; }
.sheet.is-open, .drawer.is-open { opacity: 1; }
.sheet::backdrop, .drawer::backdrop { background: rgba(6, 4, 5, .72); backdrop-filter: blur(3px); }

.sheet { align-items: flex-end; justify-content: center; }
.sheet-panel {
  /* En celular va con alto fijo: con sólo max-height el panel terminaba donde
     terminaba el contenido y por debajo se veía el catálogo a través del
     fondo semitransparente. */
  width: 100%; height: 92svh; max-height: 92svh; overflow-y: auto;
  background: var(--bg-2); border-top: 1px solid var(--line-2);
  border-radius: 14px 14px 0 0;
  transform: translateY(28px);
  transition: transform .42s var(--ease-out);
  overscroll-behavior: contain;
}
.sheet.is-open .sheet-panel { transform: none; }

.pd-close { position: absolute; top: .6rem; right: .6rem; z-index: 3; background: rgba(13, 10, 11, .6); }
.pd { position: relative; }
.pd-media {
  position: relative; width: 100%; aspect-ratio: 4 / 5; max-height: 46dvh;
  background: var(--bg-4); touch-action: pan-y;
}
.pd-media img { width: 100%; height: 100%; object-fit: cover; transition: opacity .28s var(--ease-out); }

/* Frazadas y mantas: las tres fotos ya son 4/5 exacto. El problema era el
   marco, que en pantallas bajas se achica con max-height y deja de ser 4/5
   — ahí cualquier recorte queda mal. Sólo para estos productos, el marco
   respeta su proporción real en vez de la altura disponible. */
.pd[data-pd-id="frazada-velour"] .pd-media,
.pd[data-pd-id="frazada-microfibra"] .pd-media,
.pd[data-pd-id="manta-outlet"] .pd-media {
  aspect-ratio: 4 / 5;
  max-height: none;
  height: auto;
}

/* Overlay sobre el borde inferior de la foto: el selector de color. Va
   encima y no dentro del flujo, así queda a la vista sin scrollear y no le
   come alto a la foto ni al resto de la ficha. */
.pd-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; gap: .65rem;
  padding: 3rem .9rem .85rem;
  background: linear-gradient(to top, rgba(6, 4, 5, .82), transparent);
}
.pd-overlay:empty { display: none; }

/* Flechitas de la galería general (más de una foto para el producto) */
.pd-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%; padding: 0;
  display: grid; place-items: center;
  background: rgba(13, 10, 11, .55); color: var(--cream);
  transition: background .2s var(--ease-out);
}
.pd-arrow svg { width: 18px; height: 18px; }
.pd-arrow:hover { background: rgba(13, 10, 11, .75); }
.pd-arrow-prev { left: .6rem; }
.pd-arrow-next { right: .6rem; }

.pd-count {
  position: absolute; top: .6rem; left: .6rem;
  padding: .28rem .6rem; border-radius: 999px;
  background: rgba(13, 10, 11, .6); color: var(--cream);
  font-size: .7rem; font-variant-numeric: tabular-nums;
}

.pd-colors h4 {
  font-size: .64rem; font-weight: 500; letter-spacing: .14em;
  text-transform: uppercase; color: var(--cream-2); margin-bottom: .5rem;
}
.pd-colors .swatch { width: 36px; height: 36px; }

.pd-body { padding: 1.2rem var(--pad) 1.6rem; display: flex; flex-direction: column; gap: 1rem; }
.pd-cat { font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; color: var(--cream-3); }
.pd-name { font-family: var(--serif); font-size: clamp(1.7rem, 5vw, 2.4rem); font-weight: 500; line-height: 1.1; }
.pd-desc { color: var(--cream-2); font-size: .92rem; }

.pd-price { display: flex; align-items: baseline; gap: .6rem; }
.pd-price strong { font-size: 1.75rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.pd-price small { font-size: .78rem; color: var(--cream-3); }

.pd-block h4 {
  font-size: .68rem; font-weight: 500; letter-spacing: .18em;
  text-transform: uppercase; color: var(--cream-3); margin-bottom: .6rem;
}

.opts { display: flex; flex-wrap: wrap; gap: .45rem; }
.opt {
  padding: .6rem .85rem; border: 1px solid var(--line-2); border-radius: var(--radius);
  font-size: .82rem; color: var(--cream-2); text-align: left; line-height: 1.3;
  transition: border-color .3s var(--ease-out), background .3s var(--ease-out), color .3s var(--ease-out);
}
.opt small { display: block; font-size: .68rem; color: var(--cream-3); margin-top: 2px; }
.opt:hover:not(:disabled) { border-color: var(--cream-3); color: var(--cream); }
.opt.is-active { border-color: var(--wine-soft); background: rgba(168, 96, 58, .22); color: var(--cream); }
.opt:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }

/* Galería de estampados. En celu se desliza horizontal (una fila, con
   snap); en desktop es una grilla fija — ahí sobra lugar y no hace falta
   scrollear. */
.pattern-scroll { position: relative; }
.pattern-grid {
  display: flex; gap: .5rem; overflow-x: auto;
  scroll-snap-type: x proximity; scrollbar-width: none;
  padding-right: 2.4rem;
}
.pattern-grid::-webkit-scrollbar { display: none; }
.pattern {
  position: relative; flex: 0 0 84px; aspect-ratio: 4 / 3; border-radius: 2px; overflow: hidden;
  border: 1px solid var(--line); scroll-snap-align: start;
  transition: border-color .3s var(--ease-out);
}
.pattern img { width: 100%; height: 100%; object-fit: cover; }
.pattern span {
  position: absolute; inset: auto 0 0 0; padding: .25rem .3rem;
  font-size: .58rem; text-align: center;
  background: linear-gradient(180deg, transparent, rgba(13, 10, 11, .9));
}
.pattern.is-active { border-color: var(--wine-soft); }
.pattern.is-active::after {
  content: ""; position: absolute; inset: 0; border: 2px solid var(--wine-soft);
}

/* Flechita que avisa "hay más estampados": se esconde sola al llegar al
   final de la fila (ver watchPatternHint en main.js). */
.pattern-hint {
  position: absolute; top: 0; right: 0; bottom: 0; width: 46px;
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: .2rem;
  background: linear-gradient(90deg, transparent, var(--bg-2) 60%);
  pointer-events: none;
  transition: opacity .25s var(--ease-out);
}
.pattern-hint svg {
  width: 16px; height: 16px; color: var(--cream-2);
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.specs { display: flex; flex-wrap: wrap; gap: .4rem; }

.pd-actions {
  position: sticky; bottom: 0; z-index: 2;
  padding-block: .8rem .9rem;
  padding-bottom: max(.9rem, env(safe-area-inset-bottom));
  /* Antes era un degradado que arrancaba transparente: los botones de medida
     se veían a través y parecía que la barra los cortaba al medio. Ahora es
     opaca, con una sombra que difumina el corte contra lo que scrollea. */
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  box-shadow: 0 -16px 22px -12px var(--bg-2);
}
.pd-actions-row { display: flex; gap: .6rem; align-items: stretch; }
.qty { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--radius); }
.qty button { width: 40px; height: 100%; display: grid; place-items: center; color: var(--cream-2); font-size: 1.1rem; }
.qty button:hover { color: var(--cream); background: var(--bg-4); }
.qty output { display: inline-block; min-width: 30px; text-align: center; font-size: .95rem; font-variant-numeric: tabular-nums; }
.pd-actions-row .btn-primary { flex: 1; }

/* =====================================================  11. CARRITO  */
.drawer { align-items: stretch; justify-content: flex-end; }
.drawer-panel {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  background: var(--bg-2); border-left: 1px solid var(--line);
  transform: translateX(24px);
  transition: transform .42s var(--ease-out);
}
.drawer.is-open .drawer-panel { transform: none; }

.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem var(--pad); border-bottom: 1px solid var(--line);
}
.drawer-head h2 { font-family: var(--serif); font-size: 1.5rem; font-weight: 500; }
.drawer-body { flex: 1; overflow-y: auto; padding: .6rem var(--pad) 1rem; overscroll-behavior: contain; }
.drawer-foot {
  padding: 1rem var(--pad);
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--bg-2);
}
.drawer-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .3rem; }
.drawer-total span { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--cream-3); }
.drawer-total strong { font-size: 1.5rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.drawer-note { font-size: .74rem; color: var(--cream-3); margin-bottom: .9rem; }

.citem { display: grid; grid-template-columns: 66px 1fr; gap: .8rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.citem:last-child { border-bottom: 0; }
.citem-media { aspect-ratio: 4 / 5; border-radius: 2px; overflow: hidden; background: var(--bg-4); }
.citem-media img { width: 100%; height: 100%; object-fit: cover; }
.citem-name { font-size: .88rem; font-weight: 500; line-height: 1.3; }
.citem-var { font-size: .74rem; color: var(--cream-3); margin-top: 2px; }
.citem-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .55rem; }
.citem-price { font-size: .92rem; font-variant-numeric: tabular-nums; }
.citem .qty button { width: 30px; height: 30px; font-size: 1rem; }
.citem .qty output { min-width: 24px; font-size: .85rem; }
.citem-del { font-size: .72rem; color: var(--cream-3); text-decoration: underline; text-underline-offset: 3px; }
.citem-del:hover { color: var(--wine-soft); }

.cart-empty { padding: 3.5rem 1rem; text-align: center; color: var(--cream-3); }
.cart-empty p:first-child { font-family: var(--serif); font-size: 1.4rem; color: var(--cream); margin-bottom: .4rem; }

/* ===========================================================  12. COMBOS */
.combos { padding-block: clamp(2.5rem, 6vw, 5rem); background: var(--bg-2); scroll-margin-top: var(--header-h); }
.combos-row { display: grid; gap: 1rem; grid-template-columns: 1fr; }

.combo {
  display: flex; flex-direction: column;
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color .4s var(--ease-out), transform .4s var(--ease-out);
}
.combo:hover { border-color: var(--line-2); transform: translateY(-3px); }
.combo-media { aspect-ratio: 16 / 10; overflow: hidden; }
.combo-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.combo:hover .combo-media img { transform: scale(1.05); }
.combo-body { padding: 1.1rem 1.1rem 1.3rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.combo-name { font-family: var(--serif); font-size: 1.45rem; font-weight: 500; line-height: 1.15; }
.combo-desc { font-size: .84rem; color: var(--cream-3); }
.combo-list { display: flex; flex-direction: column; gap: .25rem; font-size: .8rem; color: var(--cream-2); }
.combo-list li { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.combo-list li::before { content: "·"; color: var(--wine-soft); }
.combo-swatches { display: inline-flex; gap: .3rem; flex-wrap: wrap; }
.combo-swatches .swatch { width: 16px; height: 16px; }
.combo-swatches .swatch.is-active { box-shadow: 0 0 0 1.5px var(--bg-2), 0 0 0 3px var(--wine-soft); }
.combo-foot { margin-top: auto; padding-top: .9rem; display: flex; align-items: flex-end; justify-content: space-between; gap: .8rem; }
.combo-price { display: flex; flex-direction: column; line-height: 1.25; }
.combo-price s { font-size: .78rem; color: var(--cream-3); }
.combo-price strong { font-size: 1.3rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.combo-save { font-size: .68rem; color: var(--ok); letter-spacing: .06em; }

/* ==================================================  13. EDITORIAL + INFO */
.editorial {
  display: grid; grid-template-columns: 1fr; gap: 0;
  align-items: center;
}
.editorial-media { aspect-ratio: 16 / 10; overflow: hidden; }
.editorial-media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.9) brightness(.88); }
.editorial-text {
  padding: clamp(2rem, 6vw, 4.5rem) var(--pad);
  display: flex; flex-direction: column; gap: 1rem; align-items: flex-start;
}
.editorial-text p:not(.kicker) { color: var(--cream-2); max-width: 52ch; }
.editorial-text .btn { margin-top: .6rem; }
/* "El gramaje no se negocia": el dueño la pidió sacar sólo en celular. */
@media (max-width: 719px) { .editorial { display: none; } }

.info { padding-block: clamp(2.5rem, 6vw, 4.5rem); border-top: 1px solid var(--line); }
.info-row { display: grid; gap: 1.8rem; grid-template-columns: 1fr; }
.info-item h3 { font-family: var(--serif); font-size: 1.3rem; font-weight: 500; margin-bottom: .4rem; }
.info-item p { font-size: .88rem; color: var(--cream-3); }
.info-item::before {
  content: ""; display: block; width: 28px; height: 1px;
  background: var(--wine-soft); margin-bottom: .9rem;
}

/* ===========================================================  14. FOOTER */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); padding-top: clamp(2.5rem, 5vw, 4rem); }

/* Tres columnas: marca y datos, enlaces, redes. En celular se apilan.
   En desktop la del medio se centra y la de redes se alinea a la derecha,
   así el pie queda balanceado de punta a punta. */
.footer-inner {
  display: grid; gap: 2.4rem; grid-template-columns: 1fr;
  padding-bottom: 2.5rem;
}

.footer-col { display: flex; flex-direction: column; gap: .55rem; align-items: flex-start; }
.footer-col h3 {
  font-size: .68rem; font-weight: 500; letter-spacing: .2em;
  text-transform: uppercase; color: var(--cream); margin-bottom: .5rem;
}
.footer-col p { font-size: .86rem; color: var(--cream-3); }
.footer-col a {
  font-size: .86rem; color: var(--cream-2);
  transition: color .3s var(--ease-out);
  display: inline-flex; align-items: center; gap: .55rem;
}
.footer-col a:hover { color: var(--wine-soft); }

/* Los íconos de las redes */
.footer-col-redes svg {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Barra final: línea de acento, copyright y la firma del estudio */
.footer-legal {
  padding-block: 1.4rem;
  border-top: 1px solid var(--wine);
  display: flex; flex-direction: column; align-items: center; gap: .35rem;
  text-align: center;
}
.footer-legal p { font-size: .76rem; color: var(--cream-3); }
.footer-koda {
  font-size: .7rem; color: var(--cream-3);
  transition: color .3s var(--ease-out);
}
.footer-koda span { color: var(--wine-soft); font-weight: 500; }
.footer-koda:hover { color: var(--cream-2); }

@media (min-width: 720px) {
  /* minmax(0,...) y no 1fr a secas: si no, la columna con el texto más largo
     se estira y las tres quedan desparejas. */
  .footer-inner { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem; }
  .footer-col-medio { align-items: center; }
  .footer-col-redes { align-items: flex-end; }
}

/* ======================================================  15. ANIMACIONES */
.reveal { opacity: 0; transform: translateY(26px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
/* Red de seguridad: si un elemento combina reveal con texto partido, que se vea igual */
.reveal[data-split] { opacity: 1; transform: none; }

.hero-el { opacity: 0; transform: translateY(20px); }
.is-ready .hero-el { animation: heroIn .9s var(--ease-out) forwards; }
.is-ready .hero-el:nth-child(1) { animation-delay: .10s; }
.is-ready .hero-el:nth-child(2) { animation-delay: .18s; }
.is-ready .hero-el:nth-child(3) { animation-delay: .28s; }
.is-ready .hero-el:nth-child(4) { animation-delay: .38s; }
.is-ready .hero-el:nth-child(5) { animation-delay: .48s; }
@keyframes heroIn { to { opacity: 1; transform: none; } }

.toast {
  position: fixed; left: 50%; bottom: 1.5rem; z-index: 200;
  transform: translate(-50%, 20px); opacity: 0;
  padding: .8rem 1.2rem; border-radius: var(--radius);
  background: var(--cream); color: var(--bg);
  font-size: .84rem; font-weight: 500;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .8);
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
  pointer-events: none; max-width: calc(100vw - 2rem); text-align: center;
}
.toast.is-in { opacity: 1; transform: translate(-50%, 0); }

body.is-locked { overflow: hidden; }

/* Sólo se frenan los efectos intrusivos, no las microinteracciones */
@media (prefers-reduced-motion: reduce) {
  .hero-meta .dot { animation: none; }
}

/* ======================================================  16. RESPONSIVE  */
@media (min-width: 540px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .info-row { grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
  .toolbar { grid-template-columns: 1fr auto auto; }
  .search { grid-column: 1; }
}

@media (min-width: 720px) {
  :root { --header-h: 74px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .combos-row { grid-template-columns: repeat(3, 1fr); }
  /* El footer define sus columnas en su propia sección (busca .footer-inner
     más arriba). Antes había acá un 1.4fr para la columna de la marca, del
     pie viejo, y le ganaba por venir después. */
  .pattern-grid {
    display: grid; grid-template-columns: repeat(6, 1fr);
    overflow-x: visible; padding-right: 0;
  }
  .pattern { flex: initial; }
  .pattern-hint { display: none; }
  /* En pantalla grande entran las seis en una sola fila */
  .cats-row { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .8rem; }
  .cat-tile span { font-size: .8rem; padding: .7rem .8rem; }
  .cat-tile.is-all span { font-size: .78rem; padding: 0; }

  .sheet { align-items: center; padding: 2rem; }
  .sheet-panel {
    max-width: 1000px; border-radius: var(--radius);
    border: 1px solid var(--line-2);
    /* En compu el panel se ajusta al contenido; el alto fijo es sólo para
       celular, donde tiene que cubrir la pantalla entera. */
    height: auto; max-height: 88svh;
  }
  .pd { display: grid; grid-template-columns: 1fr 1fr; }
  .pd-media { aspect-ratio: auto; height: 100%; max-height: none; min-height: 480px; }
  .pd-body { padding: 1.8rem 1.9rem 2rem; }
  .pd-actions { background: var(--bg-2); }

  .drawer-panel { max-width: 440px; }
}

@media (min-width: 960px) {
  .header-nav { display: flex; }
  .header-burger { display: none; }
  .brand { margin-right: 0; }
  .header-actions { margin-left: auto; }

  .editorial { grid-template-columns: 1.05fr 1fr; }
  .editorial-media { aspect-ratio: auto; height: 100%; min-height: 520px; }
  .editorial-text { padding-inline: clamp(2.5rem, 5vw, 4.5rem); }

  /* El filtro deja de ser hoja inferior y pasa a columna. Scrollea junto con
     la página: sin barra interna propia, así se ven todas las opciones. */
  .catalogo-body { display: grid; grid-template-columns: 232px 1fr; gap: 2.2rem; align-items: start; }
  .filtros {
    position: static; inset: auto;
    transform: none; visibility: visible;
    max-height: none; overflow: visible;
    background: transparent; border: 0; border-radius: 0;
  }
  .filtros-head, .filtros-foot { display: none; }
  .filtros-body { padding: 0; overflow: visible; flex: none; }
  .filters-btn { display: none; }
  .toolbar { grid-template-columns: 1fr auto; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1280px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero { min-height: calc(92svh + var(--header-h)); }
}

/* Áreas de toque: el + de las tarjetas quedaba en 34px y el nombre en 21px
   de alto. Abajo de ~40px se falla el toque seguido en celular. */
@media (max-width: 719px) {
  .card-add { width: 40px; height: 40px; }
  .card-name a, .card-name button { display: inline-block; padding-block: .25rem; }
  .hero-link { padding-block: .5rem; }
}


/* ================================================  CÓDIGO DE DESCUENTO  ==
   Va en el pie del carrito, arriba del total. */
.cupon { display: grid; gap: .5rem; margin-bottom: .9rem; }
.cupon-fila { display: flex; gap: .5rem; }
.cupon-fila input {
  flex: 1; min-width: 0;
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .7rem .8rem;
  font-size: .88rem; text-transform: uppercase; letter-spacing: .04em;
}
.cupon-fila input::placeholder { text-transform: none; letter-spacing: 0; color: var(--cream-3); }
.cupon-fila input:focus { outline: none; border-color: var(--wine-soft); background: var(--bg-4); }
.cupon-fila .btn { flex: none; padding-inline: 1.1rem; }

.cupon-msg { font-size: .78rem; color: var(--ok); }
.cupon-msg.is-error { color: #D97A7A; }

/* El total tachado cuando hay descuento, y el total final destacado */
.drawer-total-desc { color: var(--ok); font-size: .86rem; align-items: baseline; }
.drawer-total-desc span { min-width: 0; }
/* nowrap: si no, el "−" se corta del monto y queda en su propio renglón */
.drawer-total-desc strong { color: var(--ok); font-weight: 500; white-space: nowrap; }
.drawer-total-final strong { color: var(--wine-soft); }
