/* css/tienda.css - Estilos específicos de tienda.html */
:root {
    --primary-green: #013836;
    --primary-brown: #8d4c2c;
    --light-brown: #a38570;
    --dark-text: #333;
    --light-text: #fff;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--dark-text);
    overflow-x: hidden;
    padding-top: 70px;
}

/* BANNER SUPERIOR */
.tienda-banner {
    width: 100%;
    height: 400px;
    overflow: hidden;
    position: relative;
}

.tienda-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* SECCIÓN DESCRIPCIÓN */
.descripcion-section {
    padding: 60px 50px;
    background-color: #f8f9fa;
}

.descripcion-text {
    max-width: 800px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.6;
    text-align: center;
}

/* SECCIÓN CATEGORÍAS */
.categorias-container {
    padding: 40px 50px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.categoria-titulo {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 30px;
    text-align: center;
}

/* SECCIÓN CATÁLOGO */
.catalogo-section {
    padding: 20px 50px 50px;
}

.catalogo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.producto-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.producto-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.producto-imagen-container {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.producto-imagen {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.producto-card:hover .producto-imagen {
    transform: scale(1.05);
}

.producto-info {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.producto-nombre {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-brown);
    margin-bottom: 10px;
    text-align: center;
}

.producto-desc {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.95rem;
    text-align: center;
}

.producto-precio {
    font-weight: 700;
    color: var(--primary-green);
    font-size: 1.2rem;
    text-align: center;
}

/* Separador entre categorías */
.categoria-separador {
    height: 2px;
    background: linear-gradient(90deg, 
        rgba(141, 76, 44, 0) 0%, 
        rgba(141, 76, 44, 0.3) 50%, 
        rgba(141, 76, 44, 0) 100%);
    margin: 50px 0;
}

/* Estilo para producto destacado */
.producto-destacado {
    animation: destacarProducto 3s ease;
    box-shadow: 0 0 0 3px var(--primary-brown), 0 10px 30px rgba(141, 76, 44, 0.3) !important;
}

@keyframes destacarProducto {
    0% {
        box-shadow: 0 0 0 0 rgba(141, 76, 44, 0);
    }
    50% {
        box-shadow: 0 0 0 5px var(--primary-brown), 0 15px 40px rgba(141, 76, 44, 0.4);
    }
    100% {
        box-shadow: 0 0 0 3px var(--primary-brown), 0 10px 30px rgba(141, 76, 44, 0.3);
    }
}

/* MODAL DE PRODUCTO */
.producto-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    overflow-y: auto;
    padding: 20px;
}

.modal-contenido {
    background-color: white;
    width: 100%;
    max-width: 1300px;
    margin: 30px auto;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    min-height: 700px;
    max-height: 95vh;
    overflow-y: auto;
}

.modal-cerrar {
    position: fixed;
    top: 40px;
    right: 40px;
    background-color: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--primary-brown);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-brown);
    transition: all 0.3s ease;
}

.modal-cerrar:hover {
    background-color: var(--primary-brown);
    color: white;
    transform: rotate(90deg);
}

.modal-cuerpo {
    display: flex;
    flex-wrap: wrap;
    min-height: 700px;
}

/* LADO DERECHO - IMAGEN */
.modal-derecho-imagen {
    width: 55%;
    position: relative;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.modal-imagen-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
}

.modal-imagen {
    width: 100%;
    height: 100%;
    max-height: 620px;
    object-fit: contain;
    border-radius: 5px;
}

/* IMAGEN CENTRADA EN EL MEDIO */
.imagen-centro {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.imagen-centro img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
    opacity: 0.9;
}

/* CONTROLES DE TAMAÑO */
.controles-tamano {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    background: none;
    padding: 0;
}

.tamano-titulo {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-green);
    margin-bottom: 15px;
    text-align: center;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.tamano-opciones {
    display: flex;
    gap: 30px;
    justify-content: center;
    background: none;
    padding: 0;
}

.tamano-opcion {
    padding: 5px 0;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 500;
    color: #666;
    background: none;
}

.tamano-opcion:hover, .tamano-opcion.activo {
    color: var(--primary-brown);
    font-weight: 600;
    border-bottom: 2px solid var(--primary-brown);
}

/* CONTROLES DE CANTIDAD */
.controles-cantidad {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    background: none;
    padding: 0;
}

.cantidad-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-green);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cantidad-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
}

.btn-cantidad {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px solid var(--primary-brown);
    background-color: transparent;
    color: var(--primary-brown);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-cantidad:hover {
    background-color: var(--primary-brown);
    color: white;
}

.cantidad-valor {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-green);
    min-width: 30px;
    text-align: center;
}

/* Icono de certificación */
.certificacion-icono {
    position: absolute;
    top: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.certificacion-icono i {
    color: var(--primary-brown);
    font-size: 1.3rem;
}

/* LADO IZQUIERDO - INFORMACIÓN */
.modal-izquierdo-info {
    width: 45%;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: white;
}

.modal-titulo-principal {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 10px;
    line-height: 1.1;
}

.modal-subtitulo {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary-brown);
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

.modal-subtitulo::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-brown);
    border-radius: 2px;
}

/* SECCIÓN HISTORIA */
.seccion-historia {
    margin-bottom: 35px;
}

.seccion-titulo {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-green);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.seccion-titulo i {
    margin-right: 10px;
    color: var(--primary-brown);
    font-size: 1.2rem;
}

.historia-texto {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #555;
    text-align: justify;
    padding-right: 10px;
}

/* SECCIÓN DETALLE */
.seccion-detalle {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 25px;
    border-left: 4px solid var(--primary-brown);
    margin-bottom: 40px;
}

.detalle-texto {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
}

.detalle-texto strong {
    color: var(--primary-green);
}

/* PRECIO Y BOTÓN COMPRAR */
.precio-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid rgba(141, 76, 44, 0.2);
}

.modal-precio {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-green);
}

.btn-comprar-modal {
    background-color: var(--primary-brown);
    color: white;
    border: none;
    padding: 14px 40px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(141, 76, 44, 0.3);
}

.btn-comprar-modal:hover {
    background-color: var(--primary-green);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(1, 56, 54, 0.4);
}

/* SECCIÓN CHEMESQUEMENA */
.modal-chememequena {
    width: 100%;
    padding: 80px 50px;
    position: relative;
    background-image: url('../img/chememequena-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
}

.chememequena-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(1, 56, 54, 0.8);
    z-index: 1;
}

.chememequena-contenido {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
}

.chememequena-titulo {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.chememequena-subtitulo {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: #a38570;
}

.chememequena-descripcion {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 40px;
    text-align: justify;
}

/* IMÁGENES HORIZONTALES */
.chememequena-img-horizontal {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    border: 3px solid white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.chememequena-img-horizontal:hover {
    transform: translateY(-5px);
}

/* FOOTER */
.footer-section {
    background-color: #013836;
    color: white;
    padding: 30px 20px;
    text-align: center;
    margin-top: 50px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #8d4c2c;
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .tienda-banner {
        height: 300px;
    }
    
    .descripcion-section {
        padding: 40px 30px;
    }
    
    .catalogo-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 30px;
    }
    
    .modal-cuerpo {
        flex-direction: column;
        min-height: auto;
    }
    
    .modal-derecho-imagen, .modal-izquierdo-info {
        width: 100%;
    }
    
    .modal-derecho-imagen {
        height: 400px;
    }
    
    .modal-izquierdo-info {
        padding: 40px;
    }
}

@media (max-width: 768px) {
    .tienda-banner {
        height: 250px;
    }
    
    .catalogo-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 25px;
    }
    
    .modal-contenido {
        margin: 20px auto;
        max-height: 90vh;
    }
    
    .modal-derecho-imagen {
        height: 350px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .catalogo-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .modal-derecho-imagen {
        height: 300px;
    }
    
    .tamano-opciones {
        flex-direction: column;
        gap: 10px;
    }
    
    .precio-container {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .btn-comprar-modal {
        width: 100%;
    }
}