/* ==========================================================
   PORTADA.CSS
   Popup promocional de la tienda virtual
   ========================================================== */


/* ----------------------------------------------------------
   BLOQUEAR SCROLL DE LA PÁGINA
   ---------------------------------------------------------- */

body.portada-bloqueo {
    overflow: hidden;
}


/* ----------------------------------------------------------
   FONDO OSCURO
   ---------------------------------------------------------- */

.portada-overlay {

    position: fixed;

    inset: 0;

    width: 100%;
    height: 100%;

    background: rgba(0, 0, 0, 0.72);

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 25px;

    box-sizing: border-box;

    z-index: 999999;

    animation: portadaEntrada 0.35s ease;
}


/* ----------------------------------------------------------
   CONTENEDOR DE LA PORTADA
   ---------------------------------------------------------- */

.portada-modal {
    position: relative;

    width: auto;
    max-width: 500px;

    max-height: 80vh;

    display: flex;
    align-items: center;
    justify-content: center;

    animation: portadaZoom 0.4s ease;
}


/* ----------------------------------------------------------
   IMAGEN PROMOCIONAL
   ---------------------------------------------------------- */

.portada-imagen {
    display: block;

    width: auto;
    max-width: 500px;

    max-height: 78vh;

    height: auto;

    object-fit: contain;

    border-radius: 14px;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.55);
}

/* ----------------------------------------------------------
   BOTÓN X
   ---------------------------------------------------------- */

.portada-cerrar {

    position: absolute;

    top: -18px;

    right: -18px;

    width: 42px;
    height: 42px;

    border: none;

    border-radius: 50%;

    background: #ffffff;

    color: #111111;

    font-size: 30px;

    line-height: 42px;

    text-align: center;

    padding: 0;

    cursor: pointer;

    z-index: 10;

    box-shadow:
        0 5px 18px rgba(0, 0, 0, 0.35);

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}


/* ----------------------------------------------------------
   EFECTO HOVER X
   ---------------------------------------------------------- */

.portada-cerrar:hover {

    transform: rotate(90deg) scale(1.08);

    background: #111111;

    color: #ffffff;
}


/* ----------------------------------------------------------
   ANIMACIONES
   ---------------------------------------------------------- */

@keyframes portadaEntrada {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }

}


@keyframes portadaZoom {

    from {
        opacity: 0;

        transform:
            scale(0.92)
            translateY(10px);
    }

    to {
        opacity: 1;

        transform:
            scale(1)
            translateY(0);
    }

}


/* ----------------------------------------------------------
   SALIDA
   ---------------------------------------------------------- */

.portada-salida {

    animation: portadaSalida 0.3s ease forwards;

}


@keyframes portadaSalida {

    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }

}


/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 900px) {

    .portada-overlay {
        padding: 20px;
    }

    .portada-modal {
        max-width: 95%;
    }

    .portada-imagen {
        max-height: 85vh;
    }

    .portada-cerrar {

        top: -15px;
        right: -15px;

        width: 40px;
        height: 40px;

        line-height: 40px;

        font-size: 28px;
    }

}


/* ==========================================================
   CELULAR
   ========================================================== */

@media (max-width: 600px) {

    .portada-overlay {
        padding: 15px;
    }

    .portada-modal {
        width: 80;
        max-width: 80%;
        max-height: 75vh;
    }

    .portada-imagen {
        width: 80%;
        max-width: 80%;
        max-height: 75vh;

        border-radius: 10px;
    }

    .portada-cerrar {
        top: -12px;
        right: -8px;

        width: 38px;
        height: 38px;

        line-height: 38px;

        font-size: 27px;
    }
}


/* ==========================================================
   CELULAR PEQUEÑO
   ========================================================== */

@media (max-width: 380px) {

    .portada-overlay {
        padding: 10px;
    }

    .portada-cerrar {

        width: 36px;
        height: 36px;

        line-height: 36px;

        font-size: 25px;
    }

}