/*
 * Shop home page (sections with nmh- classes, see home/home-it.html).
 * Colours and sizes come from the parent theme tokens (--nm-*), set in Customize.
 */

.nmh-home {
	--nmh-gap: clamp(48px, 7vw, 96px);
	--nmh-pad: max(var(--nm-gutter, 20px), calc((100% - var(--nm-container, 1240px)) / 2));
	--nmh-navy: var(--nm-heading, #1b2a49);
	--nmh-amber: var(--nm-primary, #fbb731);
	--nmh-soft: var(--nm-soft, #f7f4ee);
	--nmh-wa: #1f9d55;
	color: var(--nm-text, #404040);
	overflow-x: clip;
}

/* Classic themes wrap group content in an extra inner container: let the grids see the real children. */
.nmh-home .wp-block-group__inner-container { display: contents; }

.nmh-home > * + *,
.nmh-home :where(.wp-block-group) > * { margin-block: 0; }
.nmh-home p { margin: 0; }
.nmh-home figure { margin: 0; }
.nmh-home img { display: block; max-width: 100%; height: auto; }

/* Sections */
.nmh-section { padding: var(--nmh-gap) var(--nmh-pad); }
.nmh-section + .nmh-section:not(.nmh-products--soft):not(.nmh-cta):not(.nmh-trust) { padding-top: 0; }
.nmh-products--soft + .nmh-section { padding-top: var(--nmh-gap) !important; }

.nmh-eyebrow {
	color: #b07a0c;
	font-size: .78rem;
	font-weight: 800;
	letter-spacing: .14em;
	text-transform: uppercase;
}
.nmh-title {
	color: var(--nmh-navy);
	font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.4rem);
	font-weight: 800;
	letter-spacing: -.02em;
	line-height: 1.15;
	margin: .3em 0 0;
}

/* Section header: eyebrow + title left, "see all" right */
.nmh-head {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: end;
	column-gap: 24px;
	margin-bottom: clamp(20px, 3vw, 32px);
}
.nmh-head .nmh-eyebrow, .nmh-head .nmh-title { grid-column: 1; }
.nmh-more { grid-column: 2; grid-row: 1 / span 2; align-self: end; }
.nmh-more a {
	color: var(--nmh-navy);
	font-weight: 800;
	text-decoration: none;
	white-space: nowrap;
	border-bottom: 2px solid var(--nmh-amber);
	padding-bottom: 2px;
	transition: color .2s;
}
.nmh-more a::after { content: " \2192"; }
.nmh-more a:hover { color: #b07a0c; }

/* Buttons */
.nmh-home .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.nmh-btn .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 50px;
	padding: 12px 28px;
	border: 2px solid var(--nmh-amber);
	border-radius: 999px;
	background: var(--nmh-amber);
	color: var(--nmh-navy);
	font-size: 1rem;
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none;
	transition: transform .2s var(--nm-ease, ease), box-shadow .2s, background-color .2s, color .2s;
}
.nmh-btn .wp-block-button__link:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(251, 183, 49, .35); }
.nmh-btn.is-style-outline .wp-block-button__link { background: transparent; }
.nmh-btn--wa .wp-block-button__link { border-color: var(--nmh-wa); color: var(--nmh-wa); }
.nmh-btn--wa .wp-block-button__link:hover { background: var(--nmh-wa); color: #fff; box-shadow: 0 10px 24px rgba(31, 157, 85, .3); }
.nmh-btn--wa .wp-block-button__link::before,
.nmh-btn--wa-solid .wp-block-button__link::before {
	content: "";
	width: 20px;
	height: 20px;
	background: currentColor;
	-webkit-mask: var(--nmh-i-wa) center / contain no-repeat;
	mask: var(--nmh-i-wa) center / contain no-repeat;
}
.nmh-btn--wa-solid .wp-block-button__link { background: var(--nmh-wa); border-color: var(--nmh-wa); color: #fff; }
.nmh-btn--wa-solid .wp-block-button__link:hover { box-shadow: 0 10px 24px rgba(0, 0, 0, .25); }
.nmh-btn--dark .wp-block-button__link { border-color: var(--nmh-navy); color: var(--nmh-navy); }
.nmh-btn--dark .wp-block-button__link:hover { background: var(--nmh-navy); color: #fff; box-shadow: none; }
.nmh-btn--light .wp-block-button__link { border-color: rgba(255, 255, 255, .5); color: #fff; }
.nmh-btn--light .wp-block-button__link:hover { background: #fff; border-color: #fff; color: var(--nmh-navy); box-shadow: none; }

/* Hero */
.nmh-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	align-items: center;
	gap: clamp(32px, 5vw, 72px);
	padding-top: clamp(40px, 6vw, 80px);
	padding-bottom: clamp(40px, 6vw, 80px);
	background:
		radial-gradient(60% 80% at 100% 0%, rgba(251, 183, 49, .22), transparent 70%),
		linear-gradient(180deg, var(--nmh-soft), #fff);
}
.nmh-hero__title {
	color: var(--nmh-navy);
	font-size: clamp(2.2rem, 1.2rem + 3.6vw, 3.9rem);
	font-weight: 900;
	letter-spacing: -.03em;
	line-height: 1.04;
	margin: .35em 0 0;
}
.nmh-hero__title em {
	font-style: normal;
	background: linear-gradient(transparent 62%, rgba(251, 183, 49, .55) 62%);
}
.nmh-lead { font-size: clamp(1.02rem, .95rem + .3vw, 1.18rem); line-height: 1.65; margin-top: 18px !important; max-width: 34em; }
.nmh-hero__note { margin-top: 20px !important; font-size: .95rem; color: var(--nm-muted, #7a7a7a); }
.nmh-hero__note strong { color: var(--nmh-navy); }
.nmh-hero__note::before { content: ""; display: inline-block; width: 18px; height: 18px; margin-right: 8px; vertical-align: -3px; background: var(--nmh-wa); -webkit-mask: var(--nmh-i-truck) center / contain no-repeat; mask: var(--nmh-i-truck) center / contain no-repeat; }

.nmh-hero__media {
	position: relative;
	display: grid;
	grid-template-columns: 1.25fr 1fr;
	grid-template-rows: 1fr 1fr;
	gap: 14px;
	aspect-ratio: 1 / 0.92;
}
.nmh-hero__img { position: relative; overflow: hidden; border-radius: 20px; box-shadow: var(--nm-shadow); background: #fff; }
.nmh-hero__img a, .nmh-hero__img img { display: block; width: 100%; height: 100%; }
.nmh-hero__img img { object-fit: cover; transition: transform .6s var(--nm-ease, ease); }
.nmh-hero__img:hover img { transform: scale(1.05); }
.nmh-hero__img--main { grid-row: 1 / span 2; }
.nmh-hero__badge {
	position: absolute;
	left: -18px;
	bottom: 26px;
	display: flex;
	flex-direction: column;
	padding: 14px 18px 14px 58px;
	border-radius: 16px;
	background: #fff;
	box-shadow: var(--nm-shadow);
	color: var(--nmh-navy);
	font-size: .82rem;
	line-height: 1.25;
}
.nmh-hero__badge strong { font-size: 1.05rem; }
.nmh-hero__badge::before {
	content: "";
	position: absolute;
	left: 14px;
	top: 50%;
	width: 32px;
	height: 32px;
	margin-top: -16px;
	border-radius: 50%;
	background: var(--nmh-amber) var(--nmh-i-leaf-url) center / 18px no-repeat;
}

/* Trust bar */
.nmh-trust {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0;
	padding-top: 0 !important;
	margin-top: calc(var(--nmh-gap) * -.35) !important;
	position: relative;
	z-index: 1;
}
.nmh-trust .nmh-ico {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 22px 18px 22px 72px;
	background: #fff;
	border: 1px solid var(--nm-border, #e6e1d8);
	font-size: .9rem;
	line-height: 1.35;
	color: var(--nm-muted, #7a7a7a);
}
.nmh-trust .nmh-ico + .nmh-ico { border-left: 0; }
.nmh-trust .nmh-ico:first-child { border-radius: 16px 0 0 16px; }
.nmh-trust .nmh-ico:last-child { border-radius: 0 16px 16px 0; }
.nmh-trust strong { color: var(--nmh-navy); font-size: 1rem; }
.nmh-trust a { color: inherit; }
.nmh-ico::before {
	content: "";
	position: absolute;
	left: 20px;
	top: 50%;
	width: 38px;
	height: 38px;
	margin-top: -19px;
	border-radius: 50%;
	background: rgba(251, 183, 49, .18);
}
.nmh-ico::after {
	content: "";
	position: absolute;
	left: 29px;
	top: 50%;
	width: 20px;
	height: 20px;
	margin-top: -10px;
	background: #b07a0c;
	-webkit-mask: var(--nmh-i) center / contain no-repeat;
	mask: var(--nmh-i) center / contain no-repeat;
}
.nmh-ico--truck { --nmh-i: var(--nmh-i-truck); }
.nmh-ico--leaf { --nmh-i: var(--nmh-i-leaf); }
.nmh-ico--lock { --nmh-i: var(--nmh-i-lock); }
.nmh-ico--chat { --nmh-i: var(--nmh-i-wa); }

/* Categories */
.nmh-cats__grid {
	display: grid;
	grid-template-columns: repeat(8, minmax(0, 1fr));
	gap: 16px;
}
.nmh-cat { position: relative; text-align: center; }
.nmh-cat a { display: block; border-radius: 50%; overflow: hidden; aspect-ratio: 1; background: var(--nmh-soft); box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--nm-border, #e6e1d8); transition: box-shadow .25s, transform .25s var(--nm-ease, ease); }
.nmh-cat a::after { content: ""; position: absolute; inset: 0; }
.nmh-cat img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--nm-ease, ease); }
.nmh-cat:hover a { box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--nmh-amber); transform: translateY(-3px); }
.nmh-cat:hover img { transform: scale(1.08); }
.nmh-cat figcaption.wp-element-caption {
	margin: 14px 0 0;
	color: var(--nmh-navy);
	font-size: .95rem;
	font-weight: 800;
	line-height: 1.25;
}

/* Product rows: the parent theme styles the cards */
.nmh-products .woocommerce { margin: 0; }
.nmh-products .woocommerce ul.products { margin-bottom: 0; }
.nmh-products--soft { background: var(--nmh-soft); }

/* Promo cards */
.nmh-promos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.nmh-promo {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
	align-items: center;
	overflow: hidden;
	border-radius: 24px;
	background: #fdf1d6;
	min-height: 300px;
}
.nmh-promo--dark { background: var(--nm-footer-bg, #0f4670); color: rgba(255, 255, 255, .85); }
.nmh-promo--dark .nmh-promo__title { color: #fff; }
.nmh-promo--dark .nmh-eyebrow { color: var(--nmh-amber); }
.nmh-promo__img { align-self: stretch; }
.nmh-promo__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--nm-ease, ease); }
.nmh-promo:hover .nmh-promo__img img { transform: scale(1.05); }
.nmh-promo__body { padding: 28px clamp(20px, 3vw, 36px); }
.nmh-promo__title { color: var(--nmh-navy); font-size: clamp(1.3rem, 1rem + 1vw, 1.7rem); font-weight: 900; line-height: 1.15; margin: .3em 0 .4em; }
.nmh-promo .wp-block-buttons { margin-top: 18px; }

/* Story */
.nmh-story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: clamp(32px, 6vw, 80px); }
.nmh-story__img img { width: 100%; border-radius: 24px; }
.nmh-story__body > p:not(.nmh-eyebrow) { margin-top: 16px; font-size: 1.05rem; line-height: 1.7; }
.nmh-checks { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
/* The classic editor can nest the list items (ul > li > ul > li): show one check per item only. */
.nmh-checks ul.nmh-checks, .nmh-checks ul { margin: 0; padding: 0; list-style: none; }
.nmh-checks li:has(> ul) { padding-left: 0 !important; list-style: none; }
.nmh-checks li:has(> ul)::before { display: none !important; }
.nmh-checks li, .nmh-check { position: relative; padding-left: 34px; font-weight: 700; color: var(--nmh-navy); list-style: none; }
.nmh-checks + .nmh-checks { margin-top: 10px; }
.nmh-check { margin-top: 10px !important; font-size: 1rem !important; line-height: 1.5 !important; }
:not(.nmh-check) + .nmh-check { margin-top: 20px !important; }
.nmh-checks li::before, .nmh-check::before {
	content: "";
	position: absolute;
	left: 0;
	top: 1px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--nmh-amber) var(--nmh-i-check-url) center / 12px no-repeat;
}

/* Final call to action */
.nmh-cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px 40px;
	margin: 0 var(--nmh-pad) var(--nmh-gap) !important;
	padding: clamp(32px, 5vw, 56px);
	border-radius: 28px;
	background:
		radial-gradient(50% 120% at 100% 100%, rgba(251, 183, 49, .28), transparent 70%),
		var(--nmh-navy);
	color: rgba(255, 255, 255, .85);
}
.nmh-cta .nmh-title { color: #fff; margin: 0 0 8px; }
.nmh-cta .wp-block-buttons { margin-top: 0; }

/* Icons */
.nmh-home {
	--nmh-i-truck: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h11v10H3zM14 9h4l3 3v4h-7z'/%3E%3Ccircle cx='7' cy='17.5' r='1.8'/%3E%3Ccircle cx='17' cy='17.5' r='1.8'/%3E%3C/svg%3E");
	--nmh-i-leaf: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 19c0-8 5-13 15-14-1 10-6 15-14 15'/%3E%3Cpath d='M5 19l7-7'/%3E%3C/svg%3E");
	--nmh-i-leaf-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b2a49' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 19c0-8 5-13 15-14-1 10-6 15-14 15'/%3E%3Cpath d='M5 19l7-7'/%3E%3C/svg%3E");
	--nmh-i-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='10' width='16' height='11' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E");
	--nmh-i-wa: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2zm0 18.2a8.2 8.2 0 0 1-4.2-1.2l-.3-.2-3 .8.8-2.9-.2-.3A8.2 8.2 0 1 1 12 20.2zm4.5-6.1c-.2-.1-1.5-.7-1.7-.8s-.4-.1-.6.1-.7.8-.8 1-.3.2-.5.1a6.7 6.7 0 0 1-3.3-2.9c-.3-.4.2-.4.7-1.4a.5.5 0 0 0 0-.4l-.8-1.9c-.2-.5-.4-.4-.6-.4h-.5a1 1 0 0 0-.7.3 3 3 0 0 0-.9 2.2 5.2 5.2 0 0 0 1.1 2.7 11.8 11.8 0 0 0 4.5 4c1.7.7 2.3.8 3.2.6a2.7 2.7 0 0 0 1.8-1.2 2.2 2.2 0 0 0 .1-1.3c0-.1-.2-.2-.5-.3z'/%3E%3C/svg%3E");
	--nmh-i-check-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b2a49' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

/* Tablet */
@media (max-width: 991px) {
	.nmh-hero { grid-template-columns: 1fr; }
	.nmh-hero__media { max-width: 640px; width: 100%; margin-inline: auto; aspect-ratio: 1 / .75; }
	.nmh-hero__badge { left: 12px; }
	.nmh-trust { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0 !important; padding-top: 24px !important; }
	.nmh-trust .nmh-ico { border-radius: 0 !important; }
	.nmh-trust .nmh-ico:nth-child(odd) { border-left: 1px solid var(--nm-border, #e6e1d8); }
	.nmh-trust .nmh-ico:nth-child(n+3) { border-top: 0; }
	.nmh-trust .nmh-ico:nth-child(1) { border-radius: 16px 0 0 0 !important; }
	.nmh-trust .nmh-ico:nth-child(2) { border-radius: 0 16px 0 0 !important; }
	.nmh-trust .nmh-ico:nth-child(3) { border-radius: 0 0 0 16px !important; }
	.nmh-trust .nmh-ico:nth-child(4) { border-radius: 0 0 16px 0 !important; }
	.nmh-cats__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 16px; }
	.nmh-promos { grid-template-columns: 1fr; }
	.nmh-story { grid-template-columns: 1fr 1.2fr; }
}

/* Phone */
@media (max-width: 767px) {
	.nmh-home { --nmh-gap: 48px; }
	.nmh-hero { padding-top: 28px; text-align: left; }
	.nmh-hero__media { aspect-ratio: 1 / .85; gap: 10px; }
	.nmh-hero__img { border-radius: 14px; }
	.nmh-hero__badge { left: 8px; bottom: 12px; padding: 10px 12px 10px 50px; }
	.nmh-hero__badge::before { left: 10px; }
	.nmh-actions { flex-direction: column; }
	.nmh-actions .wp-block-button, .nmh-actions .wp-block-button__link { width: 100%; }
	.nmh-trust { padding-top: 20px !important; }
	.nmh-trust .nmh-ico { padding: 16px 12px 16px 12px; font-size: .82rem; }
	.nmh-trust .nmh-ico::before, .nmh-trust .nmh-ico::after { position: static; order: -1; margin: 0 0 8px; }
	.nmh-trust .nmh-ico::before { display: none; }
	.nmh-trust strong { font-size: .92rem; }
	.nmh-head { grid-template-columns: 1fr; }
	.nmh-more { grid-column: 1; grid-row: auto; margin-top: 10px !important; }
	.nmh-cats__grid { display: flex; overflow-x: auto; gap: 16px; scroll-snap-type: x mandatory; margin-inline: calc(var(--nmh-pad) * -1); padding: 6px var(--nmh-pad) 8px; scrollbar-width: none; }
	.nmh-cats__grid::-webkit-scrollbar { display: none; }
	.nmh-cat { flex: 0 0 96px; scroll-snap-align: start; }
	.nmh-cat figcaption.wp-element-caption { font-size: .85rem; }
	.nmh-promo { grid-template-columns: 1fr; min-height: 0; }
	.nmh-promo__img img { aspect-ratio: 16 / 9; height: auto; }
	.nmh-story { grid-template-columns: 1fr; }
	.nmh-cta { margin-inline: var(--nm-gutter, 20px) !important; flex-direction: column; align-items: stretch; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
	.nmh-home *, .nmh-home *::before, .nmh-home *::after { transition: none !important; }
}
