/* Product media aspect-ratio fix, added 2026-07-16.
   Prevents product photos and thumbnails from being stretched into tall rectangles. */
body.page-product .images-container {
  max-width: 100%;
}

body.page-product .product-cover,
body.page-product .product-cover.product-cover-zoom {
  align-items: center;
  background: #fff;
  display: flex;
  justify-content: center;
  min-height: 0 !important;
  overflow: hidden;
  width: 100%;
}

body.page-product .product-cover img.js-qv-product-cover {
  aspect-ratio: auto !important;
  display: block !important;
  height: auto !important;
  max-height: min(72vh, 640px);
  max-width: 100% !important;
  object-fit: contain !important;
  width: auto !important;
}

body.page-product .product-images.js-qv-product-images {
  min-height: 0 !important;
}

body.page-product .product-images.js-qv-product-images .slick-track {
  align-items: stretch;
  display: flex;
}

body.page-product .product-images.js-qv-product-images .slick-slide,
body.page-product .product-images.js-qv-product-images .thumb-container {
  height: auto !important;
}

body.page-product .product-images.js-qv-product-images img.thumb {
  aspect-ratio: 1 / 1;
  background: #fff;
  border: 1px solid #e8e8e8;
  display: block !important;
  height: auto !important;
  max-height: 120px;
  object-fit: contain !important;
  padding: 4px;
  width: 100% !important;
}

@media (max-width: 991px) {
  body.page-product .images-container {
    height: auto !important;
    min-height: 0 !important;
  }

  body.page-product .product-cover,
  body.page-product .product-cover.product-cover-zoom {
    height: auto !important;
  }

  body.page-product .product-cover img.js-qv-product-cover {
    max-height: 78vw;
    width: 100% !important;
  }
}

@media (max-width: 575px) {
  body.page-product .product-images.js-qv-product-images img.thumb {
    max-height: 96px;
  }
}

/* Reserve the product media slot before the cover image and thumbnails decode. */
body.page-product .product-cover,
body.page-product .product-cover.product-cover-zoom {
  aspect-ratio: 4 / 3 !important;
}

body.page-product .product-cover img.js-qv-product-cover {
  max-height: 100% !important;
  max-width: 100% !important;
  object-fit: contain !important;
  width: auto !important;
}

body.page-product .product-images.js-qv-product-images {
  min-height: 112px !important;
}

@media (min-width: 992px) {
  body.page-product .images-container {
    min-height: 660px !important;
  }

  body.page-product .product-cover,
  body.page-product .product-cover.product-cover-zoom {
    min-height: 600px !important;
  }
}

@media (max-width: 991px) {
  body.page-product .images-container {
    min-height: calc(78vw + 150px) !important;
  }

  body.page-product .product-cover,
  body.page-product .product-cover.product-cover-zoom {
    min-height: 78vw !important;
  }
}
