/* --- styles/lightbox.css --- */

.lightbox-overlay {
    display: none; position: fixed; z-index: 9999; 
    top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.9); 
    justify-content: center; align-items: center;
}

.lightbox-close-btn {
    position: absolute; top: 30px; right: 40px; color: var(--text-main); 
    cursor: pointer; transition: 0.2s ease; z-index: 10001;
    background: rgba(26, 26, 26, 0.6); border: none; border-radius: 50%;
    width: 50px; height: 50px; display: flex; justify-content: center; align-items: center; padding: 0;
}
.lightbox-close-btn svg { width: 20px; height: 20px; }
.lightbox-close-btn:hover { transform: scale(1.1); background: rgba(26, 26, 26, 0.9); }

.lightbox-img-content {
    max-width: 90%; max-height: 85vh; border: var(--border-bold);
    user-select: none; 
    object-fit: contain; /* INI KUNCI AGAR GAMBAR TIDAK TERPOTONG SAMA SEKALI */
}

.lightbox-nav-btn {
    position: absolute; top: 50%; transform: translateY(-50%); 
    color: white; cursor: pointer; user-select: none;
    background: rgba(26, 26, 26, 0.6); border: 2px solid white; border-radius: 50%;
    width: 60px; height: 60px; transition: 0.3s ease; z-index: 10000;
    display: none; justify-content: center; align-items: center; padding: 0;
}
.lightbox-nav-btn svg { width: 24px; height: 24px; transition: 0.2s ease; }
.lightbox-nav-btn:hover {
    background: rgba(26, 26, 26, 0.9); border-color: var(--brand-color); 
    color: var(--brand-color); transform: translateY(-50%) scale(1.05); 
}

#lightbox-prev { left: 40px; }
#lightbox-next { right: 40px; }

@media (max-width: 600px) {
    .lightbox-close-btn { top: 20px; right: 20px; width: 40px; height: 40px; }
    .lightbox-close-btn svg { width: 16px; height: 16px; }
    
    .lightbox-img-content {
        max-height: 70vh; 
        margin-bottom: 70px; /* Sisakan ruang kosong di bawah gambar */
    }
    
    /* Gunakan !important agar pasti override settingan desktop */
    .lightbox-nav-btn {
        width: 46px; height: 46px;
        top: auto !important; 
        bottom: 25px !important; 
        transform: none !important; 
        border-width: 1.5px;
    }
    .lightbox-nav-btn svg { width: 18px; height: 18px; }

    #lightbox-prev { left: calc(50% - 55px) !important; } 
    #lightbox-next { right: auto !important; left: calc(50% + 9px) !important; }
    
    .lightbox-nav-btn:hover { transform: scale(1.05) !important; }
}