/**
 * Product page recommendation sections (includes/recommendations.php):
 * "Complete the kit", "Pairs with", "Recommended for you".
 * Cards reuse the archive card styles (product-card.css, .hfm-shop tokens).
 * Always one row: a scroll-snap slider (swipe on touch, arrows from
 * js/recommendations.js on larger screens). Desktop shows four at a time.
 */

.hfm-recs {
	margin: 48px auto;
	max-width: 1280px;
	padding: 0 16px;
}

.hfm-recs[hidden] {
	display: none;
}

.hfm-recs__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin: 0 0 16px;
}

.hfm-recs__nav {
	display: none;
	flex: none;
	gap: 8px;
}

.hfm-recs__nav button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--hfm-line, #d9d9d9);
	border-radius: 999px;
	background: var(--hfm-surface, #fff);
	color: var(--hfm-ink);
	cursor: pointer;
	transition: opacity 0.15s ease, border-color 0.15s ease;
}

.hfm-recs__nav button:hover:not(:disabled) {
	border-color: var(--hfm-ink);
}

.hfm-recs__nav button:disabled {
	opacity: 0.35;
	cursor: default;
}

@media (min-width: 600px) {
	.hfm-recs.is-scrollable .hfm-recs__nav {
		display: inline-flex;
	}
}

.hfm-recs__title {
	margin: 0 0 4px;
	font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
	line-height: 1.2;
	color: var(--hfm-ink);
}

.hfm-recs__sub {
	margin: 0;
	font-size: 0.9375rem;
	color: var(--hfm-ink-2);
}

.hfm-shop.hfm-recs ul.hfm-recs__grid {
	list-style: none;
	margin: 0;
	padding: 0 0 8px;
	display: grid;
	grid-template-columns: none;
	grid-auto-flow: column;
	grid-auto-columns: minmax(64%, 1fr);
	gap: 16px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
}

.hfm-shop.hfm-recs ul.hfm-recs__grid > li {
	position: relative;
	width: auto;
	margin: 0;
	float: none;
	scroll-snap-align: start;
	min-width: 0;
}

@media (min-width: 600px) {
	.hfm-shop.hfm-recs ul.hfm-recs__grid {
		grid-auto-columns: calc((100% - 32px) / 3);
	}
}

@media (min-width: 1024px) {
	.hfm-shop.hfm-recs ul.hfm-recs__grid {
		grid-auto-columns: calc((100% - 48px) / 4);
		scrollbar-width: none; /* Arrows instead. */
	}
	.hfm-recs__grid::-webkit-scrollbar {
		display: none;
	}
}

.hfm-recs__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	padding: 3px 9px;
	border-radius: 999px;
	background: var(--hfm-accent);
	color: var(--hfm-accent-ink, #fff);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	pointer-events: none;
}
