/*
 * Styles for the "Big Brands, Big Savings" section (hhd_render_homepage_cheaper_products())
 * when it appears on product category pages, below the Load More button.
 *
 * Deliberately NOT the full home.css file: that file also styles unrelated
 * homepage-only elements under reused class names (e.g. .hhd-category-grid,
 * which belongs to the homepage's featured-category slider but happens to
 * share a name with the *category page's own* subcategory directory grid).
 * Loading all of home.css on category pages collapsed that subcategory grid's
 * columns to near-zero width — William, 2026-08-27. This file only contains
 * the rules this one section actually needs, copied from home.css.
 */

.hhd-home-section {
	box-sizing: border-box;
	width: min(calc(100% - 32px), var(--hhd-home-width, 1290px)) !important;
	max-width: var(--hhd-home-width, 1290px) !important;
	margin-inline: auto !important;
}

@media (max-width: 767px) {
	.hhd-home-section {
		width: min(calc(100% - 24px), var(--hhd-home-width, 1290px)) !important;
	}
}

.hhd-managed-section {
	padding-block: clamp(36px, 6vw, 72px);
}

.hhd-managed-section h2 {
	margin: 0 0 20px;
	color: var(--hhd-navy, #062b64);
	font-size: clamp(1.6rem, 3vw, 2.25rem);
}

.hhd-managed-section__heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.hhd-managed-section__copy {
	max-width: 850px;
	margin: -8px 0 24px;
}

.hhd-managed-section--cheaper .hhd-managed-section__copy {
	margin-bottom: 40px;
}

.hhd-home-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 18px;
	border-radius: 4px;
	background: var(--hhd-yellow, #ffd21c);
	color: #102541;
	font-weight: 700;
	text-decoration: none;
}

.hhd-managed-section--cheaper ul.products {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 24px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.hhd-managed-section--cheaper ul.products li.product {
	float: none;
	width: auto;
	margin: 0;
	text-align: center;
	display: flex;
	flex-direction: column;
}

.hhd-managed-section--cheaper ul.products li.product > a:first-child {
	display: block;
	color: #14243a;
	text-decoration: none;
}

.hhd-managed-section--cheaper ul.products li.product img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 4px;
	margin: 0 auto 10px;
}

.hhd-managed-section--cheaper ul.products li.product .woocommerce-loop-product__title {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	margin: 0 0 6px;
	color: #14243a;
}

.hhd-managed-section--cheaper ul.products li.product .price {
	display: block;
	font-size: 15px;
	font-weight: 600;
	margin: 0 0 8px;
}

.hhd-managed-section--cheaper ul.products li.product .price del {
	opacity: .55;
	font-weight: 400;
	margin-right: 6px;
}

.hhd-managed-section--cheaper ul.products li.product .price ins {
	text-decoration: none;
	color: #b3261e;
}

.hhd-managed-section--cheaper ul.products li.product .hhd-product-card__media {
	position: relative;
	display: block;
}

.hhd-managed-section--cheaper ul.products li.product .hhd-product-card__competitor {
	display: block;
	min-height: 17px;
	font-size: 12px;
	color: #6b7280;
	margin-bottom: 2px;
}

.hhd-managed-section--cheaper ul.products li.product .hhd-product-card__competitor del {
	text-decoration: line-through;
}

.hhd-managed-section--cheaper ul.products li.product .hhd-product-card__saving-amount-pill {
	position: absolute;
	top: 8px;
	left: 8px;
	display: inline-block;
	background: #b3261e;
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	padding: 5px 10px;
	border-radius: 4px;
	line-height: 1;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}

.hhd-managed-section--cheaper ul.products li.product .hhd-product-card__button {
	margin-top: auto;
	font-size: 13px;
	min-height: 36px;
	padding: 8px 14px;
	width: 100%;
}

.hhd-product-card__price-check-note {
	margin: 20px 0 0;
	font-size: 12px;
	color: #8a8f98;
}

@media (max-width: 900px) {
	.hhd-managed-section--cheaper ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 16px;
	}
}

@media (max-width: 600px) {
	.hhd-managed-section--cheaper ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 14px;
	}
}
