/* Modern Electronics Recommendation Hub CSS */
:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-blue: #38bdf8;
  --accent-green: #22c55e;
  --accent-purple: #a855f7;
  --accent-orange: #f97316;
  --border-color: #334155;
  --amazon-btn: #f59e0b;
  --amazon-btn-hover: #d97706;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  padding-bottom: 60px;
}

header {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  border-bottom: 1px solid var(--border-color);
  padding: 2rem 1rem;
  text-align: center;
}

header h1 {
  font-size: 2.2rem;
  background: linear-gradient(to right, var(--accent-blue), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto;
}

nav {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 0.75rem 1rem;
  overflow-x: auto;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background-color: rgba(56, 189, 248, 0.15);
}

.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.disclaimer-box {
  background-color: rgba(245, 158, 11, 0.1);
  border: 1px solid var(--amazon-btn);
  border-radius: 8px;
  padding: 1rem;
  font-size: 0.85rem;
  color: #fbbf24;
  margin-bottom: 2rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  border-color: var(--accent-blue);
}

.badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: var(--accent-purple);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  text-transform: uppercase;
  z-index: 10;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.specs-list {
  list-style: none;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.specs-list li {
  padding: 0.35rem 0;
  border-bottom: 1px dashed rgba(255,255,255,0.08);
  color: var(--text-secondary);
}

.specs-list li strong {
  color: var(--accent-blue);
}

.tech-analysis {
  background-color: rgba(15, 23, 42, 0.6);
  border-left: 3px solid var(--accent-green);
  padding: 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  color: #cbd5e1;
}

.price-tag {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  font-style: italic;
}

.amazon-btn {
  display: block;
  width: 100%;
  background-color: var(--amazon-btn);
  color: #0f172a;
  text-align: center;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.amazon-btn:hover {
  background-color: var(--amazon-btn-hover);
  color: #ffffff;
}

footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
}

/* Cabecera Centrada con Logo + Texto */
/* header.main-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 1rem;
} */
/* REGLA ÚNICA Y CORREGIDA PARA EL ENCABEZADO */
header.main-header {
  /* Si la imagen está en la raíz junto al CSS: */
  background: linear-gradient(
      rgba(15, 23, 42, 0.75), 
      rgba(15, 23, 42, 0.85)
    ), 
    url('../fondo.jpg') center/cover no-repeat;
    
  border-bottom: 1px solid var(--border-color);
  padding: 2.5rem 1rem;
  position: relative;
  text-align: center;
}
.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;     /* Alinea el logo y texto verticalmente */
  justify-content: center; /* Centra todo el bloque en la pantalla */
  gap: 2rem;               /* Espacio entre el logo y el texto */
}

.header-logo img {
  max-height: 110px;       /* Tamaño del logo */
  width: auto;
  display: block;
}

.header-text {
  text-align: center;       /* Centra las líneas de texto */
  max-width: 750px;
}

.header-text h1 {
  font-size: 1.9rem;
  background: linear-gradient(to right, var(--accent-blue), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.4rem;
  line-height: 1.2;
}

.header-text p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0 auto;
}
/* ==========================================
   CARRUSEL AUTOMÁTICO (AMPLIADO A 320PX)
   ========================================== */

.carousel-box {
  width: 100%;
  height: 320px; /* <--- Aumentado de 220px a 320px para mayor impacto visual */
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  background-color: #0b1120;
  position: relative;
}

.carousel-track {
  display: flex;
  height: 100%;
  width: 100%;
}

/* Ajuste de imágenes a la nueva altura */
.carousel-track img {
  width: 100%;
  min-width: 100%;
  flex: 0 0 100%;
  height: 100%;
  object-fit: contain; /* Mantiene la proporción perfecta sin recortar nada */
  padding: 0.75rem;
  box-sizing: border-box;
}

/* Pausar animación al pasar el ratón */
.carousel-box:hover .carousel-track {
  animation-play-state: paused;
}

/* Etiqueta interactiva Top Catálogo PS5 */
.ps5-tag {
  font-size: 0.8rem;
  color: #c084fc;
  font-weight: bold;
  transition: color 0.3s ease, transform 0.2s ease;
  cursor: pointer;
}

.ps5-tag:hover {
  color: var(--accent-purple); /* Cambia al púrpura corporativo en hover */
  text-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
}

/* Ajuste para tarjetas de juegos con imagen PNG */
.game-card-img {
  width: 100%;
  height: 110px;
  object-fit: contain; /* Ideal para PNGs con transparencia o portadas */
  padding: 0.5rem;
  background-color: rgba(11, 17, 32, 0.5);
}



/* --- PARA PRODUCTOS CON 7 IMÁGENES (P1 y P3) --- */
.track-7 {
  animation: slide7 21s infinite ease-in-out;
}

@keyframes slide7 {
  0%, 11%    { transform: translateX(0%); }
  14%, 25%   { transform: translateX(-100%); }
  28%, 39%   { transform: translateX(-200%); }
  42%, 53%   { transform: translateX(-300%); }
  56%, 67%   { transform: translateX(-400%); }
  70%, 81%   { transform: translateX(-500%); }
  84%, 95%   { transform: translateX(-600%); }
  100%       { transform: translateX(0%); }
}

/* --- PARA PRODUCTOS CON 6 IMÁGENES (P2) --- */
.track-6 {
  animation: slide6 18s infinite ease-in-out;
}

@keyframes slide6 {
  0%, 13%    { transform: translateX(0%); }
  16%, 29%   { transform: translateX(-100%); }
  33%, 46%   { transform: translateX(-200%); }
  50%, 63%   { transform: translateX(-300%); }
  66%, 79%   { transform: translateX(-400%); }
  83%, 96%   { transform: translateX(-500%); }
  100%       { transform: translateX(0%); }
}


/* --- PARA PRODUCTOS CON 4 IMÁGENES --- */
.track-4 {
  animation: slide4 16s infinite ease-in-out;
}

@keyframes slide4 {
  0%, 20%    { transform: translateX(0%); }
  25%, 45%   { transform: translateX(-100%); }
  50%, 70%   { transform: translateX(-200%); }
  75%, 95%   { transform: translateX(-300%); }
  100%       { transform: translateX(0%); }
}
/* Adaptación para dispositivos móviles */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 1rem;
  }

  .header-logo img {
    max-height: 85px;
  }
}


/* Layout contenedor horizontal */
.featured-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

@media (max-width: 992px) {
  .featured-container {
    grid-template-columns: 1fr;
  }
}

/* Panel destacado de la derecha */
.featured-panel {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 1.5rem;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.featured-card {
  background: #1e293b;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #334155;
}

/* Ajuste de imagen estática sin recortes */
.carousel-track.track-1 {
  width: 100%;
  animation: none;
}

.carousel-track.track-1 img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}


/* Selector de Categoría Gaming (Toggle Pill Switch) */
.switch-wrapper {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0 2rem 0;
}

.switch-container {
  display: inline-flex;
  background-color: #ffffff;
  border-radius: 50px;
  padding: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid #e2e8f0;
}

.switch-btn {
  border: none;
  background: transparent;
  padding: 0.6rem 1.4rem;
  border-radius: 40px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.25s ease-in-out;
}

.switch-btn.active {
  background-color: #a855f7; /* Tono café/dorado de la imagen */
  color: #2e180d;
  box-shadow: 0 2px 6px rgba(209, 154, 102, 0.4);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* 1. SOLO CAMBIAR EL FONDO DEL CUADRO DE IMÁGENES A BLANCO */
.carousel-box {
  width: 100%;
  height: 320px;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  background-color: #ffffff; /* <--- Fondo blanco para que las fotos luzcan perfectas */
  position: relative;
}

/* 2. SI TIENES IMÁGENES DE JUEGOS INDIVIDUALES */
.game-card-img {
  width: 100%;
  height: 110px;
  object-fit: contain;
  padding: 0.5rem;
  background-color: #ffffff; /* <--- Fondo blanco solo para la imagen */
}

/* 3. REVERTIR LA TARJETA COMPLETA A SU ESTADO OSCURO ORIGINAL */
.card {
  background-color: var(--bg-card); /* <--- Conserva el fondo azul/oscuro del tema */
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

/* 4. REVERTIR EL TEXTO A SU COLOR CLARO ORIGINAL */
.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary); /* <--- Texto blanco/claro original */
  line-height: 1.4;
}

.specs-list li {
  padding: 0.35rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08); /* <--- Borde punteado original */
  color: var(--text-secondary);
}


/* ==========================================
   CARRUSEL PRINCIPAL (SOLO SLIDE ACTIVO VISIBLE)
   ========================================== */

/* ==========================================
   CARRUSEL HERO (AJUSTE FINAL Y BOTONES)
   ========================================== */

.hero-carousel-container {
  position: relative !important;
  width: 100%;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  margin-bottom: 3rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  background-color: #0b1120;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background-color: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 100; /* Garantiza que queden sobre la tarjeta y reciban clics */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(6px);
  user-select: none;
}

.carousel-btn:hover {
  background-color: var(--accent-purple, #a855f7);
  border-color: #ffffff;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.7);
}

.carousel-btn.prev {
  left: 20px;
}

.carousel-btn.next {
  right: 20px;
}

.hero-carousel-track {
  display: flex;
  width: 500%; /* 5 tarjetas alineadas */
  /*animation: heroSlideLoop 25s infinite cubic-bezier(0.4, 0, 0.2, 1);*/
  transition: transform 0.6s ease-in-out;
}

.hero-carousel-container:hover .hero-carousel-track {
  animation-play-state: paused;
}

.hero-slide {
  width: 20%;
  flex: 0 0 20%;
  box-sizing: border-box;
  min-height: 600px;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  padding: 4rem 5.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  position: relative;
}

/* ESTILOS DE TEXTO Y BADGES */
.hero-slide-content {
  max-width: 520px;
  z-index: 2;
}

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  color: #ffffff;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-description {
  color: #cbd5e1;
  font-size: 1.05rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* BOTÓN LLAMATIVO */
.hero-btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.hero-btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.15);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

/* CONTENEDOR DE VÍDEO (SLIDE 4) */
.hero-video-box {
  flex: 0 0 320px;
  height: 220px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--accent-purple);
  box-shadow: 0 8px 20px rgba(168, 85, 247, 0.3);
  z-index: 2;
  background-color: #000;
}

.hero-video-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ANIMACIÓN DE DESPLAZAMIENTO LIMPIO */
@keyframes heroSlideLoop {
  0%, 16%    { transform: translateX(0%); }
  20%, 36%   { transform: translateX(-20%); }
  40%, 56%   { transform: translateX(-40%); }
  60%, 76%   { transform: translateX(-60%); }
  80%, 96%   { transform: translateX(-80%); }
  100%       { transform: translateX(0%); }
}

/* ADAPTABILIDAD MÓVIL */
@media (max-width: 768px) {
  .hero-slide {
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem 3.5rem;
    min-height: 480px;
  }

  .hero-title {
    font-size: 1.4rem;
  }

  .hero-video-box {
    width: 100%;
    flex: none;
    height: 180px;
  }
  .nav-container {
    display: flex;
    flex-wrap: wrap;             /* Permite que los botones bajen a una segunda fila */
    justify-content: center;     /* Centra los elementos */
    gap: 0.5rem;                 /* Reduce el espacio entre botones */
    padding: 0.5rem;
  }

  .nav-link {
    font-size: 0.85rem;          /* Reduce ligeramente el texto para móviles */
    padding: 0.4rem 0.75rem;     /* Ajusta el relleno interno */
    text-align: center;
    flex: 1 1 auto;              /* Permite adaptarse al tamaño del contenido */
  }



}

  /* Canvas fijo en el fondo sin alterar el color base de la web */

  #lightning-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    background: transparent;
  }

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

.hero-slide-media {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* --- Agrandar contenedor del Video --- */
.hero-slide-media .video-container {
  position: relative;
  width: 100%;
  max-width: 320px;          /* Mayor ancho */
  height: 420px;             /* Mayor altura */
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.45);
  background-color: #000;
  flex-shrink: 0;
}

.hero-slide-media .video-container iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%) scale(3.2);
  object-fit: cover;
  border: 0;
  pointer-events: none;
}
