/* Original gallery layout; large photos follow their own proportions without edge fill. */
.gallery-stage-photo,
.sector-detail-page .gallery-stage-photo,
.sector-explorer .sector-photo,
.capabilities .production-image,
.detail-hero-image:not(.detail-hero-video),
.product-gallery-stage,
.product-detail-photo {
  --photo-height:590px;
  width:min(100%,calc(var(--photo-height) * var(--photo-ratio,1.5)));
  max-width:884px;
  height:auto;
  min-height:0;
  aspect-ratio:var(--photo-ratio,1.5);
  margin-inline:auto;
  padding:0;
  overflow:hidden;
  background:transparent !important;
}
.sector-detail-page .gallery-stage-photo,
.detail-hero-image:not(.detail-hero-video) { max-width:760px; }
.product-gallery { max-width:1120px; }
.product-gallery-stage { max-width:1120px; }
.gallery-stage-photo > img,
.sector-detail-page .gallery-stage-photo > img,
.sector-explorer .sector-photo > img,
.capabilities .production-image > img,
.detail-hero-image:not(.detail-hero-video) > img,
.product-gallery-stage > img,
.product-detail-photo > img {
  display:block;
  width:100%;
  height:100%;
  max-height:none;
  object-fit:contain !important;
  background:transparent !important;
  mix-blend-mode:normal;
}
/* Thumbnail viewports are filled by the photograph, with no colored padding. */
.gallery-browser .gallery-shot img { object-fit:cover; }
@media(max-width:850px) {
  .gallery-stage-photo,
  .sector-explorer .sector-photo,
  .capabilities .production-image { --photo-height:520px; }
}
@media(max-width:600px) {
  .gallery-stage-photo,
  .sector-detail-page .gallery-stage-photo,
  .sector-explorer .sector-photo,
  .capabilities .production-image,
  .detail-hero-image:not(.detail-hero-video),
  .product-gallery-stage,
  .product-detail-photo { width:100%; max-width:100%; }
}

/* Sector galleries keep the established square product size for every photo. */
.sector-detail-page .gallery-stage-photo {
  width:min(100%,590px);
  max-width:590px;
  height:auto;
  aspect-ratio:1 / 1;
}
.sector-detail-page .gallery-stage-photo > img { object-fit:cover !important; }
