/* Повноекранний перегляд фото (js/lightbox.js) */

body.lightbox-open {
    overflow: hidden;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    background: rgba(20, 18, 16, 0.92);
    backdrop-filter: blur(4px);
    animation: lightbox-fade 0.2s ease;
}

.lightbox.hidden {
    display: none;
}

@keyframes lightbox-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.lightbox-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1100px;
    height: 100%;
    overflow: hidden;
}

.lightbox-img {
    max-width: 100%;
    max-height: calc(100vh - 130px);
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
    cursor: zoom-in;
    transition: transform 0.25s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox-img.zoomed {
    cursor: grab;
    transition: none;
}

.lightbox-img.zoomed:active {
    cursor: grabbing;
}

.lightbox-close,
.lightbox-nav {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.lightbox-close:hover,
.lightbox-nav:hover {
    background: var(--accent-gold, #D1B88B);
    border-color: var(--accent-gold, #D1B88B);
    color: #1a1a1a;
}

.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
    outline: 2px solid var(--accent-gold, #D1B88B);
    outline-offset: 3px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    font-size: 28px;
    line-height: 1;
}

.lightbox-nav {
    width: 52px;
    height: 52px;
    font-size: 22px;
}

.lightbox-nav.hidden {
    visibility: hidden;
}

.lightbox-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0 24px;
    pointer-events: none;
    text-align: center;
}

.lightbox-caption {
    max-width: 700px;
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-main, 'Montserrat', sans-serif);
    font-size: 13px;
    line-height: 1.4;
}

.lightbox-counter {
    color: var(--accent-gold, #D1B88B);
    font-family: var(--font-main, 'Montserrat', sans-serif);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
}

@media (max-width: 768px) {
    .lightbox {
        padding: 12px;
        gap: 4px;
    }

    .lightbox-img {
        max-height: calc(100vh - 150px);
    }

    /* На мобільному гортаємо свайпом — стрілки лише заважали б. */
    .lightbox-nav {
        display: none;
    }

    .lightbox-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }
}
