/* Compact, dependency-free product galleries. */
.product-gallery { min-width: 0; margin: 0; }
.gallery-stage {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  touch-action: pan-y pinch-zoom;
}
.gallery-stage > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(140,115,75,.4);
  border-radius: 50%;
  background: rgba(251,250,247,.95);
  color: var(--gold-deep);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.gallery-arrow--prev { left: .65rem; }
.gallery-arrow--next { right: .65rem; }
.gallery-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.gallery-caption { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem .15rem; color: var(--gold-deep); font-size: .82rem; }
.gallery-count { white-space: nowrap; font-variant-numeric: tabular-nums; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(var(--gallery-columns,4),minmax(52px,1fr)); align-items: start; gap: .6rem; overflow-x: auto; padding: 4px; margin: -4px; }
.gallery-thumb { min-width: 0; padding: 0; border: 0; background: transparent; color: var(--muted); font: inherit; cursor: pointer; }
.gallery-thumb img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; border: 2px solid transparent; border-radius: .7rem; background: #fff; padding: 3px; }
.gallery-thumb span { display: block; margin-top: .4rem; font-size: .72rem; text-align: center; }
.gallery-thumb[aria-pressed="true"] { color: var(--gold-deep); font-weight: 700; }
.gallery-thumb[aria-pressed="true"] img { border-color: var(--gold); }
.gallery-thumb:hover img { border-color: var(--gold-light); }
.gallery-thumb:focus-visible, .gallery-arrow:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 3px; }
.gallery-hint { margin: .85rem 0 0; font-size: .72rem; color: var(--muted); }
.gallery-thumbs[hidden], .gallery-arrow[hidden] { display: none; }
@media (min-width: 48rem) {
  .product--reverse .product-gallery { grid-column: 2; }
}
@media (max-width: 420px) {
  .gallery-thumbs { gap: .4rem; }
  .gallery-thumb span { font-size: .67rem; }
}
