/**
 * Archive listing — all product cards (.aco-archive-contain).
 * Fixed square image area; full packshot via object-fit: contain (no crop / stretch).
 *
 * Uses absolute fill + object-fit so tall bottles (Coca Grand, Lipton Grand, etc.)
 * are never clipped by overflow when percentage max-height fails in flex layouts.
 * Compatible with transparent WebP.
 *
 * @package Annexe_Customizations
 */

ul.products li.product.aco-archive-contain .astra-shop-thumbnail-wrap > a.woocommerce-LoopProduct-link {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	width: 100%;
	overflow: hidden;
	margin: 0 0 1em;
	box-sizing: border-box;
	background: transparent;
}

ul.products li.product.aco-archive-contain .astra-shop-thumbnail-wrap > a.woocommerce-LoopProduct-link img,
ul.products li.product.aco-archive-contain .astra-shop-thumbnail-wrap > a.woocommerce-LoopProduct-link img.attachment-woocommerce_thumbnail,
ul.products li.product.aco-archive-contain .astra-shop-thumbnail-wrap > a.woocommerce-LoopProduct-link img.attachment-woocommerce_single,
ul.products li.product.aco-archive-contain .astra-shop-thumbnail-wrap > a.woocommerce-LoopProduct-link img.attachment-full {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: 100% !important;
	object-fit: contain;
	object-position: center center;
	margin: 0 !important;
	padding: 0;
	display: block;
	box-sizing: border-box;
}

/* Fallback if Astra wrap is absent (standard WC loop link). */
ul.products li.product.aco-archive-contain > a.woocommerce-LoopProduct-link:first-child {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	width: 100%;
	overflow: hidden;
	margin: 0 0 1em;
	box-sizing: border-box;
	background: transparent;
}

ul.products li.product.aco-archive-contain > a.woocommerce-LoopProduct-link:first-child > img {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: 100% !important;
	object-fit: contain;
	object-position: center center;
	margin: 0 !important;
	padding: 0;
	display: block;
	box-sizing: border-box;
}
