html {
  scroll-behavior: smooth;
}

/* Los <select> del catálogo usan texto claro sobre fondo oscuro,
   pero el navegador renderiza el listado desplegado (<option>) con
   fondo blanco propio sin heredar esos colores — eso dejaba el texto
   blanco sobre blanco, ilegible hasta pasar el mouse. */
select option {
  background-color: #171717;
  color: #ffffff;
}

/* FAQ accordion: grid-template-rows 0fr->1fr anima el alto sin medir
   scrollHeight por JS y sin saltos. */
.faq-panel.open {
  grid-template-rows: 1fr;
}
.faq-trigger[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg);
}
@media (prefers-reduced-motion: reduce) {
  .faq-panel {
    transition: none;
  }
}

/* Botones flotantes: en iOS con home indicator, bottom-5 a secas queda
   pegado al borde/gesto de sistema. Se suma env(safe-area-inset-bottom)
   (0px en navegadores que no lo soportan, o sin notch). */
.floating-btn--whatsapp {
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
}

/* ============================================================
   DESIGN TOKENS — Elitex
   Fuente única de valores de color, layout, radios, espaciado y
   tipografía fluida. Los valores se extrajeron de lo que ya se
   usaba de forma consistente en el sitio (no son una paleta nueva).
   ============================================================ */
:root {
  /* Color */
  --color-black: #0a0a0a;
  --color-carbon: #1c1c1c;
  --color-surface: rgba(255, 255, 255, 0.05);
  --color-surface-strong: rgba(255, 255, 255, 0.1);
  --color-border: rgba(255, 255, 255, 0.1);
  --color-white: #ffffff;
  --color-muted: rgba(255, 255, 255, 0.6);

  /* Layout */
  --container-width: 1280px;
  --container-width-wide: 1400px;
  --header-height: 104px;

  /* Radios */
  --radius-sm: 0.75rem;
  --radius-md: 1.5rem;
  --radius-lg: 2rem;
  --radius-xl: 2.5rem;

  /* Espaciado (misma escala de 4px que ya usa Tailwind en el resto del sitio) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Tipografía fluida — mismos mínimos/máximos que ya tenía cada
     breakpoint, solo se suaviza la transición entre ellos */
  --text-h1-line1: clamp(3rem, 2.38rem + 2.65vw, 4.5rem);
  --text-h1-line2: clamp(2.25rem, 1.63rem + 2.65vw, 3.75rem);
  --text-h2: clamp(1.5rem, 1.07rem + 1.85vw, 2.25rem);
}

/* ============================================================
   CONTENEDORES Y SECCIONES
   Evita que cada sección tenga su propio max-width/padding.
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: 0.5rem;
}
@media (min-width: 640px) {
  .container { padding-inline: 1rem; }
}

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

.section {
  padding-block: 4rem;
}
@media (min-width: 640px) {
  .section { padding-block: 5rem; }
}

/* Secciones que continúan visualmente a la anterior (sin gap propio arriba) */
.section-continued {
  padding-top: 0;
  padding-bottom: 4rem;
}
@media (min-width: 640px) {
  .section-continued { padding-bottom: 5rem; }
}

.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.section-eyebrow-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
}

.section-title {
  font-size: var(--text-h2);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--color-white);
}

/* Offset de scroll coherente para el header sticky */
#productos, #mayoristas, #contacto, #tallas, #testimonios, #visitanos {
  scroll-margin-top: var(--header-height);
}

/* Deep ambient black & white illumination matching the Elitex logo palette */
.hero-card-bg {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 12%, rgba(0,0,0,0) 40%),
    rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.main-outer-viewport {
  background:
    radial-gradient(circle at 50% 20%, rgba(36,36,36,0.35) 0%, rgba(0,0,0,0.55) 55%, rgba(0,0,0,0.8) 100%),
    url('../img/elitex/hero-bg.webp') center center / cover no-repeat fixed,
    #000;
}
@media (max-width: 767px) {
  /* background-attachment: fixed is expensive to repaint on mobile browsers; use scroll there */
  .main-outer-viewport {
    background-attachment: scroll;
  }
}

/* Product photo card: real photo, not a transparent cutout, so we use a soft rounded frame instead of blend-mode */
.product-photo-card {
  border-radius: 1.75rem;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.25);
}
/* Chrome / metallic finish for the big ELITEX wordmark */
.metal-text {
  background: linear-gradient(180deg, #ffffff 0%, #e8e8e8 30%, #8f8f8f 52%, #f5f5f5 68%, #a8a8a8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 2px 20px rgba(255,255,255,0.15);
}

#introOverlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: radial-gradient(circle at 50% 45%, #1c1c1c 0%, #0a0a0a 55%, #000000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1400px;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}
#introOverlay.intro-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.intro-stage {
  transform-style: preserve-3d;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.intro-logo {
  width: 96px;
  height: 96px;
  border-radius: 9999px;
  border: 2px solid rgba(255,255,255,0.7);
  box-shadow: 0 30px 60px -10px rgba(0,0,0,0.8);
  animation: introLogoIn 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards, introLogoFloat 3s ease-in-out 1.4s infinite;
  transform: rotateY(-220deg) translateZ(-300px) scale(0.4);
  opacity: 0;
}
.intro-word {
  font-weight: 800;
  letter-spacing: 0.15em;
  font-size: 2.5rem;
  color: #fff;
  opacity: 0;
  transform: rotateX(60deg) translateY(40px) translateZ(-120px);
  animation: introWordIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.9s forwards;
}
@media (min-width: 640px) {
  .intro-word { font-size: 4rem; }
  .intro-logo { width: 128px; height: 128px; }
}
.intro-sub {
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  opacity: 0;
  animation: introFadeIn 0.8s ease 1.6s forwards;
}
@keyframes introLogoIn {
  0% { transform: rotateY(-220deg) translateZ(-300px) scale(0.4); opacity: 0; }
  60% { opacity: 1; }
  100% { transform: rotateY(0deg) translateZ(0) scale(1); opacity: 1; }
}
@keyframes introLogoFloat {
  0%, 100% { transform: rotateY(0deg) translateZ(0) scale(1) translateY(0); }
  50% { transform: rotateY(8deg) translateZ(20px) scale(1.02) translateY(-6px); }
}
@keyframes introWordIn {
  0% { transform: rotateX(60deg) translateY(40px) translateZ(-120px); opacity: 0; }
  100% { transform: rotateX(0deg) translateY(0) translateZ(0); opacity: 1; }
}
@keyframes introFadeIn {
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .intro-logo, .intro-word, .intro-sub { animation: introFadeIn 0.4s ease forwards !important; transform: none !important; }
}
