/* =========================================================================
   LULACURVY — Sistema de diseño
   Paleta: ciruela profundo + vino + oro cálido + blush + marfil cálido
   Tipografía: Fraunces (display, con carácter curvo) + Work Sans (cuerpo)
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,500;1,9..144,600&family=Work+Sans:wght@400;500;600;700&display=swap');

:root {
  --color-bg: #FBF3EC;
  --color-bg-soft: #F3E4D8;
  --color-dark: #2B1220;
  --color-dark-soft: #3D1A2D;
  --color-primary: #9C3B54;
  --color-primary-dark: #7C2C41;
  --color-accent: #C9A15A;
  --color-accent-soft: #E7CE9C;
  --color-blush: #F3D9CE;
  --color-text: #2B1220;
  --color-muted: #8A7570;
  --color-white: #FFFFFF;
  --color-success: #4C7A5E;
  --color-heart: #E63950;
  --color-error: #B23A3A;

  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body: 'Work Sans', 'Segoe UI', sans-serif;

  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 32px;
  --radius-blob: 62% 38% 55% 45% / 45% 55% 45% 55%;

  --shadow-soft: 0 10px 30px rgba(43, 18, 32, 0.08);
  --shadow-hover: 0 16px 40px rgba(43, 18, 32, 0.14);
  --tint-rgb: 43, 18, 32;

  --container-width: 1240px;
}

/* Respaldo de los temas en el CSS externo: el mecanismo principal es el bloque
   <style> que se genera en cada página (ver base.html), pero se deja también aquí
   por seguridad, con menor especificidad, para que nunca dependa de un solo sitio. */
html[data-theme="indigo"] {
  --color-bg: #F7F5EF;
  --color-bg-soft: #ECE6D8;
  --color-dark: #13223A;
  --color-dark-soft: #1E3557;
  --color-primary: #1F3A5F;
  --color-primary-dark: #122845;
  --color-accent: #E0913D;
  --color-accent-soft: #F0C08A;
  --color-blush: #F3E3CB;
  --color-text: #13223A;
  --color-muted: #6C7A8C;
  --color-success: #3D6B4F;
  --color-error: #A83232;
  --shadow-soft: 0 10px 30px rgba(19, 34, 58, 0.08);
  --shadow-hover: 0 16px 40px rgba(19, 34, 58, 0.16);
  --tint-rgb: 19, 34, 58;
}

html[data-theme="boutique"] {
  --color-bg: #FAFAFA;
  --color-bg-soft: #EDEDED;
  --color-dark: #1A1A1A;
  --color-dark-soft: #2E2E2E;
  --color-primary: #1A1A1A;
  --color-primary-dark: #000000;
  --color-accent: #C9A15A;
  --color-accent-soft: #DDBB7A;
  --color-blush: #EFE6D3;
  --color-text: #1A1A1A;
  --color-muted: #7A7A7A;
  --color-success: #3D6B4F;
  --color-error: #A83232;
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.07);
  --shadow-hover: 0 16px 40px rgba(0, 0, 0, 0.14);
  --tint-rgb: 26, 26, 26;
}

* { box-sizing: border-box; }

/* Los navegadores aplican su propia fuente por defecto a los controles de formulario
   (button, input, select, textarea), ignorando el font-family de la página. Sin esto,
   los swatches de color/medidas y otros botones se ven con la tipografía del sistema
   en vez de con la de la web. */
button, input, select, textarea, optgroup, option {
  font-family: inherit;
  font-size: 100%;
}

/* ---------------------------------------------------------------- ICONOS (Font Awesome Duotone) */
.fa-duotone, .fad {
  --fa-primary-color: var(--color-primary);
  --fa-secondary-color: var(--color-accent);
  --fa-secondary-opacity: 0.55;
}
.icon-dark { color: var(--color-dark); --fa-primary-color: var(--color-dark); --fa-secondary-color: var(--color-accent); }
.icon-gold { color: var(--color-accent); --fa-primary-color: var(--color-accent); --fa-secondary-color: var(--color-blush); }
.icon-white { color: #ffffff; --fa-primary-color: #ffffff; --fa-secondary-color: var(--color-accent-soft); --fa-secondary-opacity: 0.7; }
.icon-muted { color: var(--color-muted); --fa-primary-color: var(--color-muted); --fa-secondary-color: var(--color-bg-soft); }

html { scroll-behavior: smooth; max-width: 100%; overflow-x: hidden; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
html.lc-loading { overflow: hidden; }

/* ---------------------------------------------------------------- LOADER DE MARCA */
.site-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, var(--color-dark-soft), var(--color-dark) 75%);
  transition: opacity 0.7s ease, visibility 0.7s ease;
}
.site-loader-skip { display: none !important; }
.site-loader-hide { opacity: 0; visibility: hidden; pointer-events: none; }
.site-loader-inner { text-align: center; }
.site-loader-logo {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  color: var(--color-white);
  letter-spacing: 0.01em;
  animation: loaderReveal 1.1s cubic-bezier(0.22, 1, 0.36, 1) both, loaderGlow 2.4s ease-in-out 1.1s infinite;
}
.site-loader-logo span { color: var(--color-accent); font-style: normal; }
.site-loader-subtitle {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-accent-soft);
  margin-top: 6px;
  animation: fadeIn 1s ease 0.4s both;
}
.site-loader-bar {
  width: 200px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  margin: 28px auto 0;
  overflow: hidden;
}
.site-loader-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
  border-radius: 999px;
  animation: loaderProgress 4s cubic-bezier(0.3, 0, 0.2, 1) both;
}
@keyframes loaderReveal {
  from { opacity: 0; transform: scale(0.85) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes loaderGlow {
  0%, 100% { text-shadow: 0 0 0 rgba(201, 161, 90, 0); }
  50% { text-shadow: 0 0 26px rgba(201, 161, 90, 0.45); }
}
@keyframes loaderProgress {
  from { width: 0%; }
  to { width: 100%; }
}

img {
  max-width: 100%;
  display: block;
  /* Red de seguridad: si una imagen no llega a cargar, que su texto
     alternativo (atributo alt) se vea legible y no minúsculo. */
  font-size: 0.9rem;
  color: var(--color-muted);
}

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-dark);
  margin: 0 0 0.5em;
  line-height: 1.15;
  font-weight: 600;
}

h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; }

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

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

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* =========================================================================
   ANIMACIONES — keyframes y utilidades reutilizables en todo el sitio
   ========================================================================= */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes floatSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes heartPop {
  0% { transform: scale(1); }
  30% { transform: scale(1.35); }
  55% { transform: scale(0.9); }
  100% { transform: scale(1); }
}
@keyframes heartAppear {
  0% { transform: scale(0) rotate(0deg); opacity: 0; }
  30% { transform: scale(1.35) rotate(0deg); opacity: 1; }
  45% { transform: scale(0.85); }
  60% { transform: scale(1.2); }
  75% { transform: scale(0.95); }
  100% { transform: scale(1); }
}
@keyframes heartBreak {
  0% { transform: scale(1) rotate(0deg); opacity: 1; }
  15% { transform: scale(1.15) rotate(-6deg); opacity: 1; }
  35% { transform: scale(0.9) rotate(8deg); opacity: 0.9; }
  55% { transform: scale(1.05) rotate(-10deg); opacity: 0.7; }
  75% { transform: scale(0.6) rotate(14deg); opacity: 0.35; }
  100% { transform: scale(0.15) rotate(28deg); opacity: 0; }
}
@keyframes badgeBounce {
  0%, 100% { transform: scale(1); }
  30% { transform: scale(1.4); }
  60% { transform: scale(0.9); }
}
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
@keyframes underlineGrow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@keyframes dotPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes slideDownFade {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* Revelado al hacer scroll: se activa añadiendo .is-visible vía JS (IntersectionObserver) */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Aparición escalonada para cuadrículas (categorías, productos) */
.stagger-grid > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.stagger-grid.is-visible > * { opacity: 1; transform: translateY(0); }
.stagger-grid.is-visible > *:nth-child(1) { transition-delay: 0.02s; }
.stagger-grid.is-visible > *:nth-child(2) { transition-delay: 0.08s; }
.stagger-grid.is-visible > *:nth-child(3) { transition-delay: 0.14s; }
.stagger-grid.is-visible > *:nth-child(4) { transition-delay: 0.20s; }
.stagger-grid.is-visible > *:nth-child(5) { transition-delay: 0.26s; }
.stagger-grid.is-visible > *:nth-child(6) { transition-delay: 0.32s; }
.stagger-grid.is-visible > *:nth-child(7) { transition-delay: 0.38s; }
.stagger-grid.is-visible > *:nth-child(8) { transition-delay: 0.44s; }

.animate-fade-in { animation: fadeIn 0.6s ease both; }
.animate-fade-in-up { animation: fadeInUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }
.animate-float { animation: floatSlow 5s ease-in-out infinite; }
.animate-heart-pop { animation: heartPop 0.5s ease; }
.animate-badge-bounce { animation: badgeBounce 0.45s ease; }
.animate-shake { animation: shakeX 0.4s ease; }

/* Sensación de tacto en todo lo pulsable */
.btn, .chip, .measurement-option, .color-swatch, .category-card, .product-card, a.icon-link, .favorite-btn {
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}
.btn:active, .chip:active, .measurement-option:active, .color-swatch:active { transform: scale(0.95); }

/* ---------------------------------------------------------------- BOTONES */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 28px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}
.btn:hover::after { left: 130%; }
.btn-primary { background: var(--color-primary); color: var(--color-white); }
.btn-primary:hover { background: var(--color-primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-dark { background: var(--color-dark); color: var(--color-white); }
.btn-dark:hover { background: var(--color-dark-soft); transform: translateY(-2px); }
.btn-outline { background: transparent; border-color: var(--color-dark); color: var(--color-dark); }
.btn-outline:hover { background: var(--color-dark); color: var(--color-white); }
.btn-gold { background: var(--color-accent); color: var(--color-dark); }
.btn-gold:hover { background: var(--color-accent-soft); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-danger { background: var(--color-error); color: var(--color-white); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------------------------------------------------------------- HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid rgba(var(--tint-rgb), 0.08);
}
.announcement-bar {
  background: var(--color-dark);
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 12px;
}
.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 16px;
  max-width: var(--container-width);
  margin: 0 auto;
}
@media (min-width: 640px) { .header-main { gap: 24px; padding: 18px 24px; } }
.logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
  flex-shrink: 0;
  text-decoration: none;
}
.logo {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 5vw, 1.9rem);
  font-weight: 700;
  color: var(--color-dark);
  font-style: italic;
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.logo-wrap:hover .logo { transform: scale(1.04) rotate(-1deg); }
.logo-subtitle {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-top: 2px;
}
@media (min-width: 640px) { .logo-subtitle { font-size: 0.68rem; } }
.logo span { color: var(--color-accent); font-style: normal; transition: color 0.3s ease; }
.logo-image {
  max-height: 52px;
  max-width: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.logo-wrap:hover .logo-image { transform: scale(1.04); }
@media (min-width: 640px) { .logo-image { max-height: 60px; } }

.search-form { flex: 1; max-width: 420px; position: relative; display: none; }
.search-form input {
  width: 100%;
  padding: 12px 44px 12px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--color-bg-soft);
  background: var(--color-white);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.search-form input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 4px rgba(156, 59, 84, 0.12); outline: none; }
.search-form button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-dark);
  border: none;
  color: var(--color-white);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s ease;
}
.search-form button:hover { background: var(--color-primary); transform: translateY(-50%) scale(1.08) rotate(8deg); }
.search-form button .icon-fa { font-size: 0.95rem; }
@media (min-width: 860px) { .search-form { display: block; } }

.header-icons { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.icon-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-dark);
  gap: 4px;
  min-width: 30px;
  max-width: 70px;
  white-space: nowrap;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.icon-link:hover { transform: translateY(-3px); color: var(--color-primary); }
.icon-wrap { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; }
.icon-link svg { width: 22px; height: 22px; stroke: var(--color-dark); }
.icon-link i { font-size: 1.25rem; transition: transform 0.25s ease; }
.icon-link:hover i { transform: scale(1.12); }
/* En móvil solo se muestran los iconos: los textos (Favoritos, Carrito, nombre...) ocupan
   demasiado ancho y son los causantes de que el header se saliera de la pantalla. */
.icon-label { display: none; }
@media (min-width: 640px) {
  .header-icons { gap: 22px; }
  .icon-link { max-width: none; }
  .icon-label { display: inline; }
}
.icon-link:hover .icon-fallback svg { transform: scale(1.12); }
.icon-label { line-height: 1.1; }

/* Icono de reserva (SVG) mientras no esté disponible el kit self-hosted de Font Awesome Pro.
   En cuanto static/fa-pro/css/all.css cargue de verdad, main.js añade la clase .fa-ready
   al <html> y se intercambian automáticamente por los iconos duotone. */
.icon-fa { display: none; }
.icon-fallback { display: inline-flex; align-items: center; justify-content: center; transition: transform 0.25s ease; }
.icon-fallback svg { display: block; transition: fill 0.2s ease; }
html.fa-ready .icon-fa { display: inline-flex; align-items: center; justify-content: center; }
html.fa-ready .icon-fallback { display: none; }

.cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--color-primary);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: scaleIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
  z-index: 2;
}
.cart-badge.animate-badge-bounce { animation: badgeBounce 0.45s ease; }

.main-nav {
  border-top: 1px solid rgba(var(--tint-rgb), 0.06);
}
.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin: 0 auto;
  padding: 12px 24px;
  max-width: var(--container-width);
}
.main-nav a {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-dark);
  position: relative;
  padding-bottom: 4px;
  transition: color 0.25s ease;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.main-nav a:hover { color: var(--color-primary); }
.main-nav a:hover::after { transform: scaleX(1); }

.mobile-menu-toggle {
  display: flex;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 4px;
  width: 32px;
  height: 32px;
}
.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-dark);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}
.mobile-menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 860px) { .mobile-menu-toggle { display: none; } }

.mobile-search { padding: 0 24px 14px; }
@media (min-width: 860px) { .mobile-search { display: none; } }

@media (max-width: 859px) {
  .main-nav {
    display: block;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
  }
  .main-nav.open { max-height: 600px; opacity: 1; }
  .main-nav ul { flex-direction: column; gap: 4px; }
}

/* ---------------------------------------------------------------- FLASH MESSAGES */
.flash-container { max-width: var(--container-width); margin: 16px auto 0; padding: 0 24px; }
.flash {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  animation: slideDownFade 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: opacity 0.35s ease, transform 0.35s ease, max-height 0.35s ease, margin 0.35s ease, padding 0.35s ease;
}
.flash.is-closing { opacity: 0; transform: translateY(-8px) scale(0.98); max-height: 0; margin: 0; padding-top: 0; padding-bottom: 0; overflow: hidden; }
.flash-success { background: #E4F0E8; color: var(--color-success); }
.flash-error { background: #F8E4E4; color: var(--color-error); }
.flash-info { background: var(--color-blush); color: var(--color-primary-dark); }
.flash button { background: none; border: none; cursor: pointer; font-size: 1rem; color: inherit; }

/* ---------------------------------------------------------------- HERO / BANNER */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--color-dark);
  color: var(--color-white);
}
.hero-custom-bg {
  background-size: cover;
  background-position: center;
}
.hero-custom-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(var(--tint-rgb),0.72), rgba(var(--tint-rgb),0.6));
  z-index: 0;
}
.hero-custom-bg .hero-slide { z-index: 1; }
.hero-custom-bg .hero-dots { z-index: 1; }
.hero-custom-bg .hero-fallback { position: relative; z-index: 1; }
.hero-slide {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 32px;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 60px 24px;
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}
.hero-slide.active { position: relative; opacity: 1; pointer-events: auto; }
@media (min-width: 860px) {
  .hero-slide { grid-template-columns: 1.1fr 0.9fr; padding: 90px 24px; }
}
.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: clamp(0.8rem, 1.4vw, 0.95rem);
  color: var(--color-accent-soft);
  font-weight: 700;
  margin-bottom: 14px;
}
.hero-slide h1 { color: var(--color-white); font-style: italic; }
.hero-slide.active h1, .hero-slide.active p, .hero-slide.active .btn {
  animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero-slide.active p { animation-delay: 0.08s; }
.hero-slide.active .btn { animation-delay: 0.16s; }
.hero-slide p { color: rgba(255,255,255,0.85); font-size: clamp(1rem, 1.6vw, 1.2rem); max-width: 480px; line-height: 1.6; }
.hero-image-wrap {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--radius-blob);
  overflow: hidden;
  border: 6px solid rgba(201, 161, 90, 0.35);
  animation: floatSlow 6s ease-in-out infinite;
}
.hero-image-wrap img { width: 100%; height: 100%; object-fit: cover; }
.hero-dots { display: flex; gap: 8px; justify-content: center; padding-bottom: 24px; position: relative; z-index: 2; }
.hero-dots button {
  width: 8px; height: 8px; border-radius: 50%; border: none; background: rgba(255,255,255,0.3); cursor: pointer;
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1), background 0.35s ease, transform 0.25s ease;
}
.hero-dots button:hover { transform: scale(1.3); }
.hero-dots button.active { background: var(--color-accent); width: 22px; border-radius: 8px; }

.hero-fallback {
  text-align: center;
  padding: 90px 24px;
}
.hero-fallback h1 { font-style: italic; }

/* ---------------------------------------------------------------- SECCIONES */
.section { padding: 64px 0; }
.section-tight { padding-top: 40px; padding-bottom: 40px; }
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}
.section-header .eyebrow {
  color: var(--color-primary);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  display: block;
  margin-bottom: 6px;
}
.section-alt { background: var(--color-bg-soft); }
.section-dark { background: var(--color-dark); color: var(--color-white); }
.section-dark h2 { color: var(--color-white); }

.link-arrow { font-weight: 600; color: var(--color-primary); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }

/* ---------------------------------------------------------------- CATEGORIAS */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (min-width: 640px) { .category-grid { grid-template-columns: repeat(4, 1fr); } }
.category-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--color-blush);
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}
.category-card:hover { transform: translateY(-6px) scale(1.015); box-shadow: var(--shadow-hover); }
.category-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.category-card:hover img { transform: scale(1.08) rotate(0.5deg); }
.category-card-title {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 18px 16px;
  background: linear-gradient(to top, rgba(var(--tint-rgb),0.88), transparent);
  color: white;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  transition: padding-bottom 0.3s ease;
}
.category-card:hover .category-card-title { padding-bottom: 22px; }

/* ---------------------------------------------------------------- PRODUCTOS */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 18px;
}
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.product-thumb { position: relative; aspect-ratio: 3/4; overflow: hidden; background: var(--color-blush); }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.product-card:hover .product-thumb img { transform: scale(1.08); }
.product-badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; }
.badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 5px 11px;
  border-radius: 999px;
  color: white;
  animation: scaleIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.badge-new { background: var(--color-primary); }
.badge-sale { background: var(--color-accent); color: var(--color-dark); animation-delay: 0.06s; }
.badge-out { background: var(--color-muted); }
.product-name { transition: color 0.2s ease; }
.product-card:hover .product-name { color: var(--color-primary); }
.price { transition: transform 0.2s ease; }
.product-card:hover .price { transform: translateX(2px); }

.favorite-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(var(--tint-rgb), 0.12);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s ease;
}
.favorite-btn:hover { transform: scale(1.12); background: white; }

/* Corazón sin marcar: contorno gris bien visible */
.favorite-btn .heart-svg {
  width: 18px; height: 18px;
  stroke: var(--color-muted);
  fill: none;
  stroke-width: 2;
  transition: stroke 0.2s ease, fill 0.2s ease;
}
.favorite-btn .heart-icon {
  font-size: 1.05rem;
  color: var(--color-muted);
  transition: color 0.2s ease;
}
/* Corazón marcado como favorito: relleno rojo */
.favorite-btn.is-active .heart-svg { stroke: var(--color-heart); fill: var(--color-heart); }
.favorite-btn.is-active .heart-icon { color: var(--color-heart); }

/* Animación de aparición: crece de pequeño a grande con un "latido" doble */
.favorite-btn.animate-heart-in .heart-svg,
.favorite-btn.animate-heart-in .heart-icon {
  animation: heartAppear 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
/* Animación de rotura al quitar de favoritos: tiembla, se encoge y se desvanece */
.favorite-btn.animate-heart-break .heart-svg,
.favorite-btn.animate-heart-break .heart-icon {
  animation: heartBreak 0.55s ease-in both;
}
.favorite-btn.animate-heart-pop { animation: heartPop 0.5s ease; }


.product-info { padding: 14px 16px 18px; flex: 1; display: flex; flex-direction: column; }
.product-category { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-muted); margin-bottom: 3px; }
.product-name { font-family: var(--font-body); font-weight: 600; font-size: 1.02rem; line-height: 1.35; margin-bottom: 8px; color: var(--color-dark); }
.product-price-row { margin-top: auto; display: flex; align-items: baseline; gap: 8px; }
.price { font-weight: 700; color: var(--color-primary); font-size: 1.05rem; }
.price-old { text-decoration: line-through; color: var(--color-muted); font-size: 0.9rem; }

/* ---------------------------------------------------------------- FILTROS / CATALOGO */
.catalog-layout { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 900px) { .catalog-layout { grid-template-columns: 240px 1fr; } }
.filters { background: var(--color-white); border-radius: var(--radius-md); padding: 22px; box-shadow: var(--shadow-soft); align-self: start; }
.filter-group { margin-bottom: 22px; }
.filter-group h4 { font-family: var(--font-body); text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.05em; color: var(--color-dark); margin-bottom: 10px; font-weight: 700; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--color-bg-soft);
  font-size: 0.88rem;
  cursor: pointer;
  background: var(--color-white);
  color: var(--color-dark);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chip.active, .chip:hover { border-color: var(--color-primary); color: var(--color-primary); }
.filters input[type="number"] { width: 100%; padding: 10px 12px; border-radius: var(--radius-sm); border: 1.5px solid var(--color-bg-soft); margin-bottom: 8px; font-size: 0.92rem; }
.results-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; flex-wrap: wrap; gap: 12px; font-size: 0.92rem; }
.results-toolbar select { width: auto; padding: 8px 34px 8px 12px; border-radius: var(--radius-sm); border: 1.5px solid var(--color-bg-soft); background-color: white; font-size: 0.9rem; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--color-muted); }

/* ---------------------------------------------------------------- FICHA DE PRODUCTO */
.product-detail { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 900px) { .product-detail { grid-template-columns: 1fr 1fr; } }
.pd-gallery-main { border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 4/5; background: var(--color-blush); margin-bottom: 12px; }
.pd-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumbs { display: flex; gap: 10px; }
.pd-thumbs img { width: 68px; height: 68px; object-fit: cover; border-radius: var(--radius-sm); cursor: pointer; border: 2px solid transparent; }
.pd-thumbs img.active { border-color: var(--color-primary); }
.pd-category { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; color: var(--color-primary); font-weight: 700; margin-bottom: 8px; }
.pd-price { font-size: clamp(1.7rem, 2.4vw, 2.1rem); font-weight: 700; color: var(--color-primary); margin: 12px 0; display: flex; gap: 12px; align-items: baseline; }
.pd-status {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 20px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}
.pd-status.ok { color: var(--color-success); background: #E4F0E8; }
.pd-status.out { color: var(--color-error); background: #F8E4E4; }
.pd-status i { margin-top: 2px; flex-shrink: 0; }
.option-group { margin: 20px 0; }
.option-group h4 { font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px; color: var(--color-dark); }
.option-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.color-swatch {
  padding: 10px 18px;
  border: 1.5px solid var(--color-bg-soft);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  background: white;
  color: var(--color-dark);
}
.color-swatch.selected { border-color: var(--color-primary); background: var(--color-blush); }
.measurement-options { display: flex; flex-wrap: wrap; gap: 10px; }
.measurement-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1.5px solid var(--color-bg-soft);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  background: white;
  color: var(--color-dark);
  text-align: left;
}
.measurement-option.selected { border-color: var(--color-primary); background: var(--color-blush); }
.measurement-out-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-error);
  background: #F8E4E4;
  padding: 2px 8px;
  border-radius: 999px;
}
.qty-selector { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.qty-selector button {
  width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--color-bg-soft);
  background: white; cursor: pointer; font-size: 1.2rem; font-weight: 600; color: var(--color-dark);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
.qty-selector button:hover { border-color: var(--color-primary); color: var(--color-primary); }
.qty-selector button:active { transform: scale(0.9); }
.qty-selector input[type="number"] {
  width: 56px;
  text-align: center;
  padding: 9px 6px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-bg-soft);
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-dark);
  background: var(--color-bg);
  /* Oculta las flechas nativas del navegador: ya tenemos botones +/- propios */
  -moz-appearance: textfield;
  appearance: textfield;
}
.qty-selector input[type="number"]::-webkit-outer-spin-button,
.qty-selector input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.qty-selector input[type="number"]:focus { border-color: var(--color-primary); outline: none; background: white; }
.pd-actions { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.pd-description { margin-top: 30px; border-top: 1px solid var(--color-bg-soft); padding-top: 24px; color: var(--color-muted); font-size: 1rem; line-height: 1.7; }
.pd-description h4 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-dark); margin-bottom: 10px; }

/* ---------------------------------------------------------------- CARRITO */
.cart-layout { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 900px) { .cart-layout { grid-template-columns: 2fr 1fr; } }
.cart-item {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--color-bg-soft);
  align-items: center;
  animation: fadeInUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.cart-item:nth-of-type(2) { animation-delay: 0.05s; }
.cart-item:nth-of-type(3) { animation-delay: 0.1s; }
.cart-item:nth-of-type(4) { animation-delay: 0.15s; }
.cart-item:nth-of-type(5) { animation-delay: 0.2s; }
.cart-item img { width: 90px; height: 110px; object-fit: cover; border-radius: var(--radius-sm); transition: transform 0.3s ease; }
.cart-item:hover img { transform: scale(1.04); }
.cart-item-meta { font-size: 0.92rem; color: var(--color-muted); }
.cart-item-qty { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.cart-item-qty input { width: 46px; text-align: center; padding: 6px; border-radius: var(--radius-sm); border: 1.5px solid var(--color-bg-soft); }
.summary-box { background: var(--color-white); border-radius: var(--radius-md); padding: 26px; box-shadow: var(--shadow-soft); align-self: start; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 0.95rem; }
.address-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1.5px solid var(--color-bg-soft);
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.address-option input[type="radio"] { margin-top: 3px; }
.address-option:hover { border-color: var(--color-primary); }
.address-option:has(input:checked) { border-color: var(--color-primary); background: var(--color-blush); }

.payment-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1.5px solid var(--color-bg-soft);
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.payment-option:hover { border-color: var(--color-primary); transform: translateX(2px); }
.payment-option:has(input:checked) { border-color: var(--color-primary); background: var(--color-blush); }
.payment-icon {
  width: 42px; height: 42px; min-width: 42px;
  border-radius: 50%;
  background: var(--color-dark);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.payment-option:has(input:checked) .payment-icon { background: var(--color-primary); transform: scale(1.06); }
.discount-form { display: flex; gap: 8px; margin-bottom: 14px; }
.discount-form input {
  flex: 1; padding: 10px 12px; border-radius: var(--radius-sm); border: 1.5px solid var(--color-bg-soft);
  font-family: var(--font-body); font-size: 0.85rem; text-transform: uppercase;
}
.discount-form input:focus { border-color: var(--color-primary); outline: none; }
.summary-total { font-weight: 700; font-size: 1.2rem; border-top: 1px solid var(--color-bg-soft); padding-top: 14px; margin-top: 14px; color: var(--color-primary); }

/* ---------------------------------------------------------------- FORMULARIOS */
.form-page {
  max-width: 460px;
  margin: 60px auto;
  background: var(--color-white);
  padding: 40px 34px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.form-page h1 { font-size: 1.9rem; text-align: center; font-style: italic; }
.form-subtitle { text-align: center; color: var(--color-muted); margin-bottom: 28px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 6px; color: var(--color-dark); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-bg-soft);
  font-family: var(--font-body);
  font-size: 0.92rem;
  background: var(--color-bg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--color-primary);
  outline: none;
  background: white;
  box-shadow: 0 0 0 4px rgba(156, 59, 84, 0.1);
}
.field input:disabled { opacity: 0.6; cursor: not-allowed; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-footnote { text-align: center; margin-top: 20px; font-size: 0.88rem; color: var(--color-muted); }
.checkbox-row { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; }

/* ---------------------------------------------------------------- SELECT PERSONALIZADO */
/* Estilo completo aplicado a CUALQUIER <select> de la web, esté o no dentro de un .field,
   para que nunca dependa del contenedor y siempre sustituya el aspecto nativo del navegador. */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  padding: 12px 38px 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-bg-soft);
  background-color: var(--color-white);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.92rem;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232B1220' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 13px;
}
select:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 4px rgba(156, 59, 84, 0.1);
}
select:hover { border-color: var(--color-primary); }
select::-ms-expand { display: none; }
/* Los select dentro de un .field ya reciben ancho 100% arriba; esto solo evita doble margen */
.field select { margin-bottom: 0; }

/* ---------------------------------------------------------------- CHECKBOXES Y RADIOS PERSONALIZADOS */
input[type="checkbox"], input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid var(--color-bg-soft);
  background: var(--color-white);
  display: inline-flex;
  position: relative;
  cursor: pointer;
  vertical-align: middle;
  flex-shrink: 0;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
input[type="checkbox"] { border-radius: 6px; }
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]:hover, input[type="radio"]:hover { border-color: var(--color-primary); }
input[type="checkbox"]:checked, input[type="radio"]:checked {
  background: var(--color-primary);
  border-color: var(--color-primary);
  animation: scaleIn 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 6px; top: 2px;
  width: 5px; height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 8px; height: 8px;
  background: white;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
input[type="checkbox"]:active, input[type="radio"]:active { transform: scale(0.9); }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
input[type="checkbox"]:disabled, input[type="radio"]:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------------------------------------------------------------- CUENTA */
.account-layout { display: grid; grid-template-columns: 1fr; gap: 32px; }
.account-layout > * { min-width: 0; }
@media (min-width: 860px) { .account-layout { grid-template-columns: 240px 1fr; } }
.account-nav { background: var(--color-white); border-radius: var(--radius-md); padding: 10px; box-shadow: var(--shadow-soft); align-self: start; }
.account-nav a { display: block; padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.9rem; color: var(--color-dark); }
.account-nav a:hover, .account-nav a.active { background: var(--color-blush); color: var(--color-primary-dark); }
.account-card { background: var(--color-white); border-radius: var(--radius-md); padding: 28px; box-shadow: var(--shadow-soft); margin-bottom: 20px; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-tile { background: var(--color-white); border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-soft); }
.stat-tile .num { font-family: var(--font-display); font-size: 1.9rem; color: var(--color-primary); }
.stat-tile .label { font-size: 0.85rem; text-transform: uppercase; color: var(--color-muted); letter-spacing: 0.04em; }

.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-md); box-shadow: var(--shadow-soft); }
table.data-table { width: 100%; min-width: 560px; border-collapse: collapse; background: white; }
table.data-table th, table.data-table td { padding: 14px 16px; text-align: left; font-size: 0.95rem; border-bottom: 1px solid var(--color-bg-soft); }
table.data-table th { text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.05em; color: var(--color-muted); background: var(--color-bg); }

.status-pill { padding: 5px 13px; border-radius: 999px; font-size: 0.82rem; font-weight: 700; display: inline-block; }
.status-Pendiente { background: #F3E4D8; color: #8A5A22; }
.status-Preparando { background: #E4E9F5; color: #34519C; }
.status-Enviado { background: #E4F0F5; color: #2B7A9C; }
.status-Entregado { background: #E4F0E8; color: var(--color-success); }
.status-Confirmado { background: #E9E4F5; color: #5B3C9C; }
.status-En-reparto { background: #F5EEE0; color: #9C6E1F; }
.status-Cancelado { background: #F5E4E4; color: var(--color-error); }
.status-ticket-Abierto { background: #F3E4D8; color: #8A5A22; }
.status-ticket-Respondido { background: #E4E9F5; color: #34519C; }
.status-ticket-Cerrado { background: #E4F0E8; color: var(--color-success); }

/* ---------------------------------------------------------------- TICKETS DE SOPORTE */
.ticket-list { display: flex; flex-direction: column; gap: 10px; }
.ticket-list-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--color-white); border-radius: var(--radius-md); padding: 16px 20px; box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ticket-list-row:hover { transform: translateX(4px); box-shadow: var(--shadow-hover); }
.ticket-list-meta { font-size: 0.8rem; color: var(--color-muted); margin-top: 3px; }
.ticket-order-tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--color-blush); color: var(--color-primary-dark);
  padding: 4px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600;
  transition: background 0.2s ease;
}
.ticket-order-tag:hover { background: var(--color-accent-soft); }

.ticket-thread { display: flex; flex-direction: column; gap: 14px; max-height: 480px; overflow-y: auto; padding-right: 4px; }
.ticket-message { display: flex; }
.ticket-message.is-customer { justify-content: flex-end; }
.ticket-message.is-admin { justify-content: flex-start; }
.ticket-message-bubble { max-width: 78%; padding: 12px 16px; border-radius: 14px; }
.ticket-message.is-customer .ticket-message-bubble { background: var(--color-primary); color: white; border-bottom-right-radius: 4px; }
.ticket-message.is-admin .ticket-message-bubble { background: var(--color-bg-soft); color: var(--color-text); border-bottom-left-radius: 4px; }
.ticket-message-meta { display: flex; justify-content: space-between; gap: 14px; font-size: 0.72rem; opacity: 0.75; margin-bottom: 4px; }
.ticket-message-bubble p { margin: 0; line-height: 1.55; white-space: pre-line; }

.status-dot {
  width: 14px; height: 14px; border-radius: 50%; margin: 0 auto 6px;
  transition: background 0.6s ease, transform 0.3s ease;
}
.status-dot-current { animation: dotPulse 1.6s ease-in-out infinite; }

/* ---------------------------------------------------------------- FOOTER */
.site-footer { background: var(--color-dark); color: rgba(255,255,255,0.75); padding: 56px 0 24px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.1fr; } }
.footer-grid h4 { color: white; font-family: var(--font-body); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 12px; font-size: 0.95rem; }
.footer-grid li a {
  display: inline-flex;
  align-items: center;
  color: rgba(255,255,255,0.75);
  transition: color 0.22s ease, transform 0.22s ease, padding-left 0.22s ease;
}
.footer-grid li a:hover { color: var(--color-accent); transform: translateX(3px); }
.footer-brand p { font-size: 0.9rem; line-height: 1.65; max-width: 340px; }
.footer-logo { font-family: var(--font-display); font-style: italic; font-size: 1.6rem; color: white; margin-bottom: 2px; }
.footer-subtitle {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 14px;
}
.footer-social { display: flex; gap: 12px; margin-top: 18px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.16);
  display: flex; align-items: center; justify-content: center;
  color: white;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.footer-social a:hover { background: var(--color-primary); border-color: var(--color-primary); transform: translateY(-4px) scale(1.06); }
.footer-social .icon-fallback svg { stroke: currentColor; }
.footer-social .icon-fa { font-size: 1.05rem; --fa-primary-color: white; --fa-secondary-color: var(--color-accent); }
.footer-bottom { text-align: center; font-size: 0.85rem; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.12); }
.footer-legal-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; }
.footer-legal-links a { color: rgba(255,255,255,0.6); font-size: 0.78rem; transition: color 0.2s ease; }
.footer-legal-links a:hover { color: var(--color-accent); }

/* ---------------------------------------------------------------- MISC */
.divider-blob {
  width: 60px; height: 6px; background: var(--color-accent); border-radius: 999px; margin: 0 0 20px;
}
.breadcrumbs { font-size: 0.9rem; color: var(--color-muted); margin-bottom: 18px; }
.breadcrumbs a:hover { color: var(--color-primary); }
.error-page { text-align: center; padding: 100px 24px; }
.error-page h1 { font-size: 5rem; font-style: italic; color: var(--color-primary); }

/* ---------------------------------------------------------------- PÁGINAS LEGALES */
.legal-page { max-width: 780px; margin: 0 auto; padding: 48px 24px 80px; }
.legal-page h1 { font-size: 2rem; }
.legal-page h2 { font-size: 1.25rem; margin-top: 40px; padding-top: 8px; border-top: 1px solid var(--color-bg-soft); }
.legal-page p, .legal-page li { color: var(--color-text); line-height: 1.75; }
.legal-page ul, .legal-page ol { padding-left: 22px; margin-bottom: 1.2em; }
.legal-page li { margin-bottom: 8px; }
.legal-updated { color: var(--color-muted); font-size: 0.85rem; margin-top: -10px; margin-bottom: 30px; }
.legal-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--color-blush);
  border: 1.5px solid var(--color-accent-soft);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font-size: 0.9rem;
  color: var(--color-primary-dark);
  margin-bottom: 34px;
}
.legal-notice i { margin-top: 3px; flex-shrink: 0; color: var(--color-accent); }
.legal-table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 0.88rem; }
.legal-table th, .legal-table td { padding: 12px 14px; border: 1px solid var(--color-bg-soft); text-align: left; vertical-align: top; }
.legal-table th { background: var(--color-bg-soft); font-weight: 700; }
.legal-page code { background: var(--color-bg-soft); padding: 2px 6px; border-radius: 4px; font-size: 0.85em; }

/* ---------------------------------------------------------------- ESTRELLAS Y VALORACIONES */
.stars-display { display: inline-flex; gap: 2px; }
.star-icon { display: inline-flex; align-items: center; justify-content: center; }
.star-icon .icon-fallback svg { fill: var(--color-bg-soft); transition: fill 0.2s ease; }
.star-icon.is-filled .icon-fallback svg { fill: var(--color-accent); }
.star-icon .icon-fa { font-size: 0.9rem; color: var(--color-bg-soft); }
.star-icon.is-filled .icon-fa { color: var(--color-accent); }
.stars-display.lg .icon-fallback svg { width: 20px; height: 20px; }
.stars-display.lg .icon-fa { font-size: 1.4rem; }

.product-card-rating { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.product-card-rating span { font-size: 0.78rem; color: var(--color-muted); }

.reviews-section { padding: 20px 0 60px; }
.reviews-summary { margin-bottom: 32px; }
.reviews-average { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.reviews-average-number { font-family: var(--font-display); font-size: 2.2rem; color: var(--color-primary); font-weight: 700; }
.reviews-count { color: var(--color-muted); font-size: 0.9rem; }

.reviews-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .reviews-grid { grid-template-columns: 1fr; } }

.reviews-list { display: flex; flex-direction: column; gap: 18px; }
.review-card { background: var(--color-white); border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-soft); }
.review-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.review-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--color-blush); color: var(--color-primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem; flex-shrink: 0;
}
.review-card-meta { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.review-date { font-size: 0.78rem; color: var(--color-muted); }
.review-card p { margin: 0; color: var(--color-text); line-height: 1.6; }

.review-form-card { background: var(--color-white); border-radius: var(--radius-md); padding: 24px; box-shadow: var(--shadow-soft); position: sticky; top: 100px; }
.review-form-card h3 { font-size: 1.1rem; margin-bottom: 14px; }
.review-form-card textarea {
  width: 100%; margin: 14px 0; padding: 12px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-bg-soft); font-family: var(--font-body); font-size: 0.9rem; resize: vertical;
}
.review-form-card textarea:focus { border-color: var(--color-primary); outline: none; }

/* Selector de estrellas interactivo (radios ocultos + labels en orden inverso) */
.star-rating-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.star-rating-input input { position: absolute; opacity: 0; width: 0; height: 0; }
.star-rating-input label {
  font-size: 1.9rem; color: var(--color-bg-soft); cursor: pointer; transition: color 0.15s ease, transform 0.15s ease;
}
.star-rating-input label:hover { transform: scale(1.15); }
.star-rating-input input:checked ~ label,
.star-rating-input label:hover,
.star-rating-input label:hover ~ label { color: var(--color-accent); }

/* ---------------------------------------------------------------- NAV: enlace a Directos */
.nav-live-link { position: relative; }
.nav-live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #E0453C; margin-left: 6px; animation: liveDotPulse 1.6s ease-in-out infinite;
  vertical-align: middle;
}
@keyframes liveDotPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.55; transform: scale(1.3); } }

/* ---------------------------------------------------------------- DIRECTOS (LIVE SHOPPING) */
.live-header { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.live-header h1 { font-style: italic; margin-bottom: 10px; }
.live-description { color: var(--color-muted); font-size: 1.05rem; }

.live-layout { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: start; }
@media (min-width: 960px) {
  .live-layout { grid-template-columns: 1.6fr 1fr; }
}
.live-main { min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.live-sidebar {
  min-width: 0; background: var(--color-white); border-radius: var(--radius-md); padding: 22px; box-shadow: var(--shadow-soft);
}
@media (min-width: 960px) {
  .live-sidebar { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow-y: auto; }
}
.live-sidebar h2 { font-size: 1.1rem; margin-bottom: 16px; }

.live-video-wrap {
  position: relative; width: 100%; aspect-ratio: 16/9; border-radius: var(--radius-md);
  overflow: hidden; background: var(--color-dark); box-shadow: var(--shadow-soft);
}
.live-video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.live-video-placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; color: rgba(255,255,255,0.7); text-align: center; padding: 24px;
}

.live-platforms { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: -8px; }
.live-platforms-label { font-size: 0.85rem; color: var(--color-muted); font-weight: 600; }
.live-platforms-links { display: flex; flex-wrap: wrap; gap: 10px; }
.live-platform-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px;
  font-size: 0.85rem; font-weight: 700; color: white; transition: transform 0.15s ease, filter 0.2s ease;
}
.live-platform-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.live-platform-facebook { background: #1877F2; }
.live-platform-instagram { background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF, #515BD4); }
.live-platform-tiktok { background: #111; }

.live-chat-platform {
  display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px;
  border-radius: 50%; margin-right: 6px; font-size: 0.65rem; color: white; vertical-align: middle;
}
.live-chat-platform.live-platform-web { background: var(--color-muted); }
.live-chat-platform.live-platform-facebook { background: #1877F2; }
.live-chat-platform.live-platform-instagram { background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF, #515BD4); }
.live-chat-platform.live-platform-tiktok { background: #111; }

.live-articles h2, .live-chat h2 { font-size: 1.2rem; margin-bottom: 16px; }
.live-articles-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 560px) { .live-articles-grid { grid-template-columns: 1fr 1fr; } }
.live-article-card {
  display: flex; gap: 14px; align-items: flex-start; background: var(--color-white);
  border-radius: var(--radius-md); padding: 16px; box-shadow: var(--shadow-soft);
}
.live-article-card img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.live-article-card strong { display: block; margin-bottom: 4px; }
.live-article-card p { color: var(--color-muted); font-size: 0.88rem; margin: 0; line-height: 1.5; }

.live-chat { background: var(--color-white); border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-soft); }
.live-chat-messages {
  height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
  padding: 4px 4px 12px; margin-bottom: 12px; border-bottom: 1px solid var(--color-bg-soft);
}
.live-chat-msg { font-size: 0.9rem; line-height: 1.5; background: var(--color-bg-soft); border-radius: var(--radius-sm); padding: 8px 12px; }
.live-chat-msg strong { color: var(--color-primary-dark); margin-right: 6px; }
.live-chat-empty { color: var(--color-muted); font-size: 0.88rem; text-align: center; margin: auto; }
#live-guest-name {
  width: 100%; margin-bottom: 8px; padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-bg-soft); font-family: inherit; font-size: 0.9rem;
}
.live-chat-input-row { display: flex; gap: 8px; }
.live-chat-input-row input {
  flex: 1; min-width: 0; padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-bg-soft); font-family: inherit; font-size: 0.9rem;
}

.live-products { display: flex; flex-direction: column; gap: 22px; max-height: 700px; overflow-y: auto; padding-right: 6px; }
.live-product .product-card { box-shadow: none; border: 1px solid var(--color-bg-soft); }
.live-quick-add { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.live-quick-add select {
  width: 100%; padding: 9px 12px; border-radius: var(--radius-sm); border: 1.5px solid var(--color-bg-soft);
  font-family: inherit; font-size: 0.85rem; background: var(--color-white);
}
.live-sidebar-empty { color: var(--color-muted); font-size: 0.9rem; }

.live-offline {
  text-align: center; padding: 70px 24px; background: var(--color-white); border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft); display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.live-offline h2 { font-size: 1.3rem; margin: 0; }
.live-offline p { color: var(--color-muted); margin: 0; }

/* ---------------------------------------------------------------- POPUP GENÉRICO (sitio público) */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(43, 18, 32, 0.55);
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease;
}
.modal-overlay.is-open { display: flex; }
.modal-box {
  background: white;
  border-radius: 18px;
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  max-height: 85dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: scaleIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--color-bg-soft); }
.modal-header h3 { margin: 0; font-size: 1.1rem; }
.modal-close { background: none; border: none; font-size: 1.5rem; line-height: 1; color: var(--color-muted); cursor: pointer; padding: 4px 8px; border-radius: 8px; transition: background 0.2s ease, color 0.2s ease; }
.modal-close:hover { background: var(--color-bg-soft); color: var(--color-error); }
.modal-tab-content { padding: 22px 24px; overflow-y: auto; overflow-x: hidden; flex: 1; min-height: 0; }
body.modal-open { overflow: hidden; }

@media (max-width: 480px) {
  .modal-overlay { padding: 10px; }
  .modal-box { max-height: 92vh; max-height: 92dvh; }
  .modal-header, .modal-tab-content { padding: 16px; }
}

/* ---------------------------------------------------------------- POPUP DE COMPRA RÁPIDA (Directos) */
.buy-now-modal-box { max-width: 480px; }
.buy-now-product { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.buy-now-product img { width: 60px; height: 72px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.buy-now-price { color: var(--color-primary-dark); font-weight: 700; margin-top: 2px; }
.buy-now-section-title { font-size: 0.9rem; margin: 20px 0 10px; color: var(--color-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.buy-now-payment-choice { display: flex; flex-direction: column; gap: 8px; }
.buy-now-payment-choice label {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1.5px solid var(--color-bg-soft);
  border-radius: var(--radius-sm); cursor: pointer; font-size: 0.9rem; transition: border-color 0.2s ease, background 0.2s ease;
}
.buy-now-payment-choice input { accent-color: var(--color-primary); }
.buy-now-payment-choice label:has(input:checked) { border-color: var(--color-primary); background: var(--color-blush); }
.buy-now-error { background: #FBE4E4; color: #A83232; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 0.85rem; margin-bottom: 14px; }
#buy-now-total { font-weight: 700; }

/* ---------------------------------------------------------------- POPUP DE WHATSAPP */
.wa-popup-widget { position: fixed; right: 20px; bottom: 20px; z-index: 900; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.wa-popup-bubble {
  width: 58px; height: 58px; border-radius: 50%; background: #25D366; color: white; border: none;
  font-size: 1.6rem; display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45); transition: transform 0.2s ease;
  animation: waBubblePulse 2.4s ease-in-out infinite;
}
.wa-popup-bubble:hover { transform: scale(1.08); }
@keyframes waBubblePulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45); }
  50% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45), 0 0 0 10px rgba(37, 211, 102, 0.12); }
}

.wa-popup-card {
  width: 300px; max-width: calc(100vw - 40px); background: white; border-radius: 16px; overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,0.22);
  display: none; flex-direction: column; animation: scaleIn 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.wa-popup-card.is-open { display: flex; }
.wa-popup-header { display: flex; align-items: center; gap: 12px; background: #075E54; color: white; padding: 16px; }
.wa-popup-avatar {
  width: 42px; height: 42px; border-radius: 50%; background: #25D366; display: flex; align-items: center;
  justify-content: center; font-size: 1.3rem; flex-shrink: 0;
}
.wa-popup-header strong { display: block; font-size: 0.92rem; }
.wa-popup-header span { display: block; font-size: 0.72rem; opacity: 0.85; }
.wa-popup-close { margin-left: auto; background: none; border: none; color: white; font-size: 1.3rem; cursor: pointer; line-height: 1; opacity: 0.85; }
.wa-popup-close:hover { opacity: 1; }
.wa-popup-body { padding: 16px; background: #ECE5DD; }
.wa-popup-body p {
  background: white; padding: 12px 14px; border-radius: 10px; border-top-left-radius: 2px;
  font-size: 0.85rem; line-height: 1.5; margin: 0; box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.wa-popup-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; background: #25D366;
  color: white; font-weight: 700; font-size: 0.9rem;
}
.wa-popup-cta:hover { background: #1EBE5A; }

@media (max-width: 480px) {
  .wa-popup-widget { right: 14px; bottom: 14px; }
  .wa-popup-bubble { width: 52px; height: 52px; font-size: 1.4rem; }
}
