@font-face {
    font-family: 'Barlow';
    src: url('fonts/Barlow-Regular.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

:root {
    --bg-color: #12161a;
    --card-bg: #1e252b;
    --text-color: #ffffff;
    --vbucks-color: #ffd700;
    --fondo-secundario: #191821; 
}
/* Elimina cualquier espacio no deseado al inicio de la página */
body {
    background-color: #000000;
    color: var(--text-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden; /* 🚫 Esta es la línea mágica que elimina la barra horizontal */
}

#shop-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0;
    color: #ffffff;
    text-transform: uppercase;
    text-align: center;
}

.store-title {
    font-size: 1.8rem; /* Bajamos de 2.2 a 1.8 para que tenga aire por arriba y abajo */
    font-weight: 800;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0px; 
    color: #ffffff;
}

header p {
    color: #8a9a86;
}

#shop-container {
    max-width: 1200px;
    margin: 0 auto;
}

.shop-section {
    margin-bottom: 50px;
    scroll-margin-top: 160px;
}

/* ==========================================================================
    🎯 AJUSTES DE ALINEACIÓN Y JERARQUÍAS (FORTNITE)
    ========================================================================== */

.section-title {
    color: #ffffff !important;
    font-size: 1.8rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 10px; /* Reducimos el espacio para acercarlo a las tarjetas */
    letter-spacing: 1px;
    /* Hemos eliminado el border-bottom y el padding-bottom */
}

/* 🌟 CUADRÍCULA BASE PC (4 COLUMNAS PARA TODOS LOS CATÁLOGOS) */
.section-grid,
.ff-grid-container,
.ml-grid-container,
.roblox-grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 Columnas en pantalla completa */
    gap: 20px;
}

.ff-grid-container,
.ml-grid-container,
.roblox-grid-container {
    padding: 10px;
}

.item-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-color: var(--fondo-secundario) !important;
    border: none !important;
}

.item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
}

.item-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    padding: 15px;
    background-color: var(--fondo-secundario) !important;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.item-info > div:first-child {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.item-name {
    position: absolute;
    bottom: 0px;
    left: 0px;
    width: 100%;
    margin: 0;
    /* Reducimos el padding superior porque ya no hay un degradado oscuro que justificar */
    padding: 12px 12px 10px 12px; 
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
    z-index: 5;
    box-sizing: border-box;
    
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis; 
    
    /* 🌟 ELIMINAMOS EL DEGRADADO Y MEJORAMOS LA SOMBRA DEL TEXTO */
    background: transparent; 
    text-shadow: 
        1px 1px 2px rgba(0, 0, 0, 0.9), 
        0px 0px 8px rgba(0, 0, 0, 0.7),
        0px 2px 4px rgba(0, 0, 0, 0.5); /* Tres capas de sombra para que resalte sin manchar el fondo */
}

.item-description-specie {
    font-size: 0.75rem;
    font-weight: bold;
    color: #718096;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: auto !important;
    padding-top: 8px;
}

/* --- SISTEMA DE CAPAS DE IMAGEN --- */
.card-image-wrapper {
    width: 100%;
    aspect-ratio: 1;
    position: relative; 
    overflow: hidden;
}

.api-bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; 
}

.item-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2; 
    background-color: transparent !important; 
    transition: opacity 0.5s ease-in-out;
}

/* --- SECCIÓN DE PRECIOS --- */
.item-footer {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 5px;
}

/* --- SECCIÓN DE PRECIOS --- */
.item-price {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-color) !important;
    font-size: 1.05rem;
    white-space: nowrap; 
    font-family: 'Barlow', sans-serif; /* <--- Llama a tu nueva fuente local */
    font-weight: 500; 
}

.item-price-soles {
    font-size: 1.1rem;
    color: #ffffff !important;
    letter-spacing: 0.5px;
    white-space: nowrap; 
    font-family: 'Barlow', sans-serif; /* <--- Llama a tu nueva fuente local */
    font-weight: 500; 
}

.vbucks-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    position: relative;
    display: inline-block;
    border: 2px solid #5ce1e6;
    background: #0055cc;
    box-shadow: inset 0 0 4px #00ffff, 0 0 6px rgba(0, 119, 255, 0.8);
    box-sizing: border-box;
}

.vbucks-icon::before {
    content: "V";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -51%);
    font-family: 'Arial Black', Gadget, sans-serif;
    font-size: 11px;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.6);
    line-height: 1;
}

.item-rarity {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 20px;
    background-color: rgba(30, 37, 43, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    z-index: 4;
    letter-spacing: 1px;
    pointer-events: none;
}

.item-countdown {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.85rem;
    font-weight: bold;
    color: #ffffff;
    z-index: 4;
    pointer-events: none;
    background: transparent !important; 
    border: none !important;
    box-shadow: none !important;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.9), 0px 0px 2px rgba(0, 0, 0, 0.9); 
}

.item-countdown.urgent {
    color: #61f908 !important;
}

.loading {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 1.5rem;
    padding: 50px;
}

.item-new-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #faff00;
    color: #000000;
    font-size: 0.85rem;
    font-weight: 900;
    font-style: italic;
    padding: 3px 10px;
    border-radius: 6px;
    z-index: 5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

.item-card[data-type="lego"] {
    display: none !important;
}

/* ==========================================================================
    🌟 MENÚ LATERAL DE FILTROS (COMPACTO CON SCROLL Y CENTRADO)
    ========================================================================== */
.sidebar-wrapper {
    position: fixed;
    top: 50%; 
    left: 15px;
    z-index: 9999;
    width: 276px; /* AUMENTADO UN 15% */
    display: flex;
    flex-direction: column;
    gap: 8px; 
    transform: translateY(-50%); 
    pointer-events: none; 
}

.filters-header {
    background-color: #d1d5db; 
    color: #111827; 
    border: none;
    padding: 8px 14px; 
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.85rem; 
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-transform: uppercase;
    width: max-content; 
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: background-color 0.2s ease;
    pointer-events: auto; 
}

.filters-header:hover {
    background-color: #e5e7eb;
}

.shop-sidebar-filters {
    background: rgba(15, 15, 15, 0.85) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 5px 0; 
    color: white;
    max-height: 600px; /* AUMENTADO PARA MOSTRAR MÁS SECCIONES */
    overflow-y: auto;  
    overflow-x: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6); 
    display: none; 
    pointer-events: auto; 
}

.shop-sidebar-filters::-webkit-scrollbar { width: 6px; }
.shop-sidebar-filters::-webkit-scrollbar-track { background: transparent; margin-top: 5px; margin-bottom: 5px; }
.shop-sidebar-filters::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.3); border-radius: 10px; }
.shop-sidebar-filters::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.5); }

.filter-btn {
    width: 100%;
    background: transparent;
    border: none;
    color: #ffffff; 
    text-align: left;
    padding: 12px 14px; 
    font-size: 0.75rem; 
    font-weight: 700; 
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.1s ease-in-out;
    display: block;
    line-height: 1.2;
}

.filter-btn:hover { background-color: rgba(255, 255, 255, 0.1); }
.filter-btn.active { background-color: rgba(255, 255, 255, 0.15); color: #ffffff !important; }

/* ==========================================================================
    ESTRUCTURA PRINCIPAL Y TABS
    ========================================================================== */
.main-content-wrapper {
    flex-grow: 1;
    width: 100%;
    box-sizing: border-box;
    padding: 0; /* MODIFICADO: Cambiado a 0 para eliminar por completo los espacios negros laterales del encabezado */
    margin-left: 0 !important; 
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 2. Fuerza al encabezado a pegarse arriba y elimina márgenes del título */
.shop-header {
    width: 100%; /* Asegura expansión de borde a borde */
    height: auto; /* Se ajusta automáticamente al contenido */
    min-height: 100px; /* Asegura que tenga al menos los 100px que querías */
    display: flex;
    flex-direction: column; /* Esto pone el H1 arriba y el DIV abajo */
    justify-content: center; /* Centra verticalmente */
    align-items: center; /* Centra horizontalmente */
    margin-top: 0 !important;
    padding-top: 15px; /* Ajusta este valor si quieres un poco de aire interno */
    background-color: #15171C;
    gap: 15px; /* Espacio entre el título y los botones */
}

#shop-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-top: 0 !important; /* Esto es vital: elimina el espacio que el H1 suele añadir */
    margin-bottom: 0;
    color: #ffffff;
    text-transform: uppercase;
    text-align: center;
}

.nav-tabs-container {
    display: flex;
    justify-content: center;
    gap: 10px; /* Espacio entre tus botones */
    flex-wrap: wrap; /* Por si en celulares son muchos botones, que pasen a la siguiente línea */
}

.nav-tabs-container {
    display: flex;
    justify-content: center;
    gap: 10px; /* Espacio entre tus botones */
    flex-wrap: wrap; /* Por si en celulares son muchos botones, que pasen a la siguiente línea */
}

.nav-tab-btn {
    background-color: #181c22;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.nav-tab-btn:hover { background-color: rgba(255, 255, 255, 0.05); color: #ffffff; }
.nav-tab-btn.active {
    background-color: #ff7b00;
    color: #ffffff !important;
    border-color: #000000;
    box-shadow: 0 0 10px rgba(155, 89, 182, 0.4);
}

.tab-content { 
    display: none; 
    width: 100%; 
    box-sizing: border-box; 
    padding: 20px; /* MODIFICADO: Pasamos el padding lateral aquí para que tus catálogos no toquen los bordes de la pantalla */
}
.tab-content.active { display: block; }

/* ==========================================================================
    CATÁLOGOS: FREE FIRE, MOBILE LEGENDS Y ROBLOX
    ========================================================================== */

.ff-catalog-wrapper, .ml-catalog-wrapper, .roblox-catalog-wrapper { max-width: 1200px; margin: 0 auto; padding: 20px; text-align: center; }

/* Textos Juegos */
.ff-title { font-size: 2rem; font-weight: 900; color: #f39c12; text-shadow: 0 0 15px rgba(243, 156, 18, 0.4); margin-bottom: 5px; letter-spacing: 1px; }
.ff-subtitle { font-size: 1rem; color: #a0aec0; margin-bottom: 40px; }
.ml-title { font-size: 2rem; font-weight: 900; color: #9b59b6; text-shadow: 0 0 15px rgba(155, 89, 182, 0.4); margin-bottom: 5px; letter-spacing: 1px; }
.ml-subtitle { font-size: 1rem; color: #a0aec0; margin-bottom: 40px; }
.roblox-title { font-size: 2rem; font-weight: 900; color: #e2e8f0; text-shadow: 0 0 15px rgba(255, 255, 255, 0.4); margin-bottom: 5px; letter-spacing: 1px; }
.roblox-subtitle { font-size: 1rem; color: #a0aec0; margin-bottom: 40px; }

/* Cartas de Juegos */
.ff-package-card { background: linear-gradient(135deg, #1e252b 0%, #151a1e 100%); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 8px; padding: 20px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 15px; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); position: relative; overflow: hidden; }
.ml-package-card { background: linear-gradient(135deg, #181524 0%, #11141a 100%); border: 1px solid rgba(155, 89, 182, 0.15); border-radius: 8px; padding: 20px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 12px; transition: all 0.3s ease; }
.ff-package-card:hover { transform: translateY(-5px); border-color: rgba(243, 156, 18, 0.3); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); }
.ml-package-card:hover { transform: translateY(-5px); border-color: rgba(155, 89, 182, 0.4); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5); }

/* Insignias y Textos interiores */
.ff-diamond-badge { font-size: 1.6rem; font-weight: 800; color: #ffffff; letter-spacing: 0.5px; display: flex; align-items: center; gap: 8px; }
.ml-diamond-badge { font-size: 1.5rem; font-weight: 800; color: #ffffff; display: flex; align-items: center; gap: 6px; }
.ff-package-info, .ml-package-info { display: flex; flex-direction: column; width: 100%; gap: 4px; }
.ff-label, .ml-label { font-size: 0.7rem; font-weight: 700; color: #718096; letter-spacing: 1px; }
.ff-price, .ml-price { font-size: 1.3rem; font-weight: 800; color: #2ecc71; }
.ml-bonus-text { font-size: 0.75rem; font-weight: 600; color: #00e5ff; background-color: rgba(0, 229, 255, 0.06); padding: 2px 10px; border-radius: 20px; }
.ml-bonus-plus { color: #00e5ff; font-weight: 700; }
.ff-package-card.highlight { border-color: rgba(243, 156, 18, 0.2); background: linear-gradient(135deg, #28231a 0%, #151a1e 100%); }
.ff-package-card.highlight .ff-label { color: #f39c12; }
.ff-package-card.ultra { border-color: rgba(231, 76, 60, 0.3); background: linear-gradient(135deg, #34191c 0%, #151a1e 100%); }
.ff-package-card.ultra .ff-diamond-badge { color: #e74c3c; text-shadow: 0 0 10px rgba(231, 76, 60, 0.5); }
.ff-package-card.ultra .ff-label { color: #e74c3c; }
.ml-package-card.highlight { border-color: rgba(155, 89, 182, 0.3); background: linear-gradient(135deg, #241a36 0%, #11141a 100%); }
.ml-package-card.weekly-card { border: 1px solid rgba(0, 229, 255, 0.3); background: linear-gradient(135deg, #112836 0%, #11141a 100%); }
.ml-package-card.weekly-card .ml-diamond-badge { color: #00e5ff; text-shadow: 0 0 10px rgba(0, 229, 255, 0.3); }
.ml-package-card.ultra { border-color: rgba(231, 76, 60, 0.25); background: linear-gradient(135deg, #2d1316 0%, #11141a 100%); }
.ml-package-card.ultra .ml-label { color: #e74c3c; }


/* ==========================================================================
    📱 ADAPTACIONES PARA PANTALLAS Y CELULARES (BREAKPOINTS)
    ========================================================================== */

@media (max-width: 1100px) {
    .sidebar-wrapper { left: 10px; z-index: 9999; }
    .section-grid, .ff-grid-container, .ml-grid-container, .roblox-grid-container { grid-template-columns: repeat(3, 1fr) !important; }
}

@media (max-width: 650px) {
    .sidebar-wrapper { left: 5px; }
    .nav-tabs-container { flex-wrap: nowrap !important; gap: 3px; padding: 0 4px; width: 100%; box-sizing: border-box; }
    .nav-tab-btn { flex: 1 1 0px; padding: 8px 1px; font-size: 0.55rem; white-space: nowrap; letter-spacing: 0px; text-align: center; min-width: 0; }
    .section-grid, .ff-grid-container, .ml-grid-container, .roblox-grid-container { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; padding: 5px; }
    .item-info, .ff-package-card, .ml-package-card { padding: 10px; }
    .item-name { font-size: 0.85rem; min-height: 2.1rem; }
    .item-price { font-size: 0.85rem; }
    .item-price-soles { font-size: 0.9rem; }
    .item-rarity, .item-countdown { font-size: 0.65rem; padding: 3px 6px; top: 8px; }
    .item-countdown { right: 8px; }
    .item-rarity { left: 8px; }
    
    /* Pequeño ajuste para que el botón de WhatsApp no moleste en celular */
    .whatsapp-float { width: 50px; height: 50px; }
    .whatsapp-icon { width: 28px; height: 28px; }
}

/* ==========================================================================
    🟢 BOTÓN FLOTANTE DE WHATSAPP
    ========================================================================== */
.whatsapp-float {
    position: fixed;
    top: 50%;
    right: 15px; /* Pegado a la derecha */
    transform: translateY(-50%); /* Centrado exacto */
    width: 60px;
    height: 60px;
    background-color: #25d366;
    border-radius: 50%;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #32f072; /* Un verde mucho más vivo, brillante y alegre */
    transform: translateY(-50%) scale(1.1); 
    box-shadow: 0px 4px 15px rgba(37, 211, 102, 0.6); /* Añade un leve resplandor verde */
}

.whatsapp-icon {
    width: 35px;
    height: 35px;
    filter: drop-shadow(0 0 2px rgba(0,0,0,0.2));
}

/* 💬 Tooltip (Mensaje al pasar el mouse) */
.whatsapp-float::before {
    content: "Contactar por WhatsApp";
    position: absolute;
    right: 75px; /* Lo coloca a la izquierda del botón */
    background-color: #1e252b;
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    font-weight: bold;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateX(10px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

.whatsapp-float:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* Brillo naranja para artículos seleccionados */
.item-card.seleccionado {
    border: 2px solid #ff9800 !important;
    box-shadow: 0 0 15px #ff9800, 0 0 20px rgba(255, 152, 0, 0.4) !important;
    transform: scale(0.98);
    transition: all 0.2s ease;
}

/* ==========================================================================
    💓 ANIMACIÓN DE LATIDO PARA WHATSAPP
    ========================================================================== */
@keyframes latido-corazon {
    0% {
        transform: translateY(-50%) scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.8);
    }
    50% {
        transform: translateY(-50%) scale(1.15); /* Se hace 15% más grande */
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); /* El brillo se expande y desaparece */
    }
    100% {
        transform: translateY(-50%) scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Esta clase se activa con JavaScript solo cuando hay artículos seleccionados */
.latido-activo {
    animation: latido-corazon 1.5s infinite; /* Late infinitamente cada 1.5 segundos */
    background-color: #32f072 !important; /* Un verde aún más radiactivo/brillante */
}

/* ==========================================================================
    🛒 BOTÓN AÑADIR CARRITO (COLOR MOSTAZA)
    ========================================================================== */
.btn-anadir-carrito {
    width: 100%;
    background-color: #4E5466; /* Color mostaza base */
    color: #ffffff;
    border: none;
    padding: 8px 0;
    margin-top: 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px; /* Espacio entre el carrito y el texto */
    transition: background-color 0.2s ease, transform 0.1s ease;
}

/* Efecto al pasar el mouse por encima */
.btn-anadir-carrito:hover {
    background-color: #ff9800; /* Se ilumina un poco más */
}

/* Efecto al hacer clic (se hunde ligeramente) */
.btn-anadir-carrito:active {
    transform: scale(0.96);
}

/* Estilos del ícono SVG para que sea blanco y del tamaño correcto */
.btn-anadir-carrito .cart-icon {
    fill: #ffffff;
    width: 18px;
    height: 18px;
}

/* ==========================================================================
    🌟 MODAL DE AVISO (COPIA EXACTA)
    ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.activo {
    display: flex;
    opacity: 1;
}

/* Valores extraídos directamente de tu captura de pantalla */
.modal-content {
    background-color: #1C1C1C; /* Variable --card */
    border: 2px solid #ff7b00; /* Variable --orange */
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    max-width: 350px;
    width: 90%;
    box-shadow: 0 15px 30px rgba(255, 123, 0, 0.15); /* Sombra naranja tenue */
    transform: translateY(-20px); /* Efecto de aparición desde arriba */
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Al activarse, la caja baja suavemente a su posición original */
.modal-overlay.activo .modal-content {
    transform: translateY(0); 
}

.icono-advertencia {
    width: 55px;
    height: 55px;
    margin-bottom: 15px;
}

.modal-content p {
    font-weight: 400; /* Le quita lo grueso y lo deja en peso normal */
    font-size: 1rem; /* Tamaño de letra estándar */
    line-height: 1.5; /* Espaciado entre líneas para que se lea mejor */
    margin: 15px 0 20px 0; /* Separa el texto del icono arriba y del botón abajo */
    color: #ffffff; /* Asegura que el texto sea blanco */
}
#btn-cerrar-modal {
    background-color: #ff7b00; /* Variable --orange */
    color: #ffffff;
    border: none;
    padding: 12px 0;
    width: 100%;
    font-size: 1.05rem;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

#btn-cerrar-modal:hover {
    background-color: #e56f00; /* Naranja ligeramente más oscuro para el hover */
}

#btn-cerrar-modal:active {
    transform: scale(0.96);
}

/* ==========================================================================
   💰 VISTA PREVIA DEL TOTAL (ESQUINA INFERIOR DERECHA) - TAMAÑO REDUCIDO
   ========================================================================== */
.floating-total {
    position: fixed;
    bottom: 25px; 
    right: 25px; 
    background-color: #0b0f12; 
    border-radius: 8px; /* Un poco menos curvo para el nuevo tamaño */
    padding: 8px 16px; /* Reducimos el espacio interior a la mitad */
    display: none; 
    flex-direction: column;
    align-items: flex-end; 
    gap: 0px; 
    z-index: 9998; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8); /* Sombra más pequeña */
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.floating-total.activo {
    display: flex;
    animation: deslizarArriba 0.3s ease-out;
}

@keyframes deslizarArriba {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.total-label {
    color: #8a9a86; 
    font-size: 0.7rem; /* Reducido drásticamente (antes 1rem) */
    font-weight: 800;
    letter-spacing: 1px;
}

.soles-highlight {
    color: #ff7b00; 
    font-size: 1.1rem; /* Reducido drásticamente (antes 1.8rem) */
    font-weight: 700;
    font-family: 'Barlow', sans-serif; 
    letter-spacing: 0.5px;
}

/* ==========================================================================
   LOGO DEL ENCABEZADO
   ========================================================================== */
#shop-title {
    display: flex;
    align-items: center; /* Centra el logo y el texto verticalmente */
    gap: 12px; /* Espacio entre el logo y el nombre de la tienda */
    margin: 0;
}

.shop-logo {
    height: 40px; /* Ajusta este valor para hacer el logo más grande o más pequeño */
    width: auto;
    object-fit: contain;
}

/* ==========================================================================
   AJUSTE DE PESTAÑAS PARA MÓVILES (VISTA COMPACTA)
   ========================================================================== */
@media (max-width: 768px) {
    .nav-tabs-container {
        display: flex;
        justify-content: center;
        gap: 5px; /* Reducimos la separación entre los botones */
        width: 100%;
        padding: 0 10px; /* Un pequeño margen para que no choquen con la orilla de la pantalla */
        box-sizing: border-box;
    }

    .nav-tab-btn {
        flex: 1; /* Esto obliga a los 3 botones a repartirse el espacio en partes exactamente iguales */
        padding: 10px 2px; /* Reducimos el relleno interno para que ocupen menos espacio a lo alto */
        font-size: 0.75rem; /* Achicamos la letra lo suficiente para que "Mobile Legends" encaje bien */
        white-space: nowrap; /* Le prohíbe al texto partirse en dos líneas */
        text-align: center;
        border-radius: 6px; /* Bordes ligeramente más finos para pantallas pequeñas */
    }
}
/* ==========================================================================
   PIE DE PÁGINA (FOOTER LEGAL)
   ========================================================================== */
.legal-footer {
    background-color: #111418; 
    padding: 30px 20px; 
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 60px; 
    box-sizing: border-box; 
    
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    
    /* 🔥 NUEVO: Jalamos el footer hacia abajo para anular el relleno del contenedor */
    margin-bottom: -30px; 
}

.footer-brand {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin: 0 0 12px 0;
    text-transform: uppercase;
}

.footer-copy {
    color: #a0aec0; /* Un gris claro para el copyright */
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.footer-disclaimer {
    color: #4a5568; /* Gris más apagado para el texto legal (sutil pero legible) */
    font-size: 0.75rem;
    line-height: 1.6;
    max-width: 900px;
    margin: 0 auto;
}

/* ==========================================================================
   ESTILOS FUSIONADOS: MOBILE LEGENDS Y FREE FIRE (BLINDADO)
   ========================================================================== */

/* --- 1. CONTENEDOR PRINCIPAL: ANCHO Y CENTRADO ORIGINAL --- */
#tab-cuenta, 
#tab-juegos {
    max-width: 1100px;
    margin: 0 auto;
    padding-top: 20px;
    padding-bottom: 40px;
}

/* --- 2. BANNERS --- */
#tab-cuenta .top-banner-box,
#tab-juegos .top-banner-box {
    width: 100%;
    background-color: var(--fondo-secundario, #191821);
    border-radius: 10px;
    margin-bottom: 25px;
    box-sizing: border-box;
    overflow: hidden;
}

#tab-cuenta .top-banner-box img,
#tab-juegos .top-banner-box img {
    width: 100%;
    height: auto;
    display: block;
}

/* --- 3. CONTENEDORES DE ID Y SERVER --- */
#tab-cuenta .top-row,
#tab-juegos .top-row {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    margin-bottom: 25px;
}

/* FF: 1 campo */
#tab-juegos .id-box {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 265px;
}

/* ML: 2 campos */
#tab-cuenta .id-server-container {
    display: flex;
    width: 100%;
    max-width: 356px;
    gap: 12px;
}
#tab-cuenta .id-group { flex: 3; display: flex; flex-direction: column; }
#tab-cuenta .server-group { flex: 1.2; display: flex; flex-direction: column; }

#tab-cuenta .player-id-title,
#tab-juegos .player-id-title {
    color: #ffffff;
    font-size: 1.65rem;
    font-weight: 900; 
    text-transform: uppercase; 
    margin-bottom: 10px;
    text-align: left;
}

#tab-cuenta .player-id-field,
#tab-juegos .player-id-field {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 18px;
    font-size: 1rem;
    background-color: #1a1c23 !important; 
    border: 2px solid #2d313f !important;
    border-radius: 10px !important; 
    color: #ffffff !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    text-align: center !important; /* Fuerza los números al centro */
}

#tab-cuenta .player-id-field:focus,
#tab-juegos .player-id-field:focus {
    border: 2px solid #2d313f !important;
    background-color: #1a1c23 !important;
}

/* --- 4. CATÁLOGO COMPARTIDO Y REJILLAS (GRID) --- */
#tab-cuenta .shop-section,
#tab-juegos .shop-section { width: 100%; }

#tab-cuenta .section-title,
#tab-juegos .section-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    margin-top: 0;
    margin-bottom: 20px;
    text-align: left;
}

#tab-cuenta .section-grid,
#tab-juegos .section-grid { 
    display: grid; 
    gap: 15px; 
    width: 100%; 
}

/* Diferenciación de Columnas */
#tab-cuenta .section-grid { grid-template-columns: repeat(3, 1fr); }
#tab-juegos .section-grid { grid-template-columns: repeat(4, 1fr); }

#tab-cuenta .item-card,
#tab-juegos .item-card {
    background-color: var(--fondo-secundario, #191821);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    border: 2px solid transparent; 
}
#tab-cuenta .item-card:hover,
#tab-juegos .item-card:hover { transform: translateY(-4px); box-shadow: 0 6px 15px rgba(0, 0, 0, 0.6); }

#tab-cuenta .item-card.seleccionado,
#tab-juegos .item-card.seleccionado { border: 2px solid #ff0000; box-shadow: 0 0 15px rgba(255, 0, 0, 0.5); }

/* Fuerza bruta para que diamantes y precio estén lado a lado */
#tab-cuenta .item-info,
#tab-juegos .item-info { 
    padding: 14px 18px !important; 
    display: flex !important; 
    flex-direction: row !important;
    justify-content: space-between !important; 
    align-items: center !important; 
}

#tab-cuenta .item-price,
#tab-juegos .item-price { 
    display: flex; align-items: center; gap: 6px; 
    color: #ffffff; font-size: 1.1rem; font-weight: 500; 
    margin: 0 !important; /* Anula márgenes globales */
}
#tab-cuenta .item-price-soles,
#tab-juegos .item-price-soles { font-size: 1.1rem; color: #ffffff; font-weight: 500; }

/* ==========================================================================
   FUERZA BRUTA: BLOQUE A LA DERECHA (MANTENIENDO CENTRADO INTERNO)
   ========================================================================== */

#tab-cuenta .bottom-row,
#tab-juegos .bottom-row { 
    display: flex !important; 
    justify-content: flex-end !important; /* <--- ESTO MUEVE TODO EL BLOQUE A LA DERECHA */
    width: 100% !important; 
    margin-top: 25px !important; 
}

#tab-cuenta .checkout-box,
#tab-juegos .checkout-box { 
    display: flex !important; 
    flex-direction: column !important; 
    align-items: center !important; /* <--- ESTO PROTEGE EL CENTRADO INTERNO (TOTAL Y BOTÓN) */
    justify-content: center !important; 
    width: 100% !important; 
    max-width: 265px !important; 
    margin: 0 0 0 auto !important; /* <--- Refuerza que la caja se pegue a la derecha */
    padding: 0 !important;
}

/* ==========================================================================
   EL RESTO QUEDA EXACTAMENTE IGUAL PARA NO ROMPER LAS 2 LÍNEAS
   ========================================================================== */

#tab-cuenta .floating-total,
#tab-juegos .floating-total { 
    display: flex !important; 
    flex-direction: column !important; 
    align-items: center !important; 
    justify-content: center !important; 
    width: 100% !important; 
    text-align: center !important; 
    margin: 0 auto 8px auto !important; 
    padding: 0 !important;
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
}

#tab-cuenta .floating-total > div,
#tab-juegos .floating-total > div { 
    display: flex !important; 
    flex-direction: row !important; 
    align-items: center !important; 
    justify-content: center !important; 
    width: 100% !important; 
    text-align: center !important; 
    margin: 0 auto !important; 
    padding: 0 !important;
    gap: 6px !important; 
}

#tab-cuenta .diamonds-preview,
#tab-juegos .diamonds-preview { 
    margin-bottom: 5px !important;
    gap: 8px !important;
}

#tab-cuenta .total-label,
#tab-juegos .total-label,
#tab-cuenta .soles-highlight,
#tab-juegos .soles-highlight { 
    display: inline-block !important;
    text-align: center !important; 
    margin: 0 !important;
    padding: 0 !important;
}

/* Anulamos el comportamiento global flotante del total de Fortnite */
#tab-cuenta .floating-total,
#tab-juegos .floating-total { 
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    display: flex !important; 
    flex-direction: column !important; 
    align-items: center !important; /* Centra el texto sobre el botón */
    justify-content: center !important; 
    width: 100% !important; 
    text-align: center !important;
    margin-bottom: 8px; 
}

#tab-cuenta .diamonds-preview,
#tab-juegos .diamonds-preview { 
    display: flex !important; 
    align-items: center !important; 
    justify-content: center !important; 
    gap: 6px; 
    color: #ffffff; 
    font-size: 1.2rem; 
    font-weight: bold; 
    margin-bottom: 5px; 
    width: 100% !important;
}
#tab-cuenta .total-label,
#tab-juegos .total-label { color: #7d8b99; font-size: 1.1rem; font-weight: bold; text-align: center; }
#tab-cuenta .soles-highlight,
#tab-juegos .soles-highlight { color: #ff0000; font-size: 1.1rem; font-weight: bold; margin-left: 2px; }

/* Botón WhatsApp */
#tab-cuenta .whatsapp-box-btn,
#tab-juegos .whatsapp-box-btn {
    width: 100%; box-sizing: border-box; background-color: #179b4b; border-radius: 10px;
    padding: 14px 18px; display: flex; justify-content: center; align-items: center;
    gap: 10px; text-decoration: none; color: #ffffff; font-weight: bold; font-size: 1.1rem;
    margin-top: 5px; transition: all 0.3s ease;
}
#tab-cuenta .whatsapp-box-btn.latido-activo,
#tab-juegos .whatsapp-box-btn.latido-activo { background-color: #25d366 !important; animation: radar-pulse-ff 3s infinite ease-in-out; }

@keyframes radar-pulse-ff {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); transform: scale(1); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); transform: scale(1.02); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); transform: scale(1); }
}

/* --- 6. MODALES Y RESPONSIVO --- */
@media (max-width: 900px) {
    #tab-cuenta .section-grid, #tab-juegos .section-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
    #tab-cuenta .section-grid { grid-template-columns: repeat(1, 1fr); gap: 8px; }
    #tab-juegos .section-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    
    #tab-cuenta .item-card, #tab-juegos .item-card { padding: 8px; }
    #tab-cuenta .item-price, #tab-cuenta .item-price-soles,
    #tab-juegos .item-price, #tab-juegos .item-price-soles { font-size: 0.85rem; }
    
    #tab-cuenta .top-row, #tab-juegos .top-row { justify-content: center; } 
    #tab-cuenta .bottom-row, #tab-juegos .bottom-row { justify-content: center; } 
    #tab-cuenta .id-server-container, #tab-juegos .id-box, 
    #tab-cuenta .checkout-box, #tab-juegos .checkout-box { max-width: 100%; }
}

/* ==========================================================================
   CORRECCIÓN DEFINITIVA: FOOTER ANCLADO Y EXPANDIDO AL 100%
   ========================================================================== */
body {
    overflow-x: hidden; /* Previene barras de desplazamiento horizontales por el estiramiento */
}

#tab-cuenta, 
#tab-juegos {
    position: relative; 
    min-height: calc(100vh - 100px); 
    padding-bottom: 260px !important; /* Aumentamos a 260px para proteger el botón en celulares */
}

#tab-cuenta .legal-footer, 
#tab-juegos .legal-footer {
    position: absolute;
    bottom: 0;
    /* --- MAGIA PARA ROMPER LA CAJA DE 1100px --- */
    left: 50%;
    transform: translateX(-50%);
    width: 100vw !important; 
    margin: 0 !important;
    box-sizing: border-box;
}
