/* RESET BÁSICO */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #0F0F0F; /* Fondo muy oscuro */
    color: #FFFFFF; /* Texto blanco por defecto */
    line-height: 1.6;
}

/* 1. HEADER Y LOGO */
header {
    text-align: center;
    padding: 40px 20px 20px;
    background-color: #000000;
    border-bottom: 2px solid #FF0000; /* Línea de color de acento */
}

/* Estilo para el Título de Texto Principal */
.main-title {
    font-family: 'Oswald', sans-serif;
    font-size: 3em;
    color: #FF0000; /* Rojo vibrante */
    letter-spacing: 5px;
    margin-bottom: 15px;
}

/* Estilo para la imagen del encabezado (header-big.png) */
.header-image {
    max-width: 280px; /* Tamaño similar al ancho de un producto */
    width: 90%; 
    height: auto;
    margin: 0 auto 10px;
    display: block;
}

/* Slogan */
.tagline {
    color: #AAAAAA;
    font-style: italic;
    margin-top: 10px;
}

/* 2. CATÁLOGO Y GRID */
.catalogue-grid {
    padding: 40px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Contenedor para el Título y los Iconos */
.section-title-container {
    grid-column: 1 / -1; 
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.section-title {
    color: #FFD700;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 5px;
    text-transform: uppercase;
    margin: 0 15px;
    font-size: 1.8em;
}

/* Estilo para el icono (icon.png) */
.section-icon {
    width: 25px;
    height: 25px;
    object-fit: contain;
}

.product-item {
    background-color: #1A1A1A;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* El enlace ahora es el elemento principal del producto */
.product-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-item:hover .product-link {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.5);
}

/* Ajuste para que las imágenes de los productos se vean completas (contain) */
.product-image {
    width: 100%;
    min-height: 250px; 
    object-fit: contain; 
    background-color: #000000; 
    display: block;
    transition: opacity 0.3s ease;
}

.product-item:hover .product-image {
    opacity: 0.85;
}

.product-info {
    padding: 15px;
    text-align: center;
}

.product-name {
    color: #FFD700;
    margin-bottom: 5px;
    font-size: 1.2em;
}

.product-description {
    color: #CCCCCC;
    font-size: 0.9em;
}

/* 3. FOOTER Y CONTACTO */
footer {
    text-align: center;
    padding: 40px 20px;
    background-color: #000000;
    border-top: 2px solid #FF0000;
    margin-top: 40px;
}

.contact-title {
    color: #FFFFFF;
    margin-bottom: 20px;
    font-family: 'Oswald', sans-serif;
}

.whatsapp-button {
    display: inline-block;
    background-color: #25D366;
    color: #000000;
    padding: 15px 15px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
}

.whatsapp-button:hover {
    background-color: #128C7E;
    color: #FFFFFF;
    transform: translateY(-2px);
}

.whatsapp-icon {
    font-size: 1.2em;
    margin-right: 8px;
}

.footer-text {
    color: #888888;
    font-size: 0.8em;
    margin-top: 5px;
}

/* Estilo para el logo en el pie de página (logo.png) */
.footer-logo {
    width: 60px;
    height: auto;
    margin-top: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* ======================================= */
/* 4. LIGHTBOX (Ventana de Detalle) */
/* ======================================= */
.lightbox {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.95); 
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox:target {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    background-color: #1A1A1A;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    /* Por defecto, apilado (Mejor para móviles) */
    flex-direction: column; 
    max-height: 90vh;
    overflow-y: auto; /* Permite scroll en la ventana si el contenido es grande */
}

/* Estilos de la imagen en el Lightbox */
.lightbox-content img {
    width: 100%;
    max-height: 50vh; /* Máximo 50% del alto de la ventana en móviles */
    object-fit: contain; 
    background-color: #000000;
}

/* Estilos de los detalles (Texto y Botón) */
.lightbox-details {
    padding: 20px;
    text-align: center;
}

.lightbox-details h3 {
    color: #FFD700;
    font-size: 1.5em;
    margin-bottom: 10px;
}

.lightbox-whatsapp-btn {
    display: block;
    width: 90%;
    margin: 20px auto 0;
    padding: 12px;
    background-color: #25D366;
    color: #000000;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.2s;
}

/* Botón de cierre */
.close-btn {
    position: absolute;
    top: 10px; /* Subido para mejor visibilidad */
    right: 15px;
    color: #FF0000;
    font-size: 30px;
    text-decoration: none;
    line-height: 1;
    z-index: 10000;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #FFFFFF;
}

/* MEDIA QUERIES para tabletas y escritorio */
@media (min-width: 768px) {
    .lightbox-content {
        /* Lado a lado en pantallas grandes */
        flex-direction: row; 
        max-height: 80vh; 
    }

    .lightbox-content img {
        width: 50%;
        max-height: none; /* Eliminar restricción de altura */
    }

    .lightbox-details {
        width: 50%;
        text-align: left;
    }
}