/* JBA v16.20.459 — native carousel: square media + full product visibility.
 *
 * v16.20.458 used object-fit:cover in the existing landscape media box. That
 * removed left/right gutters but cropped the top/bottom of square product
 * photography (notably loose stones). Most catalogue photography is square,
 * so the safest visual model is a square card media frame. The image can then
 * stay full-width without cutting the product itself.
 *
 * Scope is intentionally limited to native product carousels. Listing grids
 * and the single-product gallery are untouched.
 */

/* Let the carousel card grow with the now-square media instead of clipping its
 * title/code/price area to an older fixed-height card shell. */
html body .jba-native-carousel .jba-one-product-card,
html body .jba-native-carousel .jba-dk-card.jba-v196-card {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
}

/* Square frame: width still spans the complete card, while the frame ratio now
 * matches the dominant 1:1 catalogue photography. */
html body .jba-native-carousel .jba-one-product-card .jba-tpd-luxe__thumb,
html body .jba-native-carousel .jba-one-product-card .jba-dk-card__image,
html body .jba-native-carousel .jba-dk-card.jba-v196-card .jba-dk-card__image,
html body .jba-native-carousel .jba-dk-card.jba-v196-card .img-item-slider,
html body .jba-native-carousel .jba-dk-card.jba-v196-card .jba-v1654-card-image,
html body .jba-native-carousel .jba-dk-card.jba-v196-card .jba-v1817-similar__image {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: 1 / 1 !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #f8f8f8 !important;
}

html body .jba-native-carousel .jba-one-product-card .jba-tpd-luxe__thumb picture,
html body .jba-native-carousel .jba-one-product-card .jba-tpd-luxe__thumb .jba-optimized-picture,
html body .jba-native-carousel .jba-one-product-card .jba-dk-card__image picture,
html body .jba-native-carousel .jba-one-product-card .jba-dk-card__image .jba-optimized-picture,
html body .jba-native-carousel .jba-dk-card.jba-v196-card .img-item-slider picture,
html body .jba-native-carousel .jba-dk-card.jba-v196-card .img-item-slider .jba-optimized-picture,
html body .jba-native-carousel .jba-dk-card.jba-v196-card .jba-v1654-card-image picture,
html body .jba-native-carousel .jba-dk-card.jba-v196-card .jba-v1817-similar__image picture {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* Full product, no crop. For the normal square source photos this still fills
 * the frame edge-to-edge; non-square legacy images get a neutral tiny letterbox
 * rather than losing part of the jewellery. */
html body .jba-native-carousel .jba-one-product-card .jba-tpd-luxe__thumb img:not(.deluxe-javaherat):not(.haraj-javaherat),
html body .jba-native-carousel .jba-one-product-card .jba-dk-card__image img:not(.deluxe-javaherat):not(.haraj-javaherat),
html body .jba-native-carousel .jba-dk-card.jba-v196-card .img-item-slider img:not(.deluxe-javaherat):not(.haraj-javaherat),
html body .jba-native-carousel .jba-dk-card.jba-v196-card .jba-v1654-card-image img:not(.deluxe-javaherat):not(.haraj-javaherat),
html body .jba-native-carousel .jba-dk-card.jba-v196-card .jba-v1817-similar__image img:not(.deluxe-javaherat):not(.haraj-javaherat) {
  display: block !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  max-height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: contain !important;
  object-position: center center !important;
  border: 0 !important;
  box-sizing: border-box !important;
}

/* Keep mobile carousel cards content-driven too. Older mobile rules clamp them
 * to 286/316px, which would otherwise cut the price after making media square. */
@media (max-width: 767px) {
  html body .jba-native-carousel .jba-one-product-card,
  html body .jba-native-carousel .jba-dk-card.jba-v196-card,
  html body [data-jba-native-carousel="1"] .jba-dk-view-all {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }
}
