/* local.css */
:root {
    --color-primary: #4a6cf7;
    --color-secondary: #ff6b6b;
    --color-fondo: #ffffff;
    --font-titulo: 'Poppins', sans-serif;
    --font-texto: 'Poppins', sans-serif;
}

body {
    font-family: var(--font-texto);
    background-color: var(--color-fondo);
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.local-main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* =============== AJUSTE DE TRANSPARENCIA =============== */
.hero-section,
.productos-section,
.video-section,
.redes-section {
    padding: 2rem;
    background: rgba(242, 243, 245, 0.8);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.hero-section {
    text-align: center;
    padding: 3rem 2rem;
}

.hero-section h1 {
    font-family: var(--font-titulo);
    color: var(--color-primary);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.descripcion-local {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 1.5rem;
}

/* Multimedia */
.logo-local {
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.video-promocional {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 8px;
    margin: 0 auto;
    display: block;
}

/* Productos */
.productos-section h2,
.video-section h2,
.redes-section h2 {
    font-family: var(--font-titulo);
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 1.5rem;
}

.grid-productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.card-producto {
    background: rgba(248, 238, 238, 0.6);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* IMAGEN DE PRODUCTO - PROTAGONISTA */
.producto-img {
    position: relative;
    width: 100%;
    height: 350px; /* Altura fija para consistencia */
    overflow: hidden;
    background: #f8f8f8;
}

.producto-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
}

/* Overlay de zoom al hacer hover */
.overlay-zoom {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.producto-img:hover .overlay-zoom {
    opacity: 1;
}

.producto-img:hover img {
    transform: scale(1.05);
}

.overlay-zoom span {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    background: rgba(74, 108, 247, 0.9);
    padding: 12px 24px;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.producto-info {
    padding: 1.25rem;
}

.producto-info h3 {
    font-family: var(--font-titulo);
    color: var(--color-primary);
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.descripcion {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.precio {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 1.3rem;
    margin: 0.5rem 0;
}

.btn-comprar {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 0.85rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: block;
    width: 100%;
    margin-top: 0.75rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-comprar:hover {
    background-color: #3a5ce5;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(74, 108, 247, 0.3);
}

/* Redes */
.redes-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.btn-redes {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.btn-redes:hover {
    opacity: 0.9;
}

/* =================================
   MODAL DE ZOOM PROFESIONAL (PANTALLA COMPLETA)
   ================================= */
.modal-imagen {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-imagen.activo {
    display: flex;
    opacity: 1;
}

.modal-toolbar {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 2001;
    background: rgba(255, 255, 255, 0.15);
    padding: 10px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-btn {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #333;
}

.modal-btn:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.modal-btn.cerrar-modal {
    background: rgba(255, 107, 107, 0.9);
    color: white;
}

.modal-btn.cerrar-modal:hover {
    background: rgba(255, 107, 107, 1);
}

/* CORRECCIÓN PRINCIPAL: Contenedor de la imagen más grande */
.modal-contenedor-imagen {
    width: 95%; /* Ocupa casi todo el ancho */
    height: 90vh; /* Ocupa casi todo el alto */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.modal-img {
    max-width: 100%;
    max-height: 100%; /* Ahora permite que la imagen crezca hasta llenar el contenedor padre */
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 0.1s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.modal-caption {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.7);
    padding: 12px 25px;
    border-radius: 30px;
    text-align: center;
    max-width: 80%;
    z-index: 2001;
    backdrop-filter: blur(4px);
}

.modal-instructions {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
    z-index: 2001;
}

/* Responsive */
@media (max-width: 768px) {
    .local-main {
        padding: 0 1rem;
        margin: 1rem auto;
    }
    
    .hero-section,
    .productos-section,
    .video-section,
    .redes-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .grid-productos {
        grid-template-columns: 1fr;
    }
    
    .producto-img {
        height: 300px;
    }
    
    .modal-toolbar {
        top: 10px;
        right: 10px;
        padding: 8px;
    }
    
    .modal-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .modal-caption {
        bottom: 50px;
        font-size: 1rem;
        padding: 8px 16px;
        max-width: 90%;
    }
    
    .modal-instructions {
        font-size: 0.8rem;
        padding: 6px 12px;
        bottom: 5px;
    }
    
    .modal-contenedor-imagen {
        width: 100%;
        height: 85vh;
    }
    
    .modal-img {
        max-height: 85vh;
    }
}

@media (max-width: 480px) {
    .producto-img {
        height: 250px;
    }
    
    .producto-info {
        padding: 1rem;
    }
    
    .producto-info h3 {
        font-size: 1.1rem;
    }
    
    .precio {
        font-size: 1.2rem;
    }
    
    .modal-toolbar {
        top: 5px;
        right: 5px;
    }
    
    .modal-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .modal-caption {
        font-size: 0.9rem;
        bottom: 40px;
    }
    
    .modal-instructions {
        display: none;
    }
}

/* Animaciones adicionales */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-imagen.activo .modal-contenedor-imagen {
    animation: scaleIn 0.3s ease;
}

.modal-imagen.activo .modal-caption,
.modal-imagen.activo .modal-instructions {
    animation: fadeIn 0.3s ease 0.1s both;
}