:root {
    --bg-color: #0d1117;
    --card-bg: #161b22;
    --text-color: #c9d1d9;
    --neon-cyan: #00f0ff;
    --neon-purple: #b026ff;
    --border-radius: 12px;
}

/* =========================================
   ESTILOS GLOBALES Y FONDO DE IMAGEN
========================================= */
body {
    margin: 0;
    padding: 0;
    /* Mantenemos el color oscuro sólido de base */
    background-color: var(--bg-color); /* #0d1117 */
    color: var(--text-color);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    /* VITAL: El body debe tener posición relativa para el fondo */
    position: relative; 
}

/* El Fondo de Imagen Sutil */
body::before {
    content: "";
    /* Posición FIJA para que no se mueva al hacer scroll */
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Ruta a tu imagen */
    background-image: url('../img/bg.jpg'); 
    background-size: cover; /* Cubrir toda la pantalla sin deformarse */
    background-position: center;
    background-repeat: no-repeat;
    /* OPACIDAD BAJA Y SUTIL (5%) */
    opacity: 0.05; 
    /* Colocarse por detrás de todo (Z-index negativo) */
    z-index: -1; 
    /* Asegurar que no interfiere con los clics */
    pointer-events: none; 
}

.header::-webkit-scrollbar { display: none; }

.cat-btn {
    background: transparent;
    color: var(--text-color);
    border: 1px solid #30363d;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: bold;
    transition: all 0.3s ease;
}

.cat-btn.active {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.container {
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.product-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid #30363d;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:active, .product-card:hover {
    border-color: var(--neon-purple);
    box-shadow: 0 0 15px rgba(176, 38, 255, 0.3);
    transform: translateY(-2px);
}

.media-container {
    position: relative;
    width: 100%;
    height: 150px;
    background: #000;
}

.media-container img, .media-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    color: var(--neon-cyan);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    border: 1px solid var(--neon-cyan);
}

.no-media {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #30363d;
}

.product-info {
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-cat {
    font-size: 11px;
    color: var(--neon-purple);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.product-desc {
    font-size: 12px;
    color: #8b949e;
    margin-bottom: 12px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2; /* <--- Añade esta línea */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.variant-select {
    width: 100%;
    background: #0d1117;
    color: var(--neon-cyan);
    border: 1px solid #30363d;
    padding: 8px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 13px;
    outline: none;
    cursor: pointer;
}

.variant-select:focus {
    border-color: var(--neon-cyan);
}

/* =========================================
   ESTILOS DEL MODAL (TARJETA FLOTANTE)
========================================= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: none; /* Oculto por defecto */
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-content {
    background-color: var(--card-bg);
    border: 1px solid var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal-content::-webkit-scrollbar { display: none; }

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.6);
    color: var(--text-color);
    border: 1px solid #30363d;
    border-radius: 50%;
    width: 30px; height: 30px;
    font-size: 16px;
    cursor: pointer;
    z-index: 10;
    transition: 0.2s;
}

.close-btn:hover { color: var(--neon-purple); border-color: var(--neon-purple); }

/* Visor Multimedia del Modal */
.slider-container {
    position: relative;
    width: 100%;
    height: 250px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #30363d;
}

#modalMedia img, #modalMedia video {
    width: 100%;
    height: 250px;
    object-fit: contain; /* Para ver la foto entera sin recortes */
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(13, 17, 23, 0.7);
    color: var(--neon-cyan);
    border: 1px solid var(--neon-cyan);
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 8px;
    font-size: 18px;
    z-index: 5;
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }
.slider-btn:active { background: var(--neon-cyan); color: #000; }

.modal-info { padding: 20px; }

.product-desc-modal {
    font-size: 14px;
    color: #c9d1d9;
    line-height: 1.5;
    margin-bottom: 20px;
}

.price-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #30363d;
}

/* Bloquear visualmente el botón de descarga en navegadores Chrome/Telegram */
video::-internal-media-controls-download-button {
    display:none;
}

video::-webkit-media-controls-enclosure {
    overflow:hidden;
}

video::-webkit-media-controls-panel {
    width: calc(100% + 30px); /* Desplaza el botón de descarga fuera de la vista */
}

/* =========================================
   HEADER DE MARCA (MINIMALISTA)
========================================= */

.brand-main {
    margin: 0;
    font-size: 38px; /* Tamaño grande pero equilibrado */
    font-weight: 800;
    color: #ffffff; /* Blanco puro */
    letter-spacing: 4px; /* Un poco de aire entre letras */
    line-height: 1;
    text-shadow: none; /* Sin efectos de brillo */
}

.brand-sub {
    display: block;
    font-size: 10px; /* BCN mucho más pequeño */
    color: #8b949e; /* Un gris claro para que no compita con el blanco */
    letter-spacing: 6px; 
    margin-top: 4px;
    font-weight: 600;
    text-transform: uppercase;
    text-shadow: none; /* Sin efectos */
}

/* Ajuste para que el header de categorías se pegue justo debajo */

.brand-header {
    text-align: center;
    padding: 15px 0;
    /* Cambiamos el color sólido #161b22 por una versión semi-transparente */
    background-color: rgba(22, 27, 34, 0.85); /* 85% de opacidad del color gris */
    border-bottom: 1px solid #30363d;
}

.header {
    position: sticky;
    top: 0;
    /* Cambiamos el fondo para que deje ver la imagen sutilmente */
    background: rgba(13, 17, 23, 0.7); /* 70% opacidad del fondo oscuro */
    backdrop-filter: blur(10px); /* Mantenemos el desenfoque */
    padding: 12px;
    z-index: 100;
    border-bottom: 1px solid #30363d;
}