/* =================================================================
======================= HOJA DE ESTILOS GENERAL =======================
================================================================== */

/* --- Estilos Globales y Fuentes --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&family=Roboto:wght@400;500&display=swap');

:root {
    --color-primario: #5A2A82; /* Morado Obispo del logo */
    --color-secundario: #FFD700; /* Amarillo Sol (ajustado para mejor visibilidad) */
    --color-texto: #333333;
    --color-fondo: #FFFFFF;
    --color-fondo-seccion: #f9f9f9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--color-texto);
    background-color: var(--color-fondo);
    padding-top: 80px; /* Espacio para el header fijo */
}

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    color: var(--color-primario);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

main section {
    padding: 80px 0;
}

/* Espaciado específico para evitar superposiciones */
#preview-productos {
    padding-bottom: 40px;
}

/* --- Barra de Navegación (Header) --- */
.header {
    background-color: var(--color-fondo);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo img {
    height: 50px;
}

.nav-menu a {
    color: var(--color-primario);
    text-decoration: none;
    font-weight: 500;
    margin-left: 25px;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.nav-menu a:hover {
    color: var(--color-secundario);
}

/* Estilo para el link de la página activa */
.nav-menu a.active {
    font-weight: 700;
    border-bottom-color: var(--color-secundario);
}

/* --- Estilos para la Página de Inicio (Hero) --- */
.hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('imagenes/flyerpan.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    height: calc(100vh - 80px); /* Restamos la altura del header */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('imagenes/flyerpan.jpeg');
    background-size: cover;
    background-position: center;
    filter: blur(10px);
    z-index: -1;
}

.hero-content h1 {
    font-size: 3.5rem; color: white; margin-bottom: 20px;
}
.hero-content p {
    font-size: 1.2rem; margin-bottom: 30px;
}
.cta-button {
    background-color: var(--color-primario); color: white; padding: 15px 30px; text-decoration: none; border-radius: 5px; font-weight: bold; font-family: 'Montserrat', sans-serif; transition: background-color 0.3s ease;
}
.cta-button:hover {
    background-color: var(--color-secundario); color: var(--color-texto);
}

/* --- Estilos Generales de Secciones --- */
.section-title {
    text-align: center; font-size: 2.5rem; margin-bottom: 50px;
}

/* --- Estilos para las demás páginas --- */
.page-header {
    background-color: var(--color-fondo-seccion);
    text-align: center;
    padding: 50px 20px;
}

.about-content {
    display: flex; align-items: center; gap: 50px;
}
.about-image { flex: 1; }
.about-image img { width: 100%; border-radius: 10px; }
.about-text { flex: 1; }

.products-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px;
}
.product-card {
    background-color: white; border-radius: 10px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); overflow: hidden; text-align: center;
}
.product-card img { width: 100%; height: 200px; object-fit: cover; }
.product-card-content { padding: 20px; }
.product-card h3 { margin-bottom: 10px; }

.map-container {
    position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; background: #eee; border-radius: 10px;
}
.map-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.locations-list { text-align: center; margin-top: 30px; }

.contact-wrapper { display: flex; gap: 40px; flex-wrap: wrap; }
.contact-form, .contact-info { flex: 1; min-width: 300px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 500; }
.form-group input, .form-group textarea { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 5px; font-size: 1rem; }
.btn-enviar { display: block; width: 100%; padding: 15px; background-color: var(--color-primario); color: white; border: none; border-radius: 5px; font-size: 1.1rem; font-weight: bold; cursor: pointer; transition: background-color 0.3s ease; }
.btn-enviar:hover { background-color: #482269; }

/* --- Estilos para iconos de contacto --- */
.contact-info p i {
    color: var(--color-primario);
    margin-right: 8px;
    width: 20px;
}

/* --- Footer --- */
.footer {
    background-color: var(--color-primario); 
    color: white; 
    text-align: center; 
    padding: 30px 0;
    margin-top: auto;
    position: relative;
    z-index: 1;
}

/* --- Botón Flotante de WhatsApp --- */
.whatsapp-flotante {
    position: fixed; width: 60px; height: 60px; bottom: 30px; right: 30px; background-color: #25D366; border-radius: 50px; text-align: center; box-shadow: 2px 2px 6px rgba(0,0,0,0.4); z-index: 100; transition: transform 0.3s ease;
}
.whatsapp-flotante:hover { transform: scale(1.1); }
.whatsapp-flotante img { width: 36px; margin-top: 12px; }

/* =================================================================
================== ESTILOS ADICIONALES PARA LA NUEVA HOME ===========
================================================================== */

/* --- Estilos para las Secciones de Vista Previa --- */
#preview-nosotros {
    background-color: var(--color-fondo-seccion);
}

.preview-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.preview-text {
    flex: 1;
    order: 1; /* Por defecto, el texto va primero */
}

.preview-image {
    flex: 1;
}

.preview-image img {
    width: 100%;
    border-radius: 10px;
}

/* Botón secundario para las vistas previas */
.btn-secondary {
    display: inline-block;
    margin-top: 20px;
    background-color: transparent;
    color: var(--color-primario);
    border: 2px solid var(--color-primario);
    padding: 12px 28px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: var(--color-primario);
    color: white;
}

/* Centrar botón en la sección de productos */
.section-cta {
    text-align: center;
}

/* Estilo para la llamada a la acción de Puntos de Venta */
#preview-cta {
    background-color: var(--color-fondo-seccion);
    color: var(--color-texto);
    text-align: center;
    margin-top: 0;
    padding: 60px 0;
}

#preview-cta h2 {
    color: var(--color-primario);
}

#preview-cta .cta-button {
    background-color: var(--color-primario);
    color: white;
}
#preview-cta .cta-button:hover {
    background-color: var(--color-secundario);
    color: var(--color-texto);
}

/* Ajustes específicos para el footer del index */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    padding-bottom: 20px;
}

#preview-cta {
    margin-bottom: 0;
    padding-bottom: 40px;
}


/* Ajustes para móviles */
@media (max-width: 768px) {
    .preview-content {
        flex-direction: column;
    }
    .preview-text {
        order: 2; /* En móvil, el texto va después de la imagen */
    }
}/* =================================================================
=========== ESTILOS ADICIONALES PARA PÁGINA 'NOSOTROS' ==========
================================================================== */

.philosophy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 50px;
}

.philosophy-card {
    background-color: var(--color-fondo-seccion);
    padding: 30px;
    border-radius: 10px;
}

.philosophy-card h3 {
    margin-bottom: 15px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 30px;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.value-item {
    background-color: var(--color-fondo);
    padding: 20px;
    border-radius: 8px;
    border-left: 5px solid var(--color-secundario);
}

/* --- Estilos para Carrusel de Productos --- */
.product-carousel {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
}

.carousel-container {
    display: flex;
    overflow: hidden;
    border-radius: 10px;
    position: relative;
    width: 100%;
    justify-content: center;
    align-items: center;
}

.carousel-slide {
    min-width: 100%;
    flex-shrink: 0;
    transition: transform 0.5s ease;
    display: none;
}

.carousel-slide.active {
    display: block;
}

/* Hacer que las imágenes del carrusel se vean COMPLETAS sin recortarse */
.product-card .carousel-slide img {
    width: 100% !important;
    height: 200px !important;
    object-fit: contain !important;
    cursor: pointer;
    background-color: #f8f8f8;
    display: block;
    margin: 0 auto;
}

.carousel-slide img:hover {
    opacity: 0.9;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 18px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.carousel-nav:hover {
    background-color: rgba(0,0,0,0.7);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.carousel-dots {
    text-align: center;
    margin-top: 15px;
}

.dot {
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: var(--color-primario);
}

/* --- Modal para expandir imagen --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
}

.modal-carousel-container {
    position: relative;
    width: 90%;
    max-width: 800px;
    margin: auto;
    top: 50%;
    transform: translateY(-50%);
}

.modal-content {
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.7);
    color: white;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 24px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.modal-nav:hover {
    background-color: rgba(0,0,0,0.9);
}

.modal-prev {
    left: -60px;
}

.modal-next {
    right: -60px;
}

.modal-dots {
    text-align: center;
    margin-top: 20px;
}

.modal-dot {
    height: 15px;
    width: 15px;
    margin: 0 8px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.modal-dot.active {
    background-color: white;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.close:hover {
    color: #bbb;
}

/* --- Icono de lupa --- */
.zoom-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
}

.zoom-icon:hover {
    background-color: rgba(0,0,0,0.9);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .philosophy-grid {
        grid-template-columns: 1fr;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
    }
    
    .carousel-nav {
        padding: 8px 12px;
        font-size: 16px;
    }
    
    .modal-carousel-container {
        width: 95%;
    }
    
    .modal-nav {
        padding: 10px 15px;
        font-size: 20px;
    }
    
    .modal-prev {
        left: -50px;
    }
    
    .modal-next {
        right: -50px;
    }
    
    .modal-content {
        max-height: 70vh;
    }
}