/* ═══════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════
   Transparent over the homepage hero, solid everywhere else and once the
   homepage has scrolled. The logo and icons are always white, so the header
   ground is always dark — there is no light variant to keep in contrast.
   ═══════════════════════════════════════════ */

.site-header {
	position: fixed;
	top: var(--admin-bar, 0);
	left: 0;
	width: 100%;
	height: var(--header-height);
	background: transparent;
	z-index: var(--z-header);
	transition: background var(--transition-base), border-color var(--transition-base);
	border-bottom: 1px solid transparent;
}

.site-header--scrolled,
.site-header--solid {
	background: var(--se-black);
	border-bottom-color: var(--se-line-on-dark);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	height: 100%;
	max-width: var(--container-max);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

/* ── Logo ────────────────────────────────── */

.site-header__logo {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
}

.site-header__logo svg,
.site-header__logo img {
	height: 28px;
	width: auto;
}

@media (min-width: 48rem) {
	.site-header__logo svg,
	.site-header__logo img { height: 32px; }
}

/* ── Primary nav ─────────────────────────── */

.site-header__nav {
	display: none;
}

@media (min-width: 64rem) {
	.site-header__nav { display: block; }
}

.site-header__nav-list {
	display: flex;
	align-items: center;
	gap: 0;
}

.site-header__nav-list a {
	display: inline-block;
	position: relative;
	z-index: 0;
	padding: 6px 16px;
	font-family: var(--font-heading);
	font-size: var(--type-body-size);
	line-height: normal;
	text-transform: uppercase;
	color: var(--se-white);
	transition: color var(--transition-fast);
}

/* Pink brushstroke behind the label on hover and focus. It sits behind the
   text via a stacking context on the link itself, not a negative z-index on
   the page, so it never slips under the header background. */
.site-header__nav-list a::before {
	content: '';
	position: absolute;
	inset: 50% auto auto 0;
	transform: translateY(-50%);
	width: 100%;
	height: 28px;
	background: var(--se-pink);
	opacity: 0;
	clip-path: polygon(2% 20%, 8% 0%, 95% 5%, 100% 25%, 98% 80%, 92% 100%, 5% 95%, 0% 75%);
	transition: opacity var(--transition-fast);
	z-index: -1;
}

.site-header__nav-list a:hover::before,
.site-header__nav-list a:focus-visible::before,
.site-header__nav-list .current-menu-item > a::before {
	opacity: 1;
}

/*
 * No weight change on hover: bolding the label changes its width and shoves
 * every item after it sideways. The brushstroke is the hover signal. The
 * current page still reads as bold, but that is static, so nothing moves.
 */
.site-header__nav-list a:hover {
	color: var(--se-white);
}

.site-header__nav-list .current-menu-item > a {
	font-weight: 700;
}

.site-header__nav-list a > .site-header__nav-label {
	display: inline-block;
}

/* ── Actions ─────────────────────────────── */

.site-header__actions {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex: 0 0 auto;
}

.site-header__icon-btn {
	display: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	color: var(--se-white);
	border-radius: 50%;
	transition: color var(--transition-fast);
}

@media (min-width: 48rem) {
	.site-header__icon-btn { display: flex; }
}

.site-header__icon-btn svg {
	width: 20px;
	height: 20px;
}

.site-header__icon-btn:hover {
	color: var(--se-pink);
}

.site-header__account {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 6px;
	border: 1px solid var(--se-white);
	border-radius: 50%;
	color: var(--se-white);
	transition: border-color var(--transition-fast), color var(--transition-fast);
}

.site-header__account:hover {
	border-color: var(--se-pink);
	color: var(--se-pink);
}

.site-header__account svg {
	width: 20px;
	height: 20px;
}

.site-header__cart-count {
	position: absolute;
	top: -4px;
	inset-inline-end: -4px;
	min-width: 18px;
	height: 18px;
	padding-inline: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--se-pink);
	/* 12px white on #FF04BC is 3.5:1 and AA wants 4.5:1 at this size; black is
	   6:1. Same pink, same fix as the sale flash and the checkout button. */
	color: var(--se-black);
	font-family: var(--font-heading);
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1;
	border-radius: 9px;
}

.site-header__cart-count.is-empty {
	display: none;
}

/* ── Hamburger ───────────────────────────── */

.site-header__menu-toggle {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	padding: 10px;
	z-index: calc(var(--z-header) + 1);
}

@media (min-width: 64rem) {
	.site-header__menu-toggle { display: none; }
}

.site-header__menu-toggle span {
	display: block;
	width: 24px;
	height: 2px;
	background: var(--se-white);
	transform-origin: center;
	transition: transform var(--transition-base), opacity var(--transition-base);
}

.site-header__menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header__menu-toggle.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.site-header__menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile menu ─────────────────────────── */

.site-header__mobile-menu {
	position: fixed;
	inset: 0;
	z-index: calc(var(--z-header) - 1);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2rem;
	padding: calc(var(--header-height) + 2rem) var(--gutter) 3rem;
	background: var(--se-black);
	opacity: 0;
	transition: opacity var(--transition-base);
	overflow-y: auto;
}

.site-header__mobile-menu.is-open {
	opacity: 1;
}

.site-header__mobile-list {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.25rem;
	text-align: center;
}

.site-header__mobile-list a,
.site-header__mobile-account {
	display: inline-block;
	padding: 0.5rem 1rem;
	font-family: var(--font-heading);
	font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
	text-transform: uppercase;
	color: var(--se-white);
}

.site-header__mobile-list a:hover,
.site-header__mobile-list .current-menu-item > a,
.site-header__mobile-account:hover {
	color: var(--se-pink);
}

.site-header__mobile-account {
	font-size: 1.125rem;
	border-top: 1px solid var(--se-line-on-dark);
	padding-top: 1.5rem;
	margin-top: 0.5rem;
}
