/* --- BASE --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Segoe UI', Roboto, sans-serif;
    background: radial-gradient(circle at top, #1a0000 0%, #050505 100%);
    color: #ffffff;
    overflow-x: hidden;
}

/* --- HEADER CONFIGURADO COMO BANNER COMPLETO --- */
header {
    background: #0b1116; /* Combina exacto con la textura del logo nuevo */
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid yellow;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.contenedor-banner {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: #0b1116;
}

.logo-banner {
    width: 100%;
    height: auto;
    max-height: 250px; /* Evita que ocupe de más en monitores gigantes */
    object-fit: cover; /* Hace que el fondo gris rellene de punta a punta los bordes laterales */
    display: block;
}

/* --- MENÚ DE NAVEGACIÓN --- */
nav {
    width: 100%;
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    padding: 12px 0;
}

nav ul { 
    display: flex; 
    list-style: none; 
    gap: 35px; 
}

nav a { 
    color: white; 
    text-decoration: none; 
    font-weight: bold; 
    text-transform: uppercase; 
    font-size: 0.95rem; 
    transition: 0.3s;
    position: relative;
    padding: 5px 10px;
}

nav a:hover { color: yellow; }
nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: yellow;
    transition: width 0.3s ease;
}
nav a:hover::after { width: 100%; }

/* --- SISTEMA DE PÁGINAS (ANIMACIONES) --- */
.seccion-pagina {
    display: none; 
    opacity: 0;
    min-height: 80vh;
    padding: 40px 5%;
}

.seccion-pagina.activa {
    display: block;
    animation: aparecerSuave 0.6s forwards;
}

@keyframes aparecerSuave {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- GRILLAS Y TARJETAS --- */
.contenedor-grilla, .contenedor-as {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding-top: 30px;
}

.tarjeta-producto {
    background: #111;
    border: 1px solid #333;
    border-radius: 12px;
    overflow: hidden;
    transition: 0.3s;
    text-align: center;
}

.tarjeta-producto:hover { transform: translateY(-5px); border-color: yellow; }

/* Efecto suave para cuando cambia el SRC de la imagen */
.tarjeta-producto img.img-principal-producto { 
    width: 100%; 
    aspect-ratio: 1/1; 
    object-fit: cover;
    transition: opacity 0.2s ease-in-out;
}
.tarjeta-producto img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }

/* --- ESTILOS DE VENTA --- */
.info-venta { padding: 15px; }
.info-venta h3 { font-size: 1.1rem; color: yellow; margin-bottom: 10px; }
.info-venta p { font-size: 0.85rem; color: #ccc; margin-bottom: 15px; min-height: 40px; }
.precio { display: block; font-size: 1.3rem; font-weight: bold; margin-bottom: 10px; color: #fff; }
.estado { font-size: 0.75rem; text-transform: uppercase; font-weight: bold; margin-bottom: 15px; display: block; }
.no-disponible { color: #ff4444; }

.btn-comprar {
    display: block;
    background: yellow;
    color: black;
    padding: 12px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 6px;
    transition: 0.3s;
}

.btn-comprar.agotado { background: #444; color: #888; cursor: not-allowed; pointer-events: none; }
.sin-stock-visual img { filter: grayscale(1) opacity(0.6); }

/* --- FOOTER Y VARIOS --- */
h2 { text-align: center; color: yellow; text-transform: uppercase; letter-spacing: 2px; }
footer { text-align: center; padding: 40px; background: #000; color: #666; margin-top: 50px; }

/* --- LIGHTBOX --- */
.lightbox { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); display: none; justify-content: center; align-items: center; z-index: 2000; }
.lightbox.mostrar { display: flex; }
.lightbox-img { max-width: 90%; max-height: 85%; border: 2px solid yellow; }
.cerrar { position: absolute; top: 20px; right: 30px; font-size: 40px; color: white; cursor: pointer; }

/* --- SELECTOR DE COLORES TIENDA --- */
.contenedor-selector-color {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.contenedor-selector-color label {
    color: #ccc;
    font-weight: 500;
}

.contenedor-selector-color select {
    background: #222;
    color: #fff;
    border: 1px solid #444;
    padding: 6px 10px;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    transition: 0.3s;
}

.contenedor-selector-color select:focus, 
.contenedor-selector-color select:hover {
    border-color: yellow;
}

/* --- RESPONSIVIDAD PARA MÓVILES --- */
@media (max-width: 600px) {
    .logo-banner {
        max-height: 140px; /* Queda compacto y perfecto en celulares sin comerse la pantalla */
        object-fit: cover;
    }

    nav ul {
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav a {
        font-size: 0.8rem;
        padding: 4px 6px;
    }

    .contenedor-grilla, .contenedor-as {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
    }

    .subtitulo-tienda {
        color: #ffffff;
        font-size: 1.4rem;
        margin: 40px 0 10px 0;
        border-left: 4px solid yellow;
        padding-left: 10px;
        text-transform: uppercase;
        letter-spacing: 1px;
    }
}
/* --- ESTILOS DEL CARRITO --- */
.contador-carrito {
    background: yellow;
    color: black;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    margin-left: 5px;
}

#modal-carrito { background: rgba(0,0,0,0.95); }
.contenido-carrito {
    background: #111;
    padding: 25px;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    border: 1px solid yellow;
    color: white;
    max-height: 80vh;
    overflow-y: auto;
}

.item-carrito {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    padding: 10px 0;
}

.btn-eliminar { background: #ff4444; border: none; color: white; padding: 5px 10px; cursor: pointer; border-radius: 4px; }

/* Ajustes para el contenedor y el logo */
.contenedor-banner {
    width: 100%;
    text-align: center;
    padding: 20px 0;
}

.logo-banner {
    max-width: 100%;       /* Nunca será más ancho que la pantalla */
    width: 400px;          /* Tamaño ideal en PC (puedes ajustarlo) */
    height: auto;          /* Mantiene la proporción para que no se vea estirado */
    display: block;
    margin: 0 auto;        /* Centrado automático */
}

/* Regla especial para móviles */
@media (max-width: 600px) {
    .logo-banner {
        width: 250px;      /* Tamaño más compacto en celulares */
    }
}

/* --- ESTILO PROFESIONAL PARA BOTONES DE FILTRO --- */
.contenedor-filtros {
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-filtro {
    background: #1a1a1a;
    color: #ffffff;
    border: 1px solid #444;
    padding: 10px 20px;
    border-radius: 25px; /* Bordes redondeados modernos */
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.btn-filtro:hover {
    background: yellow;
    color: black;
    border-color: yellow;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 255, 0, 0.2);
}

.btn-filtro:active {
    transform: translateY(0);
}