/* ============================================================
   VAENTY — styles.css
   Base reset, CSS variables, typography, utilities, animations
   ============================================================ */

/* ─── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body { overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ─── Custom Properties ──────────────────────────────────── */
:root {
  /* Surfaces — light by default, dark used sparingly (footer, mobile nav) */
  --color-bg: #FFFFFF;
  --color-bg-alt: #F5F5F9;
  --color-bg-dark: #16161F;
  --color-bg-void: #101018;
  --color-bg-section: #FAFAFC;
  --color-bg-card: #FFFFFF;
  --color-bg-card-hover: #FAFAFC;
  --color-card-border: #E6E6ED;

  /* Text */
  --color-text: #17171F;
  --color-gray-light: #63677A;
  --color-gray-mid: #9397A8;
  --color-white: #FFFFFF;

  /* Brand — muted, not neon. Used for buttons/text accents, not glow. */
  --color-violet: #4F3AA3;
  --color-violet-bright: #6248B8;
  --color-violet-dark: #392C7A;
  --color-cyan: #0E7C86;
  --color-cyan-bright: #12939F;
  --color-blue: #2E54D4;
  --color-blue-dark: #1F3EAE;
  --color-gradient-neon: linear-gradient(135deg, #4F3AA3 0%, #0E7C86 100%);
  --color-gradient-bg: radial-gradient(ellipse 70% 55% at 50% -10%, rgba(79,58,163,0.08), transparent 60%),
                        radial-gradient(ellipse 55% 45% at 90% 10%, rgba(14,124,134,0.06), transparent 60%),
                        var(--color-bg);

  --color-whatsapp: #1DA851;
  --color-sale: #C6295A;

  /* Type */
  --font-heading: 'Rajdhani', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Shape */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* Elevation — soft, no neon glow */
  --shadow-card: 0 4px 24px rgba(23,23,31,0.06);
  --shadow-card-light: 0 2px 12px rgba(23,23,31,0.05);
  --shadow-glow-violet: 0 8px 24px rgba(79,58,163,0.14);
  --shadow-glow-cyan: 0 8px 24px rgba(14,124,134,0.14);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --transition: 0.25s var(--ease-out);
  --transition-slow: 0.5s var(--ease-out);
}

/* ─── Body ───────────────────────────────────────────────── */
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--color-text);
}
h1 { font-size: clamp(2.25rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.5rem; }

.text-gradient {
  background: var(--color-gradient-neon);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ─── Scrollbar ──────────────────────────────────────────── */
/* OJO: en Chrome, declarar `scrollbar-width`/`scrollbar-color` desactiva por
   completo las reglas ::-webkit-scrollbar y fuerza su `thin` de 10 px fijos.
   Por eso la API estándar va aislada para Firefox, que no soporta ::-webkit-. */
@supports not selector(::-webkit-scrollbar) {
  html, *, *::before, *::after { scrollbar-width: thin; }
  html { scrollbar-color: #2A2A33 #000000; }
  .cart-drawer__items, #nav-search-results { scrollbar-color: rgba(255,255,255,0.22) transparent; }
}
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: #000000; }
::-webkit-scrollbar-thumb { background: #2A2A33; border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-violet); }
/* Sin flechas: si quedan, el navegador ignora el ancho pedido */
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-corner { background: transparent; }
/* Paneles oscuros propios (cajón del carrito, buscador): pista transparente
   para que no aparezca una franja negra sobre el fondo del panel. */
.cart-drawer__items::-webkit-scrollbar-track,
#nav-search-results::-webkit-scrollbar-track { background: transparent; }
.cart-drawer__items::-webkit-scrollbar-thumb,
#nav-search-results::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.22); }

/* ─── Layout Utilities ───────────────────────────────────── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section--sm { padding: 56px 0; }
.text-center { text-align: center; }
.text-violet { color: var(--color-violet); }
.text-cyan { color: var(--color-cyan); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-cyan);
  margin-bottom: 12px;
}
.section-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--color-gradient-neon);
  display: inline-block;
}

/* ─── Reveal on scroll ───────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ─── Keyframe animations ────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeIn 0.7s var(--ease-out) forwards; }

@keyframes shimmer {
  to { background-position: -200% 0; }
}
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(23,23,31,0.04) 25%,
    rgba(23,23,31,0.08) 50%,
    rgba(23,23,31,0.04) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes auroraShift {
  0%, 100% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(-2%, 2%, 0) scale(1.06); }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── Stats Grid ─────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}
.stat__number {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--color-violet);
  line-height: 1;
  display: block;
}
.stat__label {
  color: var(--color-gray-light);
  font-size: 15px;
  margin-top: 8px;
}
@media (max-width: 580px) {
  .stats-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ─── Mobile global fixes (≤ 480px) ─────────────────────── */
@media (max-width: 480px) {
  .section-label {
    font-size: 10px;
    letter-spacing: 1.5px;
    max-width: 100%;
    white-space: normal;
    flex-wrap: wrap;
  }
  .container { padding: 0 16px; }
  .section { padding: 64px 0; }
}

@media (max-width: 390px) {
  .container { padding: 0 14px; }
}
