/*
 * ZUVA Hakoura Universal 10.12.1 — catalogue product image fit correction.
 * Presentation only. Keeps the existing product-card dimensions and layout,
 * but shows the complete WooCommerce product image instead of cropping it.
 */

/* Website catalogue only. The installed PWA keeps its own image handling. */
html:not(.zuva-pwa-standalone) body.zuva-universal-theme:is(.woocommerce-shop,.post-type-archive-product,.tax-product_cat,.tax-product_tag)
:is(.wc-block-components-product-image,.wp-block-woocommerce-product-image),
html:not(.zuva-pwa-standalone) body.zuva-universal-theme .zuva-universal-shop
:is(.wc-block-components-product-image,.wp-block-woocommerce-product-image) {
  overflow: hidden !important;
}

html:not(.zuva-pwa-standalone) body.zuva-universal-theme:is(.woocommerce-shop,.post-type-archive-product,.tax-product_cat,.tax-product_tag)
:is(.wc-block-components-product-image,.wp-block-woocommerce-product-image) img,
html:not(.zuva-pwa-standalone) body.zuva-universal-theme .zuva-universal-shop
:is(.wc-block-components-product-image,.wp-block-woocommerce-product-image) img,
html:not(.zuva-pwa-standalone) body.zuva-universal-theme:is(.woocommerce-shop,.post-type-archive-product,.tax-product_cat,.tax-product_tag)
ul.products li.product a img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  transform: none !important;
}

/* Prevent the catalogue hover treatment from re-cropping/zooming the image. */
html:not(.zuva-pwa-standalone) body.zuva-universal-theme:is(.woocommerce-shop,.post-type-archive-product,.tax-product_cat,.tax-product_tag)
.wc-block-product:hover :is(.wc-block-components-product-image,.wp-block-woocommerce-product-image) img,
html:not(.zuva-pwa-standalone) body.zuva-universal-theme .zuva-universal-shop
.wc-block-product:hover :is(.wc-block-components-product-image,.wp-block-woocommerce-product-image) img,
html:not(.zuva-pwa-standalone) body.zuva-universal-theme:is(.woocommerce-shop,.post-type-archive-product,.tax-product_cat,.tax-product_tag)
ul.products li.product:hover a img {
  transform: none !important;
}
