/**
 * V2 product cards — hard visual overrides (3.09.2)
 * Loads last; beats WooCommerce, Elementor, theme link styles.
 */

/* ── Strip Woo li chrome — card lives on article ── */
body.hh-v2-product-cards-active .hh-v2-product-grid ul.products,
body.hh-v2-product-cards-active .hh-v2-product-grid__list {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	gap: clamp(1.5rem, 2.5vw, 2rem) !important;
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	width: 100% !important;
	max-width: 1120px;
	margin-inline: auto !important;
	align-items: stretch !important;
}

body.hh-v2-product-cards-active .hh-v2-product-grid--featured ul.products {
	gap: clamp(1.65rem, 3vw, 2.25rem) !important;
}

body.hh-v2-product-cards-active .hh-v2-product-grid ul.products::before,
body.hh-v2-product-cards-active .hh-v2-product-grid ul.products::after {
	content: none !important;
	display: none !important;
}

body.hh-v2-product-cards-active .hh-v2-product-grid ul.products > li.product,
body.hh-v2-product-cards-active .hh-v2-product-grid__list > li.product,
body.hh-v2-product-cards-active .hh-v2-product-grid__list > li {
	display: flex !important;
	flex-direction: column !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
	clear: none !important;
	position: static !important;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	overflow: visible !important;
	list-style: none !important;
}

body.hh-v2-product-cards-active .hh-v2-product-grid ul.products > li.product.hh-loop-card,
body.hh-v2-product-cards-active .woocommerce ul.products > li.product.hh-loop-card {
	min-height: 0 !important;
}

/* Collapsed catalog rows */
body.hh-v2-product-cards-active .hh-v2-product-grid__item--collapsed {
	display: none !important;
}

body.hh-v2-product-cards-active .hh-v2-product-grid__more {
	margin: 2rem 0 0;
	text-align: center;
}

/* ── Card shell ── */
body.hh-v2-product-cards-active .hh-v2-product-card,
body.hh-v2-product-cards-active .hh-product-card.hh-v2-product-card {
	display: flex !important;
	flex-direction: column !important;
	height: 100% !important;
	width: 100% !important;
	background: #fafaf8 !important;
	border: 1px solid rgba(0, 0, 0, 0.08) !important;
	border-radius: 26px !important;
	overflow: hidden !important;
	box-shadow: 0 8px 28px rgba(26, 26, 26, 0.07) !important;
	transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease !important;
	text-decoration: none !important;
	color: #1a1a1a !important;
}

body.hh-v2-product-cards-active .hh-v2-product-grid--featured .hh-v2-product-card {
	border-radius: 28px !important;
	box-shadow: 0 12px 36px rgba(26, 26, 26, 0.09) !important;
}

body.hh-v2-product-cards-active .hh-v2-product-card:hover,
body.hh-v2-product-cards-active .hh-product-card.hh-v2-product-card:hover {
	border-color: rgba(0, 0, 0, 0.14) !important;
	box-shadow: 0 18px 44px rgba(26, 26, 26, 0.12) !important;
	transform: translateY(-4px);
}

/* ── Kill default link styling inside cards ── */
body.hh-v2-product-cards-active .hh-v2-product-card a,
body.hh-v2-product-cards-active .hh-v2-product-grid .product a,
body.hh-v2-product-cards-active .woocommerce .hh-v2-product-card a {
	text-decoration: none !important;
	box-shadow: none !important;
	color: inherit;
}

body.hh-v2-product-cards-active .hh-v2-product-card a:hover,
body.hh-v2-product-cards-active .hh-v2-product-card a:focus {
	text-decoration: none !important;
	box-shadow: none !important;
}

/* ── Media frame ── */
body.hh-v2-product-cards-active .hh-v2-product-card__media,
body.hh-v2-product-cards-active .hh-product-card__media {
	display: block !important;
	position: relative !important;
	flex: 0 0 auto !important;
	width: 100% !important;
	aspect-ratio: 4 / 3 !important;
	overflow: hidden !important;
	background: #f0eeeb !important;
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	border-radius: 0 !important;
}

body.hh-v2-product-cards-active .hh-v2-product-grid--featured .hh-v2-product-card__media,
body.hh-v2-product-cards-active .hh-v2-product-grid--featured .hh-product-card__media {
	aspect-ratio: 16 / 11 !important;
}

body.hh-v2-product-cards-active .hh-v2-product-card__media img,
body.hh-v2-product-cards-active .hh-v2-product-card__img,
body.hh-v2-product-cards-active .hh-product-card__media img,
body.hh-v2-product-cards-active .hh-product-card__img {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	min-height: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	object-fit: cover !important;
	object-position: center center !important;
	border: none !important;
	border-radius: 0 !important;
	aspect-ratio: unset !important;
}

/* ── Body ── */
body.hh-v2-product-cards-active .hh-v2-product-card__body,
body.hh-v2-product-cards-active .hh-product-card__body {
	display: flex !important;
	flex-direction: column !important;
	flex: 1 1 auto !important;
	gap: 0.55rem !important;
	padding: clamp(1.15rem, 2.2vw, 1.45rem) clamp(1.2rem, 2.4vw, 1.55rem) clamp(1.2rem, 2.4vw, 1.5rem) !important;
	background: transparent !important;
	border: none !important;
}

body.hh-v2-product-cards-active .hh-v2-product-grid--featured .hh-v2-product-card__body {
	padding: clamp(1.25rem, 2.5vw, 1.6rem) clamp(1.3rem, 2.6vw, 1.65rem) clamp(1.3rem, 2.6vw, 1.6rem) !important;
}

/* ── Tag chip ── */
body.hh-v2-product-cards-active .hh-v2-product-card__tag,
body.hh-v2-product-cards-active .hh-product-card__badge {
	display: inline-flex !important;
	align-self: flex-start;
	padding: 0.28rem 0.7rem !important;
	border-radius: 999px !important;
	background: rgba(196, 30, 58, 0.08) !important;
	color: #a01830 !important;
	font-size: 0.72rem !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	border: 1px solid rgba(196, 30, 58, 0.18) !important;
}

body.hh-v2-product-cards-active .hh-product-card__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

body.hh-v2-product-cards-active .hh-product-card__badges .hh-product-card__badge:not(:first-child) {
	background: #f3f0ec !important;
	color: #5c534c !important;
	border-color: transparent !important;
	font-weight: 600 !important;
}

/* ── Title ── */
body.hh-v2-product-cards-active .hh-v2-product-card__title,
body.hh-v2-product-cards-active .hh-product-card__title {
	margin: 0 !important;
	padding: 0 !important;
	font-size: 1.02rem !important;
	font-weight: 700 !important;
	line-height: 1.35 !important;
	color: #1a1a1a !important;
	background: none !important;
	border: none !important;
}

body.hh-v2-product-cards-active .hh-v2-product-grid--featured .hh-v2-product-card__title,
body.hh-v2-product-cards-active .hh-v2-product-grid--featured .hh-product-card__title {
	font-size: 1.1rem !important;
}

body.hh-v2-product-cards-active .hh-v2-product-card__title a,
body.hh-v2-product-cards-active .hh-product-card__title a,
body.hh-v2-product-cards-active .woocommerce .hh-v2-product-card__title a,
body.hh-v2-product-cards-active .elementor .hh-v2-product-card__title a {
	color: #1a1a1a !important;
	text-decoration: none !important;
	text-decoration-line: none !important;
	text-underline-offset: unset !important;
	border: none !important;
	box-shadow: none !important;
	display: -webkit-box !important;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-weight: 700 !important;
}

body.hh-v2-product-cards-active .hh-v2-product-card__title a:hover,
body.hh-v2-product-cards-active .hh-product-card__title a:hover {
	color: #1a1a1a !important;
	text-decoration: none !important;
}

/* ── Meta / benefit / price ── */
body.hh-v2-product-cards-active .hh-v2-product-card__meta,
body.hh-v2-product-cards-active .hh-product-card__benefit,
body.hh-v2-product-cards-active .hh-product-card__price {
	margin: 0 !important;
	padding: 0 !important;
	font-size: 0.86rem !important;
	line-height: 1.5 !important;
	color: #666 !important;
	background: none !important;
	border: none !important;
}

body.hh-v2-product-cards-active .hh-v2-product-card__meta--quote,
body.hh-v2-product-cards-active .hh-product-card__price--quote span,
body.hh-v2-product-cards-active .hh-product-card__price--request span {
	color: #5c5c5c !important;
	font-weight: 500 !important;
}

body.hh-v2-product-cards-active .hh-product-card__price--amount {
	color: #1a1a1a !important;
	font-weight: 700 !important;
	font-size: 0.95rem !important;
}

body.hh-v2-product-cards-active .hh-product-card__note {
	display: none !important;
}

/* ── CTA row ── */
body.hh-v2-product-cards-active .hh-v2-product-card__actions,
body.hh-v2-product-cards-active .hh-product-card__actions {
	margin-top: auto !important;
	padding-top: 0.65rem !important;
	display: flex !important;
	flex-wrap: wrap !important;
	gap: 0.5rem !important;
	align-items: center !important;
	border: none !important;
	background: none !important;
}

body.hh-v2-product-cards-active .hh-v2-product-card__actions .hh-v2-btn,
body.hh-v2-product-cards-active .hh-v2-product-card__actions .hh-btn,
body.hh-v2-product-cards-active .hh-v2-product-card__actions .button,
body.hh-v2-product-cards-active .hh-product-card__actions .hh-v2-btn,
body.hh-v2-product-cards-active .hh-product-card__actions .hh-btn,
body.hh-v2-product-cards-active .hh-product-card__actions .button {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	min-height: 44px !important;
	padding: 0.6rem 1.1rem !important;
	border-radius: 999px !important;
	font-size: 0.86rem !important;
	font-weight: 600 !important;
	text-decoration: none !important;
	line-height: 1.2 !important;
	white-space: nowrap;
	margin: 0 !important;
	width: auto !important;
	float: none !important;
}

body.hh-v2-product-cards-active .hh-v2-product-card__actions .hh-v2-btn--dark,
body.hh-v2-product-cards-active .hh-v2-product-card__actions .hh-btn--navy,
body.hh-v2-product-cards-active .hh-product-card__actions .hh-v2-btn--dark,
body.hh-v2-product-cards-active .hh-product-card__actions .button.add_to_cart_button {
	background: #1a1a1a !important;
	border: 1px solid #1a1a1a !important;
	color: #fff !important;
}

body.hh-v2-product-cards-active .hh-v2-product-card__actions .hh-v2-btn--primary,
body.hh-v2-product-cards-active .hh-product-card__actions .hh-v2-btn--primary {
	background: #c41e3a !important;
	border: 1px solid #c41e3a !important;
	color: #fff !important;
}

body.hh-v2-product-cards-active .hh-v2-product-card__actions .hh-v2-btn--outline,
body.hh-v2-product-cards-active .hh-v2-product-card__actions .hh-btn--ghost,
body.hh-v2-product-cards-active .hh-product-card__actions .hh-v2-btn--outline {
	background: #fff !important;
	border: 1px solid #d8d0c8 !important;
	color: #1a1a1a !important;
}

body.hh-v2-product-cards-active .hh-link-arrow {
	display: none !important;
}

/* Hide default Woo loop elements if any leak through */
body.hh-v2-product-cards-active .hh-v2-product-grid .woocommerce-loop-product__title,
body.hh-v2-product-cards-active .hh-v2-product-grid .price:not(.hh-product-card__price),
body.hh-v2-product-cards-active .hh-v2-product-grid .star-rating,
body.hh-v2-product-cards-active .hh-v2-product-grid a.add_to_cart_button:not(.hh-v2-btn):not(.hh-btn) {
	display: none !important;
}

@media (max-width: 1024px) {
	body.hh-v2-product-cards-active .hh-v2-product-grid ul.products,
	body.hh-v2-product-cards-active .hh-v2-product-grid__list {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 640px) {
	body.hh-v2-product-cards-active .hh-v2-product-grid ul.products,
	body.hh-v2-product-cards-active .hh-v2-product-grid__list {
		grid-template-columns: 1fr !important;
		gap: 1.15rem !important;
	}

	body.hh-v2-product-cards-active .hh-v2-product-card__actions,
	body.hh-v2-product-cards-active .hh-product-card__actions {
		flex-direction: column !important;
		align-items: stretch !important;
	}

	body.hh-v2-product-cards-active .hh-v2-product-card__actions .hh-v2-btn,
	body.hh-v2-product-cards-active .hh-v2-product-card__actions .hh-btn,
	body.hh-v2-product-cards-active .hh-v2-product-card__actions .button,
	body.hh-v2-product-cards-active .hh-product-card__actions .hh-v2-btn,
	body.hh-v2-product-cards-active .hh-product-card__actions .hh-btn,
	body.hh-v2-product-cards-active .hh-product-card__actions .button {
		width: 100% !important;
	}
}
