/* --- LIMPIEZA PARA VER REJILLA --- */
main.container {
    background: transparent !important;
    backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* --- BUSCADOR CENTRADO --- */
.search-wrapper {
    max-width: 500px; 
    margin: 60px auto; 
    text-align: center;
    position: sticky;
    top: 90px;
    z-index: 1000;
}

.search-container {
    display: flex;
    align-items: center;
    background: rgba(26, 26, 46, 0.9) !important;
    backdrop-filter: blur(15px);
    border: 2px solid var(--neon-cyan);
    border-radius: 50px;
    padding: 5px 20px;
}

#gameSearch {
    flex: 1; background: transparent; border: none; color: white;
    padding: 12px; font-family: 'Orbitron'; outline: none;
}

/* --- SECCIONES AZULES FLOTANTES --- */
.genre-section {
    background: rgba(20, 20, 35, 0.95) !important; 
    backdrop-filter: blur(10px);
    border: 2px solid rgba(0, 242, 255, 0.3);
    border-radius: 20px;
    margin: 100px 5% !important; 
    padding: 40px;
    position: relative;
    transition: 0.5s;
}

.genre-section:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.2);
}

.category-title {
    color: var(--neon-cyan);
    font-family: 'Orbitron';
    border-left: 5px solid var(--neon-magenta);
    padding-left: 20px;
    margin-bottom: 30px;
}

/* --- CARDS Y BOTONES --- */
.slider-content {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc(20% - 16px); /* 5 por línea */
    gap: 20px;
    overflow-x: auto;
    padding: 20px 5px;
}

.catalog-card {
    background: var(--card-bg);
    border: 1px solid rgba(0, 242, 255, 0.2);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.game-title {
    text-align: center; /* TÍTULO CENTRADO */
    margin: 15px 0;
    font-size: 0.95rem;
    font-family: 'Orbitron';
    min-height: 2.5em;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* GRID DE BOTONES DINÁMICO */
.purchase-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: auto;
}

.purchase-grid:has(> :nth-child(2)) { grid-template-columns: 1fr 1fr; }
.purchase-grid > :nth-child(3):last-child { grid-column: span 2; }

.btn-std {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--neon-cyan);
    color: white;
    cursor: pointer;
    transition: 0.3s;
}

.btn-std:hover {
    background: var(--neon-cyan);
    color: black;
    box-shadow: 0 0 10px var(--neon-cyan);
}

.btn-label { font-size: 0.6rem; text-transform: uppercase; }
.btn-price { font-weight: bold; font-size: 0.8rem; }

/* CONTENEDOR DE IMAGEN (Ajustado para evitar zoom excesivo) */
.img-container {
    height: 230px; /* Reducimos un poco la altura para que no haga tanto zoom out */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.img-container img {
    width: 100%;
    height: 100%;
    /* Cambiamos a 'contain' si no quieres zoom, 
       o mantenemos 'cover' con una altura controlada */
    object-fit: cover; 
    transition: transform 0.5s ease;
}

/* INFO BOX (Aseguramos que esté sobre la imagen y centrada) */
.info-box {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9); /* Más oscuro para leer mejor */
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centrado vertical */
    align-items: center;     /* Centrado horizontal */
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden; /* Evita que interfiera cuando no se ve */
    transition: all 0.4s ease;
    z-index: 25;
}

/* Mostrar info */
.info-box.show {
    opacity: 1;
    visibility: visible;
}

/* Botón 'i' (Aseguramos que esté por encima de la info) */
.info-trigger {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--neon-magenta);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 40; /* El más alto de la card */
    font-family: 'Orbitron';
    font-weight: bold;
    box-shadow: 0 0 10px var(--neon-magenta);
}


/* ESTILO DE LA LUPA CYBERPUNK */
.cyber-lupa {
    position: relative;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

/* El círculo de la lupa */
.lupa-circulo {
    width: 14px;
    height: 14px;
    border: 2px solid var(--neon-cyan);
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    box-shadow: 0 0 8px var(--neon-cyan);
    transition: 0.3s;
}

/* El mango de la lupa */
.lupa-mango {
    width: 2px;
    height: 10px;
    background: var(--neon-cyan);
    position: absolute;
    bottom: 2px;
    right: 2px;
    transform: rotate(-45deg);
    box-shadow: 0 0 8px var(--neon-cyan);
    transition: 0.3s;
}

/* EFECTO HOVER: La lupa cambia a Magenta */
#search-btn:hover .lupa-circulo {
    border-color: var(--neon-magenta);
    box-shadow: 0 0 15px var(--neon-magenta);
}

#search-btn:hover .lupa-mango {
    background: var(--neon-magenta);
    box-shadow: 0 0 15px var(--neon-magenta);
}

#search-btn:hover .cyber-lupa {
    transform: scale(1.1) rotate(5deg);
}

/* AJUSTE ADICIONAL PARA EL BOTÓN */
#search-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
}


/* CARRITO LATERAL CYBERPUNK */
#side-cart {
    position: fixed;
    right: -400px; /* Escondido */
    top: 0;
    width: 350px;
    height: 100vh;
    background: rgba(13, 13, 22, 0.95);
    backdrop-filter: blur(20px);
    border-left: 2px solid var(--neon-cyan);
    z-index: 2000;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    padding: 20px;
}

#side-cart.cart-open {
    right: 0;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 242, 255, 0.2);
}

.item-name {
    color: var(--neon-cyan);
    font-size: 0.85rem;
    font-family: 'Orbitron';
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background: var(--neon-magenta);
    color: white;
    border: none;
    font-family: 'Orbitron';
    cursor: pointer;
    box-shadow: 0 0 15px var(--neon-magenta);
    margin-top: 20px;
}

/* Icono flotante */
#cart-icon-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1500;
    cursor: pointer;
    background: var(--neon-cyan);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px var(--neon-cyan);
}

#cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--neon-magenta);
    color: white;
    border-radius: 50%;
    padding: 4px 8px;
    font-size: 0.7rem;
}

.flying-item {
    position: fixed;
    width: 20px;
    height: 20px;
    background: var(--neon-cyan);
    box-shadow: 0 0 15px var(--neon-cyan);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .slider-content { grid-auto-columns: calc(33.33% - 15px); }
}

@media (max-width: 768px) {
    .genre-section { margin: 60px 3% !important; padding: 20px; }
    .search-wrapper { max-width: 90%; top: 120px; }
    .slider-content { grid-auto-columns: calc(50% - 10px); }
}


