/* Homepage CMS elements retain their own layout in any native shopping experience. */
.home-section {
	--home-gap: 1.5rem;

	color: var(--sw-text-color);
}

.home-container {
	width: var(--site-container-width);
	margin-inline: auto;
	padding-inline: var(--site-content-frame);
}

.home-section *,
.home-section *::before,
.home-section *::after {
	min-width: 0;
}

.home-section h1,
.home-section h2,
.home-section h3 {
	color: var(--sw-headline-color);
}

.home-section p {
	margin: 0;
}

.home-section .home-eyebrow {
	margin: 0 0 0.625rem;
	color: var(--sw-color-brand-primary);
	font: italic 400 1rem / 1.4 "Hanken Grotesk", var(--sw-font-family-headline);
}

.home-section .home-heading {
	margin: 0;
	font: 800 clamp(1.75rem, 2.5vw, 2.25rem) / 1.05 var(--sw-font-family-headline);
	letter-spacing: -0.03em;
	text-wrap: pretty;
}

.home-heading span {
	color: var(--sw-color-brand-primary);
}

.home-section__header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem 2rem;
	margin-bottom: 1.75rem;
}

.home-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--sw-color-brand-primary);
	font: 400 0.9375rem / 1.4 var(--sw-font-family-base);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
	text-decoration-color: color-mix(in oklch, var(--sw-color-brand-primary) 35%, transparent);
	min-height: 44px;
}

.home-section__header > .home-link {
	position: relative;
	min-height: 0;
	margin-bottom: 0.5rem;
}

.home-section__header > .home-link::after,
.home-search__examples a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: 44px;
	transform: translateY(-50%);
}

.home-section__header > .home-link > .icon {
	width: 16px;
	height: 16px;
}

.home-section__header > .home-link > .icon > svg {
	top: 0;
}

a.home-link:hover {
	color: var(--site-palette-forest-900);
	text-decoration-color: currentcolor;
}

.home-link > .icon {
	flex: none;
}

.home-section .icon {
	color: inherit;
}

.home-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.home-hero {
	padding-block: clamp(2.5rem, 5vw, 4.5rem);
	background: var(--site-palette-forest-950);
	color: var(--site-palette-dark-copy);
}

.home-hero__grid {
	display: grid;
	grid-template-columns: repeat(24, minmax(0, 1fr));
	gap: 2rem clamp(0.5rem, 1.3vw, 1.5rem);
	align-items: center;
}

.home-hero__content {
	grid-column: span 14;
}

.home-hero__media {
	grid-column: 16 / span 9;
	aspect-ratio: 5 / 4;
	overflow: hidden;
}

.home-hero .home-heading {
	font-size: clamp(2.125rem, 3.6vw, 3.25rem);
	color: var(--site-palette-white);
	max-width: 22ch;
	line-height: 1.02;
	letter-spacing: -0.034em;
	text-wrap: balance;
}

.home-hero .home-eyebrow,
.home-hero .home-heading span {
	color: var(--site-palette-mint-200);
}

.home-hero .home-intro {
	max-width: 46ch;
	margin-top: 1.125rem;
	font-size: 1.125rem;
	line-height: 1.5;
}

.home-search {
	position: relative;
	margin-top: 1.75rem;
	max-width: 32.5rem;
}

.home-hero .home-search__examples {
	margin-top: 0.875rem;
	font-size: 0.875rem;
}

.home-search__examples a {
	position: relative;
	color: var(--site-palette-mint-200);
	display: inline-flex;
	align-items: center;
	line-height: 1.5;
	text-underline-offset: 0.2em;
}

.home-promises {
	padding-block: 1.375rem;
	border-bottom: 1px solid var(--sw-border-color);
}

.cms-page.shop-home-layout :is(.home-hero, .home-promises) {
	width: 100%;
	max-width: 120rem;
	margin-inline: auto;
}

.cms-page.shop-home-layout .home-promises {
	background: var(--site-palette-ink-100);
}

.home-promises__list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.25rem clamp(1rem, 2vw, 2rem);
	list-style: none;
	margin-block: 0;
}

.home-promises__list > .home-slot--wcs:not(:has(> .home-promises__item)) {
	display: none;
}

.home-promises__list:has(> .home-slot--wcs > .home-promises__item) {
	grid-template-columns: 1fr;

	@media (width >= 768px) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	@media (width >= 1280px) {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.home-promises__item {
	display: flex;
	gap: 0.875rem;
	align-items: flex-start;
	font-size: 0.9375rem;
	line-height: 1.5;
}

.home-promises__item > .icon {
	color: var(--sw-color-brand-primary);
	flex: none;
	width: 22px;
	height: 22px;
	margin-top: 2px;
}

.home-promises__item > .icon > svg {
	top: 0;
}

.home-promises__item strong {
	display: block;
	color: var(--sw-headline-color);
	font-family: var(--sw-font-family-headline);
	font-size: 0.9375rem;
	font-weight: 600;
}

.home-promises__item .home-link {
	position: relative;
	min-height: 0;
	font-size: 0.9375rem;
	line-height: 1.5;
	gap: 0.375rem;
}

.home-promises__item .home-link::after {
	content: "";
	position: absolute;
	inset: -0.6875rem 0;
	min-height: 44px;
}

.home-promises__item .home-link > .icon {
	width: 14px;
	height: 14px;
}

.home-categories {
	padding-top: clamp(2.5rem, 5vw, 4rem);
}

.home-category-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: var(--home-gap);
}

.home-category {
	grid-column: span 2;
	display: flex;
	flex-direction: column;
	color: inherit;
	text-decoration: none;
	border: 1px solid var(--sw-border-color);
	background-color: var(--site-palette-ink-100);
	transition: background-color var(--site-duration-fast) var(--site-easing-standard);
}

.home-category:nth-child(n + 4) {
	grid-column: span 3;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-category:nth-child(n + 4) .home-category__image {
	aspect-ratio: auto;
	min-height: 180px;
	height: 100%;
}

.home-category__image {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--site-palette-ink-100);
}

.home-category__image .home-image {
	position: absolute;
	inset: 0;
}

.home-category__content {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 1.375rem 1.5rem 1.5rem;
}

.home-category__content .home-link {
	min-height: 0;
	margin-top: auto;
	padding-top: 1.125rem;
}

.home-category h3 {
	font: 700 1.375rem / 1.15 var(--sw-font-family-headline);
	letter-spacing: -0.016em;
	margin: 0 0 0.5rem;
}

.home-category p {
	font-size: 0.9375rem;
	line-height: 1.55;
}

.home-category:focus-visible {
	color: inherit;
	background-color: var(--site-palette-ink-200);
	outline-color: var(--site-palette-forest-700);
}

.home-category:focus-visible .home-link > .icon {
	animation: home-category-arrow 900ms ease-in-out infinite;
}

@media (hover: hover) and (pointer: fine) {
	.home-category:hover {
		color: inherit;
		text-decoration: none;
		background-color: var(--site-palette-ink-200);
	}

	.home-category:hover .home-link > .icon {
		animation: home-category-arrow 900ms ease-in-out infinite;
	}
}

@keyframes home-category-arrow {
	0%,
	100% {
		transform: translateX(0);
	}

	50% {
		transform: translateX(0.25rem);
	}
}

@media (prefers-reduced-motion: reduce), (update: slow) {
	.home-category {
		transition: none;
	}

	.home-category:is(:hover, :focus-visible) .home-link > .icon {
		animation: none;
	}
}

@media (forced-colors: active) {
	.home-category:focus-visible {
		outline-color: Highlight;
	}
}

.home-highlight,
.home-workshop {
	margin-top: clamp(3rem, 6vw, 5rem);
	padding-block: clamp(2rem, 4vw, 3.5rem);
}

.home-highlight {
	background: var(--site-palette-mint-50);
}

.home-band {
	display: grid;
	grid-template-columns: repeat(24, minmax(0, 1fr));
	gap: 2rem clamp(0.5rem, 1.3vw, 1.5rem);
	align-items: center;
}

.home-band__media {
	grid-column: span 10;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.home-band__copy {
	grid-column: 12 / span 13;
}

.home-highlight__media.product-box {
	position: relative;
	width: 100%;
	max-width: 100%;
	height: auto;
	aspect-ratio: 1;
}

.home-highlight .home-band__copy {
	height: auto;
}

.home-highlight .home-heading {
	text-wrap: balance;
}

.home-highlight__media > a {
	position: absolute;
	inset: 0;
	display: block;
}

.home-highlight__media .home-image {
	object-fit: contain;
	mix-blend-mode: multiply;
}

.home-highlight__badge {
	position: absolute;
	left: 3.25rem;
	top: 0.875rem;
	padding: 0.5rem 0.625rem;
	border-radius: 3px;
	background: var(--site-palette-forest-950);
	color: var(--site-palette-white);
	font: 600 0.75rem / 1.4 var(--sw-font-family-headline);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.home-highlight__name {
	display: block;
	margin-top: 0.75rem;
	color: var(--sw-headline-color);
	font: 600 1.0625rem / 1.4 var(--sw-font-family-headline);
	text-decoration: none;
}

.home-section .home-copy {
	margin-top: 1rem;
	font-size: 1.0625rem;
	line-height: 1.6;
	max-width: 48ch;
	white-space: pre-line;
}

.home-benefits {
	display: grid;
	gap: 0.625rem;
	list-style: none;
	padding: 0;
	margin-block: 1.25rem;
	font-size: 0.9375rem;
}

.home-benefits li {
	display: flex;
	gap: 0.625rem;
	align-items: flex-start;
}

.home-benefits .icon {
	flex: none;
	color: var(--sw-color-brand-primary);
}

.home-highlight .home-band__copy > .product-price-info .product-price:not(.with-regulation-price) {
	font-size: 1.875rem;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

.home-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 1.5rem;
	align-items: center;
	margin-top: 1.5rem;
}

.home-actions .product-action {
	margin: 0;
}

.home-highlight .home-actions {
	margin-top: 1.25rem;
}

.home-actions .btn {
	height: 52px;
	padding-block: 0;
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
}

.home-accessories {
	margin-top: 2rem;
}

.home-accessories h3 {
	font: 600 0.9375rem / 1.4 var(--sw-font-family-headline);
	margin-bottom: 0.75rem;
}

.home-accessories__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

.home-accessory {
	display: flex;
	align-items: center;
	gap: 0.875rem;
	padding: 0.75rem;
	color: var(--sw-headline-color);
	background: var(--site-palette-white);
	text-decoration: none;
}

.home-accessory__media {
	width: 56px;
	height: 56px;
	flex: none;
	background: var(--site-palette-ink-100);
}

.home-accessory__media .home-image {
	object-fit: contain;
	mix-blend-mode: multiply;
}

.home-accessory__name {
	flex: 1;
	font: 650 0.875rem / 1.3 var(--sw-font-family-headline);
}

.home-accessory > .product-box {
	height: auto;
	flex: none;
}

.home-accessory .product-price-wrapper {
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.home-accessory .product-box .product-price:not(.with-regulation-price) {
	font-size: 0.9375rem;
	line-height: 1.3;
}

.home-accessory .product-price-unit:empty {
	margin: 0;
}

.home-accessory:hover {
	text-decoration: none;
	background: var(--site-palette-ink-100);
}

.home-products {
	padding-top: clamp(3rem, 6vw, 5rem);
}

.home-product-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 2.25rem 1.25rem;
}

.home-product-grid .product-box {
	min-width: 0;
}

.home-product-grid .product-box .product-name {
	font-size: 1rem;
	font-weight: 650;
	line-height: 1.3;
}

.home-product-grid .product-box .product-price:not(.with-regulation-price) {
	font-size: 1.1875rem;
}

.home-product-grid .product-badges > .badge {
	height: 28px;
}

.home-product-grid .product-badges .badge-discount {
	width: 28px;
	min-width: 28px;
}

/* The visible surface is 40px; its native button and focus target stay 44px. */
.home-product-grid .shop-card-action.btn {
	border: 2px solid transparent;
	background-clip: padding-box;
	padding: 8px;
}

.home-guides {
	padding-block: clamp(3rem, 6vw, 5rem);
}

.home-workshop {
	background: var(--site-palette-ink-100);
}

.home-guide-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--home-gap);
}

.home-guide {
	text-decoration: none;
}

.home-guide__media {
	aspect-ratio: 16 / 9;
	background: var(--site-palette-ink-100);
	overflow: hidden;
	margin-bottom: 0.875rem;
}

.home-guide__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.home-guide .home-eyebrow {
	font-size: 0.875rem;
	margin-bottom: 0.375rem;
}

.home-guide h3 {
	font: 700 1.1875rem / 1.25 var(--sw-font-family-headline);
	letter-spacing: -0.012em;
	margin: 0;
}

.home-guide:hover {
	text-decoration: none;
}

.home-guide:hover h3 {
	color: var(--sw-color-brand-primary);
}

.cms-block-content-search-hero,
.cms-block-content-promises,
.cms-block-commerce-categories,
.cms-block-commerce-highlight,
.cms-block-commerce-products,
.cms-block-content-workshop,
.cms-block-content-guides {
	overflow: visible;
}

.home-cms-slot {
	padding-inline: 0;
}

.cms-page.shop-home-layout .cms-section-default.full-width {
	padding-inline: 0;
}

.cms-page.shop-home-layout .cms-block-container-row {
	margin-inline: 0;
}

.cms-page.shop-home-layout .cms-breadcrumb {
	display: none;
}

@media (width <= 1023px) {
	.home-hero__content {
		grid-column: span 14;
	}

	.home-hero__media {
		grid-column: 16 / span 9;
	}

	.home-band {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: 2rem;
	}

	.home-band__media,
	.home-band__copy {
		grid-column: auto;
	}

	.home-product-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.home-accessories__grid {
		grid-template-columns: 1fr;
	}

	.home-promises__list {
		gap: 1.5rem;
	}
}

@media (width <= 767px) {
	.home-hero__grid,
	.home-band {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	.home-hero__content,
	.home-hero__media {
		grid-column: auto;
	}

	.home-hero__media {
		max-height: 22rem;
		width: 100%;
		aspect-ratio: 5 / 4;
	}

	.home-promises__list {
		grid-template-columns: 1fr;
	}

	.home-section__header {
		align-items: flex-start;
		flex-direction: column;
		gap: 0.75rem;
	}

	.home-guide-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.home-category-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.home-category,
	.home-category:nth-child(n + 4) {
		grid-column: auto;
	}
}

@media (width <= 639px) {
	.home-container {
		padding-inline: 0;
	}

	.home-category-grid,
	.home-guide-grid {
		grid-template-columns: 1fr;
	}

	.home-search .btn:is(.btn-primary, .header-search-btn) {
		padding-inline: 0.75rem;
	}

	.home-accessory {
		display: grid;
		grid-template-columns: 56px minmax(0, 1fr);
		gap: 0.5rem 0.875rem;
	}

	.home-accessory__media {
		grid-column: 1;
		grid-row: 1 / span 2;
	}

	.home-accessory__name {
		grid-column: 2;
		grid-row: 1;
	}

	.home-accessory > .product-box {
		grid-column: 2;
		grid-row: 2;
	}

	.home-product-grid {
		column-gap: 1rem;
	}
}

.container-main:has(> .cms-page.shop-home-layout) {
	padding-block: 0;
}

.container-main:has(> .cms-page.shop-home-layout) > .cms-breadcrumb {
	display: none;
}

@media (width <= 1023px) {
	.home-category:nth-child(n + 4) {
		display: flex;
	}

	.home-category:nth-child(n + 4) .home-category__image {
		aspect-ratio: 4 / 3;
		height: auto;
	}
}

@supports (grid-template-rows: subgrid) {
	.home-product-grid {
		row-gap: 0;
	}
}

/* Multi-slot compositions keep the legacy elements untouched. */
.home-composition .home-slot {
	display: contents;
}

.home-composition .home-heading strong {
	color: var(--sw-color-brand-primary);
	font-weight: inherit;
}

.home-composition.home-hero .home-heading strong {
	color: var(--site-palette-mint-200);
}

.home-composition .home-native-text {
	white-space: normal;
}

.home-composition.home-promises .cms-element-text strong {
	display: inline;
}

.home-composition .home-native-text p + p {
	margin-top: 1rem;
}

.home-composition .home-native-text ul {
	margin-block: 1.25rem;
	padding-left: 1.25rem;
}

.home-composition .home-native-text li + li {
	margin-top: 0.625rem;
}

.home-composition .home-section__header > .home-slot .home-link {
	position: relative;
	min-height: 0;
	margin-bottom: 0.5rem;
}

.home-composition .home-section__header > .home-slot .home-link::after {
	content: "";
	position: absolute;
	inset-inline: 0;
	top: 50%;
	height: 44px;
	transform: translateY(-50%);
}

.home-composition .home-section__header > .home-slot .home-link > .icon {
	width: 16px;
	height: 16px;
}

.home-composition .home-section__header > .home-slot .home-link > .icon > svg {
	top: 0;
}
/* stylelint-disable declaration-no-important -- Override native CMS image-container inline cover min-height inside the fixed media rail. */
.home-composition :is(.home-band__media, .home-hero__media) .cms-element-image,
.home-composition :is(.home-band__media, .home-hero__media) .cms-image-container {
	width: 100%;
	height: 100%;
	min-height: 0 !important;
}
/* stylelint-enable declaration-no-important */
.home-composition :is(.home-band__media, .home-hero__media) .cms-image {
	position: static;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.home-composition .home-native-product-grid > .home-slot {
	display: block;
}

/* Native CMS product slots forward the same nine shared card tracks. */

@supports (grid-template-rows: subgrid) {
	.home-native-product-grid > .home-slot,
	.home-native-product-grid .cms-element-product-box,
	.home-native-product-grid .cms-element-alignment,
	.home-native-product-grid .cms-element-product-box .product-box {
		grid-template-rows: subgrid;
		grid-row: 1 / span 9;
		height: auto;
		min-width: 0;
	}

	/* Only display competes with the composition fallback; track geometry keeps its original scope. */
	.home-composition .home-native-product-grid > .home-slot,
	.home-native-product-grid .cms-element-product-box,
	.home-native-product-grid .cms-element-alignment,
	.home-native-product-grid .cms-element-product-box .product-box {
		display: grid;
	}

	.home-native-product-grid > .home-slot {
		grid-row: span 9;
		margin-bottom: 36px;
	}

	.home-native-product-grid > .home-slot:nth-last-child(-n + 2) {
		margin-bottom: 0;
	}

	@media (width >= 1024px) {
		.home-native-product-grid > .home-slot:nth-last-child(-n + 4) {
			margin-bottom: 0;
		}
	}
}

.home-composition .home-native-product-grid .cms-element-product-box {
	height: 100%;
}

.home-composition.home-highlight
	.home-band__copy
	.home-slot
	> .product-price-info
	.product-price:not(.with-regulation-price) {
	font-size: 1.875rem;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

.cms-block-home-search-hero,
.cms-block-home-promises,
.cms-block-home-categories,
.cms-block-home-highlight,
.cms-block-home-offers,
.cms-block-home-products,
.cms-block-home-workshop,
.cms-block-home-guides {
	overflow: visible;
}

.cms-page.shop-home-layout
	[class*="cms-block-home-"]
	> .cms-block-container
	> .cms-block-container-row
	> .home-section:not(.home-hero--centered) {
	padding-inline: 0;
}

.home-composition.home-highlight .home-copy {
	max-width: none;
}

.home-composition.home-highlight .home-native-text p {
	max-width: 48ch;
}

.home-composition.home-highlight .home-native-text ul {
	list-style: none;
	padding: 0;
	font-size: 0.9375rem;
	line-height: 1.5;
}

.home-composition.home-highlight .home-native-text li {
	position: relative;
	padding-left: 28px;
}

.home-composition.home-highlight .home-native-text li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 2px;
	width: 18px;
	height: 18px;
	background: var(--sw-color-brand-primary);
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")
		center / contain no-repeat;
}

/* The centered search hero is a separate native composition without a media slot. */
.home-hero--centered {
	padding: clamp(40px, 5vw, 72px) clamp(20px, 3.4vw, 48px);

	.home-hero__centered {
		max-width: 720px;
		margin-inline: auto;
		text-align: center;
	}

	.home-eyebrow {
		margin-bottom: 12px;
	}

	.home-heading {
		max-width: none;
		margin-bottom: 18px;
		font-size: clamp(32px, 3.4vw, 48px);
		line-height: 1.03;
		letter-spacing: -0.034em;
	}

	.home-intro {
		max-width: 46ch;
		margin: 0 auto 30px;
		font-size: 18px;
		line-height: 1.55;
		color: rgb(255 255 255 / 78%);
		text-wrap: balance;
	}

	.home-search-composed {
		max-width: 640px;
		margin: 0 auto;
		text-align: left;
	}

	.home-search-composed .shop-search-field .btn.header-search-btn:not(:disabled) {
		background: var(--site-palette-mint-200);
		color: var(--site-palette-forest-950);
	}

	.home-search-composed
		.shop-search-field
		.btn.header-search-btn:not(:disabled):is(:hover, :focus-visible, :active) {
		background: #d9f7e6;
	}

	.home-search__examples a:focus-visible {
		outline: 2px solid var(--sw-color-brand-primary);
		outline-offset: 3px;
	}

	.home-search__examples {
		margin: 16px 0 0;
		font-size: 14px;
		color: rgb(255 255 255 / 62%);
	}

	.home-search__examples a {
		text-decoration: underline;
		text-underline-offset: 3px;
		text-decoration-color: rgb(169 239 200 / 40%);
	}

	.home-search__examples a:hover {
		color: #d9f7e6;
		text-decoration-color: currentcolor;
	}
}

.cms-block-home-search-centered {
	overflow: visible;
}
