.custom-lightbox-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}
.custom-lightbox-modal.open {
    display: flex;
    animation: fadeIn 0.25s ease;
}

.lightbox-content-wrap {
    max-width: 90%;
    max-height: 90vh;
    display: flex !important;
    flex-direction: column !important; /* Bắt buộc xếp dọc: Ảnh ở trên, Tiêu đề ở dưới */
    align-items: center !important;
    justify-content: center;
    position: relative;
}

#lightboxTargetImg {
    max-width: 100%;
    max-height: 75vh; /* Giảm nhẹ chiều cao ảnh để nhường chỗ cho thanh tiêu đề bên dưới */
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    object-fit: contain;
}

.lightbox-info-bar {
    margin-top: 12px;
    color: #ffffff;
    font-size: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 20px;
    border-radius: 20px;
    min-width: 280px; /* Độ rộng tối thiểu cho thanh tiêu đề */
    max-width: 100%;
}
.lightbox-counter {
    font-size: 13px;
    opacity: 0.8;
    margin-left: 15px;
    font-family: monospace;
}
.lightbox-close-btn {
    position: absolute;
    top: 20px; right: 25px;
    color: #ffffff;
    font-size: 38px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100001;
    line-height: 1;
}
.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: none;
    width: 48px; height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 100000;
}
.lightbox-nav-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}
.prev-btn { left: 20px; }
.next-btn { right: 20px; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}