/*
 * WooCommerce layout guardrails.
 * Loaded after page-specific styles so plugin and block markup remains inside
 * the theme's visual system at every responsive size.
 */

.a2zws-cart-woocommerce > .woocommerce-notices-wrapper:empty,
.a2zws-checkout-page .woocommerce-notices-wrapper:empty {
	display: none;
}

.a2zws-cart-woocommerce .woocommerce-message:empty {
	display: none;
}

.a2zws-cart-woocommerce .cart-collaterals::after,
.a2zws-checkout-page .col2-set::after {
	clear: both;
	content: '';
	display: table;
}

/* Keep the archive's native loop controls from creating a second CTA. */
.a2zws-shop-card__buy .added_to_cart {
	display: none !important;
}

.a2zws-shop-card__buy .button {
	max-width: 100%;
	text-align: center;
	white-space: normal;
}

.a2zws-shop-card__media .woocommerce-placeholder {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.a2zws-shop-toolbar__result {
	min-width: 0;
}

/* Related-product cards retain equal-height actions and avoid image stretch. */
.a2zws-related-products .a2zws-related-grid {
	align-items: stretch;
}

.a2zws-related-products .a2zws-related-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.a2zws-related-products .a2zws-related-card__image,
.a2zws-related-products .a2zws-related-card__image img {
	display: block;
	width: 100%;
}

.a2zws-related-products .a2zws-related-card__image img {
	aspect-ratio: 1.65;
	object-fit: contain;
}

.a2zws-related-products .a2zws-related-card__content {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
}

.a2zws-related-products .a2zws-related-card__bottom {
	margin-top: auto;
}

.a2zws-related-products .a2zws-related-card__add {
	align-self: flex-start;
	margin-top: 14px;
}

@media (max-width: 680px) {
	.a2zws-shop-card__bottom {
	align-items: flex-start;
	flex-direction: column;
	}

	.a2zws-shop-card__buy,
	.a2zws-shop-card__buy .button {
	width: 100%;
	}

	.a2zws-related-products .a2zws-related-card__add {
	align-self: stretch;
	text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.a2zws-shop-card__buy .button,
	.a2zws-related-products .a2zws-related-card {
	transition: none !important;
	}
}
