.gallery-lightbox[hidden] { display: none; }
.gallery-lightbox {
    display: flex;
    position: fixed;
    z-index: 2000;
    inset: 0;
    background: rgba(0, 0, 0, .92);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.portfolio-lightbox-stage {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 0;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    overscroll-behavior: contain;
    touch-action: none;
    user-select: none;
}
.portfolio-lightbox-stage.is-zoomed { cursor: grab; }
.portfolio-lightbox-stage.is-zoomed:active { cursor: grabbing; }
.gallery-lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .5);
    object-fit: contain;
    will-change: transform;
}
.gallery-lightbox button {
    position: absolute;
    border: 0;
    background: transparent;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    z-index: 2010;
    min-width: 44px;
    min-height: 44px;
}
.gallery-lightbox button:hover { color: #C9A14F; }
.gallery-lightbox button:focus-visible, #portfolioGallery a:focus-visible { outline: 3px solid #C9A14F; outline-offset: -3px; }
.gallery-lightbox-close { top: 2rem; right: 2.5rem; font-size: 2.5rem; }
.gallery-lightbox-zoom {
    top: 2rem;
    left: 2.5rem;
    padding: .5rem .75rem;
    border: 1px solid rgba(255, 255, 255, .45) !important;
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, .45) !important;
    font-size: .9rem;
}
.gallery-lightbox-prev, .gallery-lightbox-next { top: 50%; font-size: 3rem; padding: 0 1rem; }
.gallery-lightbox-prev { left: 2vw; }
.gallery-lightbox-next { right: 2vw; }
#portfolioGallery .gallery-img {
    object-position: center top;
    transform-origin: center top;
}

#portfolioGallery .gallery-item { aspect-ratio: 6 / 5; }
.portfolio-admin-preview { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center top; border-radius: var(--radius-lg); }
.portfolio-order-controls .btn { min-height: 44px; }
.portfolio-order-controls .btn:disabled {
    color: var(--brand-gold);
    border-color: var(--brand-gold);
    background-color: transparent;
}
@media (max-width: 768px) {
    .gallery-lightbox-img { max-width: 98vw; max-height: 60vh; }
    .gallery-lightbox-close { top: 1rem; right: 1.2rem; font-size: 2rem; }
    .gallery-lightbox-zoom { top: 1rem; left: 1.2rem; }
    .gallery-lightbox-prev, .gallery-lightbox-next { font-size: 2.2rem; }
}
