/**
 * Standardized 1:1 (square) product images across listing/grid contexts:
 * Home, category/shop archives, search results, related products, upsells,
 * recent products, featured products, and any WooCommerce product-loop
 * widget. Uses object-fit: contain (never cover) so the original image
 * proportions are always preserved and nothing is cropped or distorted.
 *
 * Scope: every rule below is anchored to "ul.products li.product", which
 * is the WooCommerce/Blocksy product-loop card markup. The single-product
 * page gallery (.woocommerce-product-gallery), cart, checkout, and
 * wp-admin thumbnails are never structured as "ul.products li.product",
 * so none of them are matched or affected by this file. This is also
 * enforced on the PHP side: this stylesheet is not enqueued on the cart,
 * checkout, or any wp-admin screen.
 */

ul.products li.product .ct-media-container {
	aspect-ratio: 1 / 1 !important;
	height: auto !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	overflow: hidden !important;
	background: #fff;
}

ul.products li.product .ct-media-container img {
	aspect-ratio: 1 / 1 !important;
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: 100% !important;
	object-fit: contain !important;
	object-position: center center !important;
}
