/* ============================================================
   DOMINGUETAS — Sistema de diseño
   ------------------------------------------------------------
   Paleta tomada del logo real: azul rey profundo + naranja ámbar
   sobre blanco. El formulario pedía "azul rey + blanco"; el naranja
   sale del logo y hace de color de acción, porque azul sobre azul
   no da contraste de botón.

   Cambiar los valores de :root repinta TODO el sitio.
   Fuente única de estilos: este archivo. Sin frameworks, sin build.
   ============================================================ */

:root {
  /* Marca */
  --color-primary: #0d2a6c;        /* azul rey del logo */
  --color-primary-deep: #071a45;
  --color-primary-soft: #1b4bb0;
  --color-primary-tint: #eef2fb;

  --color-accent: #f0921a;         /* naranja/ámbar del logo */
  --color-accent-hover: #d97d0c;
  --color-accent-soft: #fff4e4;

  /* Superficies */
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-surface-alt: #f6f7fa;
  --color-cream: #f4efe6;          /* el crema del fondo de los mockups */

  /* Texto */
  --color-text: #0e1526;
  --color-text-muted: #5b6478;
  --color-text-inverse: #ffffff;

  --color-border: #e4e7ee;
  --color-border-strong: #cdd3e0;

  --color-whatsapp: #25d366;
  --color-whatsapp-hover: #1eb85a;
  --color-danger: #d92d20;
  --color-success: #12805c;

  /* Tipografía */
  --font-heading: 'Bricolage Grotesque', 'Poppins', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Layout */
  --max-width: 1320px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --header-h: 68px;

  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(14, 21, 38, .06), 0 2px 8px rgba(14, 21, 38, .04);
  --shadow: 0 4px 12px rgba(14, 21, 38, .06), 0 12px 32px rgba(14, 21, 38, .07);
  --shadow-lg: 0 8px 24px rgba(14, 21, 38, .1), 0 32px 64px rgba(14, 21, 38, .12);
  --shadow-accent: 0 8px 24px rgba(240, 146, 26, .32);

  /* Movimiento — un solo easing en todo el sitio (el de iOS) */
  --ease: cubic-bezier(.22, .8, .24, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast: .18s;
  --t: .28s;
  --t-slow: .48s;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* `height: auto` es obligatorio aquí: todas las <img> llevan width/height en el
   HTML (para que el navegador reserve el espacio y no salte el layout), y sin
   esto cualquier ancho puesto por CSS deja la altura clavada en los píxeles del
   atributo y deforma la imagen. */
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -.025em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 6.2vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
p { text-wrap: pretty; }

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

/* ============================================================
   MOVIMIENTO — revelado al hacer scroll
   Dos caminos: scroll-driven animations nativas donde el navegador
   las soporta, y IntersectionObserver (.reveal → .in) como respaldo.
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.in { opacity: 1; transform: none; }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal:not(.in) {
      animation: reveal-in linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 26%;
    }
  }
}
@keyframes reveal-in {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

/* Transición entre páginas: la foto del producto viaja del catálogo al detalle */
@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: .4s; animation-timing-function: var(--ease); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  @view-transition { navigation: none; }
}

/* ============================================================
   BOTONES
   ============================================================ */

.btn {
  --btn-bg: var(--color-primary);
  --btn-fg: var(--color-text-inverse);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 100px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 650;
  font-size: .95rem;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
              background-color var(--t-fast) var(--ease);
}
/* Brillo que barre el botón al pasar el mouse */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(0) scale(.985); transition-duration: 80ms; }

.btn-primary { --btn-bg: var(--color-accent); --btn-fg: #241200; }
.btn-primary:hover { --btn-bg: var(--color-accent-hover); box-shadow: var(--shadow-accent); }

.btn-dark { --btn-bg: var(--color-primary); }
.btn-dark:hover { --btn-bg: var(--color-primary-deep); }

.btn-whatsapp { --btn-bg: var(--color-whatsapp); --btn-fg: #04351a; }
.btn-whatsapp:hover { --btn-bg: var(--color-whatsapp-hover); }

.btn-outline {
  --btn-bg: transparent;
  --btn-fg: var(--color-text);
  border: 1.5px solid var(--color-border-strong);
}
.btn-outline:hover { --btn-bg: var(--color-text); --btn-fg: #fff; border-color: var(--color-text); }

.btn-ghost { --btn-bg: transparent; --btn-fg: var(--color-text); padding: 12px 18px; }
.btn-ghost:hover { --btn-bg: var(--color-surface-alt); box-shadow: none; transform: none; }

.btn-lg { padding: 18px 36px; font-size: 1.05rem; }
.btn-sm { padding: 10px 18px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* WhatsApp sin número confirmado: se ve completo, pero avisa en vez de abrir
   un wa.me equivocado. */
.btn[data-wa-pending] { cursor: help; }
.btn[data-wa-pending]::before {
  content: "";
  position: absolute;
  inset-block-start: 8px;
  inset-inline-end: 12px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .28);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .74rem;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-accent);
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: currentColor;
  border-radius: 2px;
}

/* ============================================================
   BARRA DE ANUNCIO — marquesina
   ============================================================ */

.announce-bar {
  background: var(--color-primary);
  color: #fff;
  font-size: .8rem;
  font-weight: 550;
  letter-spacing: .02em;
  padding: 9px 0;
  overflow: hidden;
  white-space: nowrap;
}
.announce-track {
  display: inline-flex;
  gap: 48px;
  padding-left: 48px;
  animation: marquee 34s linear infinite;
}
.announce-bar:hover .announce-track { animation-play-state: paused; }
.announce-track span { display: inline-flex; align-items: center; gap: 8px; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .announce-track { animation: none; padding-left: 0; justify-content: center; width: 100%; }
  .announce-track > *:nth-child(n+4) { display: none; }
}

/* ============================================================
   HEADER — logo centrado, se condensa al hacer scroll
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 255, 255, .82);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--t) var(--ease), border-color var(--t) var(--ease),
              background-color var(--t) var(--ease);
}
@supports (backdrop-filter: blur(1px)) {
  .site-header { backdrop-filter: blur(18px) saturate(180%); }
}
.site-header.scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: 0 4px 24px rgba(14, 21, 38, .06);
}

.nav-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
  transition: height var(--t) var(--ease);
}
.site-header.scrolled .nav-bar { height: 58px; }

.brand-logo {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -.03em;
  color: var(--color-primary);
  transition: transform var(--t) var(--ease);
}
.brand-logo img { height: 40px; width: auto; transition: height var(--t) var(--ease); }
.site-header.scrolled .brand-logo img { height: 32px; }
.brand-logo:hover { transform: scale(1.03); }
/* El logo circular a 40px no se lee: la palabra "Dominguetas" que trae dentro
   queda ilegible. Por eso el nombre va también como texto, y solo se oculta en
   pantallas muy angostas donde no cabe al lado del menú y del carrito. */
.brand-logo span { display: none; }
@media (min-width: 560px) { .brand-logo span { display: inline; } }

.nav-left { justify-self: start; display: flex; align-items: center; gap: 4px; min-width: 0; }

.nav-links { display: none; gap: 4px; align-items: center; }
@media (min-width: 900px) { .nav-links { display: flex; } }
.nav-links a {
  position: relative;
  padding: 9px 14px;
  border-radius: 100px;
  font-size: .92rem;
  font-weight: 550;
  color: var(--color-text);
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t) var(--ease);
}
.nav-links a:hover { background: var(--color-surface-alt); }
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }

.nav-actions { justify-self: end; display: flex; align-items: center; gap: 4px; }
.icon-btn {
  position: relative;
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--color-text);
  transition: background-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.icon-btn:hover { background: var(--color-surface-alt); transform: translateY(-1px); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 21px; height: 21px; }

.nav-toggle { justify-self: start; }
@media (min-width: 900px) { .nav-toggle { display: none; } }

.cart-count {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 19px; height: 19px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 100px;
  background: var(--color-accent);
  color: #241200;
  font-size: .68rem;
  font-weight: 800;
  line-height: 1;
  transition: transform var(--t) var(--ease-spring), opacity var(--t) var(--ease);
}
.cart-count[data-empty="true"] { opacity: 0; transform: scale(.4); }
.cart-count.bump { animation: bump .42s var(--ease-spring); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } }

/* Menú móvil */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: var(--color-bg);
  padding: 20px var(--gutter) 40px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform var(--t-slow) var(--ease), visibility var(--t-slow);
}
.mobile-nav.open { transform: none; visibility: visible; }
.mobile-nav-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
/* `> a` (hijos directos) y no `a`: si no, el logo del encabezado y el botón del
   pie también se llevan el borde y el tamaño de titular, y aparece una línea
   suelta debajo del logo. */
.mobile-nav > a {
  padding: 16px 4px;
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 750;
  letter-spacing: -.02em;
  opacity: 0;
  transform: translateY(14px);
}
.mobile-nav.open > a {
  animation: slide-up .5s var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 45ms + 90ms);
}
@keyframes slide-up { to { opacity: 1; transform: none; } }
.mobile-nav-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }

/* ============================================================
   BUSCADOR EN OVERLAY
   ============================================================ */

.search-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: 82vh;
  margin: 8vh auto auto;
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.search-dialog::backdrop { background: rgba(7, 26, 69, .42); backdrop-filter: blur(6px); }
.search-dialog[open] { animation: pop-in .34s var(--ease); }
.search-dialog[open]::backdrop { animation: fade-in .34s var(--ease); }
@keyframes pop-in { from { opacity: 0; transform: translateY(-14px) scale(.97); } }
@keyframes fade-in { from { opacity: 0; } }

.search-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--color-border);
}
.search-head input {
  flex: 1;
  border: 0;
  font: inherit;
  font-size: 1.1rem;
  background: none;
  outline: none;
}
.search-results { max-height: 60vh; overflow-y: auto; overscroll-behavior: contain; }
.search-hit {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  transition: background-color var(--t-fast) var(--ease);
}
.search-hit:hover, .search-hit:focus-visible { background: var(--color-surface-alt); }
.search-hit img { width: 52px; height: 65px; object-fit: cover; border-radius: 8px; background: var(--color-cream); }
.search-hit strong { display: block; font-size: .95rem; font-weight: 650; }
.search-hit small { color: var(--color-text-muted); font-size: .82rem; }
.search-hit-price { margin-left: auto; font-weight: 700; font-size: .92rem; }
.search-empty { padding: 40px 20px; text-align: center; color: var(--color-text-muted); }

/* ============================================================
   HERO
   ============================================================ */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 88% 8%, rgba(240, 146, 26, .16), transparent 58%),
    radial-gradient(100% 80% at 4% 96%, rgba(27, 75, 176, .14), transparent 60%),
    var(--color-cream);
}
.hero-grid {
  display: grid;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
  max-width: var(--max-width);
  margin-inline: auto;
  padding: clamp(40px, 7vw, 88px) var(--gutter) clamp(48px, 7vw, 96px);
}
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.02fr .98fr; } }

.hero-copy > * + * { margin-top: 20px; }
.hero h1 .accent {
  position: relative;
  color: var(--color-accent);
  white-space: nowrap;
}
/* Subrayado dibujado a mano que se traza al cargar */
.hero h1 .accent::after {
  content: "";
  position: absolute;
  left: -2%; right: -2%; bottom: -.06em;
  height: .12em;
  border-radius: 100px;
  background: currentColor;
  opacity: .3;
  transform: scaleX(0);
  transform-origin: left;
  animation: draw 1s var(--ease) .35s forwards;
}
@keyframes draw { to { transform: scaleX(1); } }

.lead { font-size: clamp(1.02rem, 1.7vw, 1.2rem); color: var(--color-text-muted); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .88rem; color: var(--color-text-muted); }
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; }

/* Visual del hero: dos camisetas apiladas con paralaje suave */
.hero-visual { position: relative; }
.hero-stack { position: relative; aspect-ratio: 1 / 1; }
.hero-stack img {
  position: absolute;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  background: var(--color-cream);
  animation: float-in .9s var(--ease) both;
}
.hero-stack img:nth-child(1) {
  width: 62%; top: 0; right: 0;
  transform: rotate(3deg);
  animation-delay: .1s;
}
.hero-stack img:nth-child(2) {
  width: 56%; bottom: 0; left: 0;
  transform: rotate(-4deg);
  animation-delay: .24s;
  z-index: 2;
}
@keyframes float-in {
  from { opacity: 0; transform: translateY(28px) rotate(0deg) scale(.94); }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-stack img:nth-child(1) { animation: float-in .9s var(--ease) .1s both, bob 7s var(--ease) 1.2s infinite; }
  .hero-stack img:nth-child(2) { animation: float-in .9s var(--ease) .24s both, bob 8s var(--ease) 1.6s infinite reverse; }
}
@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}

.hero-badge {
  position: absolute;
  bottom: 6%; right: -2%;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 260px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow);
  z-index: 3;
  animation: float-in .9s var(--ease) .5s both;
}
@supports (backdrop-filter: blur(1px)) { .hero-badge { backdrop-filter: blur(12px); } }
.hero-badge strong { display: block; font-size: .92rem; font-weight: 700; }
.hero-badge span { font-size: .8rem; color: var(--color-text-muted); line-height: 1.4; }

/* ============================================================
   TRUST BAR + CIFRAS
   ============================================================ */

.trust-bar { background: var(--color-primary); color: #fff; }
/* Columnas explícitas y no `auto-fit`: con auto-fit los 4 puntos caían 3+1 y la
   fila suelta se veía como un error de maquetación. */
.trust-bar .container {
  display: grid;
  gap: 18px 28px;
  grid-template-columns: 1fr;
  padding-block: 26px;
}
@media (min-width: 560px) { .trust-bar .container { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1080px) { .trust-bar .container { grid-template-columns: repeat(4, 1fr); gap: 4px 28px; } }
.trust-item { display: flex; align-items: center; gap: 13px; }
.trust-item .icon {
  flex: none;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, .12);
  font-size: 1.15rem;
}
.trust-item strong { display: block; font-size: .92rem; font-weight: 650; }
.trust-item span { font-size: .8rem; color: rgba(255, 255, 255, .68); line-height: 1.4; }

@media (min-width: 860px) {
  .brand-teaser { grid-template-columns: 1fr 1fr; }
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  text-align: center;
  padding-block: clamp(36px, 5vw, 60px);
}
.stat-num {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -.04em;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}
.stat-label { font-size: .84rem; color: var(--color-text-muted); }

/* ============================================================
   SECCIONES
   ============================================================ */

.section { padding-block: clamp(52px, 8vw, 100px); }
.section-alt { background: var(--color-surface-alt); }
.section-tight { padding-block: clamp(32px, 5vw, 56px); }

.section-head {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
  margin-bottom: clamp(26px, 4vw, 44px);
}
.section-head > * + * { margin-top: 12px; }
.section-head p { color: var(--color-text-muted); max-width: 56ch; }
.section-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

/* ============================================================
   CARRUSEL DE COLECCIÓN — scroll-snap nativo
   ============================================================ */

.carousel-wrap { position: relative; }
.carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(215px, 1fr);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  padding: 4px var(--gutter) 20px;
  max-width: var(--max-width);
  margin-inline: auto;
  scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel > * { scroll-snap-align: start; }
@media (min-width: 700px) { .carousel { grid-auto-columns: minmax(255px, 1fr); } }

.carousel-nav {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  z-index: 5;
  width: 44px; height: 44px;
  display: none;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow);
  color: var(--color-text);
  transition: transform var(--t) var(--ease), opacity var(--t) var(--ease);
}
@media (min-width: 900px) { .carousel-nav { display: grid; } }
.carousel-nav:hover { transform: translate(0, -50%) scale(1.1); }
.carousel-nav[hidden] { display: none; }
.carousel-nav.prev { left: 8px; }
.carousel-nav.next { right: 8px; }

/* ============================================================
   TARJETA DE PRODUCTO — cross-fade frente/espalda
   ============================================================ */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: clamp(14px, 2vw, 26px);
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
  /* Aquí iba `content-visibility: auto`. Se quitó: con 50 tarjetas el ahorro de
     render es mínimo (el peso real ya se resolvió con srcset + carga diferida
     de la cara frontal), y en cambio saca el contenido no visible del árbol de
     accesibilidad y del buscador del navegador (Ctrl+F). No vale la pena. */
}
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); } }

.product-card {
  display: flex;
  flex-direction: column;
  container-type: inline-size;
}

.product-media {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-cream);
  isolation: isolate;
}
.product-media img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity var(--t-slow) var(--ease), transform .6s var(--ease);
}
.product-media .img-front { opacity: 0; }
.product-card:hover .product-media img,
.product-card:focus-within .product-media img { transform: scale(1.045); }
/* El hover muestra el frente de la camiseta: el cliente ve las dos caras
   sin tener que entrar al producto. Los dos recortes están alineados al
   píxel, así que el cambio no salta. */
@media (hover: hover) {
  .product-card:hover .img-back { opacity: 0; }
  .product-card:hover .img-front { opacity: 1; }
}
.product-card.flipped .img-back { opacity: 0; }
.product-card.flipped .img-front { opacity: 1; }

.product-flip {
  position: absolute;
  bottom: 10px; right: 10px;
  z-index: 3;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow-sm);
  font-size: .95rem;
  transition: transform var(--t) var(--ease);
}
.product-flip:active { transform: scale(.88) rotate(180deg); }
@media (hover: hover) { .product-flip { display: none; } }

.product-badge {
  position: absolute;
  top: 10px; left: 10px;
  z-index: 3;
  padding: 5px 11px;
  border-radius: 100px;
  background: var(--color-accent);
  color: #241200;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.product-badge.new { background: var(--color-primary); color: #fff; }

/* Selector rápido de talla que sube desde abajo al pasar el mouse */
.product-quick {
  position: absolute;
  inset-inline: 8px;
  bottom: 8px;
  z-index: 2;
  display: flex;
  gap: 5px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .95);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  /* `visibility` además de `opacity` para que los lectores de pantalla no
     anuncien las tallas mientras el selector está oculto. */
  visibility: hidden;
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), visibility var(--t);
  pointer-events: none;
}
@supports (backdrop-filter: blur(1px)) { .product-quick { backdrop-filter: blur(10px); } }
@media (hover: hover) {
  .product-card:hover .product-quick,
  .product-card:focus-within .product-quick {
    opacity: 1; transform: none; visibility: visible; pointer-events: auto;
  }
}
.product-quick button {
  flex: 1;
  padding: 8px 0;
  border-radius: 8px;
  font-size: .78rem;
  font-weight: 700;
  background: var(--color-surface-alt);
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
}
.product-quick button:hover { background: var(--color-primary); color: #fff; transform: translateY(-2px); }
@container (max-width: 190px) { .product-quick { display: none; } }

.product-info { padding: 12px 2px 0; display: flex; flex-direction: column; gap: 3px; }
.product-info h3 {
  font-family: var(--font-body);
  font-size: .96rem;
  font-weight: 620;
  letter-spacing: -.01em;
  line-height: 1.3;
}
.product-title-link:hover h3 { color: var(--color-primary-soft); }
.product-meta { font-size: .78rem; color: var(--color-text-muted); }
.product-price { display: flex; align-items: baseline; gap: 8px; font-weight: 750; font-size: 1rem; margin-top: 2px; }
.price-old { color: var(--color-text-muted); font-weight: 500; font-size: .86rem; text-decoration: line-through; }

.product-card-actions { display: flex; gap: 8px; margin-top: 12px; }
.product-card-actions .btn { flex: 1; padding: 11px 14px; font-size: .84rem; }

/* Skeleton mientras carga el catálogo */
.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(100deg, var(--color-surface-alt) 30%, #eceff5 50%, var(--color-surface-alt) 70%);
  background-size: 220% 100%;
  animation: shimmer 1.4s linear infinite;
  aspect-ratio: 4 / 5;
}
@keyframes shimmer { to { background-position: -220% 0; } }

/* ============================================================
   CATEGORÍAS
   ============================================================ */

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.category-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  min-height: 168px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--color-cream);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(7, 26, 69, .72));
  z-index: 1;
  transition: opacity var(--t) var(--ease);
}
.category-card img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.category-card:hover img { transform: scale(1.08); }
.category-card strong, .category-card span { position: relative; z-index: 2; color: #fff; }
.category-card strong { font-family: var(--font-heading); font-size: 1.08rem; font-weight: 750; letter-spacing: -.02em; }
.category-card span { font-size: .78rem; color: rgba(255, 255, 255, .74); }

/* ============================================================
   PASOS / VALORES
   ============================================================ */

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 18px;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.value-card {
  position: relative;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
              border-color var(--t) var(--ease);
}
.value-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.value-card .icon {
  width: 50px; height: 50px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--color-accent-soft);
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.value-card h3 { margin-bottom: 8px; }
.value-card p { font-size: .93rem; color: var(--color-text-muted); }
.value-step {
  position: absolute;
  top: 22px; right: 26px;
  font-family: var(--font-heading);
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--color-border);
  line-height: 1;
}

/* ============================================================
   BANDA CTA
   ============================================================ */

.cta-band {
  position: relative;
  overflow: hidden;
  max-width: var(--max-width);
  margin-inline: auto;
  padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 64px);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(90% 120% at 92% 4%, rgba(240, 146, 26, .3), transparent 56%),
    var(--color-primary);
  color: #fff;
  text-align: center;
}
.cta-band > * + * { margin-top: 16px; }
.cta-band p { color: rgba(255, 255, 255, .78); max-width: 52ch; margin-inline: auto; }
.cta-band .btn-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ============================================================
   CATÁLOGO — filtros
   ============================================================ */

.catalog-toolbar {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  background: rgba(255, 255, 255, .9);
  border-bottom: 1px solid var(--color-border);
  padding-block: 14px;
}
@supports (backdrop-filter: blur(1px)) { .catalog-toolbar { backdrop-filter: blur(16px); } }
/* Los chips van en su propia fila y el buscador debajo. Compartir la fila los
   dejaba cortados a ras del buscador, como si faltara contenido. Solo se juntan
   en pantallas anchas, donde de verdad caben. */
.catalog-toolbar .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
  flex-basis: 100%;
  min-width: 0;
  /* Desvanece el borde derecho para que se lea "hay más, desliza" */
  mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 28px), transparent 100%);
}
.filter-chips::-webkit-scrollbar { display: none; }
.toolbar-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; flex: 1; }
@media (min-width: 1180px) {
  .filter-chips { flex-basis: auto; flex: 1; mask-image: none; }
  .toolbar-tools { flex: none; }
}
.chip {
  flex: none;
  padding: 9px 17px;
  border-radius: 100px;
  border: 1.5px solid var(--color-border);
  font-size: .86rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.chip:hover { border-color: var(--color-primary); transform: translateY(-1px); }
.chip.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.chip .chip-count { opacity: .55; margin-left: 5px; font-weight: 500; }

.catalog-search {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  border-radius: 100px;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  min-width: 200px;
}
.catalog-search:focus-within { border-color: var(--color-primary); }
.catalog-search input { flex: 1; border: 0; outline: none; font: inherit; font-size: .88rem; background: none; min-width: 0; }
.catalog-sort {
  padding: 10px 14px;
  border-radius: 100px;
  border: 1.5px solid var(--color-border);
  font: inherit;
  font-size: .86rem;
  font-weight: 600;
  background: var(--color-surface);
  cursor: pointer;
}
.catalog-count { font-size: .84rem; color: var(--color-text-muted); }
.catalog-empty { grid-column: 1 / -1; padding: 56px 20px; text-align: center; color: var(--color-text-muted); }

/* ============================================================
   DETALLE DE PRODUCTO
   ============================================================ */

.product-detail {
  display: grid;
  gap: clamp(24px, 4vw, 56px);
  max-width: var(--max-width);
  margin-inline: auto;
  padding: clamp(20px, 3vw, 44px) var(--gutter) clamp(48px, 7vw, 88px);
}
@media (min-width: 900px) { .product-detail { grid-template-columns: 1.06fr .94fr; align-items: start; } }

.product-gallery { display: flex; flex-direction: column; gap: 12px; }
.gallery-main {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-cream);
  cursor: zoom-in;
}
.gallery-main img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease), opacity var(--t) var(--ease);
}
.gallery-main.zoomed img { transform: scale(1.9); cursor: zoom-out; transition-duration: .45s; }
.gallery-thumbs { display: flex; gap: 10px; }
.gallery-thumbs button {
  width: 74px;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-cream);
  border: 2px solid transparent;
  transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.gallery-thumbs button:hover { transform: translateY(-2px); }
.gallery-thumbs button[aria-current="true"] { border-color: var(--color-primary); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.product-info-detail { display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 900px) { .product-info-detail { position: sticky; top: calc(var(--header-h) + 24px); } }

.breadcrumb { font-size: .82rem; color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-primary); text-decoration: underline; }
.product-info-detail h1 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
.product-detail-price { display: flex; align-items: baseline; gap: 12px; font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; }
.product-detail-price .price-old { font-size: 1.05rem; }
.product-desc { color: var(--color-text-muted); }

.option-group > * + * { margin-top: 10px; }
.option-label { display: flex; justify-content: space-between; align-items: center; font-size: .84rem; font-weight: 700; }
.option-label a { font-weight: 550; color: var(--color-primary); text-decoration: underline; text-underline-offset: 2px; }
.option-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.option-pill {
  min-width: 52px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--color-border);
  font-size: .9rem;
  font-weight: 650;
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.option-pill:hover { border-color: var(--color-primary); transform: translateY(-2px); }
.option-pill.selected { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

.qty-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.qty-control {
  display: flex;
  align-items: center;
  gap: 2px;
  border: 1.5px solid var(--color-border);
  border-radius: 100px;
  padding: 4px;
}
.qty-control button {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1.15rem;
  transition: background-color var(--t-fast) var(--ease);
}
.qty-control button:hover { background: var(--color-surface-alt); }
.qty-control span { min-width: 34px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

.product-actions { display: flex; flex-direction: column; gap: 10px; }
.note-inline {
  display: flex;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 12px;
  background: var(--color-accent-soft);
  font-size: .86rem;
  line-height: 1.5;
}
.trust-mini { display: flex; flex-direction: column; gap: 9px; font-size: .86rem; color: var(--color-text-muted); }
.trust-mini span { display: flex; align-items: center; gap: 9px; }

.spec-list { border-top: 1px solid var(--color-border); }
.spec-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: .88rem;
}
.spec-list dt { color: var(--color-text-muted); }
.spec-list dd { font-weight: 600; text-align: right; }

/* ============================================================
   CARRITO — <dialog> deslizante
   ============================================================ */

.cart-drawer {
  --drawer-w: min(430px, 100vw);
  position: fixed;
  inset: 0 0 0 auto;
  width: var(--drawer-w);
  max-width: 100vw;
  max-height: 100dvh;
  height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
/* OJO: el `display` va SOLO en [open]. Si se pone `display: flex` en la regla
   base, se anula el `display: none` que el navegador aplica a un <dialog>
   cerrado — y el panel del carrito queda encima de la página interceptando
   todos los clics del lado derecho. Pasó, y no se ve a simple vista. */
.cart-drawer[open] { display: flex; flex-direction: column; }
.cart-drawer::backdrop { background: rgba(7, 26, 69, .38); }
.cart-drawer[open] { animation: drawer-in .42s var(--ease); }
.cart-drawer[open]::backdrop { animation: fade-in .42s var(--ease); }
.cart-drawer.closing { animation: drawer-out .3s var(--ease) forwards; }
.cart-drawer.closing::backdrop { animation: fade-out .3s var(--ease) forwards; }
@keyframes drawer-in { from { transform: translateX(100%); } }
@keyframes drawer-out { to { transform: translateX(100%); } }
@keyframes fade-out { to { opacity: 0; } }

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px var(--gutter);
  border-bottom: 1px solid var(--color-border);
}
.cart-head h2 { font-size: 1.25rem; }
.cart-items { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 8px var(--gutter); }
.cart-item {
  display: grid;
  grid-template-columns: 68px 1fr auto;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
  animation: slide-up .38s var(--ease) both;
}
.cart-item.removing { animation: shrink-out .3s var(--ease) forwards; }
@keyframes shrink-out { to { opacity: 0; transform: translateX(28px); max-height: 0; padding-block: 0; } }
.cart-item img { width: 68px; aspect-ratio: 4/5; object-fit: cover; border-radius: 10px; background: var(--color-cream); }
.cart-item-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cart-item-body strong { font-size: .92rem; font-weight: 650; }
.cart-item-body small { font-size: .78rem; color: var(--color-text-muted); }
.cart-item-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 8px; }
.cart-item-price { font-weight: 700; font-size: .92rem; white-space: nowrap; }
.cart-remove { font-size: .78rem; color: var(--color-text-muted); text-decoration: underline; }
.cart-remove:hover { color: var(--color-danger); }

.cart-foot { padding: 18px var(--gutter) calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--color-border); display: flex; flex-direction: column; gap: 12px; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.15rem; font-weight: 800; }
.cart-total small { font-size: .78rem; font-weight: 500; color: var(--color-text-muted); }
.cart-empty { padding: 64px 24px; text-align: center; color: var(--color-text-muted); }
.cart-empty .icon { font-size: 2.6rem; margin-bottom: 12px; }

/* ============================================================
   TOAST
   ============================================================ */

.toast-stack {
  position: fixed;
  z-index: 200;
  bottom: calc(18px + env(safe-area-inset-bottom));
  left: 50%;
  translate: -50% 0;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  width: min(430px, calc(100vw - 24px));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-radius: 14px;
  background: var(--color-primary-deep);
  color: #fff;
  font-size: .89rem;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toast-in .42s var(--ease-spring);
}
.toast.out { animation: toast-out .3s var(--ease) forwards; }
.toast img { width: 34px; aspect-ratio: 4/5; object-fit: cover; border-radius: 6px; }
.toast .toast-action { margin-left: auto; font-weight: 700; color: var(--color-accent); white-space: nowrap; }
@keyframes toast-in { from { opacity: 0; transform: translateY(18px) scale(.94); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }

/* ============================================================
   BOTÓN FLOTANTE DE WHATSAPP
   ============================================================ */

.whatsapp-float {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom));
  right: 20px;
  z-index: 70;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--color-whatsapp);
  color: #fff;
  box-shadow: 0 8px 24px rgba(37, 211, 102, .4);
  transition: transform var(--t) var(--ease-spring), box-shadow var(--t) var(--ease);
}
.whatsapp-float:hover { transform: scale(1.08) rotate(-6deg); }
.whatsapp-float svg { width: 28px; height: 28px; }

/* ============================================================
   CHAT — Mingo
   ============================================================ */

.chat-launcher {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom));
  left: 20px;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 8px 8px;
  border-radius: 100px;
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 8px 24px rgba(13, 42, 108, .34);
  transition: transform var(--t) var(--ease-spring), box-shadow var(--t) var(--ease);
  animation: launcher-in .6s var(--ease-spring) 1.1s both;
}
@keyframes launcher-in { from { opacity: 0; transform: translateY(20px) scale(.7); } }
.chat-launcher:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 12px 32px rgba(13, 42, 108, .42); }
.chat-launcher-avatar {
  width: 40px; height: 40px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--color-accent);
  color: #241200;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
}
.chat-launcher-text { display: flex; flex-direction: column; line-height: 1.25; text-align: left; }
.chat-launcher-text strong { font-size: .88rem; font-weight: 700; }
.chat-launcher-text span { font-size: .74rem; color: rgba(255, 255, 255, .72); }
@media (max-width: 560px) { .chat-launcher-text { display: none; } .chat-launcher { padding: 8px; } }

/* Pulso único a los 8 s: invita sin acosar */
.chat-launcher.nudge .chat-launcher-avatar { animation: nudge 1.1s var(--ease) 2; }
@keyframes nudge {
  0%, 100% { transform: scale(1) rotate(0); }
  25% { transform: scale(1.12) rotate(-8deg); }
  60% { transform: scale(1.05) rotate(6deg); }
}
.chat-launcher .chat-dot {
  position: absolute;
  top: 6px; left: 40px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 2px solid var(--color-primary);
  opacity: 0;
  transition: opacity var(--t) var(--ease);
}
.chat-launcher.has-nudge .chat-dot { opacity: 1; }

.chat-panel {
  position: fixed;
  z-index: 80;
  bottom: calc(20px + env(safe-area-inset-bottom));
  left: 20px;
  width: min(390px, calc(100vw - 32px));
  height: min(600px, calc(100dvh - 120px));
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform-origin: bottom left;
  opacity: 0;
  transform: translateY(16px) scale(.94);
  visibility: hidden;
  transition: opacity var(--t) var(--ease), transform .38s var(--ease-spring), visibility var(--t);
}
.chat-panel.open { opacity: 1; transform: none; visibility: visible; }
@media (max-width: 560px) {
  .chat-panel {
    inset: 0;
    width: 100%; height: 100dvh;
    border-radius: 0;
    transform-origin: bottom center;
  }
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  background: var(--color-primary);
  color: #fff;
  flex: none;
}
.chat-head .chat-launcher-avatar { width: 38px; height: 38px; font-size: 1rem; }
.chat-head-text { flex: 1; min-width: 0; line-height: 1.25; }
.chat-head-text strong { display: block; font-size: .95rem; }
.chat-head-text span { font-size: .74rem; color: rgba(255, 255, 255, .72); display: flex; align-items: center; gap: 6px; }
.chat-online {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, .6);
  animation: ping 2.4s var(--ease) infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); }
}
.chat-close { color: #fff; opacity: .8; }
.chat-close:hover { opacity: 1; }

.chat-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--color-surface-alt);
  scroll-behavior: smooth;
}
.chat-msg {
  max-width: 86%;
  padding: 11px 15px;
  border-radius: 18px;
  font-size: .92rem;
  line-height: 1.5;
  animation: msg-in .4s var(--ease) both;
}
@keyframes msg-in { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.chat-msg.bot {
  align-self: flex-start;
  background: var(--color-surface);
  border-bottom-left-radius: 6px;
  box-shadow: var(--shadow-sm);
}
.chat-msg.user {
  align-self: flex-end;
  background: var(--color-primary);
  color: #fff;
  border-bottom-right-radius: 6px;
}
.chat-msg strong { font-weight: 700; }
.chat-msg a { color: var(--color-primary-soft); text-decoration: underline; }
.chat-msg.user a { color: #fff; }

.chat-typing { align-self: flex-start; display: flex; gap: 4px; padding: 14px 16px; background: var(--color-surface); border-radius: 18px 18px 18px 6px; box-shadow: var(--shadow-sm); }
.chat-typing i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--color-text-muted);
  animation: typing 1.2s var(--ease) infinite;
}
.chat-typing i:nth-child(2) { animation-delay: .15s; }
.chat-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }

/* Tarjetas de producto dentro del chat */
.chat-cards { display: flex; gap: 10px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; align-self: stretch; }
.chat-cards::-webkit-scrollbar { display: none; }
.chat-card {
  flex: none;
  width: 148px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  animation: msg-in .4s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}
.chat-card img { width: 100%; aspect-ratio: 4/5; object-fit: cover; background: var(--color-cream); }
.chat-card-body { padding: 9px 10px 10px; display: flex; flex-direction: column; gap: 5px; }
.chat-card-body strong { font-size: .82rem; font-weight: 650; line-height: 1.25; }
.chat-card-body .p { font-size: .84rem; font-weight: 750; }
.chat-card-body .btn { padding: 8px 10px; font-size: .76rem; border-radius: 9px; }

.chat-quick { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 16px 12px; background: var(--color-surface-alt); }
.chat-quick button {
  padding: 8px 14px;
  border-radius: 100px;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  font-size: .8rem;
  font-weight: 600;
  transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease);
}
.chat-quick button:hover { border-color: var(--color-primary); background: var(--color-primary-tint); transform: translateY(-1px); }

.chat-form {
  display: flex;
  gap: 8px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  flex: none;
}
.chat-form input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border-radius: 100px;
  border: 1.5px solid var(--color-border);
  font: inherit;
  font-size: .92rem;
  outline: none;
  transition: border-color var(--t-fast) var(--ease);
}
.chat-form input:focus { border-color: var(--color-primary); }
.chat-send {
  width: 44px; height: 44px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  transition: transform var(--t-fast) var(--ease-spring), background-color var(--t-fast) var(--ease);
}
.chat-send:hover { transform: scale(1.08); background: var(--color-primary-soft); }
.chat-send:active { transform: scale(.9); }
.chat-disclaimer { font-size: .68rem; color: var(--color-text-muted); text-align: center; padding: 0 16px 10px; background: var(--color-surface); }

/* ============================================================
   PÁGINAS DE CONTENIDO
   ============================================================ */

.page-hero {
  background:
    radial-gradient(90% 100% at 90% 0%, rgba(240, 146, 26, .14), transparent 60%),
    var(--color-cream);
  padding-block: clamp(40px, 6vw, 76px);
}
.page-hero .container > * + * { margin-top: 14px; }
.page-hero p { color: var(--color-text-muted); max-width: 58ch; font-size: 1.05rem; }

.prose { max-width: 74ch; }
.prose > * + * { margin-top: 18px; }
.prose h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); margin-top: 44px; }
.prose h3 { margin-top: 30px; }
.prose p, .prose li { color: var(--color-text-muted); }
.prose strong { color: var(--color-text); font-weight: 650; }
.prose ul { padding-left: 22px; list-style: disc; }
.prose li + li { margin-top: 8px; }
.prose a { color: var(--color-primary); text-decoration: underline; text-underline-offset: 2px; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.info-card {
  padding: 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.info-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.info-card .icon { font-size: 1.6rem; margin-bottom: 12px; }
.info-card h3 { margin-bottom: 8px; font-size: 1.1rem; }
.info-card p, .info-card a { font-size: .93rem; color: var(--color-text-muted); }
.info-card a:hover { color: var(--color-primary); }

/* Tabla de medidas — se muestra vacía a propósito hasta que el cliente mida */
.size-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.size-table th, .size-table td { padding: 13px 12px; text-align: left; border-bottom: 1px solid var(--color-border); }
.size-table th { font-weight: 700; background: var(--color-surface-alt); }
.size-table td:not(:first-child) { color: var(--color-text-muted); }
.table-scroll { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--color-border); }

.callout {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--color-accent-soft);
  border-left: 4px solid var(--color-accent);
}
.callout .icon { font-size: 1.3rem; flex: none; }
.callout p { font-size: .92rem; margin: 0; }
.callout-info { background: var(--color-primary-tint); border-left-color: var(--color-primary); }

.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  font-weight: 650;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--color-accent);
  transition: transform var(--t) var(--ease);
  flex: none;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding-bottom: 20px; color: var(--color-text-muted); font-size: .94rem; }
.faq-item[open] p { animation: slide-up .34s var(--ease); }

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer { background: var(--color-primary-deep); color: rgba(255, 255, 255, .7); padding-block: clamp(44px, 6vw, 72px) 0; }
.footer-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.footer-brand { max-width: 34ch; }
.footer-brand img { height: 56px; width: auto; margin-bottom: 14px; }
.footer-brand p { font-size: .9rem; line-height: 1.6; }
.footer-grid h4 { color: #fff; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 16px; font-family: var(--font-body); font-weight: 700; }
.footer-grid a { display: block; font-size: .9rem; padding: 5px 0; transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.footer-grid a:hover { color: #fff; transform: translateX(3px); }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  padding: 0;
  transition: background-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.footer-social a:hover { background: var(--color-accent); color: #241200; transform: translateY(-3px); }
.footer-social svg { width: 19px; height: 19px; }
.footer-bottom {
  margin-top: 44px;
  padding: 22px var(--gutter);
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: .8rem;
  text-align: center;
}
.footer-bottom strong { color: #fff; }

/* ============================================================
   404
   ============================================================ */

.notfound { min-height: 62vh; display: grid; place-content: center; text-align: center; gap: 18px; padding: 60px var(--gutter); }
.notfound .code { font-family: var(--font-heading); font-size: clamp(5rem, 18vw, 11rem); font-weight: 800; line-height: .9; letter-spacing: -.05em; color: var(--color-primary-tint); }
.notfound .btn-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Espacio para que el botón flotante y el chat no tapen el footer */
body { padding-bottom: 0; }
@media (max-width: 560px) { .site-footer { padding-bottom: 80px; } }
