/**
 * HD Product Cards — shared layer.
 * Elementor loop grid equal-height pass-through + common card behaviors.
 * All cards share the .hd-card root class alongside their style class.
 */

.hd-card {
	height: 100%;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
}
.hd-card *, .hd-card *::before, .hd-card *::after { box-sizing: border-box; }

.hd-card img {
	width: 100%;
	height: 100%;
	object-fit: cover;   /* switch to contain per-site for cut-out product shots */
	display: block;
}

/* ---- Elementor loop grid: equal-height pass-through --------------------- */
.e-loop-item:has(.hd-card) {
	display: flex;
	flex-direction: column;
	height: 100%;
}
.e-loop-item:has(.hd-card) :is(
	.e-con,
	.e-con-inner,
	.elementor-widget-shortcode,
	.elementor-widget-text-editor,
	.elementor-widget-html,
	.elementor-widget-shortcode    > .elementor-widget-container,
	.elementor-widget-text-editor  > .elementor-widget-container,
	.elementor-widget-html         > .elementor-widget-container
) {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	width: 100%;
	min-height: 0;
}
.e-loop-item:has(.hd-card) .hd-card {
	flex-grow: 1;
}

/* Hide Woo's default "View cart" link injected after AJAX add */
.hd-card .added_to_cart { display: none; }

/* Woo AJAX button states (style classes add their own visuals) */
.hd-card .add_to_cart_button.loading { opacity: .6; pointer-events: none; }
.hd-card .add_to_cart_button.added::after { content: " ✓"; }

@media (prefers-reduced-motion: reduce) {
	.hd-card, .hd-card *, .hd-card *::before, .hd-card *::after { transition: none !important; }
}
