/*
 * #468: a product photo shown whole in a fixed frame. A blurred copy of the
 * same photo (64px image style, passed in as --contained-image-bg) fills the
 * space a photo of another aspect ratio leaves free.
 */
.contained-image {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  background: #f5f5f5;
}

.contained-image::before {
  content: "";
  position: absolute;
  inset: -10%;
  z-index: -1;
  background: var(--contained-image-bg, none) center / cover no-repeat;
  filter: blur(20px);
}

.contained-image picture {
  display: block;
  height: 100%;
}

/* The Owl variant outranks the generic `.owl-carousel .owl-item img`
   (height: 280px, cover) in bornemann-adjusments.css. */
.contained-image img,
.owl-carousel .owl-item .contained-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Product page: one frame size for every photo, so swiping never jumps. */
.detail-page .product .carousel-container .product-image .contained-image {
  aspect-ratio: 16 / 10;
  border-radius: 10px;
}

@media screen and (max-width: 767px) {
  .detail-page .product .carousel-container .product-image .contained-image {
    aspect-ratio: 4 / 3;
  }
}

/* Product card. */
.product-card__image .contained-image {
  height: 220px;
}
