.z-category-header {
	--zch-ink: #171717;
	--zch-muted: #4f514f;
	--zch-border: #d6d4cd;
	--zch-surface: #f3f1ec;
	--zch-accent: #bd542f;
	width: 100%;
	max-width: 100%;
	margin: 0 0 1.5rem;
	font-family: "Plus Jakarta Sans", "Avenir Next", "Segoe UI", sans-serif;
	color: var(--zch-ink);
	-webkit-font-smoothing: antialiased;
}

/* Full-bleed without 100vw scrollbar overflow on mobile. */
body.tax-product_cat .elementor-location-archive,
body.tax-product_cat #content,
body.tax-product_cat main#main,
body.tax-product_brand .elementor-location-archive,
body.tax-product_brand #content,
body.tax-product_brand main#main,
body.zillions-shop-archive #content,
body.zillions-shop-archive main#main {
	overflow-x: clip;
}

.z-category-header *,
.z-category-header *::before,
.z-category-header *::after {
	box-sizing: border-box;
}

.z-category-hero {
	--zch-focal-x: 50%;
	--zch-focal-y: 50%;

	position: relative;
	isolation: isolate;
	min-height: clamp(245px, 23vw, 350px);
	overflow: hidden;
	background: #e7dfd4;
}

/*
 * header-2.png: chair + ottoman sit low on the right.
 * Same short hero height — crop/zoom into that cluster so the set is visible.
 */
.z-category-hero--focal-right {
	--zch-focal-x: 84%;
	--zch-focal-y: 82%;
	--zch-image-scale: 1.22;
	--zch-image-origin: 82% 75%;
}

.z-category-hero__image,
.z-category-hero__veil {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.z-category-hero__image {
	z-index: -2;
	object-fit: cover;
	object-position: var(--zch-focal-x) var(--zch-focal-y);
}

.z-category-hero--focal-right .z-category-hero__image {
	transform: scale(var(--zch-image-scale));
	transform-origin: var(--zch-image-origin);
}

.z-category-hero__veil {
	z-index: -1;
	background: linear-gradient(90deg, rgba(250, 248, 244, 0.94) 0%, rgba(250, 248, 244, 0.78) 28%, rgba(250, 248, 244, 0.2) 57%, rgba(250, 248, 244, 0) 74%);
	pointer-events: none;
}

.z-category-hero__content {
	width: min(1320px, calc(100% - 48px));
	min-height: inherit;
	margin-inline: auto;
	padding: clamp(24px, 3.5vw, 50px) 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
}

.z-category-hero__breadcrumb {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	margin-bottom: clamp(18px, 2vw, 28px);
	font-size: 0.75rem;
	line-height: 1.35;
	color: #555955;
}

.z-category-hero__breadcrumb a {
	color: inherit;
	text-decoration: none;
}

.z-category-hero__breadcrumb a:hover,
.z-category-hero__breadcrumb a:focus-visible {
	color: #000;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.z-category-hero h1 {
	margin: 0 0 0.65rem;
	max-width: 34rem;
	font: 700 clamp(2.25rem, 4.2vw, 4.15rem) / 1.02 "Plus Jakarta Sans", "Avenir Next", "Segoe UI", sans-serif;
	letter-spacing: -0.055em;
	color: var(--zch-ink);
}

.z-category-hero__content > p {
	max-width: 35rem;
	margin: 0;
	font-size: clamp(0.88rem, 1.15vw, 1rem);
	line-height: 1.55;
	color: #383b38;
}

@media (min-width: 768px) {
	.z-category-hero__content > p {
		max-width: 28.75rem;
	}
}

.z-category-hero__signature {
	position: absolute;
	left: clamp(38%, 42vw, 48%);
	top: clamp(34%, 38%, 42%);
	width: 9rem;
	margin: 0;
	font-family: "Bradley Hand", "Segoe Print", cursive;
	font-size: clamp(1.15rem, 1.8vw, 1.7rem);
	line-height: 1.05;
	transform: rotate(-8deg);
	color: #252525;
	pointer-events: none;
}

.z-category-hero--focal-right .z-category-hero__signature {
	left: clamp(36%, 40vw, 46%);
	top: 34%;
}

.z-category-hero__signature::after {
	content: "";
	display: block;
	width: 2.5rem;
	margin: 0.65rem 0 0 0.65rem;
	border-top: 2px solid currentColor;
	transform: rotate(-11deg);
}

.z-category-links {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: clamp(8px, 1vw, 16px);
	padding: 14px max(18px, calc((100vw - 1320px) / 2));
	background: #f7f5f0;
	border-top: 1px solid rgba(0, 0, 0, 0.06);
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.z-category-card {
	position: relative;
	min-width: 0;
	height: clamp(92px, 8vw, 116px);
	overflow: hidden;
	display: grid;
	grid-template-columns: minmax(88px, 45%) 1fr;
	align-items: stretch;
	background: rgba(255, 255, 255, 0.58);
	border: 1px solid transparent;
	color: var(--zch-ink) !important;
	text-decoration: none !important;
	transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.z-category-card:hover,
.z-category-card:focus-visible {
	transform: translateY(-2px);
	border-color: #9b9d98;
	background: #fff;
}

.z-category-card:focus-visible {
	outline: 2px solid #222;
	outline-offset: 2px;
}

.z-category-card.is-current {
	border-color: #656862;
	background: #fff;
}

.z-category-card--brand {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
}

.z-category-card--brand > img {
	padding: clamp(0.65rem, 1vw, 0.95rem) !important;
	object-fit: contain !important;
	background: #fff;
	mix-blend-mode: multiply;
}

.z-category-card > img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	mix-blend-mode: multiply;
}

.z-category-card__copy {
	min-width: 0;
	padding: 0.85rem 0.85rem 0.75rem 0.65rem;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 0.5rem;
}

.z-category-card__copy strong {
	font-size: clamp(0.72rem, 0.9vw, 0.88rem);
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: -0.015em;
}

.z-category-card__copy > span {
	font-size: 1rem;
	line-height: 1;
}

.z-category-card--promo {
	background: var(--zch-accent) !important;
	color: #fff !important;
}

.z-category-card--promo:hover,
.z-category-card--promo:focus-visible {
	background: #a94727 !important;
	border-color: #913a1e;
}

.z-category-card--promo > img {
	order: 2;
	opacity: 0.78;
	mix-blend-mode: luminosity;
}

.z-category-card--promo .z-category-card__copy {
	order: 1;
	padding-left: 1rem;
}

body.woocommerce.archive main#main > .woocommerce-products-header:empty,
body.woocommerce-page.archive main#main > .woocommerce-products-header:empty,
body.zillions-shop-archive main#main > .woocommerce-products-header:empty {
	display: none;
}

/* Match the Searchanise catalogue width used by category and brand archives. */
body.zillions-shop-archive .snize-navigation-wrapper {
	width: calc(100% - 40px);
	max-width: 1280px !important;
	margin-right: auto !important;
	margin-left: auto !important;
}

/* The legacy Elementor product-archive template includes its own heading block. */
body.tax-product_cat .elementor-location-archive > .elementor-element-24ac996e,
body.tax-product_brand .elementor-location-archive > .elementor-element-24ac996e {
	display: none;
}

@media (max-width: 1100px) {
	.z-category-hero--focal-right {
		--zch-focal-x: 88%;
		--zch-focal-y: 78%;
		--zch-image-scale: 1.28;
		--zch-image-origin: 86% 72%;
	}

	.z-category-hero__signature {
		left: 34%;
		top: 32%;
		font-size: clamp(1.05rem, 2.4vw, 1.4rem);
	}
}

@media (max-width: 980px) {
	.z-category-hero__signature {
		display: none;
	}

	.z-category-links {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.z-category-card--promo {
		grid-column: span 2;
	}
}

@media (max-width: 767px) {
	.z-category-header {
		margin-bottom: 1rem;
	}

	/* Hug content — end just under title/copy, before the category CTAs. */
	.z-category-hero {
		min-height: 0;
	}

	.z-category-hero:not(.z-category-hero--focal-right) {
		--zch-focal-x: 67%;
		--zch-focal-y: 50%;
	}

	.z-category-hero--focal-right {
		--zch-focal-x: 90%;
		--zch-focal-y: 72%;
		--zch-image-scale: 1.35;
		--zch-image-origin: 88% 68%;
	}

	.z-category-hero__veil {
		background: linear-gradient(90deg, rgba(250, 248, 244, 0.96) 0%, rgba(250, 248, 244, 0.86) 48%, rgba(250, 248, 244, 0.18) 100%);
	}

	.z-category-hero__content {
		width: min(100% - 32px, 1320px);
		min-height: 0;
		padding: 18px 0 16px;
		justify-content: flex-start;
	}

	.z-category-hero__breadcrumb {
		margin-bottom: 12px;
	}

	.z-category-hero h1 {
		max-width: 70%;
		margin-bottom: 0.4rem;
		font-size: clamp(1.85rem, 8.5vw, 2.4rem);
	}

	.z-category-hero__content > p {
		max-width: min(78%, 22rem);
		font-size: 0.88rem;
		line-height: 1.45;
	}

	.z-category-links {
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: minmax(220px, 72vw);
		gap: 10px;
		overflow-x: auto;
		overscroll-behavior-inline: contain;
		scroll-snap-type: inline mandatory;
		scrollbar-width: thin;
		padding: 12px 16px 16px;
	}

	.z-category-card,
	.z-category-card--promo {
		grid-column: auto;
		scroll-snap-align: start;
		height: 100px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.z-category-card {
		transition: none;
	}
}

/*
 * Keep plugin images inside their own layout boxes. Theme and lazy-load image
 * rules may otherwise restore intrinsic `height: auto`, causing both hero and
 * card images to overflow their containers despite `object-fit: cover`.
 */
.z-category-hero > img.z-category-hero__image {
	display: block !important;
	inset: 0 !important;
	width: 100% !important;
	min-width: 0 !important;
	max-width: none !important;
	height: 100% !important;
	min-height: 0 !important;
	max-height: none !important;
	margin: 0 !important;
	object-fit: cover !important;
	object-position: center center !important;
	transform: none !important;
	transform-origin: center center !important;
}

.z-category-card > img {
	display: block !important;
	align-self: stretch !important;
	justify-self: stretch !important;
	width: 100% !important;
	min-width: 0 !important;
	max-width: none !important;
	height: 100% !important;
	min-height: 0 !important;
	max-height: none !important;
	margin: 0 !important;
	object-fit: cover !important;
	object-position: center center !important;
}

/* Brand cards display complete wordmarks instead of cropping them like product photos. */
.z-category-header--brand .z-category-card--brand > img {
	object-fit: contain !important;
	padding: clamp(1rem, 1.5vw, 1.6rem) !important;
	background: #fff;
	mix-blend-mode: multiply;
}

/* Place the handwritten note just above the sofa on the Banken hero. */
.z-category-header--banken .z-category-hero__signature {
	left: 46%;
	top: 28%;
}
