/* Desktop gallery follows its purchase row; mobile retains the native layout. */
@media (min-width: 1024px) {
  html body.single-product.drn-reference-global .yc-buy-page .drn-flow-product .yc-buy-top[style*="--drn-column-obstruction"]:not(.has-no-gallery):not(.has-no-summary) > .yc-buy-gallery {
    position: sticky !important;
    align-self: start;
    top: calc(var(--drn-column-obstruction, 0px) + 12px) !important;
  }
  /* The variable exists only when the square stage needs to fit a shorter viewport. */
  html body.single-product.drn-reference-global .yc-buy-page .drn-flow-product .yc-buy-top[style*="--drn-column-stage-height"]:not(.has-no-gallery):not(.has-no-summary) > .yc-buy-gallery .yc-gallery-stage {
    box-sizing: border-box !important;
    height: var(--drn-column-stage-height) !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
  }
  html body.single-product.drn-reference-global .yc-buy-page .drn-flow-product .yc-buy-top[style*="--drn-column-stage-height"]:not(.has-no-gallery):not(.has-no-summary) > .yc-buy-gallery .yc-gallery-stage .yc-gallery-track {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    aspect-ratio: auto !important;
  }
  html body.single-product.drn-reference-global .yc-buy-page .drn-flow-product .yc-buy-top[style*="--drn-column-stage-height"]:not(.has-no-gallery):not(.has-no-summary) > .yc-buy-gallery .yc-gallery-stage .yc-gallery-track img {
    object-fit: contain !important;
  }
  /* The existing video player uses the slide as its wrapper; its controls stay at the bottom. */
  html body.single-product.drn-reference-global .yc-buy-page .drn-flow-product .yc-buy-top[style*="--drn-column-stage-height"]:not(.has-no-gallery):not(.has-no-summary) > .yc-buy-gallery .yc-gallery-stage .yc-gallery-track > .yc-has-video:not(:fullscreen) > video.yc-gallery-video:not(:fullscreen) {
    box-sizing: border-box;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    object-fit: contain !important;
  }
}
