.product-photo-open { display: block; width: 100%; padding: 0; border: 0; border-radius: var(--radius); background: var(--soft); cursor: zoom-in; }
.product-photo-open:focus-visible { outline-offset: 3px; }
.product-photo-open, .product-lightbox-frame { touch-action: pan-y pinch-zoom; }
.product-lightbox { width: min(1180px,calc(100% - 32px)); height: min(880px,calc(100vh - 32px)); height: min(880px,calc(100dvh - 32px)); max-width: none; max-height: none; margin: auto; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.product-lightbox::backdrop { background: rgb(15 18 22 / .78); }
.product-lightbox-shell { display: grid; grid-template-rows: auto minmax(0,1fr) auto; height: 100%; min-width: 0; }
.product-lightbox-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.product-lightbox-heading h2 { min-width: 0; margin: 0; font-size: 18px; line-height: 1.4; overflow-wrap: anywhere; }
.product-lightbox .button { display: grid; place-items: center; flex: 0 0 44px; width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; line-height: 1; }
.product-lightbox .button svg { display: block; width: 24px; height: 24px; pointer-events: none; }
.product-lightbox .button:focus-visible { outline-offset: 2px; }
.product-lightbox-frame { display: grid; place-items: center; min-width: 0; min-height: 0; padding: 16px; overflow: hidden; }
.product-lightbox-photo { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.product-lightbox-photo[hidden], .product-lightbox-error[hidden], .product-lightbox .button[hidden] { display: none; }
.product-lightbox-error { max-width: 30em; margin: 0; color: var(--muted); text-align: center; }
.product-lightbox-controls { display: flex; align-items: center; justify-content: center; gap: 20px; padding: 12px 16px; border-top: 1px solid var(--line); }
.product-lightbox-status { flex: 0 1 220px; min-width: 0; margin: 0; text-align: center; font-size: 14px; line-height: 1.5; }
body.gallery-open { overflow: hidden; }
@media(max-width:600px) {
  .product-lightbox { width: calc(100% - 16px); height: calc(100vh - 16px); height: calc(100dvh - 16px); border-radius: 6px; }
  .product-lightbox-heading, .product-lightbox-controls { padding: 10px 12px; }
  .product-lightbox-heading h2 { font-size: 16px; }
  .product-lightbox-frame { padding: 8px; }
  .product-lightbox-controls { gap: 12px; }
}
@media(forced-colors:active) { .product-lightbox { border-color: CanvasText; } .product-lightbox::backdrop { background: Canvas; opacity: .8; } }
