/* Let the product photograph set the gallery height at its own aspect ratio. */
.product-detail-hero .product-viewer-card {
  border: 0;
  background: transparent;
}

.product-detail-hero .product-viewer-toolbar {
  min-height: 44px;
  padding: 0 0 8px;
  border-bottom: 0;
  background: transparent;
}

.product-detail-hero .product-viewer-stage {
  height: auto;
  min-height: 0;
  overflow: hidden;
  background: transparent;
}

.product-detail-hero .product-viewer-open {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 0;
  line-height: 0;
}

.product-detail-hero .product-viewer-open > picture,
.product-detail-hero .product-viewer-open > .aj-responsive-product-hero {
  display: block;
  width: 100%;
  height: auto;
}

/* Newer product pages place a 4:5 picture directly inside the stage. */
.product-detail-hero .product-viewer-stage > picture.aj-product-picture {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: auto;
  background: transparent;
}

.product-detail-hero .product-viewer-open > img,
.product-detail-hero .product-viewer-open > picture > img,
.product-detail-hero .product-viewer-open > .aj-responsive-product-hero > img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}

.product-detail-hero .product-viewer-stage > picture.aj-product-picture > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}

.product-detail-hero .product-viewer-help {
  border-top: 0;
  padding: 10px 0 0;
  background: transparent;
}
