/* ================================================================
   Mobile First 
   
   - Los estilos base están diseñados para dispositivos móviles.
   - Al final de cada bloque de estilos se encuentran las Media Queries para tablet y escritorio.

   ÍNDICE INDEX.CSS:

   1.  Hero / Slider
   2.  Seccion Destacados
   3.  Secion Cinta Categorias
   4.  Seccion Explora por marcas
   5.  Seccion Por Que Fragracia
   6.  Seccion Aprende Sobre Fragancias
   7.  Utilidades de Encabezado
   8.  FALLBACK INDEX.HTML
================================================================ */

/* ================================================================
1. HERO / SLIDER
================================================================ */

.hero {
  position: relative;
  margin-top: var(--header-h);
  width: 100%;
  aspect-ratio: 21 / 9;   /* Proporción fija: el hero SIEMPRE mantiene esta forma */
  overflow: hidden;
  background-color: var(--color-secondary);
}

/* En pantallas extremadamente anchas (monitores 2K/4K), evita que el hero
   se vuelva desproporcionadamente alto. Solo interviene en esos casos raros,
   no afecta el comportamiento normal en celular/tablet/desktop estándar. */
@media (min-width: 1600px) {
  .hero {
    max-height: 720px;
  }
}

.hero__slider {
  display: flex;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.hero__slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-white);
  overflow: hidden;
  cursor: pointer;
}

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

.hero__slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--color-primary);
}

.hero__slide-overlay {
  position: absolute;
  inset: 0;
}

.hero__slide-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  padding: var(--sp-8) var(--sp-6);
}

.hero__slide-title {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--sp-4);
}

.hero__slide-subtitle {
  font-size: var(--text-base);
  line-height: 1.65;
  opacity: 0.9;
}

.hero__controls {
  position: absolute;
  bottom: var(--sp-6);
  left: 0; 
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  z-index: 10;
}

/* En móvil solo se ven los dots: la navegación es táctil (swipe) */
.hero__prev,
.hero__next {
  display: none;
}

.hero__prev:hover,
.hero__next:hover { 
  background: rgba(255,255,255,0.32); 
}

.hero__dots { 
  display: flex; 
  gap: var(--sp-1); 
}

.hero__dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.45);
  border: none;
  cursor: pointer;
  transition: width var(--ease), background var(--ease);
}

.hero__dot.active {
  background: var(--color-white);
  width: 24px;
}

/* ----------------------------------------------------------------
  PANTALLAS MEDIANAS / TABLET (A PARTIR DE 768px)
---------------------------------------------------------------- */
@media (min-width: 768px) {
  .hero__slide-title { font-size: var(--text-3xl); }
  .hero__slide-subtitle { font-size: var(--text-md); }

  /* A partir de tablet, vuelven las flechas de navegación junto a los dots */
  .hero__prev,
  .hero__next {
    display: flex;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.18);
    color: white;
    border: 1px solid rgba(255,255,255,0.35);
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background var(--ease);
    backdrop-filter: blur(4px);
  }
}

/* ----------------------------------------------------------------
  DESKTOP / PANTALLAS GRANDES (A PARTIR DE 1024px)
---------------------------------------------------------------- */
@media (min-width: 1024px) {
  .hero__slide-title { font-size: var(--text-3xl); }
}

/*============================================================
2. SECCIÓN DESTACADOS (PRODUCTOS DESTACADOS)
============================================================ */

.destacados_titulo {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  color: var(--color-primary);
  text-align: center;
  margin: 0 auto var(--sp-3);
  font-weight: 700;
}

.destacados_subtitulo{
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: var(--sp-8);
  text-align: center;
}

/* ============================================================
3. CINTA DE CATEGORÍAS INTERACTIVA (ANIMACIÓN INFINITA)
============================================================ */


.cinta-categorias {
  background-color: transparent;
  overflow: hidden;
  width: 100%;
  padding-block: var(--sp-4);
}

.cinta_titulo {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-primary);
  text-align: center;
}

.cinta_subtitulo {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: var(--sp-8);
  text-align: center;
}

.cinta-categorias__contenedor {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  overflow: hidden;
  padding-block: var(--sp-4);
  display: flex;
}

.cinta-categorias__riel {
  display: flex;
  width: max-content;
  animation: desplazamientoInfinito 18s linear infinite; 
  will-change: transform;
}

.cinta-categorias__contenedor:hover .cinta-categorias__riel {
  animation-play-state: paused;
}

.cinta-categorias__tarjeta {
  display: block;
  width: 260px;   
  height: 360px;  
  margin-inline: var(--sp-4);
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  flex-shrink: 0;   
  cursor: pointer;
  transition: transform 0.3s var(--ease);
}

.cinta-categorias__tarjeta:hover {
  transform: scale(0.96); 
}

.cinta-categorias__tarjeta img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Capa de efecto desenfoque (blur) */
.cinta-categorias__capa {
  position: absolute;
  top: 0; 
  left: 0;
  width: 100%; 
  height: 100%;
  background-color: rgba(24, 77, 64, 0.45); 
  backdrop-filter: blur(5px);            
  -webkit-backdrop-filter: blur(5px);    
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  z-index: 2; 
  opacity: 0;  
  will-change: opacity;                          
  transition: opacity 0.3s var(--ease);
}

.cinta-categorias__tarjeta:hover .cinta-categorias__capa {
  opacity: 1;
}

.cinta-categorias__capa p {
  color: var(--color-white);
  font-family: var(--font-serif);
  font-size: var(--text-md);      
  font-weight: 700;               
  text-align: center;
  letter-spacing: 0.03em;
  margin: 0;
}

/* Texto fijo siempre visible en la esquina inferior izquierda */
.cinta-categorias__texto-fijo {
  position: absolute;
  bottom: var(--sp-5); 
  left: var(--sp-5);   
  margin: 0;
  z-index: 3; 
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 1px; 
  transition: opacity 0.3s var(--ease);
  }

.cinta-categorias__tarjeta:hover .cinta-categorias__texto-fijo {
  opacity: 0;
}

/* Palabra secundaria (ej: "perfumes") */
.texto-fijo__secundario {
  color: var(--color-white);
  font-family: sans-serif;
  font-size: 15px;
  font-weight: 400;
  text-transform: lowercase;
  letter-spacing: 0.06em;
  opacity: 0.90;
}

/* Palabra principal (ej: "ÁRABES") */
.texto-fijo__principal {
  color: var(--color-white);
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Difuminados laterales de la cinta */
.cinta-categorias__difuminado {
  position: absolute;
  top: 0; 
  height: 100%;
  width: 80px; 
  z-index: 10;
  pointer-events: none; 
}

.cinta-categorias__difuminado--izq {
  left: 0;
  background: linear-gradient(to right, var(--color-bg), transparent);
}

.cinta-categorias__difuminado--der {
  right: 0;
  background: linear-gradient(to left, var(--color-bg), transparent); 
}

.cinta-categorias__nota {
  text-align: center;
  margin-top: var(--sp-4);
  color: var(--color-text-muted, #777777);
  font-size: var(--text-xs);
  opacity: 0.8;
  letter-spacing: 0.05em;
}

@keyframes desplazamientoInfinito {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

/* ================================================================
4. SECCIÓN: EXPLORA POR MARCAS — SLIDER DE TARJETAS
================================================================ */

.marcas-slider-section { 
  background: var(--color-bg); 
  overflow: hidden; 
}

/* Encabezado */
.marcas-slider-header { 
  text-align: center; 
  margin-bottom: var(--sp-10); 
}

/* Título principal */
.marcas-slider-titulo {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-primary);
  text-align: center;
}

/* Subtítulo */
.marcas-slider-subtitulo {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.8;
  text-align: center;
  margin-bottom: var(--sp-8);
}

/* Wrapper del slider: posición relativa para ubicar las flechas */
.marcas-slider-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

/* Contenedor con overflow oculto: solo se ve la pista */
.marcas-slider-track-outer {
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

/* Pista: flex horizontal, se mueve con transform por JS */
.marcas-slider-track {
  display: flex;
  gap: var(--sp-4);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* Tarjeta de marca (2 tarjetas en móvil por defecto) */
.marca-slider-card {
  flex: 0 0 calc((100% - var(--sp-4)) / 2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--ease), box-shadow var(--ease);
  cursor: pointer;
  text-decoration: none;
  color: var(--color-text);
  display: block;
}

.marca-slider-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Imagen de la tarjeta: proporción 3/4 tipo retrato */
.marca-slider-card__img-wrapper {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #EFEFED;
}

.marca-slider-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.marca-slider-card:hover .marca-slider-card__img { 
  transform: scale(1.04); 
}

/* Pie de la tarjeta: nombre + flecha */
.marca-slider-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--color-border);
}

.marca-slider-card__nombre {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

.marca-slider-card__arrow {
  color: var(--color-accent);
  font-size: var(--text-md);
  line-height: 1;
}

/* Flechas de navegación */
.marcas-slider-arrow {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
  box-shadow: var(--shadow-sm);
}

.marcas-slider-arrow:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}

.marcas-slider-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Botón CTA inferior */
.marcas-slider-cta {
  text-align: center;
  margin-top: var(--sp-10);
}

.marcas-slider-cta__btn {
  border-radius: var(--radius-full);
  padding: 0.85rem 2.2rem;
}

/* ----------------------------------------------------------------
 MEDIA QUERIES (RESPONSIVE PROGRESIVO)
---------------------------------------------------------------- */

/* Tablet (min-width: 768px): 3 tarjetas visibles */
@media (min-width: 768px) {
  .marcas-slider-titulo { 
    font-size: var(--text-3xl); 
  }
  
  .marca-slider-card { 
    flex: 0 0 calc((100% - (2 * var(--sp-4))) / 3);
  }
}

/* Desktop (min-width: 1024px): 4 tarjetas visibles */
@media (min-width: 1024px) {
  .marca-slider-card { 
    flex: 0 0 calc((100% - (3 * var(--sp-4))) / 4);
  }
}


/* ================================================================
5. SECCIÓN: ¿POR QUÉ FRAGRACIA?
================================================================ */

.por-que {
  background: var(--color-primary);
  text-align: center;
}

.por-que__titulo {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.15;
  margin-bottom: 0;
}

/* Grilla en móvil: 2 columnas */
.por-que__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-8) var(--sp-6);
  margin-top: var(--sp-4);
}

.por-que__item {
  text-align: center;
  color: rgba(255, 255, 255, 0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
}

/* Círculo con borde dorado y el ícono SVG dentro */
.por-que__icon-circle {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  border: 1.5px solid rgba(201, 169, 110, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  flex-shrink: 0;
  margin-bottom: var(--sp-1);
}

.por-que__item h3 {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.3;
}

.por-que__item p {
  font-size: var(--text-xs);
  opacity: 0.78;
  line-height: 1.65;
  max-width: 200px;
}

/* ----------------------------------------------------------------
  MEDIA QUERIES (RESPONSIVE PROGRESIVO)
---------------------------------------------------------------- */

/* Tablet (min-width: 768px): 2 columnas */
@media (min-width: 768px) {
  .por-que__titulo {
    font-size: var(--text-3xl);
  }

  .por-que__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop (min-width: 1024px): 4 columnas */
@media (min-width: 1024px) {
  .por-que__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-6);
  }

  .por-que__item p {
    max-width: 100%;
  }
}


/* ================================================================
6. SECCIÓN: APRENDE SOBRE FRAGANCIAS
================================================================ */

.aprende { 
  background: var(--color-bg); 
  text-align: center; 
}

.aprende__titulo {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0;
}

.aprende__subtitulo {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: var(--sp-8);
}

/* Grilla en móvil: 1 columna */
.aprende__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
  text-align: left;
}

/* Tarjeta con imagen arriba y contenido abajo */
.aprende__card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: box-shadow var(--ease), transform var(--ease);
  cursor: pointer;
}

.aprende__card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Imagen de la tarjeta */
.aprende__card-img-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #EFEFED;
}

.aprende__card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.aprende__card:hover .aprende__card-img { 
  transform: scale(1.04); 
}

/* Cuerpo de la tarjeta */
.aprende__card-body {
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.aprende__card-body h3 {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
}

.aprende__card-body p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Tag tipo badge (GUÍA, CONCEPTOS, etc.) */
.aprende__tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  align-self: flex-start;
}

/* Flecha dorada al final */
.aprende__card-arrow {
  color: var(--color-accent);
  font-size: var(--text-md);
  font-weight: 600;
  margin-top: var(--sp-1);
}

/* ----------------------------------------------------------------
  MEDIA QUERIES (RESPONSIVE PROGRESIVO)
---------------------------------------------------------------- */

/* Tablet (min-width: 768px): 2 columnas */
@media (min-width: 768px) {
  .aprende__titulo { 
    font-size: var(--text-3xl); 
  }

  .aprende__grid { 
    grid-template-columns: repeat(2, 1fr); 
  }
}

/* Desktop (min-width: 1024px): 4 columnas */
@media (min-width: 1024px) {
  .aprende__grid { 
    grid-template-columns: repeat(4, 1fr); 
  }
}


/* ================================================================
7. UTILIDADES DE ENCABEZADO DE SECCIÓN (label + diamante)

  - Reutilizables en cualquier sección del home
================================================================ */
.section { padding: var(--sp-12) 0; }

.seccion-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}
.seccion-label__icon {
  color: var(--color-accent);
  font-size: var(--text-xs);
  line-height: 1;
}
.seccion-label__text {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--color-accent);
}
/* Variante con líneas en lugar de iconos (usado en "Aprende") */
.seccion-label__line {
  display: block;
  width: 40px;
  height: 1px;
  background: var(--color-accent);
}
/* Cuando el label está sobre fondo claro */
.seccion-label--dark .seccion-label__text {
  color: var(--color-accent);
}

/* Separador de diamante horizontal */
.seccion-diamond {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  margin: var(--sp-3) 0 var(--sp-6);
}
.seccion-diamond__line {
  display: block;
  width: 60px;
  height: 1px;
  background: var(--color-accent);
  opacity: 0.5;
}
.seccion-diamond__icon {
  color: var(--color-accent);
  font-size: var(--text-xs);
  line-height: 1;
}
/* Variante sobre fondo oscuro: líneas blancas */
.seccion-diamond--dark .seccion-diamond__line { background: var(--color-accent); opacity: 0.6; }

/* ================================================================
8. FALLBACK INDEX.HTML

  - Si el hero se oculta porque slides.json falló al cargar,
    el primer section visible recibe padding superior para no
    quedar tapado por el header fijo.
================================================================ */
.destacados { scroll-margin-top: var(--header-h); }

/* Botón "Ver más" de la sección Destacados */
.destacados__ver-mas-wrapper {
  display: flex;
  justify-content: center;
  margin-top: var(--sp-8, 2rem);
}

/* Cuando el hero está oculto, el primer section visible
   necesita el espaciado superior que normalmente da el hero */
.hero[style*="none"] ~ .section:first-of-type {
  padding-top: calc(var(--header-h) + var(--sp-12));
}