/* ============================================================================
 * La Casa · v11.21.8 — Product-card image fit (no-crop)
 * ----------------------------------------------------------------------------
 * Fixes cropped product thumbnails in the WooCommerce RELATED / UP-SELL /
 * CROSS-SELL loops. Those cards forced `object-fit: cover` (in
 * v11-product-premium-v13.css), which cut tall mixer / faucet / shower images.
 *
 * This sheet loads AFTER v11-product-premium-v13.css so it overrides the
 * cover rules with `object-fit: contain` (full product always visible) while
 * keeping a consistent card height via a fixed aspect ratio + warm padding.
 *
 * Scope is strictly the product-card THUMBNAILS of those loops. It does NOT
 * touch the single-product gallery (.woocommerce-product-gallery …), the cart
 * line-item media, or any cart/checkout logic — image presentation only.
 * ==========================================================================*/

/* Related + up-sells (single product page) — and the optional custom rel media */
body.lc-product-v13 .related ul.products li.product img,
body.lc-product-v13 .upsells ul.products li.product img,
body.lc-product-v13 .related .products li.product img,
body.lc-product-v13 .upsells .products li.product img,
body.lc-product-v13 .lc-product-v13__rel-media img {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: 4 / 5 !important;
  object-fit: contain !important;
  object-position: center !important;
  background: #f8f5ef !important;
  padding: 18px !important;
  box-sizing: border-box !important;
  display: block !important;
  border-radius: 10px !important;
}

/* Stop the hover zoom from clipping the now-contained image */
body.lc-product-v13 .related ul.products li.product:hover img,
body.lc-product-v13 .upsells ul.products li.product:hover img,
body.lc-product-v13 .lc-product-v13__rel-media:hover img {
  transform: none !important;
}

/* Make sure the link wrapper never crops the contained image */
body.lc-product-v13 .related ul.products li.product > a,
body.lc-product-v13 .upsells ul.products li.product > a {
  background: #f8f5ef !important;
  border-radius: 10px !important;
  overflow: hidden !important;
}

/* Cross-sells (cart collaterals) — same no-crop treatment */
.woocommerce .cross-sells ul.products li.product img,
.woocommerce .cross-sells .products li.product img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 4 / 5 !important;
  object-fit: contain !important;
  object-position: center !important;
  background: #f8f5ef !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  display: block !important;
  border-radius: 10px !important;
}

/* ----------------------------------------------------------------------------
 * Single product MAIN image (v11.22.1) — override v13's cover + 1:1 crop.
 * Shows the full product centered, uncropped. Zoom/lightbox use the full-size
 * image and are unaffected. Gallery thumbnail strip is intentionally left as-is.
 * --------------------------------------------------------------------------*/
body.lc-product-v13 .woocommerce-product-gallery__image img,
body.lc-product-v13 .woocommerce-product-gallery img.wp-post-image {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: auto !important;
  max-height: 640px !important;
  object-fit: contain !important;
  object-position: center center !important;
  background: #ffffff !important;
}
