/* Product photography and its native detail viewer. */
.gallery { min-width: 0; }
.gallery__main { position: relative; border: 0; background: #f5f5f3; overflow: hidden; }
.gallery__zoom { position: relative; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; color: #242421; display: block; }
.gallery__zoom img { display: block; width: 100%; height: 100%; object-fit: contain; }
.gallery__zoom-hint { position: absolute; right: 18px; bottom: 18px; display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,.92); padding: 9px 12px; font-size: 11px; line-height: 1.4; pointer-events: none; }
.gallery__zoom-hint svg { width: 17px; height: 17px; }
.gallery__caption { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; line-height: 1.6; color: #6a6a66; padding: 12px 0; margin: 0; }
.gallery__caption [data-image-caption] { color: #232320; font-weight: 500; }
.gallery__thumbs { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.gallery__thumb { width: 96px; height: 96px; flex: 0 0 96px; border: 1px solid transparent; background: #f5f5f3; outline-offset: 2px; }
.gallery__thumb img { object-fit: contain; }
.gallery__thumb.active, .gallery__thumb.is-active { border-color: #30302c; box-shadow: inset 0 0 0 1px #30302c; }
.gallery__thumb:hover { border-color: #a7a7a0; }
body.has-image-viewer { overflow: hidden; }
.image-viewer { position: fixed; inset: 0; margin: auto; width: min(1120px, 94vw); max-width: 94vw; max-height: 94dvh; padding: 0; border: 0; background: #fff; color: #20201e; overflow: hidden; }
.image-viewer::backdrop { background: rgba(12,16,20,.74); backdrop-filter: blur(6px); }
.image-viewer__panel { padding: 20px; }
.image-viewer__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.image-viewer__title { font-size: 14px; font-weight: 500; }
.image-viewer__head > div { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.image-viewer__head button { padding: 9px 12px; background: transparent; color: inherit; font: inherit; font-size: 12px; border: 1px solid #deded9; cursor: pointer; min-height: 42px; }
.image-viewer__close span { font-size: 21px; margin-left: 10px; vertical-align: -1px; }
.image-viewer__stage { height: min(72dvh, 850px); overflow: auto; background: #f5f5f3; display: flex; justify-content: center; align-items: center; }
.image-viewer__stage img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.image-viewer__stage.is-magnified { display: block; }
.image-viewer__stage.is-magnified img { width: var(--image-natural-width, auto); height: auto; max-width: none; max-height: none; margin: 0 auto; }
.image-viewer__note { margin: 12px 0 0; font-size: 11px; color: #71716b; line-height: 1.6; }
@media(max-width:640px) {
  .gallery__thumb { width: 76px; height: 76px; flex-basis: 76px; }
  .gallery__zoom-hint { right: 12px; bottom: 12px; padding: 7px 9px; font-size: 10px; }
  .gallery__caption { font-size: 10px; }
  .image-viewer { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0; }
  .image-viewer__panel { padding: 14px; }
  .image-viewer__head { flex-wrap: wrap; gap: 10px; }
  .image-viewer__head > div { margin-left: auto; }
  .image-viewer__stage { height: calc(100dvh - 170px); }
}
