:root {
    --bg-dark: #050505;
    --bg-card: #121212;
    --electric-blue: #00f3ff;
    --electric-glow: rgba(0, 243, 255, 0.4);
    --text-main: #e0e0e0;
    --border-color: #333;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Rajdhani', sans-serif;
    overflow-x: hidden;
}

h1, h2, h3 { font-family: 'Orbitron', sans-serif; text-transform: uppercase; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }

/* --- HEADER --- */
header {
    background: rgba(5, 5, 5, 0.95);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}
.logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 10px var(--electric-blue);
    display: flex; align-items: center; gap: 10px;
}
.logo i { color: var(--electric-blue); font-size: 2.2rem; }

/* --- VISTA PRINCIPAL (MENÚ DE SUBSECCIONES) --- */
#main-view { padding: 40px 0; }

.section-header {
    margin-bottom: 30px;
    border-left: 5px solid var(--electric-blue);
    padding-left: 15px;
}
.section-header h2 { color: var(--electric-blue); text-shadow: 0 0 10px var(--electric-glow); }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

/* Tarjeta de Categoría (Menú Principal) */
.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}
.category-card:hover {
    border-color: var(--electric-blue);
    box-shadow: 0 0 15px var(--electric-glow);
    transform: translateY(-5px);
}
.category-card img {
    width: 100%; height: 140px; object-fit: cover; margin-bottom: 15px;
    filter: grayscale(50%);
}
.category-card:hover img { filter: grayscale(0%); }
.category-card h3 { font-size: 1rem; color: #fff; }

/* --- VISTA DE PRODUCTOS (PANTALLA COMPLETA) --- */
#product-view {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: var(--bg-dark);
    z-index: 200;
    overflow-y: auto;
    display: none;
    padding-top: 80px;
}

.back-bar {
    position: fixed; top: 70px; left: 0; width: 100%;
    background: rgba(18, 18, 18, 0.9);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 20px;
    z-index: 210;
    display: flex; align-items: center; gap: 15px;
    backdrop-filter: blur(5px);
}

.btn-back {
    background: var(--electric-blue);
    color: #000;
    padding: 10px 25px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    display: flex; align-items: center; gap: 8px;
    font-family: 'Orbitron', sans-serif;
    transition: 0.3s;
    box-shadow: 0 0 10px var(--electric-glow);
}
.btn-back:hover { background: #fff; box-shadow: 0 0 20px #fff; }

.current-category-title { font-size: 1.5rem; color: #fff; }

.products-grid-container {
    max-width: 1400px; margin: 100px auto 50px; padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* Tarjeta de Producto Individual */
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    transition: 0.3s;
}
.product-card:hover { border-color: var(--electric-blue); box-shadow: 0 0 20px rgba(0,0,0,0.5); }

.product-img { width: 100%; height: 200px; object-fit: cover; }

.product-info { padding: 20px; }
.product-name { font-size: 1.2rem; color: #fff; margin-bottom: 5px; font-weight: bold; }
.product-price { color: var(--electric-blue); font-size: 1.4rem; font-weight: 700; }

/* Botón Interactivo (?) en el producto */
.info-btn {
    position: absolute;
    top: 10px; right: 10px;
    width: 35px; height: 35px;
    background: var(--electric-blue);
    color: #000;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 0 10px var(--electric-blue);
    z-index: 2;
}
.info-btn:hover { transform: scale(1.1); background: #fff; }

/* --- MODAL --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    display: none;
    justify-content: center; align-items: center;
}
.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--electric-blue);
    padding: 30px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 0 30px var(--electric-glow);
    position: relative;
}
.modal-close { position: absolute; top: 10px; right: 15px; font-size: 1.5rem; color: #fff; cursor: pointer; }
.modal-title { color: var(--electric-blue); margin-bottom: 15px; font-family: 'Orbitron'; font-size: 1.5rem; }
.modal-text { line-height: 1.6; color: #ccc; }

@media (max-width: 768px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
    .products-grid-container { grid-template-columns: 1fr; margin-top: 140px; }
    .back-bar { top: 60px; flex-direction: column; align-items: flex-start; gap: 10px; }
    .btn-back { width: 100%; justify-content: center; }
    /* --- ESTILOS DEL BANNER DINÁMICO --- */

.dynamic-banner {
    /* Altura del banner */
    height: 140px;
    
    /* Centrado del texto */
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* Fondo de colores que se mueven (Efecto difuminado dinámico) */
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientBG 10s ease infinite;
    
    margin-bottom: 30px; /* Espacio debajo del banner */
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); /* Sombra suave */
}

/* Animación del fondo */
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#dynamic-text {
    color: white;
    font-family: 'Orbitron', sans-serif; /* Tu fuente futurista */
    font-size: 1.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.6); /* Sombra de texto para legibilidad */
    text-align: center;
    padding: 0 20px; /* Margen interno para que no toque los bordes en móviles */
    
    /* Transición suave para el cambio de texto */
    transition: opacity 0.8s ease-in-out;
    opacity: 1;
}

/* Clase oculta para el efecto de parpadeo al cambiar texto */
.fade-out {
    opacity: 0 !important;
}
}

