.products .productimg, .product-rail .rail-card .productimg, .related .related-image {
  position: relative;
  overflow: hidden;
  height: auto !important;
  aspect-ratio: 1;
}
body :is(.products, .product-rail .rail-card, .related) :is(.productimg,.related-image) img.aligned-product-photo {
  position: absolute;
  width: var(--photo-width) !important;
  height: var(--photo-height) !important;
  max-width: none !important;
  max-height: none !important;
  left: var(--photo-left);
  top: var(--photo-top);
  padding: 0 !important;
  background: transparent !important;
}

@media(max-width:900px) {
  body .products .productimg, body .product-rail .rail-card .productimg {
    display:block; width:100%; height:auto !important; aspect-ratio:1;
    min-height:0 !important; padding:0 !important; overflow:hidden;
  }
  body .products .productimg img, body .product-rail .rail-card .productimg img {
    position:absolute; top:0; left:0; width:100%; height:100%;
  }
  body .productimg img.aligned-product-photo {
    top:var(--photo-top) !important; left:var(--photo-left) !important;
  }
}
