/**
 * Home page v2 (templates/home-v2.php). Product cards come from plp-v2.css.
 */

.nvm-home-v2 {
	--home-accent: var(--main-strong-color, #c38f1e);
	--home-accent-dark: #a5770f;
	--home-text: #222;
	--home-muted: #6b6b6b;
	--home-line: #e9e5dc;
	--home-soft: #faf7f0;
	--home-radius: 12px;
}

.nvm-home-v2 .storefront-breadcrumb {
	display: none;
}

.nvm-home {
	padding: 24px 0 8px;
	color: var(--home-text);
}

.nvm-home > * + * {
	margin-top: 56px;
}

.nvm-home-h2 {
	margin: 0;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--home-text);
}

.nvm-home-eyebrow {
	display: inline-block;
	margin-bottom: 10px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--home-accent);
}

.nvm-home-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 48px;
	padding: 0 24px;
	border: 1.5px solid var(--home-text);
	border-radius: 999px;
	background: #fff;
	color: var(--home-text) !important;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none !important;
	transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.nvm-home-btn:hover {
	background: var(--home-text);
	color: #fff !important;
}

.nvm-home-btn--primary {
	border-color: var(--home-accent);
	background: var(--home-accent);
	color: #fff !important;
}

.nvm-home-btn--primary:hover {
	border-color: var(--home-accent-dark);
	background: var(--home-accent-dark);
}

/* ---------- Hero ---------- */

.nvm-home-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	align-items: center;
	gap: 56px;
	padding: 0;
	border-radius: var(--home-radius);
	background: #fff;
	overflow: hidden;
}

.nvm-home-hero__media {
	display: block;
	line-height: 0;
}

.nvm-home-hero__media img {
	width: 100%;
	height: auto;
	max-height: 640px;
	object-fit: cover;
}

.nvm-home-hero__text {
	padding: 40px 48px 40px 0;
}

.nvm-home-hero__title {
	margin: 0 0 14px;
	font-size: 44px;
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.01em;
	color: var(--home-text);
}

.nvm-home-hero__lead {
	max-width: 36ch;
	margin: 0 0 28px;
	font-size: 17px;
	line-height: 1.6;
	color: #444;
}

.nvm-home-hero__ctas {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

@media (max-width: 900px) {
	.nvm-home-hero {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.nvm-home-hero__text {
		padding: 24px 20px 28px;
		text-align: center;
	}

	.nvm-home-hero__title {
		font-size: 30px;
	}

	.nvm-home-hero__lead {
		margin: 0 auto 20px;
		font-size: 15px;
	}

	.nvm-home-hero__ctas {
		justify-content: center;
	}

	.nvm-home-hero__ctas .nvm-home-btn {
		flex: 1 1 0;
		min-width: 0;
		padding: 0 12px;
	}
}

/* ---------- Benefits ---------- */

.nvm-home-benefits {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
	margin-left: 0;
	margin-right: 0;
	padding: 20px 24px;
	list-style: none;
	border: 1px solid var(--home-line);
	border-radius: var(--home-radius);
	background: var(--home-soft);
}

.nvm-home > .nvm-home-benefits {
	margin-top: 20px;
}

.nvm-home-benefits li {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
}

.nvm-home-benefits svg {
	flex: 0 0 30px;
	width: 30px;
	height: 30px;
	fill: none;
	stroke: var(--home-accent);
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.nvm-home-benefits span {
	display: flex;
	flex-direction: column;
	font-size: 13px;
	line-height: 1.35;
	color: var(--home-muted);
}

.nvm-home-benefits strong {
	font-size: 14px;
	color: var(--home-text);
}

@media (max-width: 900px) {
	/* Swipeable strip on small screens. */
	.nvm-home-benefits {
		display: flex;
		gap: 24px;
		margin-left: -16px;
		margin-right: -16px;
		padding: 14px 16px;
		border-radius: 0;
		border-left: 0;
		border-right: 0;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}

	.nvm-home-benefits::-webkit-scrollbar {
		display: none;
	}

	.nvm-home-benefits li {
		flex: 0 0 auto;
		scroll-snap-align: start;
	}
}

/* ---------- Categories ---------- */

.nvm-home-cats .nvm-home-h2 {
	margin-bottom: 20px;
}

.nvm-home-cats__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nvm-home-cats__grid li {
	margin: 0;
}

.nvm-home-cat {
	position: relative;
	display: block;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	border-radius: var(--home-radius);
	background: #efece6;
	text-decoration: none !important;
}

.nvm-home-cat img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 20%;
	transition: transform 0.4s ease;
}

.nvm-home-cat::after {
	content: "";
	position: absolute;
	inset: 62% 0 0;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.55));
	pointer-events: none;
}

.nvm-home-cat__label {
	position: absolute;
	left: 20px;
	right: 20px;
	bottom: 18px;
	z-index: 1;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
	color: #fff;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}

.nvm-home-cat__cta {
	flex: 0 0 auto;
	padding: 6px 12px;
	border-radius: 999px;
	background: #fff;
	color: var(--home-text);
	font-size: 13px;
	font-weight: 700;
	text-shadow: none;
}

@media (hover: hover) {
	.nvm-home-cat:hover img {
		transform: scale(1.04);
	}
}

@media (max-width: 767px) {
	.nvm-home-cats__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.nvm-home-cat__label {
		left: 12px;
		right: 12px;
		bottom: 12px;
		font-size: 16px;
	}

	.nvm-home-cat__cta {
		display: none;
	}
}

/* ---------- Product rows ---------- */

.nvm-home-row__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 16px;
}

.nvm-home-row__nav {
	display: flex;
	align-items: center;
	gap: 8px;
}

.nvm-home-row__all {
	margin-right: 8px;
	color: var(--home-accent) !important;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none !important;
	white-space: nowrap;
}

.nvm-home-row__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1.5px solid var(--home-line);
	border-radius: 999px;
	background: #fff;
	color: var(--home-text);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.nvm-home-row__btn:hover {
	border-color: var(--home-text);
	background: #fff;
	color: var(--home-text);
}

.nvm-home-row__btn[disabled] {
	opacity: 0.35;
	cursor: default;
}

.nvm-home-v2 .nvm-home-row .woocommerce {
	margin: 0;
}

/* Horizontal scroller: 4 cards visible on desktop, ~2.2 on mobile. */
.nvm-home-v2 .nvm-home-row ul.products {
	grid-template-columns: none !important;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - 3 * 24px) / 4);
	margin: 0 !important;
	padding: 2px 2px 12px !important;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
}

.nvm-home-v2 .nvm-home-row ul.products::-webkit-scrollbar {
	display: none;
}

.nvm-home-v2 .nvm-home-row ul.products li.product {
	scroll-snap-align: start;
}

@media (max-width: 1024px) {
	.nvm-home-v2 .nvm-home-row ul.products {
		grid-auto-columns: calc((100% - 2 * 16px) / 3);
	}
}

@media (max-width: 767px) {
	.nvm-home > * + * {
		margin-top: 40px;
	}

	.nvm-home-h2 {
		font-size: 21px;
	}

	.nvm-home-row__btn {
		display: none;
	}

	.nvm-home-row__all {
		margin-right: 0;
	}

	.nvm-home-v2 .nvm-home-row ul.products {
		grid-auto-columns: 44%;
		gap: 12px;
		margin: 0 -16px !important;
		padding: 2px 16px 12px !important;
		scroll-padding: 0 16px;
	}
}

/* ---------- Brand ---------- */

.nvm-home-brand {
	padding: 48px 24px;
	border-radius: var(--home-radius);
	background: var(--home-soft);
	border: 1px solid var(--home-line);
	text-align: center;
}

.nvm-home-brand p {
	max-width: 60ch;
	margin: 12px auto 24px;
	font-size: 16px;
	line-height: 1.65;
	color: #444;
}

@media (max-width: 767px) {
	/* 16px gutter: the full-bleed sections above use -16px margins. */
	.nvm-home-v2 #content .col-full {
		margin-left: 0 !important;
		margin-right: 0 !important;
		padding-left: 16px !important;
		padding-right: 16px !important;
	}

	.nvm-home-hero__ctas .nvm-home-btn {
		height: 44px;
		font-size: 14px;
	}

	.nvm-home {
		padding-top: 12px;
	}

	.nvm-home-hero {
		margin-left: -16px;
		margin-right: -16px;
		border-radius: 0;
	}

	.nvm-home-brand {
		padding: 32px 16px;
	}
}
