
/* =====================================
   MODAL DE PRODUCTO
===================================== */

#modalProducto {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    padding: 20px;
    overflow-y: auto;

    background: rgba(25, 18, 20, 0.72);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);

    align-items: center;
    justify-content: center;
}

#modalProducto.activo {
    display: flex;
}

/* CONTENEDOR VERTICAL */

#modalProducto .modal-contenido {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;

    width: 100%;
    max-width: 620px;
    max-height: 92vh;
    overflow-y: auto;

    padding: 0;
    gap: 0;

    background: #fffdfc;
    border: 1px solid rgba(190, 140, 145, 0.25);
    border-radius: 22px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);

    animation: modalEntrada 0.25s ease-out;
}

/* ANIMACIÓN */

@keyframes modalEntrada {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* IMAGEN PRINCIPAL */

#modalProducto .modal-imagen {
    width: 100%;
    height: 340px;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;

    background: #f8eeee;
}

#modalProducto .modal-imagen img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
    border-radius: 0;
}

/* INFORMACIÓN */

#modalProducto .modal-info {
    display: flex;
    flex-direction: column;
    align-items: stretch;

    padding: 28px 34px 32px;
    background: #fffdfc;
}

#modalProducto .modal-etiqueta {
    margin: 0 0 8px;
    color: #a76b75;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-align: center;
}

#modalProducto #modalNombre {
    margin: 0 0 10px;
    color: #38282b;
    font-family: Georgia, serif;
    font-size: 30px;
    font-weight: 500;
    line-height: 1.25;
    text-align: center;
}

#modalProducto #modalCodigo {
    margin: 0 0 16px;
    color: #99878a;
    font-size: 12px;
    text-align: center;
}

#modalProducto #modalDescripcion {
    margin: 0;
    color: #65585a;
    font-size: 15px;
    line-height: 1.8;
    text-align: center;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

#modalProducto #modalPrecio {
    margin: 22px 0;
    color: #a34f62;
    font-size: 30px;
    font-weight: 700;
    text-align: center;
}

/* WHATSAPP: ESTILOS EXCLUSIVOS DEL MODAL */

#modalProducto #modalWhatsApp {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;

    width: 100%;
    min-height: 50px;
    padding: 14px 20px;
    margin: 0;

    border: none;
    border-radius: 10px;
    background: #278b59;
    color: #fff;

    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;

    transition: background 0.2s ease;
}

#modalProducto #modalWhatsApp:hover {
    background: #1f7048;
}

/* CERRAR */

#modalProducto .modal-cerrar {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;
    padding: 0;

    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 50%;
    background: rgba(255, 253, 252, 0.94);
    color: #493438;

    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
}

#modalProducto .modal-cerrar:hover {
    background: #f0dddd;
}

/* CELULARES */

@media (max-width: 600px) {
    #modalProducto {
        padding: 12px;
        align-items: center;
    }

    #modalProducto .modal-contenido {
        max-width: 440px;
        max-height: 94vh;
        border-radius: 18px;
    }

    #modalProducto .modal-imagen {
        height: 260px;
    }

    #modalProducto .modal-info {
        padding: 22px 20px 24px;
    }

    #modalProducto #modalNombre {
        font-size: 25px;
    }

    #modalProducto #modalDescripcion {
        font-size: 14px;
    }

    #modalProducto #modalPrecio {
        margin: 17px 0;
        font-size: 27px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #modalProducto .modal-contenido {
        animation: none;
    }
}
