/* Lightbox overlay */
#lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 9999;
}
#lightbox.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
#lightbox img {
    max-width: 90%;
    max-height: 80%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* Lightbox details */
#lightbox-details {
    margin-top: 12px;
    text-align: center;
    color: #fff;
}
#lightbox-caption {
    font-size: 20px;
    font-weight: 700;
    margin: 8px 0;
    color: #fff;
}
#lightbox-meta {
    font-size: 14px;
    color: #e5e7eb;
    margin: 4px 0 0;
}

/* Enquire button */
#enquire-btn {
    margin-top: 8px;
    padding: 10px 16px;
    background: #25D366;
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    text-align: center;
    display: inline-block;
}

/* Controls */
#lightbox .close {
    position: absolute;
    top: 20px; right: 30px;
    font-size: 30px;
    color: #fff;
    cursor: pointer;
}
/* Prev/Next arrows */
#lightbox .prev,
#lightbox .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #333, #111);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    cursor: pointer;
    user-select: none;
    z-index: 1001;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

#lightbox .prev { left: 20px; }
#lightbox .next { right: 20px; }

#lightbox .prev:hover,
#lightbox .next:hover {
    background: linear-gradient(135deg, #eab308, #ca8a04); /* amber gradient */
    color: #fff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(234, 179, 8, 0.6);
}


/* Ensure content fits inside viewport without scroll */
#lightbox.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-height: 100vh; /* never exceed viewport */
}

/* Constrain image height to leave room for text + button */
#lightbox img {
    max-height: 60%; /* reserve ~40% for caption + button */
    object-fit: contain;
}

/* Constrain details block */
#lightbox-details {
    max-height: 20%;
    overflow: hidden; /* prevent overflow */
}

/* Ensure button is always visible */
#enquire-btn {
    max-height: 10%;
    margin-top: 8px;
}
