.freyza-header {
	background: rgba(255, 255, 255, 0.96);
	border-bottom: 1px solid var(--freyza-color-border);
	position: sticky;
	top: 0;
	z-index: 50;
}

.freyza-header__inner {
	align-items: center;
	display: grid;
	gap: 20px;
	grid-template-columns: auto minmax(0, 1fr) auto;
	min-height: 76px;
	position: relative;
}

.freyza-header__brand-wrap,
.freyza-header__actions,
.freyza-header__nav,
.freyza-header__menu {
	align-items: center;
	display: flex;
}

.freyza-header__brand-wrap {
	gap: 14px;
	min-width: 0;
}

.freyza-header__brand {
	color: var(--freyza-color-primary);
	font-family: var(--freyza-font-heading);
	font-size: 1.05rem;
	font-weight: 800;
	line-height: 1.1;
	text-decoration: none;
	white-space: nowrap;
}

.freyza-header__nav {
	justify-content: center;
	min-width: 0;
}

.freyza-header__menu,
.freyza-header__menu .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.freyza-header__menu {
	gap: clamp(18px, 2.3vw, 34px);
}

.freyza-header__menu a,
.freyza-header__shop-link {
	color: var(--freyza-color-primary);
	display: inline-flex;
	font-size: 0.92rem;
	font-weight: 700;
	line-height: 1.2;
	padding-block: 8px;
	text-decoration: none;
}

.freyza-header__menu a:hover,
.freyza-header__menu a:focus-visible,
.freyza-header__shop-link:hover,
.freyza-header__shop-link:focus-visible {
	color: var(--freyza-color-secondary);
}

.freyza-header__menu .menu-item-has-children {
	position: relative;
}

.freyza-header__menu .sub-menu {
	background: var(--freyza-color-background);
	border: 1px solid var(--freyza-color-border);
	box-shadow: var(--freyza-shadow-subtle);
	left: 50%;
	min-width: 210px;
	opacity: 0;
	padding: 10px;
	position: absolute;
	top: calc(100% + 14px);
	transform: translate(-50%, 8px);
	transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
	visibility: hidden;
}

.freyza-header__menu .menu-item-has-children:hover > .sub-menu,
.freyza-header__menu .menu-item-has-children:focus-within > .sub-menu {
	opacity: 1;
	transform: translate(-50%, 0);
	visibility: visible;
}

.freyza-header__menu .sub-menu a {
	border-radius: var(--freyza-radius-sm);
	display: flex;
	padding: 10px 12px;
	white-space: nowrap;
}

.freyza-header__actions {
	gap: 10px;
	justify-content: flex-end;
}

.freyza-header__shop-link {
	margin-inline-end: 4px;
}

.freyza-header__icon-button,
.freyza-header__toggle {
	align-items: center;
	appearance: none;
	background: transparent;
	border: 1px solid transparent;
	border-radius: var(--freyza-radius-sm);
	color: var(--freyza-color-primary);
	cursor: pointer;
	display: inline-flex;
	height: 42px;
	justify-content: center;
	padding: 0;
	position: relative;
	text-decoration: none;
	width: 42px;
}

.freyza-header__icon-button:hover,
.freyza-header__icon-button:focus-visible,
.freyza-header__toggle:hover,
.freyza-header__toggle:focus-visible {
	background: var(--freyza-color-section);
	border-color: var(--freyza-color-border);
	color: var(--freyza-color-secondary);
}

.freyza-header__icon {
	fill: none;
	height: 21px;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
	width: 21px;
}

.freyza-header__cart-count {
	align-items: center;
	background: var(--freyza-color-secondary);
	border: 2px solid var(--freyza-color-background);
	border-radius: 999px;
	color: #ffffff;
	display: flex;
	font-size: 0.68rem;
	font-weight: 800;
	height: 19px;
	justify-content: center;
	line-height: 1;
	min-width: 19px;
	padding-inline: 4px;
	position: absolute;
	right: 3px;
	top: 2px;
}

.freyza-header__cart-count[data-freyza-cart-count="0"] {
	background: var(--freyza-color-muted);
}

.freyza-header__search {
	position: relative;
}

.freyza-header__search-form {
	align-items: center;
	background: var(--freyza-color-background);
	border: 1px solid var(--freyza-color-border);
	box-shadow: var(--freyza-shadow-subtle);
	display: flex;
	gap: 8px;
	padding: 8px;
	position: absolute;
	right: 0;
	top: calc(100% + 12px);
	width: min(420px, calc(100vw - 40px));
}

.freyza-header__search-form[hidden] {
	display: none;
}

.freyza-header__search-field {
	border: 0;
	min-height: 42px;
	padding-inline: 10px;
}

.freyza-header__search-field:focus {
	outline: 0;
}

.freyza-header__search-submit {
	background: var(--freyza-color-primary);
	border: 1px solid var(--freyza-color-primary);
	border-radius: var(--freyza-radius-sm);
	color: #ffffff;
	cursor: pointer;
	font-weight: 800;
	min-height: 42px;
	padding-inline: 16px;
}

.freyza-header__search-submit:hover,
.freyza-header__search-submit:focus-visible {
	background: var(--freyza-color-secondary);
	border-color: var(--freyza-color-secondary);
}

.freyza-header__toggle {
	display: none;
	flex-direction: column;
	gap: 5px;
}

.freyza-header__toggle-line {
	background: currentColor;
	display: block;
	height: 2px;
	transition: transform 160ms ease, opacity 160ms ease;
	width: 18px;
}

.freyza-header__toggle[aria-expanded="true"] .freyza-header__toggle-line:first-of-type {
	transform: translateY(3.5px) rotate(45deg);
}

.freyza-header__toggle[aria-expanded="true"] .freyza-header__toggle-line:last-of-type {
	transform: translateY(-3.5px) rotate(-45deg);
}

@media (max-width: 980px) {
	.freyza-header__inner {
		gap: 12px;
		grid-template-columns: minmax(0, 1fr) auto;
		min-height: 68px;
	}

	.freyza-header__toggle {
		display: inline-flex;
	}

	.freyza-header__brand {
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.freyza-header__nav {
		background: var(--freyza-color-background);
		border-bottom: 1px solid var(--freyza-color-border);
		border-top: 1px solid var(--freyza-color-border);
		box-shadow: var(--freyza-shadow-subtle);
		display: none;
		grid-column: 1 / -1;
		left: 50%;
		padding: 12px 20px 18px;
		position: absolute;
		top: 100%;
		transform: translateX(-50%);
		width: 100vw;
	}

	.freyza-header__nav.is-open {
		display: block;
	}

	.freyza-header__menu {
		align-items: stretch;
		flex-direction: column;
		gap: 2px;
		margin-inline: auto;
		max-width: var(--freyza-content-width);
	}

	.freyza-header__menu a {
		border-radius: var(--freyza-radius-sm);
		display: flex;
		justify-content: space-between;
		padding: 13px 10px;
	}

	.freyza-header__menu .sub-menu {
		border: 0;
		box-shadow: none;
		left: auto;
		min-width: 0;
		opacity: 1;
		padding: 0 0 0 14px;
		position: static;
		transform: none;
		visibility: visible;
	}

	.freyza-header__shop-link {
		display: none;
	}
}

@media (max-width: 560px) {
	.freyza-header__inner {
		padding-inline: 14px;
	}

	.freyza-header__actions {
		gap: 2px;
	}

	.freyza-header__brand {
		font-size: 0.95rem;
		max-width: 42vw;
	}

	.freyza-header__icon-button,
	.freyza-header__toggle {
		height: 38px;
		width: 38px;
	}

	.freyza-header__search {
		position: static;
	}

	.freyza-header__search-form {
		left: 14px;
		right: 14px;
		top: calc(100% + 8px);
		width: auto;
	}
}
