/* Shared product gallery: compact rows, consistent detail frames, no product cropping. */
.product-detail > .product-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  align-items: start;
  align-self: start;
  gap: 12px;
  min-width: 0;
}
.product-gallery > :is(.ghvq-image, a, img):not(.gh-sold-photo) {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  aspect-ratio: 4 / 3;
}
.product-gallery > :is(.ghvq-image, a, img):not(.gh-sold-photo):first-child,
.product-gallery > .gh-sold-photo + :is(.ghvq-image, a, img) {
  grid-column: 1 / -1;
  aspect-ratio: auto;
}
.product-gallery > :is(.ghvq-image, a) img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  object-position: center;
  margin: 0;
  background: #fff;
}
.product-gallery > :is(.ghvq-image, a):first-child img,
.product-gallery > .gh-sold-photo + :is(.ghvq-image, a) img {
  position: static;
  height: auto;
}
.product-gallery > img {
  height: auto;
  object-fit: contain;
}
.product-gallery > .ghvq-image:focus-visible {
  outline: 3px solid #687059;
  outline-offset: 3px;
}
@media (max-width: 700px) {
  .product-detail > .product-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .product-gallery > :is(.ghvq-image, a, img):not(.gh-sold-photo) {
    border-radius: 4px;
  }
}
