/* One opted-in product-photo ratio for product cards in every block and the inline gallery.
   Fullscreen viewers, thumbnails and unconfigured shops keep their styles. */
html[data-product-photo-ratio="wb"] { --product-photo-aspect: 3 / 4; }
html[data-product-photo-ratio="lamoda"] { --product-photo-aspect: 381 / 550; }

html:root:is([data-product-photo-ratio="wb"],[data-product-photo-ratio="lamoda"]) body .pCard .pMedia {
  position: relative;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: var(--product-photo-aspect) !important;
  overflow: hidden;
}
html:root:is([data-product-photo-ratio="wb"],[data-product-photo-ratio="lamoda"]) body .pCard .pMedia .pImg,
html:root:is([data-product-photo-ratio="wb"],[data-product-photo-ratio="lamoda"]) body #viewProduct .pCard .pMedia .pImg {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  object-position: center !important;
}
html:root:is([data-product-photo-ratio="wb"],[data-product-photo-ratio="lamoda"]) body .storefrontSsrCard :is(img,.storefrontSsrPlaceholder) {
  width: 100%;
  height: auto;
  aspect-ratio: var(--product-photo-aspect);
  object-fit: cover;
}
html:root:is([data-product-photo-ratio="wb"],[data-product-photo-ratio="lamoda"]) body:is([data-view="product"],.isImmersive) #viewProduct #galleryBox #gWrap {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  align-items: start;
}
html:root:is([data-product-photo-ratio="wb"],[data-product-photo-ratio="lamoda"]) body:is([data-view="product"],.isImmersive) #viewProduct #galleryBox #gWrap > .gImg {
  box-sizing: border-box;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: var(--product-photo-aspect) !important;
  object-fit: cover !important;
  object-position: center !important;
}
html:root:is([data-product-photo-ratio="wb"],[data-product-photo-ratio="lamoda"]) body:is([data-view="product"],.isImmersive) #viewProduct #galleryBox #gWrap > video.gImg {
  object-fit: contain !important;
}
