/* Give product photography more room without cropping the product. */
#app .os-reference-product .dc-gallery { min-width: 0; }
@media (min-width: 1180px) {
  #app .os-reference-product .dc-product-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.05fr);
  }
  #app .os-reference-product .dc-gallery-media {
    width: 100%;
    max-width: none;
    max-height: none;
  }
  #app .os-reference-product .dc-gallery-media > img,
  #app .os-reference-product .dc-gallery-media > .shimmer {
    width: 100%;
    min-width: 0;
    height: clamp(500px, 42vw, 620px);
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
    object-fit: contain;
    padding: 0;
  }
}
@media (max-width: 1179px) {
  #app .os-reference-product .dc-mobile-slide { max-height: none; }
  #app .os-reference-product .dc-mobile-slide > img,
  #app .os-reference-product .dc-mobile-gallery > .shimmer {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    max-height: none;
    object-fit: contain;
    padding: 0;
  }
}

/* Fit the actual photo bounds, including sources padded with white borders. */
#app .os-reference-product .dc-gallery .os-gallery-fitted {
  position: relative;
  overflow: hidden;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: var(--os-photo-ratio, 1);
  background: #fff;
}
#app .os-reference-product .dc-gallery .os-gallery-fitted > img {
  position: absolute;
  width: var(--os-photo-width) !important;
  height: var(--os-photo-height) !important;
  min-width: 0;
  min-height: 0;
  max-width: none !important;
  max-height: none !important;
  left: var(--os-photo-left);
  top: var(--os-photo-top);
  aspect-ratio: auto;
  object-fit: fill !important;
  border-radius: 0;
  transition: none;
}
