/*
 * ZUVA Hakoura Universal 10.12.5 — professional catalogue image framing.
 * Presentation only. No WooCommerce, ordering, pricing, cart, checkout, API,
 * combo or PWA behaviour is changed.
 *
 * Keeps the complete product photograph visible inside a consistent, compact
 * catalogue viewport so customers can scan the menu comfortably while scrolling.
 */

/* Public website catalogue only. The installed PWA keeps its existing list view. */
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 > :is(.wc-block-components-product-image,.wp-block-woocommerce-product-image),
html:not(.zuva-pwa-standalone) body.zuva-universal-theme .zuva-universal-shop
.wc-block-product > :is(.wc-block-components-product-image,.wp-block-woocommerce-product-image) {
  display: flex !important;
  width: 100% !important;
  aspect-ratio: 16 / 10 !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: clamp(8px, .9vw, 13px) !important;
  box-sizing: border-box !important;
  background: #eee4d5 !important;
}

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 > :is(.wc-block-components-product-image,.wp-block-woocommerce-product-image) :is(a,div),
html:not(.zuva-pwa-standalone) body.zuva-universal-theme .zuva-universal-shop
.wc-block-product > :is(.wc-block-components-product-image,.wp-block-woocommerce-product-image) :is(a,div) {
  width: 100% !important;
  height: 100% !important;
}

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 > :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 > :is(.wc-block-components-product-image,.wp-block-woocommerce-product-image) img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center center !important;
  transform: none !important;
  transform-origin: center center !important;
  box-sizing: border-box !important;
}

/* Never re-zoom or crop on hover. */
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 {
  transform: none !important;
}

/* Classic WooCommerce loop fallback. */
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:first-child {
  display: flex !important;
  width: 100% !important;
  aspect-ratio: 16 / 10 !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  padding: clamp(8px, .9vw, 13px) !important;
  box-sizing: border-box !important;
  background: #eee4d5 !important;
}

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:first-child img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center center !important;
  transform: none !important;
}

/* Tablet and phone website: preserve the same complete-image treatment while
   using a slightly tighter frame for efficient menu scrolling. */
@media (max-width: 980px) {
  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 > :is(.wc-block-components-product-image,.wp-block-woocommerce-product-image),
  html:not(.zuva-pwa-standalone) body.zuva-universal-theme .zuva-universal-shop
  .wc-block-product > :is(.wc-block-components-product-image,.wp-block-woocommerce-product-image),
  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:first-child {
    aspect-ratio: 16 / 10 !important;
    padding: 8px !important;
  }
}
