/**
 * Hot House — unified WooCommerce product loop cards (showcase + shop archives).
 */

/* Grid — body.woocommerce is on <body>, not a wrapper around ul.products */
body.woocommerce.tax-product_cat ul.products,
body.woocommerce-page.tax-product_cat ul.products,
body.woocommerce.hh-shop-archive ul.products,
body.woocommerce-page.hh-shop-archive ul.products,
body.hh-catalog-showcase .elementor-widget-woocommerce-products .woocommerce ul.products,
body.hh-catalog-showcase .elementor-widget-wc-products .woocommerce ul.products,
body.post-type-archive-product ul.products {
	display: grid !important;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)) !important;
	gap: 1.5rem !important;
	align-items: stretch !important;
	width: 100% !important;
	max-width: 1140px;
	margin-inline: auto;
	padding-inline: 1rem;
	list-style: none !important;
	clear: both !important;
}

body.woocommerce.tax-product_cat ul.products::before,
body.woocommerce.tax-product_cat ul.products::after,
body.woocommerce.hh-shop-archive ul.products::before,
body.woocommerce.hh-shop-archive ul.products::after {
	content: none !important;
	display: none !important;
}

@media (max-width: 48rem) {
	body.woocommerce.tax-product_cat ul.products,
	body.woocommerce.hh-shop-archive ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 32rem) {
	body.woocommerce.tax-product_cat ul.products,
	body.woocommerce.hh-shop-archive ul.products {
		grid-template-columns: 1fr !important;
	}
}

/* Kill WooCommerce float columns (woocommerce-layout.css → width:22.05%) */
body.woocommerce.tax-product_cat ul.products > li.product,
body.woocommerce-page.tax-product_cat ul.products > li.product,
body.woocommerce.hh-shop-archive ul.products > li.product,
body.woocommerce-page.hh-shop-archive ul.products > li.product {
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
	clear: none !important;
	margin: 0 !important;
	padding: 0 !important;
	position: static !important;
}

body.tax-product_cat ul.products > li.product > .hh-product-card,
body.hh-shop-archive ul.products > li.product > .hh-product-card,
body.woocommerce-page ul.products > li.product > .hh-product-card,
body.tax-product_cat ul.products > .hh-product-card,
body.hh-shop-archive ul.products > .hh-product-card {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
}

body.hh-catalog-showcase .elementor-widget-woocommerce-products li.product,
body.tax-product_cat ul.products li.product,
body.hh-shop-archive ul.products li.product {
	display: flex !important;
	flex-direction: column !important;
	height: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	background: #fff !important;
	border: 1px solid #e2e6ea !important;
	border-radius: 6px !important;
	overflow: hidden !important;
	box-shadow: 0 2px 14px rgba(13, 17, 23, 0.06) !important;
	transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease !important;
}

/* Showcase cards inside li — card chrome on article, not li */
body.tax-product_cat ul.products li.product.hh-loop-card,
body.hh-shop-archive ul.products li.product.hh-loop-card {
	display: flex !important;
	flex-direction: column !important;
	height: 100% !important;
	min-width: 0 !important;
	width: 100% !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	overflow: visible !important;
}

body.tax-product_cat ul.products li.product.hh-loop-card > .hh-product-card,
body.hh-shop-archive ul.products li.product.hh-loop-card > .hh-product-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border: 1px solid #e2e6ea;
	border-radius: 6px;
	overflow: hidden;
	box-shadow: 0 2px 14px rgba(13, 17, 23, 0.06);
	transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}

body.tax-product_cat ul.products li.product.hh-loop-card:hover > .hh-product-card,
body.hh-shop-archive ul.products li.product.hh-loop-card:hover > .hh-product-card {
	border-color: #0a1219;
	box-shadow: 0 12px 32px rgba(4, 15, 26, 0.12);
	transform: translateY(-3px);
}

/* Legacy Woo default loop (non-showcase) */
body.hh-catalog-showcase .elementor-widget-woocommerce-products li.product:hover,
body.tax-product_cat ul.products li.product:not(.hh-loop-card):hover,
body.hh-shop-archive ul.products li.product:not(.hh-loop-card):hover {
	border-color: #0a1219 !important;
	box-shadow: 0 12px 32px rgba(4, 15, 26, 0.12) !important;
	transform: translateY(-3px);
}

body.hh-catalog-showcase .elementor-widget-woocommerce-products li.product a.woocommerce-LoopProduct-link,
body.tax-product_cat li.product:not(.hh-loop-card) a.woocommerce-loop-product__link,
body.hh-shop-archive li.product:not(.hh-loop-card) a.woocommerce-loop-product__link {
	display: flex !important;
	flex-direction: column !important;
	flex: 1 !important;
	text-decoration: none !important;
	color: inherit !important;
}

body.hh-catalog-showcase .elementor-widget-woocommerce-products li.product:not(.hh-loop-card) a.woocommerce-LoopProduct-link,
body.tax-product_cat li.product:not(.hh-loop-card) > a.woocommerce-loop-product__link,
body.hh-shop-archive li.product:not(.hh-loop-card) > a.woocommerce-loop-product__link {
	overflow: hidden !important;
	background: #e8ecf0 !important;
}

/* Showcase card images — constrained inside media frame */
body.tax-product_cat .hh-product-card__media,
body.hh-shop-archive .hh-product-card__media,
body.woocommerce-page .hh-product-card__media {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #e8ecf0;
}

body.tax-product_cat .hh-product-card__img,
body.hh-shop-archive .hh-product-card__img,
body.woocommerce-page .hh-product-card__img {
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	object-fit: cover !important;
	object-position: center center !important;
	display: block !important;
}

/* Default Woo loop thumbnails only (not showcase cards) */
body.hh-catalog-showcase .elementor-widget-woocommerce-products li.product:not(.hh-loop-card) img,
body.tax-product_cat li.product:not(.hh-loop-card) img,
body.hh-shop-archive li.product:not(.hh-loop-card) img {
	width: 100% !important;
	height: auto !important;
	aspect-ratio: 1 / 1 !important;
	object-fit: cover !important;
	object-position: center center !important;
	background: #e8ecf0 !important;
	padding: 0 !important;
	display: block !important;
}

body.hh-catalog-showcase .elementor-widget-woocommerce-products .woocommerce-loop-product__title,
body.tax-product_cat .woocommerce-loop-product__title,
body.hh-shop-archive .woocommerce-loop-product__title {
	font-size: 0.95rem !important;
	font-weight: 600 !important;
	line-height: 1.35 !important;
	color: #0d1117 !important;
	padding: 1rem 1.15rem 0.5rem !important;
	margin: 0 !important;
	min-height: 2.7em;
}

body.hh-catalog-showcase:not(.hh-heating-service-hub) .elementor-widget-woocommerce-products li.product .price,
body.hh-catalog-showcase:not(.hh-heating-service-hub) .elementor-widget-woocommerce-products li.product .star-rating,
body.hh-shop-archive li.product:not(.hh-loop-card) .price,
body.hh-shop-archive li.product:not(.hh-loop-card) .star-rating {
	display: none !important;
}

body.hh-catalog-showcase.hh-heating-service-hub .elementor-widget-woocommerce-products li.product .price,
body.hh-catalog-showcase.hh-heating-service-hub .elementor-widget-wc-products li.product .price {
	display: block !important;
	padding: 0 1.15rem 0.35rem !important;
	margin: 0 !important;
	font-size: 0.95rem !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	color: #0a1219 !important;
}

body.hh-catalog-showcase.hh-heating-service-hub .hh-loop-price--quote {
	font-size: 0.82rem !important;
	font-weight: 600 !important;
	color: #66707c !important;
}

body.hh-catalog-showcase.hh-heating-service-hub .elementor-widget-woocommerce-products .star-rating {
	display: none !important;
}

body.hh-catalog-showcase .elementor-widget-woocommerce-products li.product .button,
body.hh-catalog-showcase .elementor-widget-woocommerce-products li.product a.add_to_cart_button,
body.hh-shop-archive li.product:not(.hh-loop-card) .button,
body.hh-shop-archive li.product:not(.hh-loop-card) a.add_to_cart_button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	margin: 0 1.15rem 1.15rem !important;
	margin-top: auto !important;
	padding: 0.65rem 1rem !important;
	background: #0a1219 !important;
	color: #fff !important;
	border: none !important;
	border-radius: 4px !important;
	font-size: 0.82rem !important;
	font-weight: 600 !important;
	width: calc(100% - 2.3rem) !important;
}

body.hh-catalog-showcase .elementor-widget-woocommerce-products li.product .button:hover {
	background: #141c24 !important;
	color: #fff !important;
}

.hh-loop-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	padding: 0 1rem 0.65rem;
	margin-top: 0;
}

.hh-loop-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.28rem 0.65rem;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	border-radius: 999px;
	text-decoration: none !important;
	line-height: 1.25;
	border: 1px solid transparent;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.hh-loop-badge--brand {
	background: #f4f0e8;
	border-color: rgba(201, 162, 74, 0.45);
	color: #0a1219 !important;
}

.hh-loop-badge--brand:hover {
	background: #ebe3d4;
	border-color: #c9a24a;
	color: #0a1219 !important;
}

.hh-loop-badge--fuel {
	background: #fff;
	border-color: rgba(10, 18, 25, 0.18);
	color: #334155 !important;
}

.hh-loop-badge--fuel:hover {
	background: #f4f6f8;
	border-color: #0a1219;
	color: #0a1219 !important;
}

body.hh-catalog-showcase [data-id^="hhProducts"] .elementor-heading-title {
	border-bottom: 2px solid #0a1219;
	padding-bottom: 0.35rem;
	display: inline-block;
}
