.product-photo-open {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: inherit;
  background: transparent;
  cursor: zoom-in;
}

.product-photo-open:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -5px;
}

.product-photo-open-hint {
  position: absolute;
  top: 18px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 100px;
  background: rgba(2, 8, 16, .62);
  color: #fff;
  font-size: .7rem;
  line-height: 1;
  backdrop-filter: blur(10px);
}

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

.product-lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 20px clamp(16px, 3vw, 48px);
  border: 0;
  background: rgba(2, 8, 16, .96);
  color: #fff;
  overflow: hidden;
  overscroll-behavior: contain;
}

.product-lightbox[open] { display: flex; flex-direction: column; gap: 16px; }
.product-lightbox::backdrop { background: rgba(2, 8, 16, .88); }
.product-lightbox-toolbar { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.product-lightbox-title { margin: 0; font-family: var(--font-display); font-size: 1.5rem; }
.product-lightbox-controls { display: flex; align-items: center; gap: 10px; }
.product-lightbox-counter { margin-right: 8px; color: rgba(255, 255, 255, .7); font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; white-space: nowrap; }
.product-lightbox-button { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 50%; background: rgba(255, 255, 255, .04); color: #fff; font-size: 1.2rem; line-height: 1; cursor: pointer; }
.product-lightbox-close { margin-left: 8px; font-size: 1.7rem; }
.product-lightbox-button:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .65); }
.product-lightbox-button:focus-visible { outline: 2px solid var(--accent, #78c6dc); outline-offset: 3px; }
.product-lightbox-figure { flex: 1 1 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; min-height: 0; margin: 0; }
.product-lightbox-image-wrap { flex: 1 1 0; display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; touch-action: pan-y pinch-zoom; }
.product-lightbox-image { display: block; flex: 0 1 auto; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; cursor: default; user-select: none; }
.product-lightbox-caption { flex: 0 0 auto; margin: 0; color: rgba(255, 255, 255, .75); text-align: center; font-size: .82rem; line-height: 1.5; }

@media (max-width: 560px) {
  .product-photo-open-hint { top: 12px; right: 12px; }
  .product-lightbox { padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .product-lightbox-title { display: none; }
  .product-lightbox-toolbar { justify-content: flex-end; }
  .product-lightbox-controls { width: 100%; }
  .product-lightbox-counter { margin-right: auto; }
  .product-lightbox-caption { font-size: .75rem; }
}
