/* ==========================================
   ESTILOS ESPECÍFICOS PARA EL CATÁLOGO MINIMALISTA
   ========================================== */

body {
    background-color: #ffffff;
    margin: 0;
    padding: 0;
    overflow-x: clip !important;
}

/* BLOQUEO DE SCROLL CUANDO EL MODAL ESTÁ ABIERTO */
body.no-scroll {
    overflow: hidden !important;
}

/* HEADER COMPLETO STICKY */
.catalog-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

/* FILA SUPERIOR DEL HEADER (LUPA - LOGO - FILTRO) */
.header-top-row {
    width: 100%;
    max-width: 1650px;
    padding: 0 30px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    box-sizing: border-box;
    margin-bottom: 12px;
}

.header-top-row > *:nth-child(1) { justify-self: start; }
.header-top-row > *:nth-child(2) { justify-self: center; }
.header-top-row > *:nth-child(3) { justify-self: end; }

/* BOTONES DE ÍCONOS */
.header-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.header-icon-btn:hover {
    opacity: 0.6;
    transform: scale(1.08);
}

/* LOGO CIRCULAR SIMÉTRICO */
.header-logo, .logo-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* MENÚ DESPLEGABLE DE FILTROS */
.filter-dropdown-container {
    position: relative;
}

.filter-menu {
    position: absolute;
    right: 0;
    top: 45px;
    background: #ffffff;
    border: 1px solid #eaeaea;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-radius: 0px;
    padding: 10px 0;
    width: 220px;
    display: none;
    flex-direction: column;
    z-index: 1100;
}

.filter-menu.active {
    display: flex;
}

.filter-menu-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #888888;
    padding: 8px 16px;
    text-transform: uppercase;
}

.filter-opt {
    background: none;
    border: none;
    text-align: left;
    padding: 10px 16px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #333333;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.filter-opt:hover, .filter-opt.active {
    background: #f5f5f5;
    color: #000000;
    font-weight: 800;
}

/* BARRA DE NAVEGACIÓN GRIS CLARO SIMÉTRICA */
.catalog-nav-container {
    width: 100%;
    background-color: #f5f5f5;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 0;
}

.catalog-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.catalog-nav a {
    color: #000000;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.catalog-nav a:nth-child(1) {
    justify-self: end;
    padding-right: 30px;
}

.catalog-nav a:nth-child(2) {
    justify-self: center;
}

.catalog-nav a:nth-child(3) {
    justify-self: start;
    padding-left: 30px;
}

.catalog-nav:hover a { color: #888888; }
.catalog-nav a:hover { color: #000000; }

/* ÁREA DE PRODUCTOS */
.catalog-main {
    background-color: #ffffff;
    color: #000000;
    min-height: 100vh;
    padding: 50px 25px 100px 25px;
    max-width: 1650px;
    width: 95%;
    margin: 0 auto;
}

.shop-all-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.8rem;
    text-transform: uppercase;
    margin-bottom: 50px;
    letter-spacing: 1px;
}

/* CUADRÍCULA DE PRODUCTOS */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 65px 35px;
}

/* TARJETAS DE PRODUCTO */
.product-card {
    display: flex;
    flex-direction: column;
    position: relative;
}

/* 1. HUECO DE ARRIBA (ETIQUETA CONSOLAS) */
.platform-badge {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    align-self: flex-start;
    background-color: #000000;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px !important; /* <--- HUECO ENTRE ÍCONOS E IMAGEN */
}

/* 2. HUECO DE ABAJO (CONTENEDOR DE IMAGEN) */
.image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #f4f4f4;
    overflow: hidden;
    margin-bottom: 22px !important; /* <--- HUECO ENTRE IMAGEN Y TEXTO/PRECIOS */
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
    cursor: zoom-in;
    border-radius: 0 !important;
}

/* ELIMINAMOS EL ZOOM ANTIGUO AL PASAR EL MOUSE */
.product-card:hover .image-container img {
    transform: none; 
}

/* TEXTOS, PRECIOS Y BOTÓN */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    color: #d02d2d;
    margin: 0;
}

.product-price {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: #000000;
    display: flex;
    gap: 8px;
    align-items: center;
}

.price-usd {
    color: #999;
    text-decoration: none; /* 👈 Se quitó la línea tachada */
    font-weight: 500;
    font-size: 0.8rem;
}

.btn-buy {
    margin-top: 15px;
    padding: 12px;
    background-color: #000000;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    transition: background 0.3s;
    border: none; /* 👈 ADIÓS BORDE GRIS */
    outline: none; /* 👈 ADIÓS LÍNEA AL HACER CLIC */
    cursor: pointer; /* 👈 MANITA AL PASAR EL MOUSE */
}

.btn-buy:hover {
    background-color: #333333;
}

#loading-msg {
    text-align: left;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    grid-column: 1 / -1;
    padding: 20px 0;
}

/* MODAL BÚSQUEDA */
.search-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.65);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 80px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    box-sizing: border-box;
}

.search-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-modal-card {
    background: #ffffff;
    width: 90%;
    max-width: 620px;
    border-radius: 0px;
    padding: 22px 26px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    max-height: 75vh;
}

.search-bar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #e2e2e2;
    padding-bottom: 12px;
}

.search-input-field {
    flex: 1;
    border: none;
    outline: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: #000000;
    font-weight: 500;
}

.close-search-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: #888888;
    transition: color 0.2s;
    padding: 0 4px;
}

.close-search-btn:hover {
    color: #000000;
}

.search-results-section {
    margin-top: 20px;
    overflow-y: auto;
    max-height: 55vh;
}

.search-section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #000000;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 14px;
}

.search-result-item {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    padding: 8px;
    border: 1px solid transparent;
    background-color: transparent;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.search-result-item:hover,
.search-result-item:active,
.search-result-item:focus {
    border: 1px solid #f7f7f7;
    background-color: #f7f7f7;
    transform: translateY(-2px);
}

.search-result-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 0px;
    background-color: #f0f0f0;
}

.search-result-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #222222;
    margin: 8px 0 4px 0;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-price {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: #000000;
}

/* RESPONSIVO */
@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    .header-top-row {
        padding: 0 15px;
    }
    
    /* 🔴 AQUI ESTÁ LA MAGIA DEL CELULAR: Ocultamos los textos */
    .catalog-nav-container {
        display: none !important;
    }
    
    /* Mostramos el botón hamburguesa */
    .sidebar-toggle-btn {
        display: flex;
    }
}

/* ==========================================
   FIX DEFINITIVO: PANTALLA COMPLETA PARA MÓVIL
   ========================================== */
.buy-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.75) !important; /* Oscurece toda la pantalla */
    z-index: 999999 !important; /* Queda por encima del header y títulos */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    box-sizing: border-box;
}

.buy-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.buy-modal-card {
    background: #ffffff;
    width: 100%;
    max-width: 720px;
    position: relative;
    padding: 35px 25px 30px 25px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
}

.close-buy-btn {
    position: absolute;
    top: 12px;
    right: 18px;
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: #888888;
    transition: color 0.2s;
}

.close-buy-btn:hover {
    color: #000000;
}

.buy-modal-body {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 25px;
    align-items: center;
}

.buy-modal-divider {
    width: 1px;
    height: 85%;
    background-color: #eaeaea;
}

.buy-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.buy-col-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #222222;
    margin-bottom: 15px;
    line-height: 1.4;
    text-transform: none; 
}

/* 👇 TÍTULO NUEVO: OCULTO EN PC 👇 */
.buy-modal-mobile-title {
    display: none; 
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #222222;
    text-align: center;
    margin-bottom: 15px;
    line-height: 1.4;
}

.buy-spline-box {
    width: 100%;
    height: 160px;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.buy-spline-box spline-viewer {
    width: 100%;
    height: 100%;
}

.btn-buy-option {
    width: 100%;
    padding: 11px 16px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    text-decoration: none;
    text-align: center;
    border-radius: 50px;
    transition: transform 0.2s ease, opacity 0.2s ease;
    box-sizing: border-box;
    cursor: pointer;
    border: none;
}

.btn-buy-option:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.btn-ig {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: #ffffff;
}

.btn-discord {
    background-color: #5865F2;
    color: #ffffff;
}

/* 👇 AGREGA ESTO: Ocultamos por defecto el texto corto en la PC */
.text-mobile {
    display: none;
}

/* Ocultamos las imágenes estáticas de móvil por defecto en PC */
.buy-img-box-mobile {
    display: none;
}

/* 🔴 VISTA EXCLUSIVA PARA MÓVIL (SIN MODELOS 3D DE SPLINE) 🔴 */
@media (max-width: 650px) {
    .buy-modal-card {
        padding: 30px 18px 25px 18px;
        max-width: 380px;
        margin: 0 auto;
    }

    /* Título superior para móviles */
    .buy-modal-mobile-title {
        display: block !important;
        font-family: 'Montserrat', sans-serif;
        font-size: 0.82rem;
        font-weight: 600;
        color: #222222;
        text-align: center;
        margin-bottom: 20px;
        line-height: 1.35;
    }

    /* Ocultamos los títulos individuales de columna y la línea vertical */
    .buy-col-title, 
    .buy-modal-divider {
        display: none !important;
    }

    /* 🚫 Ocultamos totalmente los lienzos 3D de Spline en el móvil */
    .buy-spline-box {
        display: none !important;
    }

    /* 📏 LOGOS MÁS GRANDES Y BALANCED ÓPTICO */
    .buy-img-box-mobile {
        width: 100%;
        height: 115px;                  /* 👈 Más espacio de altura para que respiren */
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 20px !important; /* 👈 Mantiene el espacio simétrico con el botón */
    }

    .buy-img-mobile {
        width: 98px !important;         /* 👈 Instagram más grande */
        height: 98px !important;
        object-fit: contain !important;
    }

    /* 🎯 COMPENSACIÓN ÓPTICA: Discord un pelín más grande para emparejar el peso visual */
    .buy-img-mobile[src*="discord"] {
        width: 107px !important;        /* 👈 +9px para que al ojo se vean exactamente iguales */
        height: 107px !important;
    }

    /* Grid simétrico de dos columnas */
    .buy-modal-body {
        grid-template-columns: 1fr 1fr !important;
        gap: 15px !important;
    }

    .btn-buy-option {
        font-size: 0.82rem; 
        padding: 11px 5px; 
    }
    
    /* Cambiamos el texto de los botones para celular */
    .text-pc {
        display: none !important;
    }
    .text-mobile {
        display: inline !important;
    }
}

/* ==========================================
   MENÚ LATERAL BLANCO Y BOTÓN HAMBURGUESA
   ========================================== */

/* Grupo Izquierdo (Hamburguesa + Lupa) */
.header-left-group {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-self: start;
}

/* Botón Hamburguesa: Oculto en PC por defecto */
.sidebar-toggle-btn {
    display: none; /* Se oculta en PC */
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    transition: transform 0.2s ease;
}

.sidebar-toggle-btn:hover {
    transform: scale(1.08);
}

.sidebar-toggle-btn .bar {
    width: 24px;
    height: 2px;
    background-color: #000000;
    border-radius: 2px;
}

/* Overlay Oscuro */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9990;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Menú Lateral (Blanco Puro) */
.sidebar-catalog {
    position: fixed;
    top: 0;
    left: -320px; /* Sale desde la izquierda porque el botón está a la izquierda */
    width: 300px;
    height: 100vh;
    background: #ffffff; /* Blanco puro bro */
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    transition: left 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.sidebar-catalog.active {
    left: 0;
}

.sidebar-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: #888888;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.sidebar-close-btn:hover {
    color: #000000;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eaeaea;
}

.sidebar-logo {
    width: 42px;
    height: 42px;
    border-radius: 50%;
}

.sidebar-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    color: #000000;
    letter-spacing: 1px;
}

.sidebar-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    padding: 0;
}

.sidebar-links a {
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #333333;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease, padding-left 0.3s ease;
    display: inline-block;
}

.sidebar-links a:hover {
    color: #000000;
    padding-left: 8px;
}
/* ==========================================
   MODAL DE IMAGEN GRANDE Y ZOOM (NUEVO)
   ========================================== */
.image-zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.image-zoom-overlay.active {
    opacity: 1;
    visibility: visible;
}

.image-zoom-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-zoom-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 0 !important;
    cursor: zoom-in;
    transition: transform 0.1s ease-out;
    touch-action: pinch-zoom;
}

.image-zoom-img.zoomed {
    cursor: zoom-out;
}

.close-zoom-btn {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
}

.close-zoom-btn:hover {
    color: #cccccc;
}

@media (max-width: 768px) {
    .close-zoom-btn {
        top: -45px;
        right: 0;
    }
    .image-zoom-container {
        width: 100%;
    }
}

/* ==========================================================
   SOLUCIÓN DEFINITIVA: BUG FANTASMA EN MODALES (PC Y CELULAR)
   ========================================================== */

/* 1. Desactivar clics/toques en todas las ventanas ocultas */
.search-modal-overlay,
.buy-modal-overlay,
.image-zoom-overlay,
.sidebar-overlay {
    pointer-events: none !important;
}

/* 2. Reactivar clics/toques ÚNICAMENTE cuando la ventana se abra (.active) */
.search-modal-overlay.active,
.buy-modal-overlay.active,
.image-zoom-overlay.active,
.sidebar-overlay.active {
    pointer-events: auto !important;
}

/* 3. Apagar por completo los lienzos 3D de Spline mientras el modal esté cerrado */
.buy-modal-overlay:not(.active) spline-viewer {
    pointer-events: none !important;
}

/* ==========================================
   FOOTER REDES SOCIALES (EXCLUSIVO MÓVIL)
   ========================================== */

/* En PC el contenedor 2D se oculta totalmente */
.footer-mobile-social {
    display: none;
}

/* En Móvil ocultamos el 3D y mostramos la cápsula 2D */
@media (max-width: 650px) {
    .social-spline-wrapper {
        display: none !important;
    }

    .footer-mobile-social {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 22px;
        background-color: #121212;
        border: 1px solid #222222;
        padding: 12px 26px;
        border-radius: 50px;
        margin: 20px auto 15px auto;
        width: fit-content;
    }

    .footer-social-link {
        color: #ffffff;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .footer-social-link:hover,
    .footer-social-link:active {
        opacity: 0.7;
        transform: scale(1.1);
    }
}