 /* =========================================
   LIGHTBOX
========================================= */

#customLightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.94);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    /* Estado inicial */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.4s ease,
        visibility 0s linear 0.4s;
}


/* =========================================
   LIGHTBOX ACTIVO
========================================= */

#customLightbox.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition:
        opacity 0.4s ease,
        visibility 0s linear 0s;
}


/* =========================================
   IMAGEN
========================================= */

#customLightbox img#lightboxImage {
    display: block;
    width: auto;
    height: auto;
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    margin: 0;
    padding: 0;
    opacity: 0;
    transform: scale(0.96);
    transition:
        opacity 0.45s ease,
        transform 0.45s ease;
}


/* =========================================
   IMAGEN AL ABRIR
========================================= */

#customLightbox.active img#lightboxImage {
    opacity: 1;
    transform: scale(1);
}


/* =========================================
   BOTÓN CERRAR
========================================= */

#customLightbox .lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    width: 50px;
    height: 50px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: opacity 0.2s ease;
}


/* =========================================
   BOTÓN ANTERIOR
========================================= */

#customLightbox .lightbox-prev {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 80px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 42px;
    cursor: pointer;
    z-index: 10;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}


/* =========================================
   BOTÓN SIGUIENTE
========================================= */

#customLightbox .lightbox-next {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 80px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 42px;
    cursor: pointer;
    z-index: 10;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}


/* =========================================
   HOVER
========================================= */

#customLightbox .lightbox-close:hover {
    opacity: 0.7;
}
#customLightbox .lightbox-prev:hover {
    opacity: 0.7;

    transform: translateY(-50%) translateX(-4px);
}
#customLightbox .lightbox-next:hover {
    opacity: 0.7;
    transform: translateY(-50%) translateX(4px);
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 768px) {

    #customLightbox img#lightboxImage {
        max-width: 90%;
        max-height: 80%;
    }
    #customLightbox .lightbox-prev,
    #customLightbox .lightbox-next {
        font-size: 30px;
        width: 40px;
    }

}