/* ===== RESET Y BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #0f172a; /* Tu color oscuro base */
    /* Añadimos el patrón de puntos */
    background-image: radial-gradient(#1e293b 1px, transparent 1px);
    background-size: 20px 20px; /* Espaciado entre puntos */
    color: white;
    font-family: 'Inter', sans-serif;
    margin: 0;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER MEJORADO ===== */
.header {
    background: rgba(10, 14, 39, 0.98);
    padding: 0.75rem 0;
   
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    overflow: visible !important;
    position: sticky; /* o relative, pero NO static para que z-index funcione */
    z-index: 100;
   
    top: 0;           /* Se queda pegado al borde superior */
    
    
    /* Para el efecto de desenfoque opcional (queda muy bien) */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    flex-shrink: 0;
}

.logo i {
    font-size: 1.6rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo span {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navegación */
.nav {
    display: flex;
    gap: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(102, 126, 234, 0.15);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
}

.nav-link i {
    font-size: 0.85rem;
}

/* Buscador Header */
.header-search {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.header-search .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 2.75rem;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    outline: none;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.2);
}

/* Dropdown de búsqueda */
#searchSuggestions,
.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: rgba(15, 20, 45, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    max-height: 350px;
    overflow-y: auto;
    display: none;
    z-index: 1001;
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    gap: 1rem;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: rgba(102, 126, 234, 0.15);
}

.suggestion-item img {
    width: 45px;
    height: 55px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.suggestion-item .info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.suggestion-item .name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #fff;
}

.suggestion-item .price {
    font-size: 0.85rem;
    color: #4facfe;
    font-weight: 600;
}

.suggestion-item > i {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
}

.suggestion-empty {
    padding: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.suggestion-empty i {
    font-size: 1.5rem;
}

/* Acciones Header */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}
.image-badges {
    margin-bottom: 15px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
}

/* Colores por plataforma */
.badge-steam {
    background: rgba(23, 26, 33, 0.8);
    color: #66c0f4;
    border: 1px solid #66c0f4;
}

.badge-epic {
    background: rgba(30, 30, 30, 0.8);
    color: #ffffff;
    border: 1px solid #3b3b3b;
}

.badge-ubisoft {
    background: rgba(0, 112, 187, 0.2);
    color: #00f2fe;
    border: 1px solid #00f2fe;
}

.badge-ea {
    background: rgba(255, 71, 71, 0.1);
    color: #ff4747;
    border: 1px solid #ff4747;
}
.cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #fff;
    font-size: 1.1rem;
}

.cart-icon:hover {
    background: rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #f5576c 0%, #ff6b6b 100%);
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0a0e27;
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.4);
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.action-btn.admin-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Botón menú móvil */
.mobile-menu-btn {
    display: none;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: rgba(102, 126, 234, 0.3);
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* ===== HERO CAROUSEL MEJORADO ===== */
.hero-carousel {
    position: relative;
    height: 500px;
    overflow: hidden;
    background: #0a0e27;
}

.carousel-container {
    position: relative;
    height: 100%;
    width: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
}

.carousel-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.carousel-bg-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    opacity: 0.85;
}

.carousel-slide.active .carousel-bg-image + .carousel-bg-gradient {
    opacity: 0.7;
}

.carousel-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 700px;
    padding: 2rem;
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.carousel-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 4px 20px rgba(0, 0, 0, 0.4);
    line-height: 1.1;
}

.carousel-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    text-shadow: 1px 2px 10px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: #ffffff;
    color: #0a0e27;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(255, 255, 255, 0.25);
}

.btn-primary i {
    transition: transform 0.3s ease;
}

.btn-primary:hover i {
    transform: translateX(5px);
}


/* ---- Variables de diseño ---------------------------------- */
:root {
  --hero-color-bg:        #0b0d14;
  --hero-color-primary:   #5910e0;       /* naranja-rojo */
  --hero-color-accent:    #f3f3f3;       /* ámbar cálido */
  --hero-color-text:      #f1f5f9;
  --hero-color-muted:     #94a3b8;
  --hero-overlay-dark:    rgba(11, 13, 20, 0.85);
  --hero-overlay-side:    rgba(11, 13, 20, 0.60);
  --hero-glow:            rgba(16, 11, 68, 0.45);
  --hero-height:          92vh;
  --hero-min-height:      560px;
}

/* ---- Sección contenedora ---------------------------------- */
.hero-banner {
  position: relative;
  width: 100%;
  height: var(--hero-height);
  min-height: var(--hero-min-height);
  overflow: hidden;
  background-color: var(--hero-color-bg);
  font-family: 'Inter', sans-serif;
}

/* ---- Imagen de fondo con zoom suave ----------------------- */
.banner-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform: scale(1.08);
  animation: heroZoom 18s ease-out forwards;
  z-index: 0;
  will-change: transform;
}

@keyframes heroZoom {
  to { transform: scale(1); }
}

/* ---- Overlays multicapa ----------------------------------- */
/* Oscurece todo el fondo */
.banner-bg-gradient {
  position: absolute;
  inset: 0;
  z-index: 1;

  /* Gradiente vertical: transparente arriba → oscuro abajo */
  background:
    linear-gradient(
      to bottom,
      rgba(11, 13, 20, 0.15)  0%,
      rgba(11, 13, 20, 0.50) 45%,
      rgba(11, 13, 20, 0.95) 100%
    ),
    /* Gradiente lateral: oscuro izquierda → transparente derecha */
    linear-gradient(
      to right,
      rgba(11, 13, 20, 0.92)  0%,
      rgba(11, 13, 20, 0.55) 50%,
      rgba(11, 13, 20, 0.20) 100%
    );
}

/* Textura scanline sutil (opcional, da sensación de pantalla) */
.banner-bg-gradient::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.04) 2px,
    rgba(0, 0, 0, 0.04) 4px
  );
  pointer-events: none;
}

/* ---- Línea de neón inferior ------------------------------- */
.banner-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--hero-color-primary) 30%,
    var(--hero-color-accent)  55%,
    transparent 100%
  );
  z-index: 3;
}

/* ---- Contenedor del banner -------------------------------- */
.banner-container {
  position: relative;
  width: 100%;
  height: 100%;
}

/* ---- Área de contenido ------------------------------------ */
.banner-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(3rem, 8vh, 5.5rem);
}

/* ---- Contenedor interno (ajusta al sistema de tu proyecto) */
.banner-content .container {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
}



/* ---- Título principal ------------------------------------- */
.banner-content h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(2.8rem, 7vw, 6rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.01em;
  color: var(--hero-color-text);
  text-transform: uppercase;
  margin: 0 0 1.1rem;
  max-width: 700px;
  text-wrap: balance;
  animation: heroFadeUp 0.7s 0.25s ease both;

  /* Glow sutil en el texto */
  text-shadow:
    0 0 40px rgba(58, 10, 232, 0.35),
    0 2px 4px rgba(0, 0, 0, 0.6);
}

/* Resalta el año con color primario */
.banner-content h1 span {
  color: var(--hero-color-primary);
  text-shadow:
    0 0 30px var(--hero-glow),
    0 0 60px rgba(69, 10, 232, 0.25);
}

/* ---- Descripción ------------------------------------------ */
.banner-content p {
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  font-weight: 400;
  color: var(--hero-color-muted);
  line-height: 1.6;
  max-width: 480px;
  margin: 0 0 2rem;
  animation: heroFadeUp 0.7s 0.4s ease both;
}

/* ---- Botón CTA -------------------------------------------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #fff;
  background: var(--hero-color-primary);
  padding: 0.85rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition:
    background 0.25s ease,
    transform   0.15s ease,
    box-shadow  0.25s ease;
  box-shadow:
    0 4px 20px rgba(77, 52, 223, 0.4),
    inset 0 1px 0 rgba(255,255,255,0.12);
  animation: heroFadeUp 0.7s 0.55s ease both;
}

/* Barrido de brillo al hover */
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(39, 26, 85, 0.22),
    transparent
  );
  transform: skewX(-20deg);
  transition: left 0.55s ease;
}

.btn-primary:hover::before {
  left: 130%;
}

.btn-primary:hover {
  background: var(--hero-color-accent);
  box-shadow:
    0 6px 28px rgba(70, 46, 116, 0.6),
    inset 0 1px 0 rgba(18, 46, 204, 0.15);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 10px rgba(49, 51, 161, 0.4);
}

.btn-primary i,
.btn-primary svg {
  transition: transform 0.2s ease;
}

.btn-primary:hover i,
.btn-primary:hover svg {
  transform: translateX(4px);
}

/* ---- Animación de entrada --------------------------------- */
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Indicador de scroll ---------------------------------- */
.banner-scroll-hint {
  position: absolute;
  bottom: 2rem;
  right: 2.5rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--hero-color-muted);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
  opacity: 0.7;
  animation: heroFadeUp 0.8s 1s ease both;
}

.banner-scroll-hint::after {
  content: '';
  display: block;
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, var(--hero-color-muted), transparent);
  animation: scrollLine 1.8s ease-in-out infinite;
}

@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---- Responsive ------------------------------------------- */
@media (max-width: 768px) {
  .banner-content {
    align-items: flex-end;
    padding-bottom: 3rem;
  }

  .banner-content h1 {
    font-size: clamp(2.2rem, 10vw, 3.2rem);
  }

  .banner-content p {
    font-size: 0.9rem;
    max-width: 100%;
  }

  .btn-primary {
    width: 100%;
    justify-content: center;
    padding: 1rem 1.5rem;
  }

  .banner-scroll-hint {
    display: none;
  }
}

/* ===== SECCIÓN DE JUEGOS ===== */
.games {
    padding: 4rem 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
}

.section-title {
    text-align: center;
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.section-title i {
    color: #f5576c;
}

/* Grid de juegos - 2 columnas en móvil */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.game-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.game-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.4s ease;
}

.game-card:hover {
    transform: translateY(-8px);
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.game-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .game-image img {
    transform: scale(1.08);
}

.discount-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #f5576c 0%, #ff6b6b 100%);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.8rem;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(102, 126, 234, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover .game-overlay {
    opacity: 1;
}

.view-more {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid #fff;
    border-radius: 25px;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.game-card:hover .view-more {
    transform: translateY(0);
}

.game-info {
    padding: 1.25rem;
}

.game-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    
    /* Reemplazar las tres líneas anteriores por estas para multilínea inteligente */
    display: -webkit-box;
    -webkit-line-clamp: 2;          /* Máximo de líneas visibles antes del (...) */
    -webkit-box-orient: vertical;  
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;           /* Permite el salto de línea */
    
    /* Fuerza el corte de palabras ultra largas si no tienen espacios (ej. SUPERCALIFRAGILISTICO) */
    word-break: break-word;        
    
    /* Opcional: define una altura fija para que todas las tarjetas midan exactamente lo mismo */
    height: 2.6rem;                
}

.price-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.old-price {
    text-decoration: line-through;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.price {
    font-size: 1.4rem;
    font-weight: 700;
    color: #4facfe;
}

.btn-buy {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.85rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.no-games {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: rgba(255, 255, 255, 0.5);
}

.no-games i {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

/* Paginación */
.pagination-wrapper {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    padding: 0.6rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(.disabled) {
    background: rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
}

.pagination-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
}

.pagination-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ===== MODAL DEL CARRITO MEJORADO ===== */
.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
}

.cart-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.cart-modal-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 450px;
    height: 100%;
    background: linear-gradient(180deg, #0f1535 0%, #0a0e27 100%);
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
    border-left: 1px solid rgba(102, 126, 234, 0.2);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.cart-header h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.cart-header h2 i {
    color: #667eea;
}

.close-modal {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    background: rgba(245, 87, 108, 0.3);
    color: #f5576c;
}

/* Items del carrito */
.cart-items-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.cart-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(102, 126, 234, 0.2);
}

.cart-item-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.cart-img {
    width: 60px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-item-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cart-item-info span {
    color: #4facfe;
    font-weight: 700;
    font-size: 1.1rem;
}

.btn-remove {
    background: rgba(245, 87, 108, 0.15);
    border: none;
    color: #f5576c;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-remove:hover {
    background: #f5576c;
    color: #fff;
}

/* Carrito vacío */
.cart-empty {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    flex: 1;
}

.cart-empty i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.cart-empty p {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
}

.cart-empty span {
    font-size: 0.9rem;
}

/* Footer del carrito */
.cart-footer {
    padding: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
}

.cart-summary {
    margin-bottom: 1.25rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
}

.summary-row.total {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-row.total span:last-child {
    color: #4facfe;
}

/* Sección PayPal mejorada */
.paypal-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.paypal-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.75rem;
}

.paypal-title i {
    color: #00457C;
    font-size: 1.1rem;
}

#paypal-button-container {
    min-height: 45px;
}

/* Botones de acciones */
.cart-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-continue {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-continue:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(245, 87, 108, 0.1);
    color: #f5576c;
    border: 1px solid rgba(245, 87, 108, 0.3);
    padding: 0.85rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-clear:hover {
    background: #f5576c;
    color: #fff;
    border-color: #f5576c;
}

/* ===== FOOTER ===== */
.footer {
    background: rgba(0, 0, 0, 0.4);
    padding: 4rem 0 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.footer-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.footer-section h3 i {
    color: #667eea;
}

.footer-section h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section p i {
    color: #667eea;
    width: 16px;
}

.footer-section a {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.footer-section a:hover {
    color: #667eea;
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
}

/* ===== PAGE DETAIL STYLES ===== */

/* Breadcrumb */
.breadcrumb {
    background: rgba(255, 255, 255, 0.02);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.breadcrumb .container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  flex-wrap: wrap;
  }

.breadcrumb a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: #667eea;
}

.breadcrumb i.fa-chevron-right {
    font-size: 0.625rem;
    color: rgba(255, 255, 255, 0.6);
    opacity: 0.5;
}

.breadcrumb span {
    color: #fff;
    font-weight: 500;
}

/* Game Detail Section */
.game-detail {
    padding: 3rem 0;
}



.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* Game Image */
.detail-image-wrapper {
    position: sticky;
    top: 100px;
}

.detail-image {
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.detail-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.detail-image:hover img {
    transform: scale(1.02);
}

.image-badges {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.813rem;
    font-weight: 500;
}

.badge-steam {
    background: linear-gradient(135deg, #1b2838, #2a475e);
    color: #66c0f4;
    border: 1px solid #66c0f4;
}

.badge-offline {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Game Info */
.detail-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.game-title {
    font-size: 2rem; /* O el tamaño que ya tengas configurado */
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
    
    /* Control de desborde para nombres largos */
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word; /* Evita que palabras ultra largas rompan el layout en móviles */
}

/* Price Section */
.price-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 16px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.price-tag {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.price-tag .currency {
    font-size: 1.5rem;
    color: #667eea;
    font-weight: 600;
}

.price-tag .amount {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.price-tag .currency-type {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin-left: 0.5rem;
}

.btn-add-cart {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
}

.btn-add-cart:active {
    transform: translateY(0);
}

/* Info Cards */
.info-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-card {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.info-card:hover {
    border-color: #667eea;
    transform: translateX(4px);
}

.info-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    flex-shrink: 0;
}

.info-card-icon i {
    font-size: 1.25rem;
    color: white;
}

.info-card-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
}

.info-card-content p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}

.info-card-content strong {
    color: #667eea;
}

/* Terms Section */
.terms-section {
    padding: 1.5rem;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.terms-section h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #f59e0b;
    margin-bottom: 1rem;
}

.terms-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.terms-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

.terms-list li i {
    color: #10b981;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.terms-list li strong {
    color: #fff;
}

/* CTA Buttons */
.cta-buttons {
    display: flex;
    gap: 1rem;
}

.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: #25d366;
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    background: #22c55e;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
}

/* Related Games Section */
.related-games {
    padding: 4rem 0;
    background: rgba(255, 255, 255, 0.02);
}

.related-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
}

.section-header h2 i {
    color: #ef4444;
}

.view-all {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: gap 0.2s ease;
}

.view-all:hover {
    gap: 0.75rem;
}

/* Game Card Overlay */
.game-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover .game-card-overlay {
    opacity: 1;
}

.quick-add {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-add:hover {
    transform: scale(1.1);
    background: #764ba2;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav.active {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100%;
        background: linear-gradient(180deg, #0f1535 0%, #0a0e27 100%);
        padding: 5rem 1.5rem 2rem;
        z-index: 999;
        animation: slideInLeft 0.3s ease;
        gap: 0.5rem;
    }
    
    @keyframes slideInLeft {
        from {
            transform: translateX(-100%);
        }
        to {
            transform: translateX(0);
        }
    }
    
    .nav.active .nav-link {
        padding: 1rem 1.25rem;
        font-size: 1rem;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.03);
    }
    
    .nav.active .nav-link.active::after {
        display: none;
    }
    
    .header-search {
        order: 5;
        flex: 1 1 100%;
        max-width: 100%;
        margin-top: 0.75rem;
    }
    
    .action-btn .btn-text {
        display: none;
    }
    
    .action-btn {
        width: 42px;
        height: 42px;
        padding: 0;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    /* Grid de juegos: 2 columnas en móvil */
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .game-info {
        padding: 1rem;
    }
    
    .game-info h3 {
        font-size: 0.95rem;
    }
    
    .price {
        font-size: 1.15rem;
    }
    
    .btn-buy {
        padding: 0.7rem 1rem;
        font-size: 0.85rem;
    }
    
    .btn-buy i {
        display: none;
    }
    
    /* Carrusel móvil */
    .hero-carousel {
        height: 400px;
    }
    
    .carousel-content h1 {
        font-size: 2rem;
    }
    
    .carousel-content p {
        font-size: 1rem;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .carousel-btn.prev {
        left: 10px;
    }
    
    .carousel-btn.next {
        right: 10px;
    }
    
    /* Modal carrito móvil */
    .cart-modal-content {
        max-width: 100%;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
}
.currency-selector {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 5px 10px;
    border-radius: 8px;
    margin-right: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.currency-selector i {
    color: #a855f7; /* Color morado acorde al estilo */
    margin-right: 8px;
    font-size: 0.9rem;
}

#currencySelect {
    background: transparent;
    color: white;
    border: none;
    outline: none;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

#currencySelect option {
    background: #1e293b;
    color: white;
}
@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .game-info {
        padding: 0.75rem;
    }
    
    .game-info h3 {
        font-size: 0.85rem;
    }
    
    .price-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .price {
        font-size: 1rem;
    }
    
    .btn-buy {
        padding: 0.6rem;
        font-size: 0.8rem;
    }
    
    .hero-carousel {
        height: 350px;
    }
    
    .carousel-content h1 {
        font-size: 1.5rem;
    }
    
    .carousel-content p {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .btn-primary {
        padding: 0.85rem 1.75rem;
        font-size: 0.9rem;
    }
    
    .cart-actions {
        flex-direction: column;
    }
    
    .btn-continue,
    .btn-clear {
        width: 100%;
    }
}

/* Detail Page Responsive */
@media (max-width: 1024px) {
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .detail-image-wrapper {
        position: relative;
        top: 0;
    }
    
    .game-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
.breadcrumb .container {
  font-size: 0.75rem;
  }
    
    .game-detail {
        padding: 2rem 0;
    }
    
    .game-title {
        font-size: 1.75rem;
    }
    
    .price-section {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .price-tag {
        justify-content: center;
    }
    
    .price-tag .amount {
        font-size: 2.5rem;
    }
    
    .btn-add-cart {
        width: 100%;
    }
    
    .info-card {
        flex-direction: column;
        text-align: center;
    }
    
    .info-card-icon {
        width: 56px;
        height: 56px;
        margin: 0 auto;
    }
    
    .terms-list li {
        font-size: 0.813rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .btn-whatsapp {
        width: 100%;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .related-games {
        padding: 3rem 0;
    }
}

@media (max-width: 480px) {
  .game-detail .container {
  padding: 0 1rem;
  }
    
    .game-title {
        font-size: 1.5rem;
    }
    
    .price-tag .amount {
        font-size: 2rem;
    }
    
    .image-badges {
        flex-wrap: wrap;
    }
    
    .badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
}
@media (max-width: 768px) {
    /* 1. Forzar que el buscador pase a una línea nueva para ganar espacio */
    .header-content {
        flex-wrap: wrap; 
        gap: 10px;
        justify-content: space-between;
    }

    .header-search {
        order: 3; /* Lo manda al final (abajo) */
        width: 100%; /* Ocupa todo el ancho */
        margin: 5px 0;
    }

    /* 2. Ajustar el logo para que no ocupe tanto */
    .logo {
        font-size: 1.2rem;
        flex: 1;
    }

    /* 3. Alinear los íconos (Carrito/Login) a la derecha */
    .header-actions {
        order: 2;
        gap: 15px;
    }

    /* 4. El input del buscador más compacto */
    .search-input {
        padding: 8px 12px 8px 35px;
        font-size: 14px;
    }
    
    /* 5. Asegurar que el menú móvil no rompa el diseño */
    

}
@media (max-width: 768px) {
    /* El header NO debe tener overflow hidden */
    .header {
        overflow: visible !important; 
    }

    .nav {
        display: flex;
        flex-direction: column;
        position: fixed; /* Cambia absolute por fixed para que cubra toda la pantalla */
        top: 0;
        left: -100%;
        width: 80%; /* O 100% si lo quieres pantalla completa */
        height: 100vh; /* Ocupa todo el alto de la ventana */
        background: #0a0e27;
        padding: 80px 20px 20px 20px; /* Padding superior para no tapar con el botón */
        transition: 0.3s ease-in-out;
        z-index: 9999;
        box-shadow: 5px 0 15px rgba(0,0,0,0.5);
    }

    /* Reemplaza o agrega esto en tu @media (max-width: 992px) */

.nav.active {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;          /* ocupa toda la pantalla */
    overflow-y: auto;      /* ← ESTO FIX el corte: permite scroll si hay muchos links */
    background: linear-gradient(180deg, #0f1535 0%, #0a0e27 100%);
    padding: 5rem 1.5rem 2rem;
    z-index: 1001;         /* ← mayor que el header (1000) para no quedar detrás */
    animation: slideInLeft 0.3s ease;
    gap: 0.5rem;
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.5); /* opcional, buen efecto */
}

    /* Evitar que los enlaces se amontonen */
    .nav-link {
        padding: 15px 0;
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        justify-content: flex-start;
    }
}
.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
    z-index: 1000; /* entre el header y el nav */
}
/* ===== FIX MENÚ HAMBURGUESA MÓVIL ===== */

/* 1. Mostrar el botón hamburguesa en móvil */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        order: 1; /* aparece después del logo */
    }

    /* 2. Ocultar el nav por defecto en móvil */
    .nav {
        display: none;
    }

    /* 3. Cuando el nav está activo, mostrarlo como panel lateral */
    .nav.active {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        overflow-y: auto;
        background: linear-gradient(180deg, #0f1535 0%, #0a0e27 100%);
        padding: 5rem 1.5rem 2rem;
        z-index: 1001;
        animation: slideInLeft 0.3s ease;
        gap: 0.5rem;
        box-shadow: 5px 0 30px rgba(0, 0, 0, 0.5);
    }

    /* 4. Ocultar el selector de moneda en móvil o compactarlo */
    .currency-selector {
        display: flex;
    }
    .nav.active .currency-selector {
        display: flex;
        margin-top: 1rem;
        order: 99; /* al final del menú */
    }
}

/* 5. Animación del panel lateral (faltaba definirla) */
@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to   { transform: translateX(0); }
}

/* 6. Overlay activo con z-index correcto */
.mobile-menu-overlay {
    z-index: 999;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
    z-index: 999;
}
  /* Extras del nav móvil: ocultos en desktop */
.nav-mobile-extras {
    display: none;
}

@media (max-width: 768px) {

    /* Mostrar extras dentro del panel lateral */
    .nav-mobile-extras {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        margin-top: auto;         /* empuja al fondo del panel */
        padding-top: 1.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
    }

    .nav-mobile-extras .currency-selector {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.6rem 1rem;
        background: rgba(255,255,255,0.05);
        border-radius: 8px;
        width: 100%;
    }

    .nav-mobile-extras .currency-selector select {
        background: transparent;
        border: none;
        color: inherit;
        font-size: 0.9rem;
        flex: 1;
        cursor: pointer;
    }

    /* Ocultar perfil y moneda en header-actions en móvil */
    .header-actions .currency-selector,
    .header-actions .action-btn.login-btn,
    .header-actions .action-btn.admin-btn {
        display: none;
    }
}