/* ==========================================================================
   BLOOM BEAUTY v7 — SISTEMA DE DISEÑO EDITORIAL CAFÉ · GRIS · MARRÓN
   Paleta Moderna Espresso / Taupe / Greige · Contraste Alto Garantizado
   ========================================================================== */

:root {
  color-scheme: light;

  /* Modo Claro: Café-Gris Moderno, Taupe y Marrón Profesional */
  --background: 30 18% 88%;          /* #E7E0D8 — Café gris cálido elegante */
  --foreground: 22 20% 13%;          /* #28201B — Espresso profundo muy legible (> 11:1) */
  --card: 32 24% 95%;                /* #F6F2ED — Crema piedra limpia */
  --card-foreground: 22 20% 13%;
  --popover: 32 24% 95%;
  --popover-foreground: 22 20% 13%;
  --primary: 24 24% 21%;             /* #433429 — Marrón café serio y sofisticado */
  --primary-foreground: 34 30% 96%;  /* #F8F4EF */
  --secondary: 29 17% 82%;           /* #D9CFC4 — Taupe café gris */
  --secondary-foreground: 22 20% 15%;
  --accent: 26 46% 33%;              /* #7B4F2D — Marrón bronce moderno (> 6.5:1 con blanco) */
  --accent-foreground: 0 0% 100%;    /* #FFFFFF */
  --accent-soft: 28 24% 81%;         /* #DACDC0 */
  --muted: 29 16% 83%;               /* #DBD2C8 */
  --muted-foreground: 24 18% 26%;    /* #4E4037 — Café marrón oscuro MUY legible (> 7.5:1) */
  --border: 27 16% 72%;              /* #C4B8AC — Borde marrón-gris nítido */
  --input: 27 16% 68%;
  --ring: 26 46% 33%;
  --destructive: 0 65% 42%;
  --destructive-foreground: 0 0% 100%;
  --success: 152 52% 28%;
  --success-foreground: 0 0% 100%;

  /* Superficies Glass y Gradiente Ambiental Café-Marrón */
  --glass-bg: hsla(30, 20%, 91%, 0.88);
  --glass-border: hsla(24, 24%, 21%, 0.14);
  --glass-shadow: 0 12px 34px -12px hsla(24, 26%, 14%, 0.14);
  --hero-gradient: radial-gradient(circle at 82% 22%, hsla(26, 42%, 45%, 0.16), transparent 52%),
                   radial-gradient(circle at 12% 80%, hsla(24, 24%, 30%, 0.14), transparent 55%);

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.35rem;
  --radius-pill: 9999px;

  --ease-editorial: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Modo Oscuro: Marrón Espresso, Moka Gris y Texto Crema Nítido */
[data-theme="dark"] {
  color-scheme: dark;

  --background: 22 15% 10%;          /* #1D1815 — Marrón carbón profundo */
  --foreground: 34 26% 95%;          /* #F6F1EB — Crema muy claro (> 13:1) */
  --card: 23 15% 15%;                /* #2C241F — Café espresso elegante */
  --card-foreground: 34 26% 95%;
  --popover: 23 15% 16%;
  --popover-foreground: 34 26% 95%;
  --primary: 32 34% 84%;             /* #E3D3C3 — Crema café cálido */
  --primary-foreground: 22 18% 12%;  /* #241D19 */
  --secondary: 24 14% 20%;           /* #3A302A — Marrón grisáceo moderno */
  --secondary-foreground: 34 24% 94%;
  --accent: 30 48% 66%;              /* #D2A67E — Marrón dorado luminoso (> 8.5:1) */
  --accent-foreground: 22 18% 11%;   /* #211A16 */
  --accent-soft: 25 20% 22%;         /* #43352C */
  --muted: 24 14% 19%;               /* #372E28 */
  --muted-foreground: 31 18% 82%;    /* #DAD0C6 — Café-gris claro MUY legible (> 10:1) */
  --border: 25 14% 28%;              /* #51453D — Separadores claros y sobrios */
  --input: 25 14% 33%;
  --ring: 30 48% 66%;
  --destructive: 0 76% 64%;
  --destructive-foreground: 22 15% 10%;
  --success: 152 54% 52%;
  --success-foreground: 22 15% 10%;

  --glass-bg: hsla(22, 15%, 11%, 0.88);
  --glass-border: hsla(32, 26%, 85%, 0.14);
  --glass-shadow: 0 16px 40px -12px hsla(0, 0%, 0%, 0.55);
  --hero-gradient: radial-gradient(circle at 80% 20%, hsla(30, 48%, 55%, 0.14), transparent 50%),
                   radial-gradient(circle at 15% 82%, hsla(24, 30%, 35%, 0.18), transparent 55%);
}

/* Base y Reset Accesible */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.62;
  overflow-x: clip;
  transition: background-color 240ms ease, color 240ms ease;
  touch-action: manipulation;
}

h1, h2, h3, .font-display {
  font-family: var(--font-display);
  letter-spacing: -0.012em;
  color: hsl(var(--foreground));
}

.hero-headline {
  font-size: clamp(1.85rem, 4.8vw, 3.65rem);
  line-height: 1.1;
}

.hero-ambient {
  background-image: var(--hero-gradient);
}

img {
  max-width: 100%;
  display: block;
}

button, a, select, input, textarea {
  font-family: inherit;
  color: inherit;
}

select option {
  background-color: hsl(var(--card));
  color: hsl(var(--foreground));
}

button:not(:disabled),
a[href],
[role="button"] {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  transition: top 180ms ease;
}
.skip-link:focus {
  top: 1rem;
}

/* Utilidades Semánticas Protegidas (evita que Tailwind CDN pise text-muted) */
.bg-surface { background-color: hsl(var(--background)) !important; }
.bg-card { background-color: hsl(var(--card)) !important; }
.bg-secondary-soft { background-color: hsl(var(--secondary)) !important; }
.bg-muted-soft { background-color: hsl(var(--muted)) !important; }
.bg-accent-brand { background-color: hsl(var(--accent)) !important; color: hsl(var(--accent-foreground)) !important; }
.bg-accent-soft { background-color: hsl(var(--accent-soft)) !important; }
.text-foreground { color: hsl(var(--foreground)) !important; }
.text-muted { color: hsl(var(--muted-foreground)) !important; }
.text-accent-brand { color: hsl(var(--accent)) !important; }
.border-subtle { border-color: hsl(var(--border)) !important; }

/* Superficie Liquid Glass */
.glass-surface {
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(125%);
  -webkit-backdrop-filter: blur(16px) saturate(125%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* Botones del Sistema de Diseño */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius-pill);
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-weight: 600;
  font-size: 0.9375rem;
  border: 1px solid transparent;
  transition: transform 200ms var(--ease-editorial), opacity 200ms ease, background-color 200ms ease;
}
.btn-primary:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) {
  transform: translateY(0) scale(0.985);
}
.btn-primary:disabled {
  opacity: 0.48;
  pointer-events: none;
}

.btn-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius-pill);
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
  font-weight: 600;
  font-size: 0.9375rem;
  border: 1px solid transparent;
  transition: transform 200ms var(--ease-editorial), filter 200ms ease;
}
.btn-accent:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
}
.btn-accent:active:not(:disabled) {
  transform: translateY(0) scale(0.985);
}
.btn-accent:disabled {
  opacity: 0.48;
  pointer-events: none;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius-pill);
  background-color: transparent;
  color: hsl(var(--foreground));
  font-weight: 500;
  font-size: 0.9375rem;
  border: 1px solid hsl(var(--border));
  transition: background-color 200ms ease, border-color 200ms ease, transform 200ms var(--ease-editorial);
}
.btn-outline:hover:not(:disabled) {
  background-color: hsl(var(--secondary));
  border-color: hsl(var(--foreground) / 0.35);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-pill);
  background-color: transparent;
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
  flex-shrink: 0;
  transition: background-color 180ms ease, border-color 180ms ease;
}
.btn-icon:hover {
  background-color: hsl(var(--secondary));
  border-color: hsl(var(--foreground) / 0.3);
}

/* Inputs del Sistema de Diseño (16px en móvil para evitar zoom no deseado en iOS) */
.input-field {
  width: 100%;
  min-height: 44px;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-md);
  background-color: hsl(var(--card));
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--input));
  font-size: 1rem;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
@media (min-width: 640px) {
  .input-field {
    font-size: 0.9375rem;
  }
}
.input-field::placeholder {
  color: hsl(var(--muted-foreground));
  opacity: 0.82;
}
.input-field:focus {
  outline: none;
  border-color: hsl(var(--accent));
  box-shadow: 0 0 0 3px hsl(var(--accent) / 0.2);
}

/* Tarjetas de Producto */
.product-card {
  display: flex;
  flex-direction: column;
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 280ms var(--ease-editorial), border-color 220ms ease, box-shadow 280ms ease;
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: hsl(var(--accent) / 0.55);
  box-shadow: 0 18px 36px -18px hsla(24, 24%, 10%, 0.25);
}

.product-media {
  position: relative;
  aspect-ratio: 4 / 5;
  background-color: hsl(var(--muted));
  overflow: hidden;
}
.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 520ms var(--ease-editorial);
}
.product-card:hover .product-media img {
  transform: scale(1.04);
}

/* Chips / Filtros con Scroll Táctil Limpio */
.scroll-chips {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.scroll-chips::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 38px;
  padding: 0.375rem 0.95rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  background-color: hsl(var(--card));
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}
.filter-chip:hover {
  border-color: hsl(var(--accent));
}
.filter-chip.is-active {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}

/* Hero Canvas Three.js */
#hero-canvas-3d {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

/* Drawers y Modales con Soporte Móvil (100dvh + Safe Areas + Touch Scroll) */
.overlay-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: hsla(22, 18%, 6%, 0.64);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}
.overlay-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  z-index: 100;
  width: min(100vw, 430px);
  height: 100dvh;
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border-left: 1px solid hsl(var(--border));
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  transform: translateX(100%);
  transition: transform 320ms var(--ease-editorial);
  touch-action: pan-y;
  overscroll-behavior: contain;
}
.drawer-panel.is-open {
  transform: translateX(0);
}

.drawer-panel-left {
  right: auto;
  left: 0;
  border-left: none;
  border-right: 1px solid hsl(var(--border));
  transform: translateX(-100%);
}
.drawer-panel-left.is-open {
  transform: translateX(0);
}

/* Áreas de scroll táctil fluido (desplazamiento directo con el dedo sin tocar barra) */
.drawer-panel [class*="overflow-y-auto"],
.overflow-y-auto,
#mobile-nav-drawer nav,
#cart-items-container,
#live-search-dropdown,
.modal-dialog {
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior-y: contain;
  scroll-behavior: smooth;
}

/* Scroll táctil horizontal para chips y filtros */
.scroll-chips,
.overflow-x-auto,
[class*="overflow-x-auto"] {
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.scroll-chips::-webkit-scrollbar,
.overflow-x-auto::-webkit-scrollbar {
  display: none;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}
@media (min-width: 640px) {
  .modal-shell {
    align-items: center;
    padding: 1rem;
  }
}
.modal-shell.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: 92dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: 1.5rem 1.5rem 0 0;
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 24px 60px -16px hsla(0, 0%, 0%, 0.42);
  transform: translateY(18px);
  transition: transform 280ms var(--ease-editorial);
}
@media (min-width: 640px) {
  .modal-dialog {
    border-radius: var(--radius-xl);
    padding-bottom: 2rem;
    transform: translateY(14px) scale(0.985);
  }
}
.modal-shell.is-open .modal-dialog {
  transform: translateY(0) scale(1);
}

/* Estado de Carga — Skeleton Shimmer */
.skeleton {
  position: relative;
  overflow: hidden;
  background-color: hsl(var(--muted));
  border-radius: var(--radius-md);
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    hsl(var(--background) / 0.5),
    transparent
  );
  animation: bloomShimmer 1.4s infinite;
}
@keyframes bloomShimmer {
  100% { transform: translateX(100%); }
}

/* Toast Notifications */
#toast-region {
  position: fixed;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  right: 1rem;
  left: 1rem;
  z-index: 140;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.625rem;
  pointer-events: none;
}
.toast-item {
  pointer-events: auto;
  width: min(100%, 380px);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-lg);
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  box-shadow: 0 14px 30px -10px hsla(0, 0%, 0%, 0.28);
  font-size: 0.875rem;
  animation: toastIn 240ms var(--ease-editorial) forwards;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Banner de Cookies */
.cookie-banner {
  position: fixed;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  left: 1rem;
  right: 1rem;
  z-index: 130;
  max-width: 540px;
  border-radius: var(--radius-xl);
  padding: 1.15rem;
}

/* Swiper Custom Controls */
.swiper-pagination-bullet {
  background: hsl(var(--muted-foreground));
  opacity: 0.45;
}
.swiper-pagination-bullet-active {
  background: hsl(var(--accent));
  opacity: 1;
}

/* Doble Casilla Legal */
.legal-consent-box {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  background-color: hsl(var(--muted) / 0.72);
  border: 1px solid hsl(var(--border));
}
.legal-check-label {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.8125rem;
  line-height: 1.48;
  color: hsl(var(--foreground));
  cursor: pointer;
}
.legal-check-label input[type="checkbox"] {
  margin-top: 0.15rem;
  width: 1rem;
  height: 1rem;
  accent-color: hsl(var(--accent));
  flex-shrink: 0;
  cursor: pointer;
}

/* Botón Flotante de WhatsApp (Elegante Café-Marrón / Acento) */
.floating-wpp-btn {
  position: fixed;
  right: 1.25rem;
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  z-index: 80;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-pill);
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border: 1px solid hsl(var(--border));
  box-shadow: 0 14px 30px -8px hsla(22, 24%, 8%, 0.42);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 220ms var(--ease-editorial), background-color 200ms ease;
}
.floating-wpp-btn:hover {
  transform: translateY(-3px) scale(1.04);
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

/* ==========================================================================
   BOTÓN DESTACADO DE INICIO DE SESIÓN / CUENTA (HEADER & MOBILE ADAPTATION)
   ========================================================================== */
.btn-header-auth {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 40px;
  padding: 0 0.85rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid hsl(var(--accent));
  background: linear-gradient(135deg, hsl(var(--card)) 0%, hsl(var(--secondary)) 100%);
  color: hsl(var(--foreground));
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px hsl(var(--accent) / 0.18);
  transition: all 200ms cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  cursor: pointer;
  white-space: nowrap;
}

.btn-header-auth:hover {
  background: linear-gradient(135deg, hsl(var(--accent-soft)) 0%, hsl(var(--card)) 100%);
  border-color: hsl(var(--accent-hover));
  box-shadow: 0 4px 14px hsl(var(--accent) / 0.3);
  transform: translateY(-1px);
}

.btn-header-auth:active {
  transform: scale(0.97);
}

.btn-header-auth.is-logged {
  background: linear-gradient(135deg, hsl(var(--accent) / 0.15) 0%, hsl(var(--card)) 100%);
  border-color: hsl(var(--accent));
}

.btn-header-auth-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-pill);
  background: hsl(var(--accent-soft));
  color: hsl(var(--accent-brand));
  font-size: 0.6875rem;
  font-weight: 800;
  flex-shrink: 0;
  transition: background-color 200ms ease, color 200ms ease;
}

.btn-header-auth.is-logged .btn-header-auth-avatar {
  background: hsl(var(--accent));
  color: hsl(var(--accent-contrast));
}

.btn-header-auth-label {
  display: inline-block;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Tarjeta VIP de Cuenta en Cajón Móvil */
.drawer-vip-card {
  width: 100%;
  display: block;
  padding: 1rem;
  border-radius: 1.25rem;
  background: linear-gradient(135deg, hsl(var(--accent) / 0.14) 0%, hsl(var(--card)) 100%);
  border: 1.5px solid hsl(var(--accent) / 0.65);
  box-shadow: 0 4px 16px hsl(var(--accent) / 0.12);
  transition: all 220ms var(--ease-editorial);
  cursor: pointer;
  text-align: left;
}

.drawer-vip-card:hover {
  border-color: hsl(var(--accent));
  box-shadow: 0 6px 20px hsl(var(--accent) / 0.22);
  transform: translateY(-1px);
}

/* Barra Superior VIP en Móvil */
#mobile-vip-banner {
  background: linear-gradient(90deg, hsl(var(--accent) / 0.16) 0%, hsl(var(--secondary)) 50%, hsl(var(--accent) / 0.16) 100%);
  border-bottom: 1px solid hsl(var(--accent) / 0.35);
  transition: opacity 200ms ease;
}

/* Tarjetas de Marcas Interactivas */
.brand-card-item {
  width: 100%;
  height: 100%;
  text-align: left;
  padding: 1.25rem;
  border-radius: 1.25rem;
  background: hsl(var(--card));
  border: 1.5px solid hsl(var(--border));
  transition: all 220ms var(--ease-editorial);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
}

.brand-card-item:hover {
  border-color: hsl(var(--accent));
  transform: translateY(-2px);
  box-shadow: 0 8px 24px hsl(var(--accent) / 0.15);
}

.brand-card-item.is-selected {
  border-color: hsl(var(--accent));
  background: linear-gradient(135deg, hsl(var(--accent-soft)) 0%, hsl(var(--card)) 100%);
  box-shadow: 0 0 0 2px hsl(var(--accent) / 0.35), 0 8px 24px hsl(var(--accent) / 0.18);
}

/* Stepper del Checkout */
.checkout-stepper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.checkout-step-pill {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  background-color: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  border: 1px solid hsl(var(--border));
}
.checkout-step-pill.is-active {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}
.checkout-step-pill.is-done {
  background-color: hsl(var(--accent-soft));
  color: hsl(var(--accent));
  border-color: hsl(var(--accent) / 0.45);
}

/* Ajustes Finos para Pantallas Muy Pequeñas (320px - 480px) */
@media (max-width: 480px) {
  .hero-headline {
    font-size: 1.85rem !important;
    line-height: 1.18 !important;
  }
  .product-media {
    aspect-ratio: 1 / 1 !important;
  }
  .filter-chip {
    padding: 0.3rem 0.75rem !important;
    font-size: 0.78rem !important;
    min-height: 34px !important;
  }
  .btn-primary,
  .btn-accent,
  .btn-outline {
    padding: 0.55rem 0.85rem;
    font-size: 0.8125rem;
    min-height: 40px;
  }
  .btn-icon {
    width: 38px;
    height: 38px;
  }
  .btn-header-auth {
    height: 38px;
    padding: 0 0.65rem;
    gap: 0.35rem;
    font-size: 0.75rem;
  }
  .btn-header-auth-avatar {
    width: 22px;
    height: 22px;
  }
  .product-card .p-4 {
    padding: 0.625rem;
  }
  .product-chip-badge {
    font-size: 9px !important;
    padding: 0.15rem 0.45rem !important;
  }
}

@media (max-width: 350px) {
  .btn-header-auth {
    padding: 0 0.45rem;
  }
  .btn-header-auth-label {
    max-width: 52px;
    font-size: 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  #hero-canvas-3d {
    display: none !important;
  }
}

/* Aislamiento estricto de scroll para modales y cajones (evita mover el fondo con 2 dedos en touchpad) */
html.overlay-locked,
body.overlay-locked {
  overflow: hidden !important;
  height: 100% !important;
}

.modal-shell {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  touch-action: pan-y !important;
}

.modal-dialog {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  overscroll-behavior-y: contain !important;
  touch-action: pan-y !important;
}

.drawer-panel {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  overscroll-behavior-y: contain !important;
  touch-action: pan-y !important;
}

[data-lenis-prevent] {
  overscroll-behavior: contain !important;
}
