.product-lightbox[hidden] { display: none; }

.product-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: grid;
    place-items: center;
    padding: clamp(12px, 3vw, 36px);
}

.product-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 15, 28, .82);
    backdrop-filter: blur(5px);
}

.product-lightbox__panel {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    align-items: center;
    width: min(1180px, 100%);
    max-height: calc(100dvh - 24px);
    padding: 56px 12px 16px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 20px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 28px 90px rgba(0, 0, 0, .38);
    outline: none;
    animation: product-lightbox-in .2s ease-out;
}

.product-lightbox__figure { margin: 0; min-width: 0; text-align: center; }
.product-lightbox__image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: calc(100dvh - 145px);
    margin: 0 auto;
    border-radius: 12px;
    object-fit: contain;
}
.product-lightbox__caption { min-height: 24px; padding: 10px 8px 0; color: #344054; font-size: .9rem; }

.product-lightbox__close,
.product-lightbox__nav {
    min-width: 44px;
    min-height: 44px;
    border: 1px solid #d7dee8;
    border-radius: 999px;
    background: #fff;
    color: #101828;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .14);
    transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}
.product-lightbox__close:hover,
.product-lightbox__nav:hover { border-color: #ff6b1a; background: #fff3ea; color: #d94e00; }
.product-lightbox__close:focus-visible,
.product-lightbox__nav:focus-visible { outline: 3px solid rgba(255, 107, 26, .45); outline-offset: 3px; }
.product-lightbox__close { position: absolute; top: 10px; right: 10px; font-size: 2rem; line-height: 1; }
.product-lightbox__nav { font-size: 2rem; line-height: 1; }
.product-lightbox__nav[hidden] { display: block; visibility: hidden; pointer-events: none; }

body.product-lightbox-open { overflow: hidden; }
[data-product-lightbox] { cursor: zoom-in; }

@keyframes product-lightbox-in {
    from { opacity: 0; transform: translateY(8px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 640px) {
    .product-lightbox { padding: 8px; }
    .product-lightbox__panel { grid-template-columns: 44px minmax(0, 1fr) 44px; padding: 54px 4px 12px; border-radius: 16px; }
    .product-lightbox__image { max-height: calc(100dvh - 130px); }
    .product-lightbox__caption { font-size: .8rem; }
}

@media (prefers-reduced-motion: reduce) {
    .product-lightbox__panel { animation: none; }
    .product-lightbox__close, .product-lightbox__nav { transition: none; }
}
