/* Product photography: one ordered gallery, with no automatic slide changes. */
.purchase-summary .product-gallery {
  width: 100%;
  min-width: 0;
}
.gallery-zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #edf3ee;
  cursor: zoom-in;
  touch-action: pan-y;
}
.purchase-summary .gallery-zoom img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 390px;
  aspect-ratio: 382 / 512;
  object-fit: contain;
  transition: transform 0.2s;
}
@media (hover: hover) {
  .gallery-zoom:hover img {
    transform: scale(1.035);
  }
}
.gallery-controls,
.photo-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}
.gallery-controls button,
.photo-controls button {
  width: 44px;
  height: 44px;
  border: 1px solid #b8caba;
  border-radius: 50%;
  background: #fff;
  color: #1a3a2a;
  font-size: 28px;
  cursor: pointer;
}
.gallery-controls button:disabled,
.photo-controls button:disabled {
  opacity: 0.35;
  cursor: default;
}
.gallery-thumbnails {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 1px;
}
.gallery-thumbnails button {
  flex: 0 0 48px;
  width: 48px;
  padding: 2px;
  border: 2px solid transparent;
  border-radius: 4px;
  background: white;
  cursor: pointer;
}
.gallery-thumbnails button[aria-pressed="true"] {
  border-color: #285a3b;
}
.purchase-summary .gallery-thumbnails img {
  width: 100%;
  height: 58px;
  aspect-ratio: auto;
  object-fit: cover;
  display: block;
}
.photo-dialog {
  width: min(900px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: 46px 18px 12px;
  border: 0;
  border-radius: 12px;
  background: #f5f8f4;
}
.photo-dialog::backdrop {
  background: #102419e6;
}
.photo-stage {
  touch-action: pan-y;
  overflow: hidden;
}
.photo-stage img {
  display: block;
  width: 100%;
  height: min(70dvh, 720px);
  object-fit: contain;
}
.photo-close {
  position: absolute;
  right: 14px;
  top: 5px;
  width: 44px;
  height: 40px;
  background: transparent;
  border: 0;
  font-size: 32px;
  cursor: pointer;
}
.photo-controls {
  max-width: 280px;
  margin: auto;
}
.gallery-controls[hidden],
.gallery-thumbnails[hidden] {
  display: none;
}
.gallery-photo-id {
  font-size: 12px;
  color: #496953;
  margin: 8px 0 0;
  overflow-wrap: anywhere;
}
.photo-controls {
  max-width: 440px;
}
.photo-controls span {
  text-align: center;
  font-size: 13px;
}
@media (max-width: 760px) {
  .purchase-summary {
    display: block;
  }
  .purchase-summary .gallery-zoom img {
    width: 100%;
    max-height: 300px;
  }
  .purchase-summary .gallery-thumbnails img {
    width: 100%;
    height: 58px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-zoom img {
    transition: none;
  }
}
