/*
 * WooCommerce has a native crop/uncropped choice, but no native control that
 * combines complete mixed-ratio pictures with equal-height product cards.
 * The fixed frame aligns captions; object-fit: contain keeps the whole packshot.
 */
.woocommerce ul.products li.product {
	display: flex;
	flex-direction: column;
}

.woocommerce ul.products li.product .woocommerce-loop-image-link {
	display: flex;
	width: 100%;
	aspect-ratio: 2 / 3;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: #fff;
}

.woocommerce ul.products li.product .woocommerce-loop-image-link img {
	display: block;
	width: 100%;
	height: 100% !important;
	margin: 0 auto;
	object-fit: contain;
	object-position: center;
}

.woocommerce ul.products li.product .product-details {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
}

.woocommerce ul.products li.product .product-action-wrap {
	margin-top: auto;
}

/*
 * WooCommerce intentionally disables its hover zoom when the full image is no
 * larger than the displayed image. The class below is added only in that case,
 * giving the same modest visual response without inventing missing pixels.
 */
.single-product .woocommerce-product-gallery__image {
	overflow: hidden;
}

.single-product .woocommerce-product-gallery__image > a > img {
	transition: transform 220ms ease;
}

.single-product .woocommerce-product-gallery__image.hs-product-fallback-zoom > a > img {
	transform: scale(1.08);
}

@media (prefers-reduced-motion: reduce) {
	.single-product .woocommerce-product-gallery__image > a > img {
		transition: none;
	}
}
