#lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    z-index: 9999;
}

#lightbox-overlay img {
    max-width: 100%;
    max-height: 100%;
    transform: translateY(30px);
    opacity: 0;
    transition: opacity .3s ease, transform .3s ease;
    border-radius: 0;
}

#lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

#lightbox-overlay.active img {
    opacity: 1;
    transform: translateY(0);
}

/* Container da imagem (para pan + zoom) */
#lightbox-image-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#lightbox-image {
    max-width: 100%;
    max-height: 100%;
    user-select: none;
    pointer-events: none; /* zoom e pan serão no wrapper */
    transition: transform .25s ease;
    transform-origin: center center;
}

/* Animação de entrada */
#lightbox-overlay.active #lightbox-image {
    opacity: 1;
    transform: translateY(0px);
}

/* Botão fechar */
#lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.15);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    transition: 0.2s ease;
    z-index: 999999;
}

#lightbox-close:hover {
    background: rgba(255,255,255,0.25);
}