/* ==========================================================
   Santiany Concept — Storefront
   ========================================================== */

:root {
  --color-primary: #E57A46;
  --color-primary-dark: #C4602F;
  --color-primary-light: #F3D9C7;
  --color-black: #171717;
  --color-dark: #1f1f1f;
  --color-gray-900: #222;
  --color-gray-700: #555;
  --color-gray-500: #888;
  --color-gray-300: #ddd;
  --color-gray-100: #f5f4f2;
  --color-white: #ffffff;
  --color-yellow: #FFCC00;
  --radius: 10px;
  --shadow: 0 4px 18px rgba(0,0,0,.08);
  --font-heading: 'Unbounded', 'Arial Black', Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1280px;
}

/* ---------- Modo oscuro (botón luz día/noche) ---------- */
:root[data-theme="dark"] {
  --color-white: #16171a;
  --color-gray-900: #ececef;
  --color-gray-700: #c7cad1;
  --color-gray-500: #9a9da5;
  --color-gray-300: #34363d;
  --color-gray-100: #1f2024;
  --color-primary-light: #3a2a1f;
  --shadow: 0 4px 18px rgba(0,0,0,.35);
}
:root[data-theme="dark"] .btn-outline { border-color: var(--color-gray-700); color: var(--color-gray-900); }
:root[data-theme="dark"] .btn-outline:hover { background: var(--color-gray-900); color: var(--color-black); }
:root[data-theme="dark"] img:not(.footer-logo):not(.auth-card-logo) { opacity: .95; }
/* El fondo "blanco" de estas tarjetas se invierte más oscuro que la propia
   página en modo oscuro: sin esto, la tarjeta queda casi invisible. */
:root[data-theme="dark"] .nosotros-mv-card,
:root[data-theme="dark"] .nosotros-stat { background: #222429; border-color: #383b43; }

/* ---------- Tipografía de alto impacto (titulares) ----------
   Unbounded (Google Fonts) como alternativa libre a Agrandir: geométrica,
   gruesa, mismo espíritu "brand brief". Solo en h1/h2 y titulares puntuales;
   h3/h4 de producto se quedan en la tipografía de cuerpo para legibilidad. */
h1, h2 { font-family: var(--font-heading); font-weight: 800; letter-spacing: .2px; }

* { box-sizing: border-box; }
/* Chrome/Safari no aplican [hidden] a elementos <svg> de forma fiable (a
   diferencia de cualquier otro elemento HTML): sin esto, un <svg hidden>
   sigue dibujándose encima del ícono que sí debería verse (ej. los íconos de
   play/pausa y de sonido con mute). */
svg[hidden] { display: none; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-gray-900);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ---------- Top bar ---------- */
.top-bar {
  background: var(--color-black);
  color: #fff;
  text-align: center;
  font-size: .8rem;
  padding: 8px 12px;
  letter-spacing: .3px;
}
/* Mensajes de la barra superior (Configuración → Tienda y envíos): rotan si hay varios */
.top-bar-mensaje { margin: 0; display: none; }
.top-bar-mensaje.activo { display: block; animation: topBarEntrar .45s ease; }
.top-bar-enlace { color: inherit; text-decoration: none; display: block; }
.top-bar-enlace:hover .top-bar-mensaje { text-decoration: underline; }
@keyframes topBarEntrar { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .top-bar-mensaje.activo { animation: none; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-300);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 20px;
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(240px, 680px) minmax(130px, 1fr);
  align-items: center;
  gap: 16px;
}
.logo img { height: 52px; width: auto; object-fit: contain; }
/* El header cambia de fondo claro/oscuro con el tema, así que el logo también
   tiene que cambiar: versión clara (texto negro) y oscura (texto blanco). */
.logo-oscuro { display: none; }
:root[data-theme="dark"] .logo-claro { display: none; }
:root[data-theme="dark"] .logo-oscuro { display: block; }

/* ---------- Banner "descarga nuestra app" (solo móvil, descartable) ---------- */
.app-banner {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--color-black);
  color: #fff;
  padding: 9px 16px;
}
.app-banner-link { display: flex; align-items: center; gap: 9px; color: inherit; flex: 1; justify-content: center; min-width: 0; }
.app-banner-link span { font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-banner-link strong { font-weight: 700; }
.app-banner-close { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; border: none; background: rgba(255,255,255,.12); color: #fff; flex-shrink: 0; }
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
}
.menu-toggle span { width: 24px; height: 2px; background: var(--color-black); display: block; }

.search-wrap { position: relative; max-width: 680px; width: 100%; justify-self: stretch; }
.search-form {
  display: flex;
  align-items: center;
  background: var(--color-gray-100);
  border-radius: 999px;
  padding: 8px 16px;
  width: 100%;
  gap: 4px;
}
.search-form input {
  border: none;
  background: transparent;
  outline: none;
  flex: 1;
  font-size: .9rem;
}
.search-form button { background: none; border: none; color: var(--color-gray-700); display: flex; cursor: pointer; }
.search-mic-btn { padding: 2px; border: none; background: none; color: var(--color-gray-700); cursor: pointer; display: flex; transition: color .15s ease; }
.search-mic-btn.listening { color: var(--color-primary); animation: mic-pulse 1.1s ease-in-out infinite; }
@keyframes mic-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

/* ---------- Resultados de búsqueda en vivo ---------- */
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: 0 14px 32px rgba(0,0,0,.14);
  border: 1px solid var(--color-gray-300);
  max-height: 420px;
  overflow-y: auto;
  z-index: 200;
}
.search-results-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-gray-100);
}
.search-results-item:hover { background: var(--color-gray-100); }
.search-results-item img { width: 40px; height: 48px; object-fit: cover; border-radius: 6px; background: var(--color-gray-100); flex-shrink: 0; }
.search-results-item .sr-info { min-width: 0; flex: 1; }
.search-results-item .sr-name { font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-results-item .sr-price { font-size: .8rem; font-weight: 700; color: var(--color-primary-dark); margin-top: 2px; }
.search-results-item .sr-price-old { font-size: .72rem; color: var(--color-gray-500); text-decoration: line-through; margin-left: 6px; font-weight: 400; }
.search-results-footer { display: block; text-align: center; padding: 11px; font-size: .82rem; font-weight: 700; color: var(--color-primary-dark); border-top: 1px solid var(--color-gray-100); }
.search-results-footer:hover { background: var(--color-gray-100); }
.search-results-empty { padding: 20px 14px; text-align: center; color: var(--color-gray-500); font-size: .85rem; }

/* ---------- Búsqueda móvil: overlay de pantalla completa ---------- */
.mobile-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,.45);
  display: flex;
  flex-direction: column;
  animation: ms-fade-in .2s ease;
}
.mobile-search-overlay[hidden] { display: none; }
@keyframes ms-fade-in { from { opacity: 0; } to { opacity: 1; } }
.mobile-search-panel {
  background: var(--color-white);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  box-shadow: var(--shadow);
  animation: ms-slide-down .25s ease;
}
@keyframes ms-slide-down { from { transform: translateY(-14px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.mobile-search-form {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-gray-100);
  border-radius: 999px;
  padding: 11px 16px;
}
.mobile-search-form svg { color: var(--color-gray-700); flex-shrink: 0; }
.mobile-search-form input { border: none; background: transparent; outline: none; flex: 1; min-width: 0; font-size: .95rem; }
.mobile-search-close { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: none; background: var(--color-gray-100); color: var(--color-gray-900); flex-shrink: 0; }
.mobile-search-results { flex: 1; overflow-y: auto; background: var(--color-white); }
.mobile-search-results .search-results-item { padding: 14px 18px; }
.mobile-search-results .search-results-item img { width: 50px; height: 60px; }
.mobile-search-results .search-results-footer { padding: 16px; font-size: .88rem; }
.mobile-search-results .search-results-empty { padding: 40px 20px; }
body.mobile-search-open { overflow: hidden; }

/* ---------- Barra de navegación inferior (solo móvil) ---------- */
.mobile-bottom-nav { display: none; }

.header-actions { display: flex; align-items: center; gap: 18px; justify-self: end; }
.icon-link { position: relative; display: flex; color: var(--color-gray-900); border: none; background: none; padding: 0; font: inherit; cursor: pointer; }
.theme-toggle { align-items: center; justify-content: center; }
.theme-toggle .theme-icon-luna { display: none; }
:root[data-theme="dark"] .theme-toggle .theme-icon-sol { display: none; }
:root[data-theme="dark"] .theme-toggle .theme-icon-luna { display: block; }
.mobile-search-btn { display: none; }
.cart-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  background: var(--color-primary);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.main-nav {
  background: var(--color-white);
  border-top: 1px solid var(--color-gray-100);
}
.main-nav ul {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: center;
  gap: 28px;
  overflow-x: auto;
}
.main-nav a {
  display: block;
  padding: 12px 0;
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover { border-color: var(--color-primary); color: var(--color-primary-dark); }
.main-nav .nav-sale { color: var(--color-primary-dark); }

/* ---------- Flash messages ---------- */
.flash { padding: 12px 0; text-align: center; font-size: .9rem; }
.flash-exito { background: #e4f6ea; color: #1f7a3f; }
.flash-error { background: #fdeaea; color: #b02a2a; }

/* ---------- Hero / Banners ---------- */
.hero-slider {
  position: relative;
  overflow: hidden;
  background: var(--color-white);
  /* La proporción real la pone PHP inline según el primer banner (ver index.php).
     Sin banners (solo el slide de respaldo) NO se fuerza proporción aquí: si no,
     el contenedor queda forzado a 21/8 y el slide de respaldo (min-height 320px)
     deja un hueco en blanco enorme debajo. */
  aspect-ratio: 21 / 8;
}
/* Ojo: NO animar aspect-ratio. Recalcula layout en cada frame y es lo que causaba
   el "congelado" del slider — el cambio de proporción debe ser instantáneo. */
/* Los slides se apilan uno sobre otro: la transición es un crossfade + zoom lento (Ken Burns), sin saltos de layout. */
.hero-slide {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  visibility: hidden;
  z-index: 1;
  overflow: hidden;
  transition: opacity 1.1s ease, visibility 1.1s ease;
}
.hero-slide.active { opacity: 1; visibility: visible; z-index: 2; }
/* El zoom (Ken Burns) solo se anima al activarse; al desactivarse vuelve a 1.1 sin
   transición (instantáneo, invisible porque ya está desvaneciéndose), así cada ciclo
   arranca siempre desde el mismo punto y no se nota ningún salto. */
.hero-slide-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transform: scale(1.1);
  transition: none;
}
.hero-slide.active .hero-slide-img {
  transform: scale(1);
  transition: transform 7s cubic-bezier(.25,.1,.25,1);
}
.hero-slide::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(23,23,23,.65) 0%, rgba(23,23,23,.15) 60%);
}
/* Banner con imagen propia (ya trae su texto/botón dibujado): sin oscurecer, se ve completo */
.hero-slide--plain::before { display: none; }
.hero-content {
  position: absolute; top: 50%; left: 0; transform: translateY(-50%); z-index: 1;
  color: #fff; padding: 60px 40px; max-width: 560px;
  opacity: 0; transition: opacity .7s ease .25s, transform .7s ease .25s;
}
.hero-slide.active .hero-content { opacity: 1; }
/* Slide de respaldo (sin banners cargados): sin imagen, usa un alto fijo con degradado. */
.hero-slide--fallback { position: relative; min-height: 320px; display: none; align-items: center; }
.hero-slide--fallback.active { display: flex; }
.hero-content h2 { font-size: 2.4rem; margin: 0 0 10px; line-height: 1.1; text-transform: uppercase; }
.hero-content p { margin: 0 0 20px; font-size: 1rem; opacity: .9; }

.hero-dots { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
.hero-dots button { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.5); border: none; padding: 0; transition: background .2s ease, transform .2s ease; }
.hero-dots button.active { background: var(--color-white); transform: scale(1.25); }

/* ---------- Flechas del slider ---------- */
/* Tamaño fluido: se achica solo en pantallas chicas, sin quedar enorme sobre un banner delgado. */
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: clamp(26px, 5.5vw, 44px); height: clamp(26px, 5.5vw, 44px);
  border-radius: 50%;
  background: rgba(23,23,23,.4); color: #fff; border: 1.5px solid rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease, transform .2s ease, border-color .2s ease;
  backdrop-filter: blur(3px);
  padding: 0;
}
.hero-arrow svg { width: 42%; height: 42%; }
.hero-arrow:hover { background: var(--color-primary); border-color: var(--color-primary); transform: translateY(-50%) scale(1.08); }
.hero-arrow-prev { left: clamp(6px, 2vw, 16px); }
.hero-arrow-next { right: clamp(6px, 2vw, 16px); }

.btn {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(229,122,70,.28);
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease, color .15s ease;
}
.btn:hover { background: var(--color-primary-dark); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(229,122,70,.32); }
.btn:active { transform: translateY(0); box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(229,122,70,.4); }
.btn-outline { background: transparent; border: 2px solid var(--color-black); color: var(--color-gray-900); box-shadow: none; }
.btn-outline:hover { background: var(--color-black); color: #fff; box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.btn-dark { background: var(--color-black); box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.btn-dark:hover { background: #000; box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-sm { padding: 8px 16px; font-size: .75rem; }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.option-pills span { transition: border-color .15s ease, background .15s ease, color .15s ease; }
.option-pills label:hover span { border-color: var(--color-black); }

/* ---------- Section headings ---------- */
.section { padding: 48px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; }
.section-head h2 { position: relative; display: inline-block; font-size: 1.5rem; text-transform: uppercase; letter-spacing: .5px; margin: 0; padding-bottom: 10px; }

/* ---------- Trazo tipo spray/grafiti bajo los títulos (h1 en toda la tienda, h2 de sección) ---------- */
h1, .section-head h2 { position: relative; display: inline-block; padding-bottom: 18px; }
h1::after, .section-head h2::after {
  content: '';
  position: absolute; left: -2px; bottom: 0; width: calc(100% + 10px); height: 9px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 16' preserveAspectRatio='none'%3E%3Cpath d='M2 10 Q20 2 40 9 T80 7 Q100 13 120 6 T160 9 Q180 4 198 10' stroke='%23E57A46' stroke-width='6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 100% 100%;
}
/* Donde hay scroll-reveal, el trazo se "pinta" al aparecer; si no, se ve siempre. */
[data-reveal] h1::after, [data-reveal] .section-head h2::after {
  transform: scaleX(0); transform-origin: left center;
  transition: transform .55s cubic-bezier(.22,.9,.3,1) .12s;
}
[data-reveal].reveal-visible h1::after, [data-reveal].reveal-visible .section-head h2::after { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) {
  h1::after, .section-head h2::after { transition: none; transform: scaleX(1); }
}
.section-head a { font-size: .8rem; font-weight: 700; color: var(--color-primary-dark); white-space: nowrap; }

/* ---------- Category tiles ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

/* ---------- Carrusel de categorías: 3 por vista (2 tablet, 1 móvil), auto-avance ---------- */
.cat-carousel { position: relative; display: flex; align-items: center; gap: 22px; }
.cat-carousel-viewport { flex: 1; overflow: hidden; }
.cat-carousel-track { display: flex; gap: 16px; transition: transform .5s cubic-bezier(.65,0,.35,1); }
.cat-carousel-item { flex: 0 0 calc((100% - 32px) / 3); min-width: 0; }
.cat-carousel-arrow {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--color-white);
  border: 1.5px solid var(--color-gray-200, #e4e6ea);
  color: var(--color-gray-900);
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.cat-carousel-arrow:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; transform: scale(1.06); }
.cat-carousel-arrow:disabled { opacity: .35; cursor: default; pointer-events: none; }
.cat-carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.cat-carousel-dots button { width: 7px; height: 7px; border-radius: 50%; background: var(--color-gray-200, #e4e6ea); border: none; padding: 0; transition: background .2s ease, transform .2s ease; }
.cat-carousel-dots button.active { background: var(--color-primary); transform: scale(1.3); }

@media (max-width: 960px) {
  .cat-carousel-item { flex-basis: calc((100% - 16px) / 2); }
}
@media (max-width: 600px) {
  .cat-carousel-item { flex-basis: 100%; }
  .cat-carousel-arrow { width: 32px; height: 32px; }
}
.category-tile {
  display: block;
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1/1;
  background: var(--color-gray-100);
}
.category-tile img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.category-tile-img-primary { position: relative; z-index: 1; transition: transform .4s ease, opacity .35s ease; }
.category-tile-img-hover { position: absolute; inset: 0; z-index: 2; opacity: 0; transition: transform .4s ease, opacity .35s ease; }
.category-tile:hover .category-tile-img-primary { transform: scale(1.05); }
.category-tile:hover .category-tile-img-hover { opacity: 1; transform: scale(1.05); }
.category-tile span {
  position: absolute; inset: auto 0 0 0; z-index: 3;
  background: linear-gradient(0deg, rgba(0,0,0,.65), transparent);
  color: #fff;
  padding: 16px 14px 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-size: .8rem;
  text-align: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .25s ease, transform .25s ease;
}
.category-tile:hover span { opacity: 1; transform: translateY(0); }
.category-tile.no-img span { opacity: 1; transform: none; }

/* ---------- Product carousel / grid ---------- */
/* Carrusel horizontal de productos (Novedades, Ofertas de la portada). Cada tarjeta
   tiene ancho fijo (4 por vista): antes, con un solo producto, la tarjeta se estiraba
   a todo el ancho y la foto (3:4) quedaba gigante con barra de scroll vertical. */
.product-scroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.product-scroll::-webkit-scrollbar { display: none; }
.product-scroll-wrap { position: relative; }
.product-scroll-flecha {
  position: absolute; top: calc(50% - 4px); transform: translateY(-50%); z-index: 3;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--color-white); border: 1.5px solid var(--color-gray-300);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.14);
  transition: background .15s ease, border-color .15s ease, color .15s ease, opacity .15s ease;
}
.product-scroll-flecha:hover:not(:disabled) { background: var(--color-black); border-color: var(--color-black); color: #fff; }
.product-scroll-flecha:disabled { opacity: 0; pointer-events: none; }
.product-scroll-prev { left: -8px; }
.product-scroll-next { right: -8px; }
@media (max-width: 640px) {
  .product-scroll-flecha { display: none; }
}
.product-scroll .product-card { flex: 0 0 calc((100% - 3 * 18px) / 4); min-width: 200px; scroll-snap-align: start; }
@media (max-width: 980px) { .product-scroll .product-card { flex-basis: calc((100% - 2 * 18px) / 3); } }
@media (max-width: 640px) { .product-scroll { gap: 14px; } .product-scroll .product-card { flex-basis: calc((100% - 14px) / 2.2); min-width: 0; } }

/* ---------- Carrusel "Combina tu estilo" (home) ---------- */
.combo-home-scroll .combo-home-card { flex: 0 0 calc((100% - 3 * 18px) / 4); min-width: 210px; scroll-snap-align: start; }
@media (max-width: 980px) { .combo-home-scroll .combo-home-card { flex-basis: calc((100% - 2 * 18px) / 3); } }
@media (max-width: 640px) { .combo-home-scroll .combo-home-card { flex-basis: calc((100% - 14px) / 1.5); min-width: 0; } }
.combo-home-card {
  display: flex; flex-direction: column; gap: 4px;
  border: 1.5px solid var(--color-gray-300); border-radius: var(--radius); padding: 14px;
  background: var(--color-white); transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.combo-home-card:hover { border-color: var(--color-primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.combo-home-fotos { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.combo-home-fotos img { flex: 1 1 0; width: 0; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; background: var(--color-gray-100); }
.combo-home-plus { flex-shrink: 0; font-weight: 800; color: var(--color-primary); font-size: 1.1rem; }
.combo-home-card strong { font-size: .85rem; text-transform: uppercase; letter-spacing: .3px; color: var(--color-primary-dark); }
.combo-home-nombres { font-size: .78rem; color: var(--color-gray-700); line-height: 1.4; min-height: 2.1em; }
.combo-home-precio { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.combo-home-precio .price-now { font-weight: 800; font-size: 1.05rem; color: var(--color-gray-900); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.product-card { position: relative; }
.product-card .thumb {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-gray-100);
  aspect-ratio: 3/4;
}
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease, opacity .35s ease; }
.product-card .thumb-img-primary { position: relative; z-index: 1; }
/* Segunda imagen (hover): se apila encima y aparece al pasar el mouse, cubriendo la principal. */
.product-card .thumb-img-hover { position: absolute; inset: 0; z-index: 2; opacity: 0; }
.product-card:hover .thumb-img-primary { transform: scale(1.05); }
.product-card:hover .thumb-img-hover { opacity: 1; transform: scale(1.05); }
.badge-discount {
  position: absolute; top: 10px; left: 10px;
  background: var(--color-primary);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
}
.badge-sold-out {
  position: absolute; inset: 0;
  background: rgba(255,255,255,.7);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; text-transform: uppercase; font-size: .8rem; letter-spacing: .5px;
}
.product-card-actions { position: absolute; top: 10px; right: 10px; z-index: 3; display: flex; flex-direction: column; gap: 8px; }
.favorito-form, .comparar-form { margin: 0; }
.favorito-btn, .comparar-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border: none; border-radius: 50%;
  background: rgba(255,255,255,.9);
  color: var(--color-gray-700, #333);
  cursor: pointer;
  transition: transform .15s ease, color .15s ease;
}
.favorito-btn:hover, .comparar-btn:hover { transform: scale(1.1); }
.favorito-btn.active { color: var(--color-primary); }
.comparar-btn.active { color: var(--color-primary); background: var(--color-primary-light); }
.favorito-btn-detalle.active { color: var(--color-primary); border-color: var(--color-primary); }
.product-card .info { padding-top: 10px; }
.product-card .brand { font-size: .7rem; color: var(--color-gray-500); text-transform: uppercase; letter-spacing: .5px; }
.product-card h3 { font-size: .92rem; margin: 2px 0 6px; font-weight: 600; }
.price-row { display: flex; gap: 8px; align-items: baseline; }
.price-now { font-weight: 800; font-size: 1rem; }
.price-old { text-decoration: line-through; color: var(--color-gray-500); font-size: .82rem; }

/* ---------- Filters / Category page ---------- */
.category-header { padding: 14px 0 10px; }
.category-header h1 { text-transform: uppercase; font-size: 1.8rem; margin: 0 0 6px; }

/* ---------- Ruta de navegación (volver sin usar el menú principal) ---------- */
.breadcrumb { display: flex; align-items: center; gap: 8px; padding-top: 22px; font-size: .8rem; color: var(--color-gray-500); flex-wrap: wrap; }
.breadcrumb a { color: var(--color-gray-700); font-weight: 600; transition: color .15s ease; }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb-actual { color: var(--color-primary-dark); font-weight: 700; }

/* ---------- Sub-nav de subcategorías (con ícono) ---------- */
.subcat-nav { margin-bottom: 24px; border: 1px solid var(--color-gray-300); border-radius: 999px; overflow-x: auto; }
.subcat-nav ul { display: flex; justify-content: center; gap: 4px; padding: 6px; list-style: none; margin: 0; min-width: max-content; }
.subcat-nav a {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: .85rem; font-weight: 700;
  text-transform: uppercase;
  color: var(--color-gray-700);
  transition: background .15s ease, color .15s ease;
}
.subcat-nav a:hover { background: var(--color-gray-100); color: var(--color-gray-900); }
.subcat-nav a.active { background: var(--color-primary); color: #fff; }
.subcat-nav a.active .cat-icon { color: #fff; }
.subcat-nav .cat-icon { color: var(--color-primary); flex-shrink: 0; }
.subcat-nav a.subcat-volver { color: var(--color-gray-500); border-right: 1px solid var(--color-gray-300); border-radius: 0; margin-right: 2px; padding-right: 16px; }
.subcat-nav a.subcat-volver:hover { background: none; color: var(--color-gray-900); }
.category-layout { display: grid; grid-template-columns: 220px 1fr; gap: 30px; align-items: start; }
.category-layout:not(:has(.filters)) { grid-template-columns: 1fr; }
.filters { background: var(--color-gray-100); border-radius: var(--radius); padding: 18px; position: sticky; top: 90px; }
.filters h4 { text-transform: uppercase; font-size: .78rem; letter-spacing: .5px; margin: 16px 0 8px; }
.filters h4:first-child { margin-top: 0; }
.filter-options label { display: flex; align-items: center; gap: 8px; font-size: .85rem; padding: 4px 0; cursor: pointer; }
.filtro-activo-nota { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--color-primary-dark); font-size: .78rem; margin-left: 4px; }

/* ---------- Filtros de Talla/Color como chips interactivos (tienda, categoría) ---------- */
.filtro-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.filtro-pill {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 0; margin: 0; border-radius: 999px; cursor: pointer; user-select: none;
  transition: transform .12s ease;
}
.filtro-pill:hover { transform: translateY(-1px); }
.filtro-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.filtro-pill span {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px;
  border-radius: 999px; border: 1.5px solid var(--color-gray-300); background: var(--color-white);
  font-size: .82rem; font-weight: 600; color: var(--color-gray-700);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.filtro-pill-talla span { min-width: 2.4em; justify-content: center; padding: 7px 10px; }
.filtro-pill:hover span { border-color: var(--color-primary); color: var(--color-gray-900); }
.filtro-pill.is-active span { background: var(--color-black); border-color: var(--color-black); color: #fff; }
.filtro-pill input:focus-visible ~ span { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.filtro-swatch { width: 15px; height: 15px; border-radius: 50%; border: 1px solid rgba(0,0,0,.18); flex-shrink: 0; }
.filtro-pill.is-active .filtro-swatch { box-shadow: 0 0 0 2px #fff inset; }

/* Etiquetas de producto (modelos: #Dunk, #Jordan...) */
.tag-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.tag-chip { display: inline-block; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--color-gray-300); background: var(--color-white); color: var(--color-gray-700); font-size: .78rem; text-decoration: none; transition: background .15s, color .15s, border-color .15s; }
.tag-chip:hover { border-color: var(--color-black); color: var(--color-gray-900); }
.tag-chip.active { background: var(--color-black); border-color: var(--color-black); color: #fff; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; font-size: .85rem; color: var(--color-gray-700); }
.toolbar select { padding: 8px 10px; border-radius: 6px; border: 1px solid var(--color-gray-300); }

/* ---------- Listbox con color de marca (reemplaza el <select> nativo) ---------- */
.select-custom { position: relative; display: inline-block; }
.select-custom-nativo { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.select-custom-boton {
  display: flex; align-items: center; gap: 10px;
  background: var(--color-white); border: 1px solid var(--color-gray-300); border-radius: 8px;
  padding: 9px 14px; font-size: .85rem; font-weight: 700; color: var(--color-primary-dark);
  cursor: pointer; transition: border-color .15s ease;
}
.select-custom-boton svg { flex-shrink: 0; transition: transform .15s ease; color: var(--color-primary); }
.select-custom.abierto .select-custom-boton { border-color: var(--color-primary); }
.select-custom.abierto .select-custom-boton svg { transform: rotate(180deg); }
.select-custom-lista {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 40; min-width: 100%; width: max-content;
  background: var(--color-white); border: 1px solid var(--color-gray-300); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0,0,0,.14); padding: 6px; list-style: none;
}
.select-custom-opcion {
  padding: 9px 14px; font-size: .85rem; font-weight: 600; color: var(--color-gray-900);
  border-radius: 6px; cursor: pointer; white-space: nowrap; transition: background .12s ease, color .12s ease;
}
.select-custom-opcion:hover { background: var(--color-primary-light); color: var(--color-primary-dark); }
.select-custom-opcion.activa { background: var(--color-primary); color: #fff; font-weight: 800; }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 30px; }
.pagination a, .pagination span {
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--color-gray-300); font-size: .85rem;
}
.pagination .active { background: var(--color-black); color: #fff; border-color: var(--color-black); }
.empty-state { text-align: center; padding: 60px 20px; color: var(--color-gray-500); }

/* ---------- Product detail ---------- */
.product-info .brand { color: var(--color-gray-500); text-transform: uppercase; font-size: .78rem; letter-spacing: .5px; }
.product-info h1 { font-size: 1.7rem; margin: 6px 0 12px; }
.product-info .price-row { font-size: 1.4rem; margin-bottom: 16px; }
.product-info .price-row:has(+ .price-ahorro:not([hidden])) { margin-bottom: 4px; }
.product-info .price-row .price-old { font-size: 1rem; }
.price-badge { align-self: center; background: #b02a2a; color: #fff; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: .3px; }
.price-ahorro { font-size: .85rem; color: #b02a2a; margin-bottom: 16px; }
.product-info .price-now { font-size: 1.6rem; }
.stock-msg { font-size: .82rem; margin-bottom: 18px; }
.stock-ok { color: #1f7a3f; }
.stock-low { color: var(--color-primary-dark); }
.stock-out { color: #b02a2a; }
.option-group { margin-bottom: 20px; }
.option-group label.title { display: block; font-weight: 700; font-size: .82rem; text-transform: uppercase; margin-bottom: 8px; }
.option-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.option-pills input { display: none; }
.option-pills span {
  display: inline-block; padding: 9px 16px; border: 1.5px solid var(--color-gray-300); border-radius: 8px; font-size: .85rem; cursor: pointer;
}
.option-pills input:checked + span { border-color: var(--color-black); background: var(--color-black); color: #fff; }
/* Selector de variantes: Talla y Color por separado (main.js) */
.option-group label.title .option-elegida { font-weight: 400; text-transform: none; color: var(--color-gray-700); margin-left: 4px; }
.option-pills span { display: inline-flex; align-items: center; gap: 7px; min-width: 46px; justify-content: center; }
.option-pills .swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--color-gray-300); display: inline-block; }
.option-pills label.agotada span { color: var(--color-gray-500); text-decoration: line-through; border-style: dashed; }
.option-pills label.agotada input:checked + span { background: var(--color-gray-500); border-color: var(--color-gray-500); color: #fff; }
.color-detalle-nota { display: block; font-size: .8rem; color: var(--color-gray-700); margin-top: 6px; font-style: italic; }

/* ---------- Combo de 2+ pares: una talla por cada unidad ---------- */
@keyframes comboFilaEntra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes comboPillPop { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes comboAvisoOk { 0% { opacity: 0; transform: translateX(-4px); } 100% { opacity: 1; transform: translateX(0); } }

.combo-tallas { margin: 4px 0 20px; padding: 16px; background: var(--color-gray-100); border-radius: var(--radius); border-left: 3px solid var(--color-primary); }
.combo-tallas > .title { display: block; font-weight: 700; font-size: .82rem; text-transform: uppercase; margin-bottom: 12px; color: var(--color-gray-900); letter-spacing: .01em; }
.combo-tallas > .title::after { content: ''; display: block; width: 34px; height: 3px; margin-top: 6px; background: var(--color-primary); border-radius: 2px; }

.combo-tallas-fila {
  margin-bottom: 14px; padding: 12px 12px 6px; background: var(--color-white);
  border-radius: calc(var(--radius) - 4px); border: 1px solid var(--color-gray-200);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
  animation: comboFilaEntra .35s ease both;
}
.combo-tallas-fila:nth-child(2) { animation-delay: .05s; }
.combo-tallas-fila:nth-child(3) { animation-delay: .1s; }
.combo-tallas-fila:nth-child(4) { animation-delay: .15s; }
.combo-tallas-fila:hover { border-color: var(--color-primary); box-shadow: 0 4px 14px rgba(229,122,70,.14); transform: translateY(-1px); }
.combo-tallas-fila:last-child { margin-bottom: 0; }
.combo-tallas-fila .combo-tallas-fila-titulo {
  display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 700;
  color: var(--color-white); background: var(--color-primary); padding: 3px 11px 3px 9px;
  border-radius: 20px; margin-bottom: 10px;
}
.combo-tallas-sub { margin-bottom: 10px; }
.combo-tallas-sub:last-child { margin-bottom: 6px; }
.combo-tallas-sub small { display: block; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; color: var(--color-gray-500); margin-bottom: 5px; }
.combo-tallas-sub .option-pills span { padding: 7px 13px; font-size: .8rem; background: var(--color-gray-100); transition: border-color .15s ease, background .15s ease, color .15s ease, transform .15s ease; }
.combo-tallas-sub .option-pills label:hover span { border-color: var(--color-primary); color: var(--color-primary-dark); }
.combo-tallas-sub .option-pills input:checked + span { border-color: var(--color-primary); background: var(--color-primary); color: #fff; animation: comboPillPop .25s ease; }
.combo-tallas-sub .option-pills label.agotada input:checked + span { background: var(--color-gray-500); border-color: var(--color-gray-500); }

.variant-aviso { font-size: .85rem; margin: -6px 0 16px; min-height: 1.2em; color: var(--color-gray-700); transition: color .2s ease; }
.variant-aviso.es-ok { color: #1f7a3f; font-weight: 600; animation: comboAvisoOk .3s ease; }
.variant-aviso.es-pocas { color: var(--color-primary-dark); }
.variant-aviso.es-error { color: #b02a2a; font-weight: 600; }
.qty-selector { display: flex; align-items: center; border: 1.5px solid var(--color-gray-300); border-radius: 8px; width: fit-content; }
.qty-selector button { width: 38px; height: 40px; border: none; background: none; font-size: 1.1rem; cursor: pointer; border-radius: 8px; transition: background .15s ease; }
.qty-selector button:hover { background: var(--color-gray-100); }
.qty-selector input { width: 46px; text-align: center; border: none; font-size: .95rem; }
.product-description { margin-top: 26px; font-size: .9rem; color: var(--color-gray-700); line-height: 1.6; }
.add-to-cart-row { display: flex; gap: 14px; margin-top: 22px; }

/* ---------- Combo selector ("Compra más, ahorra más") ---------- */
.combo-selector {
  margin-top: 22px;
  border: 1.5px solid var(--color-gray-300);
  border-radius: var(--radius);
  padding: 16px;
  background: linear-gradient(180deg, var(--color-white), var(--color-gray-100));
}
.combo-selector-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.combo-selector-head .combo-icon { font-size: 1.3rem; }
.combo-selector-head strong { display: block; font-size: .95rem; text-transform: uppercase; letter-spacing: .3px; }
.combo-selector-head small { color: var(--color-gray-500); font-size: .76rem; }
.combo-option {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--color-gray-300);
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  background: var(--color-white);
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.combo-option:hover { transform: translateY(-1px); border-color: var(--color-primary); }
.combo-option input { position: absolute; opacity: 0; pointer-events: none; }
.combo-option.is-checked {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  box-shadow: 0 0 0 1px var(--color-primary);
}
.combo-option-qty { font-weight: 700; font-size: .9rem; }
.combo-option-price { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.combo-option-price .price-now { font-weight: 800; }
.combo-badge {
  position: relative;
  overflow: hidden;
  background: var(--color-primary);
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  white-space: nowrap;
}
/* Brillo que recorre la pastilla de descuento de vez en cuando, para que el ahorro llame la atención. */
.combo-badge::after {
  content: '';
  position: absolute; top: 0; left: -60%; width: 35%; height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,.65), transparent);
  animation: comboBadgeShine 3.2s ease-in-out infinite;
}
@keyframes comboBadgeShine { 0% { left: -60%; } 40%, 100% { left: 130%; } }

/* Pulso suave en la opción recomendada, para que el ojo vaya ahí primero. */
@keyframes comboGlowFeatured {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229,122,70,.38); }
  50% { box-shadow: 0 0 0 8px rgba(229,122,70,0); }
}
.combo-option-featured:not(.is-checked) { animation: comboGlowFeatured 2.4s ease-in-out infinite; }

/* El listón "Más elegido" entra con un pequeño resorte al cargar la página. */
@keyframes comboRibbonIn {
  0% { transform: scale(.4); opacity: 0; }
  65% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.combo-ribbon { animation: comboRibbonIn .5s cubic-bezier(.34,1.56,.64,1) .35s both; }

/* Pequeño "pop" al cambiar de opción, para confirmar visualmente la elección. */
@keyframes comboPop { 0% { transform: scale(1); } 40% { transform: scale(1.035); } 100% { transform: scale(1); } }
.combo-option.combo-pop { animation: comboPop .3s ease; }

@media (prefers-reduced-motion: reduce) {
  .combo-badge::after { display: none; }
  .combo-option-featured { animation: none; }
  .combo-ribbon { animation: none; }
  .combo-option.combo-pop { animation: none; }
}

/* ---------- "Combina tu estilo" (venta cruzada de 2 productos distintos) ---------- */
.combina-box {
  margin-top: 16px; border: 1.5px solid var(--color-gray-300); border-radius: var(--radius);
  padding: 16px; background: linear-gradient(135deg, var(--color-primary-light), var(--color-white));
}
.combina-box-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; color: var(--color-primary-dark); }
.combina-box-head strong { font-size: .92rem; text-transform: uppercase; letter-spacing: .3px; color: var(--color-gray-900); }
.combina-box-productos { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.combina-box-item { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.combina-box-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; background: var(--color-gray-100); }
.combina-box-item span { font-size: .76rem; font-weight: 600; color: var(--color-gray-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.combina-box-plus { font-size: 1.3rem; font-weight: 800; color: var(--color-primary); flex-shrink: 0; }
.combina-box-precio {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 14px;
  padding-top: 12px; border-top: 1px dashed var(--color-gray-300);
}
.combina-box-precio span:first-child { font-size: .82rem; color: var(--color-gray-700); }
.combina-box-precio strong { font-size: 1.3rem; font-family: var(--font-heading); font-weight: 800; }
.combina-box-ahorro { background: var(--color-primary); color: #fff; font-size: .7rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; }
.combo-ribbon {
  position: absolute;
  top: -10px;
  left: 14px;
  background: var(--color-black);
  color: #fff;
  font-size: .64rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 3px 10px;
  border-radius: 999px;
}

/* ---------- Quick add (cross-sell) ---------- */
.product-card-link { display: block; }
.quick-add-form { margin-top: 8px; }
.quick-add-btn { width: 100%; }

/* ---------- Cart ---------- */
.cart-page { padding: 36px 0 60px; }
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; }
.cart-item {
  display: grid; grid-template-columns: 90px 1fr auto; gap: 16px; align-items: center;
  padding: 16px; margin-bottom: 14px; background: var(--color-white);
  border: 1px solid var(--color-gray-300); border-radius: var(--radius);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cart-item:hover { border-color: var(--color-gray-500); box-shadow: 0 4px 16px rgba(0,0,0,.05); }
.cart-item img { width: 90px; height: 110px; object-fit: cover; border-radius: 8px; background: var(--color-gray-100); }
.cart-item .name { font-weight: 700; margin: 0 0 4px; }
.cart-item .attrs { font-size: .8rem; color: var(--color-gray-500); }
.cart-item .remove { font-size: .78rem; color: #b02a2a; background: none; border: none; padding: 6px 0; cursor: pointer; }
.cart-item .remove:hover { text-decoration: underline; }
.cart-qty-form { margin: 10px 0 8px; }
.cart-qty-form .select-custom { width: 84px; }
.cart-summary { background: var(--color-gray-100); border-radius: var(--radius); padding: 24px; position: sticky; top: 90px; }
.cart-summary h3 { margin-top: 0; text-transform: uppercase; font-size: 1.1rem; }
.summary-row { display: flex; justify-content: space-between; font-size: .9rem; padding: 6px 0; }
.summary-row.total { font-weight: 800; font-size: 1.1rem; border-top: 1px solid var(--color-gray-300); margin-top: 8px; padding-top: 14px; }

/* ---------- Caja del cupón: input + botón como un solo grupo ---------- */
.cupon-box {
  display: flex; align-items: center; gap: 8px; margin-bottom: 16px;
  background: var(--color-white); border: 1.5px solid var(--color-gray-300);
  border-radius: 999px; padding: 4px 4px 4px 14px;
  transition: border-color .15s ease;
}
.cupon-box:focus-within { border-color: var(--color-primary); }
.cupon-box-icon { color: var(--color-gray-500); flex-shrink: 0; }
.cupon-box input {
  flex: 1; min-width: 0; border: none; background: none; padding: 8px 0;
  font-size: .86rem;
}
.cupon-box input:focus { outline: none; }
.cupon-box button {
  flex-shrink: 0; border: none; background: var(--color-primary); color: #fff;
  font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .3px;
  padding: 9px 18px; border-radius: 999px; cursor: pointer; transition: background .15s ease;
}
.cupon-box button:hover { background: var(--color-primary-dark); }

/* ---------- Checkout ---------- */
.checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start; padding: 36px 0 60px; }
.form-card { background: var(--color-white); border: 1px solid var(--color-gray-300); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.form-card h3 { margin-top: 0; text-transform: uppercase; font-size: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-group { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: .8rem; font-weight: 700; }
.form-group input, .form-group select, .form-group textarea {
  padding: 11px 14px; border: 1.5px solid var(--color-gray-300); border-radius: 8px; font-size: .92rem; font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--color-primary); }
.input-con-boton { display: flex; gap: 8px; }
.input-con-boton input { flex: 1; }
.input-con-boton .btn { white-space: nowrap; }
.payment-options label {
  display: flex; align-items: flex-start; gap: 10px; border: 1.5px solid var(--color-gray-300); border-radius: 8px; padding: 14px; margin-bottom: 10px; cursor: pointer;
}
.payment-options input { margin-top: 3px; }
.payment-options .pay-title { font-weight: 700; font-size: .9rem; }
.payment-options .pay-desc { font-size: .8rem; color: var(--color-gray-700); margin-top: 3px; }
.payment-instructions { display: none; background: var(--color-gray-100); border-radius: 8px; padding: 12px 14px; font-size: .82rem; margin-top: 8px; }
.payment-instructions.active { display: block; }

/* ---------- Account ---------- */
.auth-page { max-width: 440px; margin: 50px auto 70px; padding: 0 20px; position: relative; }

/* ---------- Iconos flotando alrededor de la tarjeta de login/registro ---------- */
.auth-flotantes { display: none; }
@media (min-width: 900px) {
  .auth-flotantes { display: block; }
  .auth-flotante {
    position: absolute; z-index: 1; pointer-events: none;
    filter: drop-shadow(0 10px 18px rgba(0,0,0,.16));
    animation: authFlotar 6s ease-in-out infinite;
  }
  .auth-flotante img { display: block; height: auto; }
  .auth-flotante-1 { top: 70px; left: -86px; animation-duration: 6.5s; }
  .auth-flotante-2 { top: -26px; right: -64px; animation-duration: 5.5s; animation-delay: .4s; }
  .auth-flotante-3 { bottom: 130px; right: -108px; animation-duration: 7s; animation-delay: 1.1s; }
  .auth-flotante-4 { bottom: -10px; left: -70px; animation-duration: 6s; animation-delay: .7s; }
}
@keyframes authFlotar {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-16px) rotate(4deg); }
}
@media (prefers-reduced-motion: reduce) { .auth-flotante { animation: none; } }
.auth-card {
  background: var(--color-white); border-radius: 22px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.14);
}
.auth-card-head {
  position: relative; overflow: hidden; text-align: center; color: #fff;
  padding: 38px 28px 32px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}
.auth-card-head::before {
  content: ''; position: absolute; top: -70px; right: -50px; width: 180px; height: 180px;
  background: var(--color-yellow); opacity: .16; border-radius: 50%;
}
.auth-card-head::after {
  content: ''; position: absolute; bottom: -80px; left: -40px; width: 160px; height: 160px;
  background: var(--color-black); opacity: .12; border-radius: 50%;
}
.auth-card-logo { height: 32px; width: auto; margin: 0 auto 18px; position: relative; }
.auth-card-head h1 {
  position: relative; font-family: var(--font-heading); font-weight: 900;
  font-size: 1.4rem; text-transform: none; margin: 0 0 6px; letter-spacing: .2px;
}
.auth-card-head p { position: relative; font-size: .85rem; opacity: .95; margin: 0; }
.auth-card-body { padding: 28px 28px 32px; }
.auth-card-body .form-group input { padding: 12px 14px; border-radius: 10px; }
.auth-card-body .btn-block { border-radius: 999px; padding: 14px; margin-top: 6px; }

/* ---------- Libro de Reclamaciones / páginas legales ---------- */
.reclamo-page, .legal-page { max-width: 720px; margin: 50px auto 70px; padding: 0 20px; }
.reclamo-page h1, .legal-page h1 { text-transform: uppercase; font-size: 1.5rem; margin-bottom: 10px; }
.reclamo-page .sub { color: var(--color-gray-700); font-size: .88rem; line-height: 1.7; margin-bottom: 28px; }
.reclamo-section-title { font-size: .95rem; text-transform: uppercase; letter-spacing: .4px; margin: 28px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--color-gray-300); }
.reclamo-form .form-group.full { grid-column: 1 / -1; }
.reclamo-confirmacion { text-align: center; max-width: 420px; margin: 20px auto; }
.reclamo-confirmacion svg { color: var(--color-primary); margin-bottom: 12px; }
.reclamo-confirmacion h1 { font-size: 1.3rem; margin-bottom: 4px; }
.reclamo-confirmacion p { color: var(--color-gray-700); font-size: .9rem; line-height: 1.6; margin-bottom: 14px; }
.reclamo-folio { font-size: 1.8rem; font-weight: 800; color: var(--color-gray-900); letter-spacing: 1px; margin-bottom: 18px !important; }
.legal-page .legal-content { font-size: .92rem; line-height: 1.75; color: var(--color-gray-700); }
.legal-page .legal-content p { margin-bottom: 14px; }
.legal-page .legal-updated { color: var(--color-gray-500); font-size: .8rem; margin-bottom: 24px; }

/* ---------- Rastrea tu pedido ---------- */
.rastreo-form { margin-bottom: 8px; }
.rastreo-resultado { margin-top: 28px; border: 1px solid var(--color-gray-300); border-radius: var(--radius); padding: 24px; }
.rastreo-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.rastreo-head h3 { margin: 0 0 2px; }
.rastreo-cancelado { background: #fdeaea; color: #b02a2a; padding: 12px 16px; border-radius: 8px; font-size: .88rem; margin-bottom: 20px; }
.rastreo-timeline { display: flex; align-items: flex-start; margin: 10px 0 26px; }
.rastreo-paso { flex: 1; text-align: center; position: relative; }
.rastreo-paso::before { content: ''; position: absolute; top: 7px; left: -50%; width: 100%; height: 2px; background: var(--color-gray-300); z-index: 0; }
.rastreo-paso:first-child::before { display: none; }
.rastreo-paso.completado::before { background: var(--color-primary); }
.rastreo-paso-punto { display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--color-gray-300); margin: 0 auto 8px; position: relative; z-index: 1; }
.rastreo-paso.completado .rastreo-paso-punto { background: var(--color-primary); }
.rastreo-paso.actual .rastreo-paso-punto { box-shadow: 0 0 0 4px rgba(229,122,70,.25); }
.rastreo-paso-texto { font-size: .74rem; color: var(--color-gray-500); text-transform: uppercase; letter-spacing: .3px; }
.rastreo-paso.completado .rastreo-paso-texto { color: var(--color-gray-900); font-weight: 700; }
.rastreo-guia { font-size: .88rem; margin-bottom: 8px; }
.rastreo-items { list-style: none; margin: 10px 0; padding: 0; }
.rastreo-items li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--color-gray-100); font-size: .88rem; }
.rastreo-total { text-align: right; font-size: .95rem; margin-top: 10px; }
@media (max-width: 600px) {
  .rastreo-timeline { flex-wrap: wrap; gap: 14px 0; }
  .rastreo-paso { flex: 1 1 33%; }
}

/* ---------- Comparador de productos ---------- */
.comparar-wrap { overflow-x: auto; border: 1px solid var(--color-gray-300); border-radius: var(--radius); }
.comparar-tabla { width: 100%; border-collapse: collapse; min-width: 560px; }
.comparar-tabla th, .comparar-tabla td { padding: 14px 16px; text-align: center; border-bottom: 1px solid var(--color-gray-100); vertical-align: top; }
.comparar-tabla thead th { border-bottom: 1px solid var(--color-gray-300); position: relative; }
.comparar-th-label { text-align: left !important; font-weight: 700; font-size: .82rem; color: var(--color-gray-500); white-space: nowrap; background: var(--color-gray-100); position: sticky; left: 0; }
.comparar-quitar-form { position: absolute; top: 6px; right: 6px; margin: 0; }
.comparar-quitar { width: 24px; height: 24px; border-radius: 50%; border: none; background: var(--color-gray-100); color: var(--color-gray-700); cursor: pointer; font-size: .75rem; line-height: 1; }
.comparar-quitar:hover { background: #fdeaea; color: #b02a2a; }
.comparar-producto-link { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--color-gray-900); }
.comparar-producto-link img { width: 90px; height: 110px; object-fit: cover; border-radius: 8px; background: var(--color-gray-100); }
.comparar-producto-link span { font-size: .85rem; font-weight: 700; line-height: 1.3; }
.comparar-tabla .price-old { font-size: .78rem; color: var(--color-gray-500); text-decoration: line-through; font-weight: 400; }

/* ---------- Blog ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; margin: 20px 0; }
.blog-card { display: block; color: var(--color-gray-900); }
.blog-card-thumb { aspect-ratio: 16/10; border-radius: var(--radius); overflow: hidden; background: var(--color-gray-100); margin-bottom: 12px; }
.blog-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.blog-card:hover .blog-card-thumb img { transform: scale(1.05); }
.blog-card-fecha { font-size: .72rem; text-transform: uppercase; letter-spacing: .4px; color: var(--color-primary-dark); font-weight: 700; }
.blog-card-info h3 { font-size: 1.02rem; margin: 6px 0 6px; }
.blog-card-info p { font-size: .85rem; color: var(--color-gray-500); line-height: 1.5; margin: 0; }

/* ---------- Widget flotante "Necesito ayuda" ---------- */
.ayuda-widget { position: fixed; right: 20px; bottom: 20px; z-index: 60; }
.ayuda-boton {
  display: flex; align-items: center; gap: 9px;
  background: var(--color-white); color: var(--color-gray-900);
  border: 2px solid var(--color-black); border-radius: 999px;
  padding: 13px 20px; font-size: .85rem; font-weight: 800;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  cursor: pointer; transition: transform .15s ease, background .15s ease;
}
.ayuda-boton:hover { transform: translateY(-2px); background: var(--color-yellow); }
.ayuda-widget.abierto .ayuda-boton { display: none; }
.ayuda-panel {
  position: absolute; right: 0; bottom: 0;
  width: min(320px, calc(100vw - 40px));
  background: var(--color-white); color: var(--color-gray-900);
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.ayuda-panel-head { display: flex; align-items: center; gap: 10px; background: var(--color-black); color: #fff; padding: 14px 16px; position: relative; }
.ayuda-panel-head img { width: 34px; height: 34px; object-fit: contain; }
.ayuda-panel-head strong { display: block; font-size: .88rem; }
.ayuda-panel-online { display: flex; align-items: center; gap: 5px; font-size: .72rem; color: #aaa; }
.ayuda-dot { width: 7px; height: 7px; border-radius: 50%; background: #3ecf5f; display: inline-block; }
.ayuda-panel-cerrar { position: absolute; top: 10px; right: 12px; background: none; border: none; color: #aaa; font-size: 1rem; cursor: pointer; line-height: 1; }
.ayuda-panel-cerrar:hover { color: #fff; }
.ayuda-panel-saludo { padding: 16px 16px 10px; font-size: .86rem; line-height: 1.5; margin: 0; }
.ayuda-panel-opciones { display: flex; flex-direction: column; padding: 4px 8px 12px; }
.ayuda-panel-opciones a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 10px; border-radius: 10px; font-size: .83rem; font-weight: 700;
  color: var(--color-gray-900); transition: background .15s ease;
}
.ayuda-panel-opciones a:hover { background: var(--color-gray-100); color: var(--color-primary-dark); }
.ayuda-panel-opciones svg { flex-shrink: 0; color: var(--color-primary); }
@media (max-width: 600px) {
  .ayuda-widget { right: 14px; bottom: 78px; }
  .ayuda-boton span { display: none; }
}

.app-landing { max-width: 480px; margin: 0 auto; text-align: center; }
.app-landing-icon {
  width: 84px; height: 84px;
  margin: 0 auto 20px;
  border-radius: 24px;
  background: var(--color-black);
  color: #3DDC84;
  display: flex; align-items: center; justify-content: center;
}
.app-landing h1 { text-transform: uppercase; font-size: 1.5rem; margin-bottom: 10px; }
.app-landing .sub { color: var(--color-gray-500); font-size: .92rem; margin-bottom: 28px; }
.app-landing-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; font-size: .9rem; color: var(--color-gray-700); }
.auth-switch { text-align: center; margin-top: 16px; font-size: .85rem; }
.auth-switch a { color: var(--color-primary-dark); font-weight: 700; }
.orders-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.orders-table th, .orders-table td { padding: 12px; border-bottom: 1px solid var(--color-gray-300); text-align: left; }
.status-pill { padding: 4px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; text-transform: uppercase; display: inline-block; }
.status-pendiente { background: #fdf1d6; color: #93690b; }
.status-confirmado, .status-pagado { background: #dcf3e3; color: #1f7a3f; }
.status-en_preparacion { background: #dde6fb; color: #2c4ba0; }
.status-enviado { background: #d9eefc; color: #1a6fa3; }
.status-entregado { background: #dcf3e3; color: #1f7a3f; }
.status-cancelado { background: #fdeaea; color: #b02a2a; }

/* ---------- Order confirmation ---------- */
.confirmation-box { max-width: 560px; margin: 60px auto; text-align: center; padding: 0 20px; }
.confirmation-box .check-icon { width: 70px; height: 70px; border-radius: 50%; background: var(--color-primary); color: #fff; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 2rem; }
.order-summary-card { text-align: left; background: var(--color-gray-100); border-radius: var(--radius); padding: 20px; margin: 24px 0; }

/* ---------- Trust badges ---------- */
.trust-badges {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 14px;
  padding: 22px; margin: 10px 0; background: var(--color-gray-100); border-radius: var(--radius);
}
.trust-badge {
  display: flex; align-items: center; gap: 13px; font-size: .85rem; font-weight: 700; color: var(--color-gray-900);
  padding: 8px; border-radius: 10px; transition: background .15s ease, transform .15s ease;
}
.trust-badge-link:hover { background: rgba(255,255,255,.7); transform: translateY(-2px); }
.trust-badge-ico {
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--color-primary-light); color: var(--color-primary-dark);
}

/* ---------- Slider de marcas (home, editable desde Admin → Marcas) ---------- */
.marcas-slider {
  background: var(--color-gray-100); padding: 34px 0; margin: 10px 0 0; overflow: hidden; position: relative;
}
.marcas-slider::before, .marcas-slider::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 70px; z-index: 2; pointer-events: none;
}
.marcas-slider::before { left: 0; background: linear-gradient(90deg, var(--color-gray-100), transparent); }
.marcas-slider::after { right: 0; background: linear-gradient(270deg, var(--color-gray-100), transparent); }
.marcas-slider-track {
  display: flex; align-items: center; gap: 52px; width: max-content;
}
/* La animación arranca recién cuando el JS confirma que TODOS los logos ya
   cargaron (.lista): si empezara antes, el ancho de la fila crece a medida
   que llegan las imágenes y el "vuelta a empezar" (-50%) deja de coincidir
   con el principio real, dando un salto feo a mitad de vuelta. */
.marcas-slider-track.lista {
  animation: marcasSliderScroll var(--marcas-duracion, 40s) linear infinite;
}
.marcas-slider:hover .marcas-slider-track { animation-play-state: paused; }
.marcas-slider-item { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; height: 88px; opacity: .72; filter: grayscale(1); transition: opacity .2s ease, filter .2s ease, transform .2s ease; }
.marcas-slider-item:hover { opacity: 1; filter: grayscale(0); transform: translateY(-2px); }
.marcas-slider-item img { height: 100%; width: auto; max-width: 230px; object-fit: contain; display: block; }
/* Modo oscuro: los logos de marca suelen ser un trazo oscuro sobre PNG
   transparente — se invierten a blanco para que no desaparezcan sobre el
   fondo oscuro (si el logo ya tiene color propio, el "grayscale" de abajo
   lo deja igual de neutro que en modo claro). */
:root[data-theme="dark"] .marcas-slider-item { filter: grayscale(1) invert(1); }
:root[data-theme="dark"] .marcas-slider-item:hover { filter: grayscale(0) invert(1); }
@keyframes marcasSliderScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marcas-slider-track { animation: none; }
}
@media (max-width: 640px) {
  .marcas-slider-track { gap: 36px; }
  .marcas-slider-item { height: 64px; }
  .marcas-slider-item img { max-width: 170px; }
}

/* ---------- Popup de bienvenida (cupón) ---------- */
.popup-bienvenida-overlay {
  position: fixed; inset: 0; z-index: 400; background: rgba(10,10,10,.6);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s;
}
.popup-bienvenida-overlay.visible { opacity: 1; visibility: visible; }
.popup-bienvenida {
  position: relative; width: 100%; max-width: 380px; text-align: center;
  background: linear-gradient(160deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff; border-radius: 18px; padding: 34px 26px 28px;
  box-shadow: 0 30px 70px rgba(0,0,0,.4);
  transform: scale(.9) translateY(10px); transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.popup-bienvenida-overlay.visible .popup-bienvenida { transform: scale(1) translateY(0); }
.popup-bienvenida-cerrar {
  position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.18); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .15s ease;
}
.popup-bienvenida-cerrar:hover { background: rgba(255,255,255,.3); }
.popup-bienvenida-img { width: 100%; max-height: 160px; object-fit: cover; border-radius: 12px; margin-bottom: 16px; }
.popup-bienvenida h3 {
  font-family: var(--font-heading); font-weight: 900; font-size: 1.5rem; line-height: 1.15;
  margin: 0 0 8px; color: var(--color-yellow);
}
.popup-bienvenida p { margin: 0 0 18px; font-size: .9rem; opacity: .95; }
.popup-bienvenida-codigo {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(255,255,255,.14); border: 2px dashed rgba(255,255,255,.5);
  border-radius: 10px; padding: 12px 16px; margin-bottom: 16px;
}
.popup-bienvenida-codigo span { font-family: var(--font-heading); font-weight: 800; font-size: 1.1rem; letter-spacing: 1px; }
.popup-bienvenida-codigo button {
  background: var(--color-white); color: var(--color-primary-dark); border: none;
  padding: 8px 14px; border-radius: 999px; font-weight: 800; font-size: .76rem; cursor: pointer;
  text-transform: uppercase; white-space: nowrap; transition: transform .15s ease;
}
.popup-bienvenida-codigo button:hover { transform: translateY(-1px); }
.popup-bienvenida-btn { display: block; background: var(--color-black); }
@media (max-width: 420px) {
  .popup-bienvenida { padding: 28px 18px 22px; }
  .popup-bienvenida h3 { font-size: 1.3rem; }
}

/* ---------- Página 404 ---------- */
.pagina-404 { display: flex; justify-content: center; padding: 70px 20px 90px; }
.pagina-404-caja { max-width: 460px; text-align: center; }
.pagina-404-codigo {
  display: block; font-family: var(--font-heading); font-weight: 900; font-size: 5.5rem;
  line-height: 1; color: var(--color-primary); letter-spacing: -2px; margin-bottom: 6px;
}
.pagina-404-caja h1 { font-size: 1.4rem; margin: 0 0 10px; }
.pagina-404-caja p { color: var(--color-gray-700); font-size: .92rem; margin: 0 0 28px; }
.pagina-404-buscador {
  display: flex; align-items: center; gap: 8px; margin-bottom: 20px;
  background: var(--color-gray-100); border: 1.5px solid var(--color-gray-300);
  border-radius: 999px; padding: 4px 4px 4px 18px; transition: border-color .15s ease;
}
.pagina-404-buscador:focus-within { border-color: var(--color-primary); }
.pagina-404-buscador input { flex: 1; min-width: 0; border: none; background: none; padding: 10px 0; font-size: .9rem; }
.pagina-404-buscador input:focus { outline: none; }
.pagina-404-buscador button {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; border: none;
  background: var(--color-primary); color: #fff; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s ease;
}
.pagina-404-buscador button:hover { background: var(--color-primary-dark); }
.pagina-404-botones { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 480px) {
  .pagina-404-codigo { font-size: 4rem; }
  .pagina-404-botones { flex-direction: column; }
  .pagina-404-botones .btn { width: 100%; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--color-black); color: #ddd; margin-top: 40px; position: relative; overflow: hidden; }
.footer-newsletter { background: linear-gradient(120deg, var(--color-primary-dark), var(--color-primary)); position: relative; }
.footer-newsletter.has-imagen { background-size: cover; background-position: center; }
.footer-newsletter.has-imagen::before { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(196,96,47,.85), rgba(229,122,70,.78)); }
.newsletter-inner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 32px 20px; flex-wrap: wrap; color: #fff; }
.newsletter-inner h3 { font-family: var(--font-heading); font-weight: 800; margin: 0 0 4px; font-size: 1.15rem; }
.newsletter-inner p { margin: 0; font-size: .88rem; opacity: .9; max-width: 480px; }
.newsletter-inner p a { color: var(--color-gray-900); font-weight: 800; text-decoration: underline; opacity: 1; }
.newsletter-app-copy { display: flex; align-items: center; gap: 16px; }
@media (max-width: 600px) {
  .newsletter-app-copy { flex-direction: column; text-align: center; }
}
.newsletter-form { display: flex; gap: 10px; }
.newsletter-form input { padding: 12px 16px; border-radius: 999px; border: none; min-width: 240px; font-size: .88rem; }
.newsletter-form input:focus { outline: 2px solid var(--color-black); outline-offset: 2px; }
.newsletter-form button { background: var(--color-black); color: #fff; border: none; padding: 12px 22px; border-radius: 999px; font-weight: 700; cursor: pointer; transition: background .15s ease, transform .15s ease; white-space: nowrap; }
.newsletter-form button:hover { background: #000; transform: translateY(-1px); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 36px 64px; padding: 44px 20px 36px; }
.footer-col-brand { flex: 0 1 280px; }
.footer-mapa { width: 100%; max-width: 280px; height: 160px; border-radius: 10px; overflow: hidden; margin-bottom: 16px; }
.footer-mapa iframe { display: block; filter: grayscale(.15); }
.footer-col { flex: 0 1 170px; }
.footer-logo { height: 36px; width: auto; margin-bottom: 16px; }
.footer-col h4 { font-family: var(--font-heading); font-weight: 800; text-transform: uppercase; font-size: .8rem; letter-spacing: .8px; margin-bottom: 16px; color: #fff; position: relative; padding-bottom: 10px; }
.footer-col h4::after { content: ''; position: absolute; left: 0; bottom: 0; width: 26px; height: 2px; background: var(--color-primary); }
.footer-col ul li { margin-bottom: 10px; font-size: .85rem; }
.footer-col ul a { color: #ccc; transition: color .15s ease; }
.footer-col ul a:hover { color: var(--color-primary); }
.footer-col p { font-size: .82rem; line-height: 1.6; color: #999; margin: 0 0 4px; }
.footer-slogan {
  color: var(--color-primary) !important; font-weight: 400; font-style: italic;
  text-transform: none; font-size: .86rem !important; letter-spacing: .3px;
  opacity: .92; margin-bottom: 16px !important;
}
.footer-contact-list li { display: flex; align-items: flex-start; gap: 9px; color: #ccc; }
.footer-contact-list li svg { flex-shrink: 0; margin-top: 2px; color: var(--color-primary); }
.social-links { display: flex; flex-direction: column; gap: 10px; font-size: .85rem; }
.social-links a { color: #ccc; transition: color .15s ease; }
.social-links a:hover { color: var(--color-primary); }
.social-links-iconos { flex-direction: row; gap: 10px; }
.social-links-iconos a {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: #fff; color: #171717; /* fijo: el footer siempre es oscuro, con o sin modo oscuro */
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.social-links-iconos a:hover { background: var(--color-yellow); color: #171717; transform: translateY(-2px); }
.footer-col-newsletter { min-width: 260px; }
.footer-newsletter-mini-text { font-size: .85rem; color: #ccc; margin: 0 0 14px; }
.footer-newsletter-mini-form { display: flex; gap: 0; margin-bottom: 18px; }
.footer-newsletter-mini-form input {
  flex: 1; min-width: 0; background: transparent; border: 1.5px solid #3a3a3a; border-right: none;
  border-radius: 999px 0 0 999px; padding: 11px 16px; color: #fff; font-size: .85rem;
}
.footer-newsletter-mini-form input::placeholder { color: #777; }
.footer-newsletter-mini-form input:focus { outline: none; border-color: var(--color-yellow); }
.footer-newsletter-mini-form button {
  background: var(--color-yellow); color: var(--color-black); border: 1.5px solid var(--color-yellow);
  border-radius: 0 999px 999px 0; padding: 11px 18px; font-weight: 800; font-size: .8rem; letter-spacing: .3px;
  white-space: nowrap; cursor: pointer; transition: background .15s ease;
}
.footer-newsletter-mini-form button:hover { background: #ffdb4d; }
.footer-confianza { border-top: 1px solid #262626; background: #141414; }
.footer-confianza-sellos { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; padding: 16px 20px; }
.footer-confianza-sellos img { height: 34px; width: auto; }

.footer-payment { border-top: 1px solid #262626; }
.footer-payment-inner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 20px; }
.footer-payment-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .6px; color: #888; flex-shrink: 0; }
.footer-payment-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-payment-badge { border: 1px solid #333; border-radius: 6px; padding: 5px 11px; font-size: .74rem; font-weight: 600; color: #ccc; background: #141414; }
.footer-payment-logo { height: 28px; width: auto; max-width: 90px; object-fit: contain; border-radius: 6px; background: #fff; padding: 3px 8px; }
.footer-bottom { border-top: 1px solid #262626; padding: 18px 20px; text-align: center; font-size: .78rem; color: #888; }

/* ---------- WhatsApp float ---------- */
.whatsapp-float {
  position: fixed; bottom: 90px; right: 20px; z-index: 59;
  background: #25D366; color: white; width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(0,0,0,.25);
  animation: wa-pulse 2.6s ease-in-out infinite;
}
@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 6px 16px rgba(0,0,0,.25), 0 0 0 0 rgba(37,211,102,.5); }
  50% { box-shadow: 0 6px 16px rgba(0,0,0,.25), 0 0 0 10px rgba(37,211,102,0); }
}

/* ---------- Barra flotante del comparador (bottom-left, no choca con WhatsApp/Ayuda) ---------- */
.comparador-flotante {
  position: fixed; left: 20px; bottom: 20px; z-index: 58;
  display: flex; align-items: center; gap: 10px;
  background: var(--color-black); color: #fff;
  border-radius: 999px; padding: 10px 10px 10px 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.comparador-flotante.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.comparador-flotante-icono { position: relative; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.comparador-flotante-badge {
  position: absolute; top: -9px; right: -10px;
  background: var(--color-primary); color: #fff;
  font-size: .68rem; font-weight: 800; line-height: 1;
  min-width: 16px; height: 16px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}
.comparador-flotante-texto { font-size: .82rem; font-weight: 600; white-space: nowrap; }
.comparador-flotante-btn {
  background: var(--color-white); color: var(--color-gray-900);
  font-size: .8rem; font-weight: 800; white-space: nowrap;
  border-radius: 999px; padding: 8px 16px;
  transition: background .15s ease, transform .15s ease;
}
.comparador-flotante-btn:hover { background: var(--color-primary); color: #fff; transform: translateY(-1px); }
@media (max-width: 640px) {
  .comparador-flotante { left: 14px; bottom: calc(146px + env(safe-area-inset-bottom)); padding: 8px 8px 8px 12px; }
  .comparador-flotante-texto { display: none; }
}

/* ---------- Aviso flotante (toast) genérico ---------- */
.toast-flotante {
  position: fixed; left: 50%; bottom: 28px; z-index: 300;
  transform: translate(-50%, 12px); opacity: 0;
  background: var(--color-black); color: #fff;
  font-size: .85rem; font-weight: 600; text-align: center;
  padding: 12px 20px; border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,.3);
  max-width: calc(100vw - 32px); transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
.toast-flotante.visible { opacity: 1; transform: translate(-50%, 0); }
.toast-flotante.toast-error { background: #b02a2a; }

/* ---------- Page intro loader ---------- */
.page-loader {
  position: fixed; inset: 0; z-index: 9999;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .5s ease, visibility .5s ease;
}
.page-loader-gif { width: min(220px, 55vw); height: auto; }
body.loaded .page-loader { opacity: 0; visibility: hidden; pointer-events: none; }

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease, transform .6s ease;
}
[data-reveal].reveal-visible { opacity: 1; transform: translateY(0); }

/* ---------- Glitch urbano: los títulos "tiran estática" al aparecer ---------- */
@keyframes glitchUrbano {
  0% { text-shadow: none; clip-path: inset(0 0 0 0); transform: translateX(0); }
  8% { text-shadow: -3px 0 var(--color-primary), 3px 0 #00e5ff; clip-path: inset(10% 0 62% 0); transform: translateX(-3px); }
  16% { text-shadow: 3px 0 var(--color-primary), -3px 0 #00e5ff; clip-path: inset(58% 0 6% 0); transform: translateX(3px); }
  24% { text-shadow: -2px 0 var(--color-yellow), 2px 0 #00e5ff; clip-path: inset(28% 0 42% 0); transform: translateX(-2px); }
  32% { text-shadow: 2px 0 var(--color-primary), -2px 0 #00e5ff; clip-path: inset(70% 0 2% 0); transform: translateX(1px); }
  40%, 100% { text-shadow: none; clip-path: inset(0 0 0 0); transform: translateX(0); }
}
[data-reveal].reveal-visible h1, [data-reveal].reveal-visible h2 {
  animation: glitchUrbano .6s steps(1, end) 1;
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal].reveal-visible h1, [data-reveal].reveal-visible h2 { animation: none; }
}

/* ---------- Grano/textura sutil, todo el sitio (acabado editorial/callejero) ---------- */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 9000; pointer-events: none;
  opacity: .05; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Benefits ticker (marquee) ---------- */
.ticker {
  background: var(--color-black);
  color: #fff; /* fijo: la franja del ticker siempre es oscura, con o sin modo oscuro */
  overflow: hidden;
  white-space: nowrap;
  padding: 11px 0;
}
.ticker-track { display: inline-flex; gap: 40px; animation: ticker-scroll 28s linear infinite; }
.ticker-track span { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; position: relative; padding-left: 16px; }
.ticker-track span::before {
  content: '';
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: var(--color-primary);
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Cinematic brands/destacados section ---------- */
.cinematic-section {
  position: relative;
  background: radial-gradient(ellipse at center, #262626 0%, var(--color-black) 72%);
  padding: 60px 0 50px;
  overflow: hidden;
  margin: 10px 0;
}
.cinematic-section::before, .cinematic-section::after {
  content: '';
  position: absolute; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(180deg, transparent, var(--color-primary), transparent);
  opacity: .6;
}
.cinematic-section::before { left: 32%; }
.cinematic-section::after { left: 68%; }
.cinematic-head { text-align: center; position: relative; z-index: 1; margin-bottom: 36px; }
.cinematic-head h2 { color: var(--color-yellow); text-transform: uppercase; font-size: 1.6rem; letter-spacing: 1px; margin: 0 0 8px; }
.cinematic-head p { color: #aaa; font-size: .88rem; margin: 0; }
.cinematic-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 240px)); gap: 22px;
  justify-content: center;
}
.cinematic-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.cinematic-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-primary);
  box-shadow: 0 16px 34px rgba(229,122,70,.25);
}
.cinematic-card .thumb { position: relative; aspect-ratio: 1/1; border-radius: 8px; overflow: hidden; background: #1c1c1c; margin-bottom: 12px; }
.cinematic-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease, filter .4s ease, opacity .35s ease; filter: brightness(.92); }
.cinematic-card .thumb-img-primary { position: relative; z-index: 1; }
.cinematic-card .thumb-img-hover { position: absolute; inset: 0; z-index: 2; opacity: 0; }
.cinematic-card:hover .thumb-img-primary { transform: scale(1.06); filter: brightness(1.05); }
.cinematic-card:hover .thumb-img-hover { opacity: 1; transform: scale(1.06); filter: brightness(1.05); }
.cinematic-card .brand { color: var(--color-primary); font-size: .68rem; text-transform: uppercase; letter-spacing: .5px; }
.cinematic-card h3 { color: #fff; font-size: .9rem; margin: 4px 0 8px; }
.cinematic-card .price-now { color: #fff; font-weight: 800; }
.cinematic-card .price-old { color: #888; }

/* ---------- Visor 3D futurista (zapatillas) ---------- */
.viewer3d-section {
  position: relative;
  background: radial-gradient(ellipse at 15% 20%, #241f1c 0%, var(--color-black) 60%);
  padding: 76px 0;
  overflow: hidden;
  margin: 10px 0;
}
.viewer3d-bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(229,122,70,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(229,122,70,.08) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 0%, transparent 72%);
          mask-image: radial-gradient(ellipse at 30% 40%, #000 0%, transparent 72%);
  animation: viewer3d-grid-drift 14s linear infinite;
}
@keyframes viewer3d-grid-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 42px 42px, 42px 42px; }
}
.viewer3d-bg-word {
  position: absolute; top: 50%; left: 50%; z-index: 0;
  transform: translate(-50%, -50%) rotate(-6deg);
  font-family: var(--font-heading); font-size: clamp(6rem, 17vw, 13rem); font-weight: 900; letter-spacing: 4px;
  color: transparent; -webkit-text-stroke: 1.5px rgba(255,204,0,.14);
  white-space: nowrap; pointer-events: none; user-select: none; line-height: 1;
}
.viewer3d-layout {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(260px, 1fr) minmax(300px, 1fr);
  align-items: center; gap: 50px;
}
.viewer3d-copy { max-width: 440px; }
.viewer3d-tag {
  display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--color-primary); border: 1px solid rgba(229,122,70,.5); border-radius: 999px;
  padding: 5px 14px; margin-bottom: 18px;
  box-shadow: 0 0 14px rgba(229,122,70,.25) inset;
}
.viewer3d-copy h2 {
  color: #fff; text-transform: uppercase; font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  line-height: 1.04; letter-spacing: .5px; margin: 0 0 16px; font-weight: 900;
}
.viewer3d-copy h2 span { color: var(--color-yellow); text-shadow: 0 0 18px rgba(229,122,70,.55); }
.viewer3d-copy p { color: #aaa; font-size: .95rem; line-height: 1.6; margin: 0 0 26px; }
.viewer3d-cta {
  display: inline-flex; align-items: center; gap: 10px;
}
.viewer3d-cta svg { transition: transform .25s ease; }
.viewer3d-cta:hover svg { transform: translateX(4px); }

.viewer3d { position: relative; width: 100%; max-width: 420px; margin: 0 auto; perspective: 1500px; }
.viewer3d-hud { position: absolute; width: 26px; height: 26px; border: 2px solid var(--color-primary); opacity: .8; z-index: 3; }
.viewer3d-hud-tl { top: -10px; left: -10px; border-right: none; border-bottom: none; }
.viewer3d-hud-tr { top: -10px; right: -10px; border-left: none; border-bottom: none; }
.viewer3d-hud-bl { bottom: -10px; left: -10px; border-right: none; border-top: none; }
.viewer3d-hud-br { bottom: -10px; right: -10px; border-left: none; border-top: none; }

.viewer3d-glow {
  position: absolute; left: 50%; bottom: 2%; width: 78%; aspect-ratio: 3/1; transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(229,122,70,.5) 0%, rgba(229,122,70,0) 72%);
  filter: blur(8px); z-index: 0;
}
.viewer3d-stage-wrap {
  position: relative; z-index: 1; transform-style: preserve-3d;
  animation: viewer3d-float 5.5s ease-in-out infinite;
}
@keyframes viewer3d-float {
  0%, 100% { transform: translateY(0) rotateY(-11deg) rotateX(4deg) rotateZ(-2deg); }
  50% { transform: translateY(-12px) rotateY(-11deg) rotateX(4deg) rotateZ(-1deg); }
}
.viewer3d-stage {
  position: relative; aspect-ratio: 1/1;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 30px 60px -15px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.06);
  overflow: hidden;
  cursor: grab; touch-action: none;
  -webkit-user-select: none; user-select: none;
}
.viewer3d-stage:active { cursor: grabbing; }
.viewer3d-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 9%;
  opacity: 0; pointer-events: none;
  transition: opacity .45s cubic-bezier(.22,.61,.36,1), transform .45s cubic-bezier(.22,.61,.36,1);
  transform: scale(.92) rotateY(10deg);
}
.viewer3d-img.active { opacity: 1; transform: scale(1) rotateY(0deg); }
.viewer3d-hint {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  color: #ccc; font-size: .76rem; font-weight: 600; letter-spacing: .3px;
  margin: 20px 0 0; transition: opacity .4s ease;
}
.viewer3d-hint.is-hidden { opacity: 0; }
.viewer3d-dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.viewer3d-dots button { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.25); border: none; padding: 0; transition: background .2s ease, transform .2s ease; }
.viewer3d-dots button.active { background: var(--color-primary); transform: scale(1.3); }
.viewer3d-extra { display: flex; justify-content: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.viewer3d-extra-btn {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.15); color: #ddd;
  font-size: .76rem; font-weight: 700; letter-spacing: .3px; text-transform: uppercase;
  padding: 9px 16px; border-radius: 999px; cursor: pointer; transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.viewer3d-extra-btn:hover, .viewer3d-extra-btn.active { border-color: var(--color-primary); color: var(--color-primary); background: rgba(229,122,70,.08); }

@media (max-width: 860px) {
  .viewer3d-layout { grid-template-columns: 1fr; gap: 44px; }
  .viewer3d-copy { max-width: 100%; text-align: center; margin: 0 auto; }
  .viewer3d-cta { margin: 0 auto; }
}
@media (max-width: 600px) {
  .viewer3d-section { padding: 52px 0 44px; }
  .viewer3d-copy h2 { font-size: 1.7rem; }
  .viewer3d-bg-word { font-size: clamp(4rem, 26vw, 7rem); }
}

/* ---------- Micro-interactions ---------- */
.btn { transition: background .15s ease, transform .15s ease, box-shadow .15s ease; }
.btn:active { transform: scale(.97); }
.cart-link.bump .cart-badge { animation: cart-bump .4s ease; }
@keyframes cart-bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.5); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .ticker-track, .whatsapp-float { animation: none !important; }
  .page-loader { display: none !important; }
  .hero-slide-img { transition: none; transform: none !important; }
  .hero-slide, .hero-content, .hero-slider { transition: none; }
  .viewer3d-bg-grid { animation: none; }
  .viewer3d-stage-wrap { animation: none; transform: none !important; }
  .viewer3d-img { transition: opacity .15s ease; transform: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .category-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .footer-col-brand, .footer-col { flex: 1 1 calc(50% - 32px); }
}

@media (max-width: 720px) {
  .header-inner { grid-template-columns: 1fr auto 1fr; }
  .menu-toggle { display: flex; }
  .logo { justify-self: center; }
  .app-banner { display: flex; }
  .search-wrap { display: none; }
  /* Cuenta/favoritos/carrito ya están en la barra inferior móvil; el botón de
     tema no tiene equivalente ahí, así que se queda solo en el header. */
  .header-actions { display: flex; }
  .header-actions > a { display: none; }
  body { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }

  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 250;
    background: var(--color-white);
    border-top: 1px solid var(--color-gray-300);
    box-shadow: 0 -4px 16px rgba(0,0,0,.08);
    padding: 7px 4px calc(7px + env(safe-area-inset-bottom));
  }
  .mobile-bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--color-gray-700);
    font-size: .64rem;
    font-weight: 600;
    padding: 4px 0;
    border: none;
    background: none;
    cursor: pointer;
  }
  .mobile-bottom-nav-item.active { color: var(--color-primary-dark); }
  .mobile-bottom-nav-icon-wrap { position: relative; display: flex; }
  .mobile-bottom-nav-badge {
    position: absolute;
    top: -5px;
    right: -9px;
    background: var(--color-primary);
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
  }
  .mobile-bottom-nav-search { margin-top: -26px; }
  .mobile-bottom-nav-search-circle {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 16px rgba(229,122,70,.45);
    border: 3px solid var(--color-white);
    transition: transform .15s ease;
  }
  .mobile-bottom-nav-search:active .mobile-bottom-nav-search-circle { transform: scale(.92); }
  .whatsapp-float { right: 14px; bottom: calc(146px + env(safe-area-inset-bottom)); }

  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--color-white); border-top: 1px solid var(--color-gray-300); box-shadow: var(--shadow); }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a { padding: 14px 20px; border-bottom: 1px solid var(--color-gray-100); }
  .hero-slide--fallback { min-height: 220px; }
  .hero-content h2 { font-size: 1.6rem; }
  .hero-content { padding: 30px 24px; }
  .newsletter-inner { flex-direction: column; text-align: center; }
  .newsletter-form { width: 100%; }
  .newsletter-form input { flex: 1; min-width: 0; }
  .footer-col-brand, .footer-col { flex: 1 1 100%; }
  .form-row { grid-template-columns: 1fr; }
  .combo-option { grid-template-columns: 1fr; justify-items: start; gap: 6px; }
  .combo-badge { justify-self: start; }
  .cinematic-section { padding: 44px 0 36px; }
  .cinematic-section::before, .cinematic-section::after { display: none; }
  .cinematic-head h2 { font-size: 1.25rem; }
}

/* Checkout: datos y QR de cada pasarela de pago */
.pago-datos { display: flex; gap: 14px; align-items: flex-start; }
.pago-qr { width: 120px; height: 120px; object-fit: contain; background: #fff; border: 1px solid var(--color-gray-300); border-radius: 10px; flex: 0 0 auto; }
@media (max-width: 480px) { .pago-datos { flex-direction: column; } }

/* Diálogo de confirmación propio (window.confirmar / data-confirm) */
.dlg-fondo { position: fixed; inset: 0; z-index: 1000; background: rgba(15,16,20,.48); display: flex; align-items: center; justify-content: center; padding: 16px; animation: dlgFondo .15s ease; }
.dlg-fondo.saliendo { opacity: 0; transition: opacity .12s ease; }
.dlg { background: #fff; color: #23262b; border-radius: 16px; width: min(420px, 100%); padding: 24px 24px 20px; text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,.25); animation: dlgEntrar .18s ease; font-family: inherit; }
.dlg-icono { width: 48px; height: 48px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.dlg-icono.peligro { background: rgba(217,54,47,.1); color: #d9362f; }
.dlg-icono.info { background: rgba(229,122,70,.12); color: #C4602F; }
.dlg-titulo { margin: 0 0 6px; font-size: 1.1rem; }
.dlg-mensaje { margin: 0 0 18px; font-size: .9rem; color: #5b6069; line-height: 1.45; }
.dlg-acciones { display: flex; gap: 10px; justify-content: center; }
.dlg-acciones .btn { flex: 1; justify-content: center; text-align: center; }
@keyframes dlgFondo { from { opacity: 0; } to { opacity: 1; } }
@keyframes dlgEntrar { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
.dlg .btn-peligro { background: #b02a2a; box-shadow: none; }
.dlg .btn-peligro:hover { background: #8f1f1f; }

/* ===== Página de producto (producto.php) ===== */
.pd-migas { display: flex; flex-wrap: wrap; gap: 6px; font-size: .78rem; color: var(--color-gray-500); padding: 18px 0 0; }
.pd-migas a { color: var(--color-gray-700); }
.pd-migas a:hover { color: var(--color-gray-900); text-decoration: underline; }
.pd-migas [aria-current] { color: var(--color-gray-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40ch; }

/* grid-template-rows auto 1fr: la altura que le sobra a la columna de compra cae en la
   fila de la descripción (antes quedaba un hueco entre las fotos y la descripción). */
.pd { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr); grid-template-rows: auto auto 1fr; grid-template-areas: "galeria info" "video info" "desc info"; column-gap: 48px; padding: 18px 0 36px; align-items: start; }
.pd-galeria { grid-area: galeria; min-width: 0; }
.pd-info { grid-area: info; }
/* Marca + nombre + precio fijos debajo del header mientras se baja (--alto-header lo pone main.js) */
.pd-info-cabecera { position: sticky; top: var(--alto-header, 113px); z-index: 6; background: var(--color-white); padding: 10px 0 12px; margin: -10px 0 4px; transition: box-shadow .2s ease; }
.pd-info-cabecera.fijada { box-shadow: 0 10px 14px -12px rgba(0,0,0,.25); }
.pd-info-cabecera .price-row { margin-bottom: 0; }
.pd-info-cabecera .price-ahorro { margin: 4px 0 0; }
.pd-descripcion { grid-area: desc; margin-top: 34px; border-top: 1px solid var(--color-gray-300); padding-top: 24px; }
.pd-descripcion h2 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .6px; margin: 0 0 12px; }
.pd-descripcion .product-description { margin-top: 0; font-size: .95rem; }
.product-description p { margin: 0 0 12px; }
.product-description p:last-child { margin-bottom: 0; }
.product-description strong { color: var(--color-gray-900); font-weight: 700; }
.product-description ul.descripcion-lista { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.product-description ul.descripcion-lista li { position: relative; padding-left: 22px; }
.product-description ul.descripcion-lista li::before { content: '○'; position: absolute; left: 0; top: 0; color: var(--color-primary); font-size: .8em; }

/* Galería: todas las fotos en 2 columnas (si son impares, la primera ocupa el ancho) */
.pd-galeria-pista { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pd-galeria-pista.impar .pd-foto:first-child, .pd-galeria-pista.una .pd-foto { grid-column: 1 / -1; }
.pd-foto { position: relative; display: block; padding: 0; border: none; background: var(--color-gray-100); border-radius: 10px; overflow: hidden; cursor: zoom-in; aspect-ratio: 1 / 1; }
.pd-foto[hidden] { display: none; }
.pd-galeria-pista.impar .pd-foto:first-child, .pd-galeria-pista.una .pd-foto { aspect-ratio: 4 / 3; }
.pd-foto img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
/* Lupa: solo en pantallas con mouse real (no táctiles, donde no hay "hover"
   que seguir) — la imagen se agranda y sigue el cursor (transform-origin lo
   pone el JS en cada mousemove). En táctil se queda el toque normal → visor. */
@media (hover: hover) and (pointer: fine) {
  .pd-foto.zoom-activo img { transform: scale(2); transition: transform .15s ease; }
}
.pd-foto:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 2px; }
.pd-insignias { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.pd-insignia { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; padding: 5px 10px; border-radius: 4px; }
.pd-insignia.nuevo { background: var(--color-primary); color: #fff; }
.pd-insignia.oferta { background: #b02a2a; color: #fff; }
.pd-insignia.agotado { background: var(--color-black); color: #fff; }
.pd-galeria-puntos { display: none; }
.pd-video {
  grid-area: video;
  position: relative; margin: 18px auto 0; max-width: 380px;
  border-radius: 16px; overflow: hidden; background: var(--color-black);
  box-shadow: 0 10px 28px rgba(0,0,0,.18); cursor: pointer;
}
.pd-video video { width: 100%; max-height: 640px; display: block; }
.pd-video-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: rgba(0,0,0,.55); color: #fff; font-size: .68rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .5px; padding: 4px 10px; border-radius: 999px;
  backdrop-filter: blur(2px);
}
.pd-video-toggle, .pd-video-mute {
  position: absolute; z-index: 2; display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.pd-video-toggle:hover, .pd-video-mute:hover { background: rgba(0,0,0,.72); transform: scale(1.06); }
.pd-video-toggle { width: 56px; height: 56px; left: 50%; top: 50%; transform: translate(-50%, -50%); opacity: 0; }
.pd-video:hover .pd-video-toggle, .pd-video-toggle.es-pausado { opacity: 1; }
.pd-video-mute { width: 36px; height: 36px; right: 12px; bottom: 12px; }
.pd-video-nav {
  position: absolute; z-index: 2; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; cursor: pointer;
  transition: background .15s ease, transform .15s ease; opacity: 0;
}
.pd-video:hover .pd-video-nav { opacity: 1; }
.pd-video-nav:hover { background: rgba(0,0,0,.72); transform: translateY(-50%) scale(1.08); }
.pd-video-prev { left: 10px; }
.pd-video-next { right: 10px; }
.pd-video-contador {
  position: absolute; z-index: 2; top: 12px; right: 12px;
  background: rgba(0,0,0,.55); color: #fff; font-size: .72rem; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; letter-spacing: .3px; backdrop-filter: blur(2px);
}
@media (hover: none) {
  .pd-video-nav { opacity: 1; }
}

/* Info */
.pd-marca { display: inline-block; font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--color-gray-900); text-decoration: underline; text-underline-offset: 3px; }
.pd-info h1 { font-size: 1.65rem; line-height: 1.2; margin: 6px 0 4px; }
.pd-categoria { font-size: .85rem; color: var(--color-gray-500); margin-bottom: 14px; }
.pd-compartir { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: .82rem; font-weight: 600; }
.pd-compartir a, .pd-compartir button { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--color-gray-300); background: var(--color-white); color: var(--color-gray-900); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: all .15s ease; }
.pd-compartir a:hover, .pd-compartir button:hover { background: var(--color-black); border-color: var(--color-black); color: #fff; }
.pd-compartir button.copiado { background: #1f7a3f; border-color: #1f7a3f; color: #fff; }

/* Secciones desplegables */
.pd-acordeon { margin-top: 22px; border-top: 1px solid var(--color-gray-300); }
.pd-acordeon details { border-bottom: 1px solid var(--color-gray-300); }
.pd-acordeon summary { list-style: none; cursor: pointer; padding: 15px 2px; font-weight: 700; font-size: .9rem; display: flex; justify-content: space-between; align-items: center; }
.pd-acordeon summary::-webkit-details-marker { display: none; }
.pd-acordeon summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s ease; margin-right: 4px; }
.pd-acordeon details[open] summary::after { transform: rotate(-135deg); }
.pd-acordeon p, .pd-acordeon ul { margin: 0 0 16px; font-size: .88rem; color: var(--color-gray-700); line-height: 1.6; }
.pd-acordeon a { text-decoration: underline; }
.pd-ficha { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 16px; font-size: .88rem; }
.pd-ficha dt { color: var(--color-gray-500); }
.pd-ficha dd { margin: 0; color: var(--color-gray-900); }
.pd-pagos { padding-left: 18px; }

/* Productos que te pueden interesar: carrusel horizontal */
.pd-relacionados .section-head { align-items: center; }
.pd-carrusel-flechas { display: flex; gap: 8px; }
.pd-carrusel-flechas button { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--color-gray-300); background: var(--color-white); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: all .15s ease; }
.pd-carrusel-flechas button:hover:not(:disabled) { background: var(--color-black); border-color: var(--color-black); color: #fff; }
.pd-carrusel-flechas button:disabled { opacity: .35; cursor: default; }
.pd-carrusel { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 18px) / 4); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.pd-carrusel::-webkit-scrollbar { display: none; }
.pd-carrusel-item { scroll-snap-align: start; min-width: 0; }

/* Visor a pantalla completa */
.pd-visor { position: fixed; inset: 0; z-index: 900; background: rgba(10,10,10,.94); display: flex; align-items: center; justify-content: center; }
.pd-visor[hidden] { display: none; }
.pd-visor img { max-width: min(92vw, 1100px); max-height: 88vh; object-fit: contain; border-radius: 6px; user-select: none; }
.pd-visor-cerrar { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: none; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.pd-visor-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: none; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.pd-visor-nav.prev { left: 16px; } .pd-visor-nav.next { right: 16px; }
.pd-visor-nav[hidden] { display: none; }
.pd-visor-cerrar:hover, .pd-visor-nav:hover { background: rgba(255,255,255,.25); }
.pd-visor-contador { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: #ddd; font-size: .85rem; letter-spacing: .5px; }

@media (max-width: 980px) {
  .pd { grid-template-columns: 1fr; grid-template-rows: auto; grid-template-areas: "galeria" "video" "info" "desc"; column-gap: 0; }
  .pd-info { margin-top: 18px; }
  .pd-info-cabecera { position: static; box-shadow: none !important; margin: 0; padding: 0; }
  /* Móvil: carrusel deslizable de una foto a la vez */
  .pd-galeria { margin: 0 -20px; position: relative; } /* = padding de .container: fotos de borde a borde */
  .pd-galeria-pista { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 0; scrollbar-width: none; }
  .pd-galeria-pista::-webkit-scrollbar { display: none; }
  .pd-foto, .pd-galeria-pista.impar .pd-foto:first-child, .pd-galeria-pista.una .pd-foto { flex: 0 0 100%; aspect-ratio: 1 / 1; border-radius: 0; scroll-snap-align: center; }
  .pd-galeria-puntos { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
  .pd-galeria-puntos span { width: 7px; height: 7px; border-radius: 50%; background: var(--color-gray-300); transition: all .2s ease; }
  .pd-galeria-puntos span.activo { background: var(--color-black); width: 18px; border-radius: 999px; }
  .pd-galeria-nav {
    position: absolute; z-index: 2; top: calc(50% - 15px); transform: translateY(-50%);
    width: 34px; height: 34px; border-radius: 50%; border: none;
    background: rgba(255,255,255,.85); color: var(--color-black); box-shadow: 0 2px 8px rgba(0,0,0,.18);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
  }
  .pd-galeria-prev { left: 10px; }
  .pd-galeria-next { right: 10px; }
  .pd-carrusel { grid-auto-columns: calc((100% - 14px) / 2.2); gap: 14px; }
  .pd-visor-nav { display: none; }
}
@media (min-width: 981px) {
  .pd-galeria-nav { display: none; }
}

/* ---------- Nosotros ---------- */
.nosotros-hero {
  background: linear-gradient(165deg, var(--color-gray-100) 0%, var(--color-white) 75%);
  padding: 60px 0 40px;
  margin-bottom: 48px;
}
.nosotros-hero-inner { display: flex; align-items: center; gap: 48px; flex-wrap: wrap; }
.nosotros-hero-copy { flex: 1 1 420px; min-width: 280px; }
.nosotros-eyebrow { display: inline-block; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; font-size: .78rem; color: var(--color-primary-dark); margin-bottom: 10px; }
.nosotros-hero-copy h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 18px; line-height: 1.12; }
.nosotros-historia p { font-size: .98rem; line-height: 1.7; color: var(--color-gray-900); margin: 0 0 14px; }
.nosotros-botones-pdf { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.nosotros-libro-btn { display: inline-flex; align-items: center; gap: 9px; }
.nosotros-hero-foto { flex: 1 1 320px; min-width: 240px; max-width: 460px; }
.nosotros-hero-foto img { width: 100%; height: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius); display: block; box-shadow: 0 16px 40px rgba(0,0,0,.14); }
.nosotros-stats { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 36px; }
.nosotros-stat {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--color-white);
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius);
  padding: 16px 24px;
  min-width: 140px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.nosotros-stat:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(0,0,0,.1); }
.nosotros-stat strong { font-family: var(--font-heading); font-weight: 900; font-size: 2rem; color: var(--color-primary-dark); line-height: 1; }
.nosotros-stat span { font-size: .85rem; color: var(--color-gray-700); font-weight: 600; }

.nosotros-mv { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 56px; }
.nosotros-mv-card {
  flex: 1 1 280px;
  background: var(--color-white);
  border: 1px solid var(--color-gray-300);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.nosotros-mv-card:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(0,0,0,.09); }
.nosotros-mv-card h3 { font-family: var(--font-heading); font-weight: 800; margin: 0 0 10px; }
.nosotros-mv-card p { margin: 0; line-height: 1.65; color: var(--color-gray-700); font-size: .95rem; }

.nosotros-mapa { margin-bottom: 56px; }
.nosotros-mapa-direccion { margin: -6px 0 16px; color: var(--color-gray-700); font-size: .95rem; }
.nosotros-mapa-embed { width: 100%; height: 360px; border-radius: var(--radius); overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.1); }
.nosotros-mapa-embed iframe { display: block; }

.nosotros-catalogos { margin-bottom: 56px; }
.nosotros-catalogos .caja-vacio { text-align: center; padding: 40px 20px; color: #777; background: var(--color-gray-100); border-radius: var(--radius); }
.nosotros-catalogos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 20px; }
.nosotros-catalogo-card { display: flex; flex-direction: column; gap: 6px; text-align: left; background: none; border: none; padding: 0; cursor: pointer; font: inherit; color: inherit; }
.nosotros-catalogo-portada {
  position: relative; display: flex; align-items: center; justify-content: center;
  aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden;
  background: var(--color-gray-900); color: #777;
}
.nosotros-catalogo-portada img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.nosotros-catalogo-card:hover .nosotros-catalogo-portada img { transform: scale(1.05); }
.nosotros-catalogo-ver {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px;
  background: linear-gradient(0deg, rgba(0,0,0,.78), transparent);
  color: #fff; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .4px;
  opacity: 0; transform: translateY(6px); transition: opacity .2s ease, transform .2s ease;
}
.nosotros-catalogo-card:hover .nosotros-catalogo-ver { opacity: 1; transform: translateY(0); }
.nosotros-catalogo-card strong { font-size: .92rem; margin-top: 4px; }
.nosotros-catalogo-periodo { font-size: .8rem; color: var(--color-gray-500); }

@media (max-width: 640px) {
  .nosotros-hero { padding: 32px 0 24px; }
  .nosotros-hero-inner { gap: 24px; }
  .nosotros-stats { gap: 20px; }
  .nosotros-stat strong { font-size: 1.6rem; }
}

/* ---------- Libro 3D (folleto institucional y catálogos) ---------- */
.libro3d-overlay {
  position: fixed; inset: 0; z-index: 2000; background: rgba(10,10,10,.92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .2s ease;
  padding: 16px;
}
.libro3d-overlay.abierto { opacity: 1; visibility: visible; }
.libro3d-panel { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 1240px; max-height: 100%; overflow-y: auto; }
.libro3d-head { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 1020px; margin-bottom: 10px; color: #fff; flex-shrink: 0; }
.libro3d-titulo { font-family: var(--font-heading); font-weight: 800; font-size: 1rem; }
.libro3d-cerrar { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; border: none; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; transition: background .15s ease; }
.libro3d-cerrar:hover { background: rgba(255,255,255,.22); }
/* Altura fija (no min-height con vh): así la portada y el libro miden sus
   porcentajes contra esta caja real, no contra toda la pantalla, y nunca
   empujan el modal fuera del viewport cuando el encabezado/pie ya ocupan espacio. */
.libro3d-stage {
  position: relative; width: 100%; max-width: 1020px; height: min(64vh, 560px); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.libro3d-loading {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  color: #fff; background: rgba(10,10,10,.4); border-radius: 10px;
}
/* El atributo [hidden] y la regla de arriba empatan en especificidad; sin esto,
   display:flex le gana a [hidden] y el aviso de carga nunca llega a ocultarse. */
.libro3d-loading[hidden] { display: none; }
.libro3d-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); border-top-color: var(--color-primary); animation: libro3dSpin .8s linear infinite; }
.libro3d-loading.con-error .libro3d-spinner { display: none; }
.libro3d-loading.con-error .libro3d-loading-texto { color: #ff8a8a; font-weight: 700; }
@keyframes libro3dSpin { to { transform: rotate(360deg); } }
.libro3d-loading-texto { font-size: .85rem; opacity: .85; margin: 0; text-align: center; padding: 0 20px; }
/* Siempre en el flujo normal (nunca display:none) para que "stretch" mida un tamaño real. */
.libro3d-book-wrap { display: flex; align-items: center; gap: 14px; width: 100%; height: 100%; justify-content: center; }
.libro3d-book-scroll { flex: 1 1 auto; max-width: 100%; max-height: 100%; overflow: auto; display: flex; align-items: center; justify-content: center; }
.libro3d-book-scroll.con-zoom { align-items: flex-start; justify-content: flex-start; cursor: grab; }
.libro3d-book { flex-shrink: 0; transition: transform .15s ease; transform-origin: center top; }
.libro3d-nav { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: none; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; transition: background .15s ease; }
.libro3d-nav:hover { background: rgba(255,255,255,.26); }

/* ---------- Portada cerrada (se "abre" sola o al tocarla) ---------- */
.libro3d-portada {
  position: absolute; inset: 0; z-index: 4; border-radius: 10px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  border: none; background: #0c0c0c; padding: 0; cursor: pointer; perspective: 1800px;
}
.libro3d-portada[hidden] { display: none; }
.libro3d-portada-img {
  max-width: 78%; max-height: 82%; border-radius: 8px; display: block;
  box-shadow: 0 30px 70px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.07);
  transform-origin: left center; transition: transform .7s cubic-bezier(.45,0,.2,1), opacity .7s ease;
}
.libro3d-portada-hint {
  display: flex; align-items: center; gap: 8px;
  color: #fff; font-size: .8rem; font-weight: 700;
  background: rgba(255,255,255,.14); padding: 9px 18px; border-radius: 999px;
  animation: libro3dHintPulso 1.8s ease-in-out infinite; transition: opacity .3s ease;
}
@keyframes libro3dHintPulso { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }
.libro3d-portada.abriendo .libro3d-portada-img { transform: rotateY(-110deg) scale(.9); opacity: 0; }
.libro3d-portada.abriendo .libro3d-portada-hint { opacity: 0; }
.libro3d-portada.oculta { pointer-events: none; opacity: 0; transition: opacity .3s ease .35s; }

.libro3d-footer { margin-top: 12px; width: 100%; max-width: 1020px; display: flex; align-items: center; justify-content: space-between; gap: 14px; color: #ccc; font-size: .82rem; }
.libro3d-descargar {
  display: flex; align-items: center; gap: 7px;
  color: #fff; font-weight: 700; font-size: .78rem;
  background: rgba(255,255,255,.12); padding: 8px 14px; border-radius: 999px;
  transition: background .15s ease;
}
.libro3d-descargar:hover { background: rgba(255,255,255,.24); }
.libro3d-zoom { display: flex; align-items: center; gap: 4px; }
.libro3d-zoom-btn, .libro3d-zoom-reset {
  display: flex; align-items: center; justify-content: center;
  height: 30px; min-width: 30px; padding: 0 8px; border-radius: 999px; border: none;
  background: rgba(255,255,255,.14); color: #fff; font-weight: 700; font-size: .85rem; cursor: pointer;
  transition: background .15s ease, opacity .15s ease;
}
.libro3d-zoom-btn:hover, .libro3d-zoom-reset:hover { background: rgba(255,255,255,.26); }
.libro3d-zoom-btn:disabled { opacity: .4; cursor: default; }
.libro3d-zoom-reset { min-width: 48px; font-size: .75rem; }
@media (max-width: 640px) {
  .libro3d-nav { width: 36px; height: 36px; }
  .libro3d-book-wrap { gap: 6px; }
  .libro3d-stage { height: min(58vh, 460px); }
  .libro3d-footer { gap: 10px; flex-wrap: wrap; justify-content: center; }
}
