/* --- Reseteo y Estilos Generales --- */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #f4f4f4;
}
.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}
a {
    color: #0056b3;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
img {
    max-width: 100%;
    height: auto;
    display: block; /* Ayuda a prevenir espacios inesperados */
}

/* --- Header y Navegación --- */
.header {
    background-color: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo img {
    max-height: 60px;
}
.nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
}
.nav li {
    margin-left: 25px;
}
.nav a {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    padding: 10px 5px;
}
.nav a:hover {
    color: #d9534f;
    text-decoration: none;
}

/* --- Contenido Principal --- */
main {
    background-color: #fff;
    min-height: 70vh;
    padding: 5%; /* Tu padding agregado */
}

/* --- Slider de Banners --- */
.slider-container {
    position: relative; 
    width: 100%;
    padding-top: 40%;  
    background-color: #ffffff;
    overflow: hidden;
}
.slider-image {
    position: absolute; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 1.5s ease-in-out; 
}
.slider-image.active {
    opacity: 1; 
}

/* --- Contenido de las páginas (debajo del slider o header) --- */
.content-page {
    padding: 40px 0;
}
.content-page h1, .content-page h2 {
    color: #0275d8;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.content-page p {
    line-height: 1.6;
    margin-bottom: 15px;
}
.content-page ul {
    line-height: 1.8;
    padding-left: 20px;
}

/* --- Galería --- */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}
.gallery img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border: 1px solid #ddd;
    box-shadow: 2px 2px 5px #eee;
    transition: transform 0.2s;
    cursor: pointer;
}
.gallery img:hover {
    transform: scale(1.05);
}

/* --- Footer --- */
.footer {
    background-color: #343a40;
    color: #fff;
    padding: 40px 0 20px 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.footer-column h4 {
    color: #fff;
    border-bottom: 2px solid #495057;
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.footer-column p {
    margin: 5px 0;
}
.footer a {
    color: #adb5bd;
}
.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #495057;
    font-size: 14px;
}
.footer-bottom a {
    color: #fff;
    font-weight: bold;
}

/* --- Botón Flotante de WhatsApp --- */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25D366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}
.whatsapp-float:hover {
    background-color: #128C7E;
}

/* --- Estilos para Productos --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}
.product-card {
    border: 1px solid #ddd;
    padding: 15px;
    text-align: center;
    transition: box-shadow 0.3s;
}
.product-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.product-card h3 {
    margin-top: 0;
}
.product-card a {
    display: block;
    background-color: #0275d8;
    color: #fff;
    padding: 10px;
    margin-top: 15px;
    border-radius: 4px;
}
.product-card a:hover {
    background-color: #025aa5;
    text-decoration: none;
}

/* --- ESTILOS LIGHTBOX (CORREGIDO) --- */
.lightbox-overlay {
    display: none; /* Oculto por defecto y sin afectar al layout */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}
.lightbox-overlay.active {
    display: flex; /* La clase 'active' lo hace visible y lo centra */
}
.lightbox-content {
    max-width: 90%;
    max-height: 85%;
    box-shadow: 0 0 25px rgba(0,0,0,0.8);
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}
.lightbox-close:hover {
    color: #ccc;
}


/* --- Media Queries para Responsividad --- */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
    }
    .nav ul {
        flex-direction: column;
        width: 100%;
        margin-top: 15px;
    }
    .nav li {
        margin: 5px 0;
        text-align: center;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .slider-container {
        height: 250px;
    }
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    .gallery img {
        height: 100px;
    }
}