/* Full-size gallery lightbox (product pages) */

body.gallery-lightbox-open {
    overflow: hidden;
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox.is-open {
    display: flex;
}

.gallery-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    cursor: pointer;
}

.gallery-lightbox__panel {
    position: relative;
    z-index: 1;
    width: min(96vw, 1200px);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    padding: 48px 56px 56px;
    pointer-events: none;
}

.gallery-lightbox__panel > * {
    pointer-events: auto;
}

.gallery-lightbox__figure {
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
    max-height: calc(92vh - 120px);
    overflow: hidden;
}

.gallery-lightbox__img {
    display: block;
    max-width: min(100%, 96vw);
    max-height: min(calc(92vh - 160px), 85vh);
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.gallery-lightbox__caption {
    margin-top: 12px;
    color: #f0f0f0;
    font-size: 15px;
    text-align: center;
    max-width: 100%;
}

.gallery-lightbox__close,
.gallery-lightbox__nav {
    position: absolute;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s ease;
}

.gallery-lightbox__close:hover,
.gallery-lightbox__nav:hover {
    background: rgba(255, 255, 255, 0.22);
}

.gallery-lightbox__close {
    top: 8px;
    right: 8px;
}

.gallery-lightbox__nav {
    top: 50%;
    transform: translateY(-50%);
}

.gallery-lightbox__nav--prev {
    left: 8px;
}

.gallery-lightbox__nav--next {
    right: 8px;
}

.gallery-lightbox__nav .material-symbols-outlined {
    font-size: 32px;
}

.gallery-lightbox__toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
    color: #ddd;
    font-size: 14px;
}

.gallery-lightbox__autoplay {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: transparent;
    color: #fff;
    border-radius: 20px;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 14px;
}

.gallery-lightbox__autoplay:hover {
    background: rgba(255, 255, 255, 0.1);
}

.gallery-lightbox__autoplay-icon--pause {
    display: none;
}

.gallery-lightbox__autoplay.is-playing .gallery-lightbox__autoplay-icon--play {
    display: none;
}

.gallery-lightbox__autoplay.is-playing .gallery-lightbox__autoplay-icon--pause {
    display: inline;
}

.gallery-lightbox-trigger {
    cursor: zoom-in;
}

@media (max-width: 600px) {
    .gallery-lightbox__panel {
        padding: 44px 12px 48px;
    }

    .gallery-lightbox__nav {
        width: 40px;
        height: 40px;
    }

    .gallery-lightbox__nav--prev {
        left: 4px;
    }

    .gallery-lightbox__nav--next {
        right: 4px;
    }
}
