/* ----------------------------------------
   Site Header / Navigation
   ---------------------------------------- */

.site-header {
	--header-height: 102px;
	position: sticky;
	top: 0;
	z-index: 300;
	background-color: var(--color-bg-subtle);
	height: var(--header-height);
	transition: transform 0.35s ease;
	will-change: transform;
}

/* Hidden state — slides the header out of view while scrolling down */
.site-header.is-hidden {
	transform: translateY(-100%);
}

@media (prefers-reduced-motion: reduce) {
	.site-header {
		transition: none;
	}
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 100%;
	padding: 0 40px;
}

/* Logo
   ---------------------------------------- */

.site-header__logo {
	flex-shrink: 0;
	position: relative;
	z-index: 160;
}

.site-header__logo img {
	display: block;
	width: auto;
	max-width: 158px;
	height: 57px;
	object-fit: contain;
}

.site-header__site-name {
	font-family: var(--font-primary);
	font-size: 20px;
	color: var(--color-text);
	text-decoration: none;
}

/* Primary nav
   ---------------------------------------- */

.site-header__nav {
	flex: 1;
	display: flex;
	justify-content: center;
}

.site-header__nav ul,
.site-header__nav ul li {
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-header__nav > ul {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 32px;
}

.site-header__nav > ul > li > a {
	font-family: var(--font-primary);
	font-size: var(--fs-body-4);
	font-weight: var(--fw-body-4);
	line-height: var(--lh-body-4);
	letter-spacing: var(--ls-body-4);
	text-box-trim: trim-both;
	text-box-edge: cap alphabetic;
	color: var(--color-text);
	text-decoration: none;
	white-space: nowrap;
	position: relative;
}

.site-header__nav > ul > li > a::after {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 100%;
	height: 2px;
	background-color: currentColor;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.25s ease;
}

.site-header__nav > ul > li > a:hover::after {
	transform: scaleX(1);
}

/* Right actions (cart + CTA)
   ---------------------------------------- */

.site-header__actions {
	display: flex;
	align-items: center;
	gap: 32px;
	position: relative;
	z-index: 160;
	flex-shrink: 0;
}

/* Cart
   ---------------------------------------- */

.site-header__cart {
	position: relative;
	display: flex;
	align-items: center;
	color: var(--color-text);
	text-decoration: none;
}

.site-header__cart img {
	display: block;
	width: 39px;
	height: 29px;
}

.site-header__cart-count {
	position: absolute;
	top: 5px;
	left: 3px;
	min-width: 11px;
	height: 11px;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #000;
	color: #fff;
	border-radius: 50%;
	font-family: var(--font-primary);
	font-size: 6px;
	font-weight: 400;
	line-height: 1.5;
	padding: 0 1px;
}

/* Language switcher
   ---------------------------------------- */

.lang-switcher {
	display: flex;
	align-items: center;
	gap: 4px;
	font-family: var(--font-primary);
	font-size: var(--fs-body-4);
	font-weight: var(--fw-body-4);
	line-height: var(--lh-body-4);
	letter-spacing: var(--ls-body-4);
}

.lang-switcher__item {
	color: var(--color-text);
	text-decoration: none;
	opacity: 0.4;
	transition: opacity 0.15s ease;
}

.lang-switcher__item--active {
	opacity: 1;
	cursor: default;
	pointer-events: none;
}

.lang-switcher__item:not(.lang-switcher__item--active):hover {
	opacity: 0.7;
}

.lang-switcher__sep {
	color: var(--color-text);
	opacity: 0.4;
}

.mobile-nav__panel .lang-switcher {
	margin-top: 27px;
	margin-bottom: 25px;
	font-size: var(--fs-heading-6);
	font-weight: var(--fw-heading-6);
	line-height: var(--lh-heading-6);
	letter-spacing: var(--ls-heading-6);
}

/* CTA button
   ---------------------------------------- */

/* ----------------------------------------
   Hamburger button
   ---------------------------------------- */

.site-header__burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 22px;
	height: 22px;
	padding: 0;
	background: none;
	border: none;
	cursor: pointer;
	flex-shrink: 0;
}

.site-header__burger span {
	display: block;
	width: 100%;
	height: 1.5px;
	background-color: var(--color-text);
	transition: transform 0.25s ease, opacity 0.25s ease;
}

.site-header__burger.is-active span:nth-child(1) {
	transform: translateY(6.5px) rotate(45deg);
}

.site-header__burger.is-active span:nth-child(2) {
	opacity: 0;
}

.site-header__burger.is-active span:nth-child(3) {
	transform: translateY(-6.5px) rotate(-45deg);
}

/* ----------------------------------------
   Mobile nav overlay
   ---------------------------------------- */

.mobile-nav {
	position: fixed;
	inset: 0;
	z-index: 200;
	background-color: rgba(0, 0, 0, 0.4);
	visibility: hidden;
	opacity: 0;
	transition: visibility 0.3s, opacity 0.3s ease;
}

.mobile-nav.is-open {
	visibility: visible;
	opacity: 1;
}

.mobile-nav__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(320px, 85vw);
	background-color: var(--color-bg-subtle);
	background-image: url('../../images/illustrations/illustration-butterfly-mobile-menu.webp');
	background-repeat: no-repeat;
	background-size: 180px 218px;
	background-position: right 13px top 375px;
	padding: 30px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform 0.3s ease;
}

.mobile-nav.is-open .mobile-nav__panel {
	transform: translateX(0);
}


.mobile-nav__panel ul,
.mobile-nav__panel ul li {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mobile-nav__panel .mobile-nav__list {
	display: flex;
	flex-direction: column;
	gap: 30px;
}

.mobile-nav__panel .mobile-nav__list > li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}

.mobile-nav__panel .mobile-nav__list > li > a {
	flex: 1;
	font-family: var(--font-primary);
	font-size: var(--fs-heading-6);
	font-weight: var(--fw-heading-6);
	line-height: var(--lh-heading-6);
	letter-spacing: var(--ls-heading-6);
	color: var(--color-text);
	text-decoration: none;
	display: block;
}

.mobile-nav__panel .mobile-nav__list > li > a:hover {
	opacity: 0.7;
}

.mobile-nav__toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	flex-shrink: 0;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
}

.mobile-nav__toggle::after {
	content: '';
	display: block;
	width: 13px;
	height: 10px;
	background-image: url('../../images/arrows/caret-dropdown-nav.svg');
	background-repeat: no-repeat;
	background-size: contain;
	background-position: center;
	transition: transform 0.3s ease;
}

.mobile-nav__panel .menu-item-has-children.is-open > .mobile-nav__toggle::after {
	transform: scaleY(-1);
}

.mobile-nav__panel .sub-menu {
	flex-basis: 100%;
	display: flex;
	flex-direction: column;
	gap: 22px;
	max-height: 0;
	overflow: hidden;
	margin-top: 0;
	transition: max-height 0.35s ease, margin-top 0.25s ease;
}

.mobile-nav__panel .menu-item-has-children.is-open > .sub-menu {
	max-height: 600px;
	margin-top: 30px;
}

.mobile-nav__panel .menu-item-has-children::after {
	content: '';
	flex-basis: 100%;
	height: 1px;
	background-image: repeating-linear-gradient(
		to right,
		var(--color-text) 0,
		var(--color-text) 9px,
		transparent 9px,
		transparent 18px
	);
	opacity: 0;
	transition: opacity 0.35s ease;
}

.mobile-nav__panel .menu-item-has-children.is-open::after {
	opacity: 1;
	margin-top: 30px;
}

.mobile-nav__panel .sub-menu a {
	font-family: var(--font-primary);
	font-size: var(--fs-body-3);
	font-weight: var(--fw-body-3);
	line-height: var(--lh-body-3);
	letter-spacing: var(--ls-body-3);
	color: var(--color-text);
	text-decoration: none;
	display: block;
}

.mobile-nav__panel .sub-menu a:hover {
	opacity: 0.7;
}

/* CTA inside mobile nav
   ---------------------------------------- */

.mobile-nav__cta {
	width: fit-content;
	margin-top: 30px;
}

/* ----------------------------------------
   Mega menu (desktop only)
   ---------------------------------------- */

@media (min-width: 769px) {
	.site-header__nav .sub-menu {
		list-style: none;
		margin: 0;
		padding: 0;
	}

	.site-header__nav .menu-item-has-children > a {
		display: inline-flex;
		align-items: center;
		gap: 7px;
	}

	.site-header__nav .menu-item-has-children > a::before {
		content: '';
		display: inline-block;
		width: 13px;
		height: 10px;
		background-image: url('../../images/arrows/caret-dropdown-nav.svg');
		background-repeat: no-repeat;
		background-size: contain;
		background-position: center;
		order: 1;
		flex-shrink: 0;
		transition: transform 0.3s ease;
	}

	.site-header__nav .menu-item-has-children.is-open > a::before {
		transform: scaleY(-1);
	}

	/* ── Mega menu content layout ── */

	.mega-menu__inner {
		display: flex;
		flex-direction: column;
		flex: 1;
		min-height: 0;
		max-width: 1400px;
		width: 100%;
		margin-inline: auto;
	}

	.mega-menu__content {
		display: flex;
		align-items: flex-start;
		gap: 80px;
		flex: 1;
		min-height: 0;
		padding: 40px 60px 28px;
	}

	.mega-menu__list {
		display: flex;
		flex-direction: column;
		flex-wrap: wrap;
		max-height: 262px;
		gap: 30px;
		column-gap: 64px;
		list-style: none;
		margin: 0;
		padding: 0;
	}

	.mega-menu__list a {
		font-family: var(--font-primary);
		font-size: var(--fs-body-1);
		font-weight: var(--fw-body-1);
		line-height: var(--lh-body-1);
		letter-spacing: var(--ls-body-1);
		color: var(--color-text);
		text-decoration: none;
		white-space: nowrap;
	}

	.mega-menu__images {
		position: relative;
		flex-shrink: 0;
		margin-left: auto;
		width: 575px;
		height: 430px;
	}

	.mega-menu__img-secondary {
		position: absolute;
		display: block;
		object-fit: cover;
		width: 196px;
		height: 193px;
		right: 443px;
		top: 140px;
		transform: rotate(-5deg);
		border: 4px solid #fff;
		z-index: 2;
	}

	.mega-menu__img-primary {
		position: absolute;
		display: block;
		object-fit: cover;
		width: 462px;
		height: 285px;
		right: 0;
		top: 64px;
		transform: rotate(-5deg);
		border: 4px solid #fff;
		z-index: 1;
	}

	.mega-menu__images--has-secondary .mega-menu__img-primary {
		transform: rotate(5deg);
	}

	.site-header__nav .menu-item-has-children > .sub-menu {
		position: fixed;
		top: var(--header-height, 102px);
		left: 0;
		right: 0;
		height: 528px;
		background-color: var(--color-bg-subtle);
		z-index: 150;
		clip-path: inset(0 0 100% 0);
		pointer-events: none;
		transition: clip-path 0.4s ease;
		display: flex;
		flex-direction: column;
	}

	.site-header__nav .menu-item-has-children.is-open > .sub-menu {
		clip-path: inset(0 0 0% 0);
		pointer-events: auto;
	}

	/* ── Mega menu footer ── */

	.mega-menu__footer {
		flex-shrink: 0;
		margin-inline: 60px;
		padding-block: 16px;
		height: 90px;
		display: flex;
		align-items: center;
		gap: 12px;
		background-image: repeating-linear-gradient(
			to right,
			#000 0,
			#000 9px,
			transparent 9px,
			transparent 18px
		);
		background-size: 100% 1px;
		background-position: top;
		background-repeat: no-repeat;
		box-sizing: border-box;
	}

	.mega-menu__footer-cta {
		height: 100%;
	}
}

/* ----------------------------------------
   Responsive — hide desktop nav, show burger
   ---------------------------------------- */

@media (max-width: 768px) {
	.site-header {
		height: 66px;
	}

	.site-header__inner {
		padding: 0;
		position: relative;
	}

	.mobile-nav__panel {
		width: 100%;
		padding: calc(66px + 74px) 20px 30px;
	}

	.site-header__burger {
		display: flex;
		margin-left: 16px;
	}

	.site-header__logo {
		position: absolute;
		left: 50%;
		transform: translateX(-50%);
	}

	.site-header__logo img {
		max-width: 115px;
		height: 42px;
	}

	.site-header__nav,
	.site-header__actions .site-header__cta,
	.site-header__actions .lang-switcher {
		display: none;
	}

	.site-header__actions {
		margin-right: 16px;
	}
}
