/* ================================================================
   AE Header Premium — production stylesheet
   Source design: design-proposals/.../header-premium.html
   ================================================================ */

.ae-header,
.m-header,
.m-menu,
.ae-currency-menu {
	--ae-hp-canvas: #ffffff;
	--ae-hp-paper: #faf8f5;
	--ae-hp-ink: #1a1a1a;
	--ae-hp-ink-soft: #2c2c2c;
	--ae-hp-ink-muted: #6f6f6f;
	--ae-hp-ink-faint: #999999;
	--ae-hp-line: #ececec;
	--ae-hp-line-strong: #d8d8d8;
	--ae-hp-ease: cubic-bezier(0.32, 0.72, 0.24, 1);
	--ae-hp-font-editorial: "Fraunces", Georgia, serif;
	--ae-hp-font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* ================================================================
   DESKTOP HEADER
   ================================================================ */
.ae-header {
	position: relative;
	background: var(--ae-hp-canvas);
	border-bottom: 1px solid var(--ae-hp-line);
	font-family: var(--ae-hp-font-body);
	color: var(--ae-hp-ink);
}

.ae-header-bar {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	padding: 22px 36px;
	gap: 32px;
}

.ae-nav-left {
	display: flex;
	align-items: center;
	gap: 28px;
}

.ae-nav-link {
	font-size: 11px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--ae-hp-ink-soft);
	text-decoration: none;
	background: none;
	border: none;
	padding: 4px 0;
	cursor: pointer;
	font-family: inherit;
	font-weight: 400;
	position: relative;
	transition: color 160ms var(--ae-hp-ease);
}
.ae-nav-link:hover { color: var(--ae-hp-ink); }
.ae-nav-link.is-active { color: var(--ae-hp-ink); font-weight: 500; }
.ae-nav-link.is-active::after {
	content: "";
	position: absolute;
	left: 0; right: 0;
	bottom: -6px;
	height: 1px;
	background: var(--ae-hp-ink);
}

.ae-wordmark {
	font-family: var(--ae-hp-font-editorial);
	font-weight: 400;
	font-size: 48px;
	letter-spacing: -0.015em;
	font-variation-settings: "SOFT" 40, "opsz" 72;
	text-transform: none;
	margin: 0;
	text-align: center;
	color: var(--ae-hp-ink);
	text-decoration: none;
	line-height: 1;
	white-space: nowrap;
}

a.ae-wordmark,
a.ae-wordmark:visited,
a.ae-wordmark:hover,
a.ae-wordmark:focus,
a.ae-wordmark:active,
a.m-wordmark,
a.m-wordmark:visited,
a.m-wordmark:hover,
a.m-wordmark:focus,
a.m-wordmark:active {
	color: var(--ae-hp-ink);
	text-decoration: none;
}

.ae-utils {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 28px;
}

.ae-util {
	background: transparent;
	border: none;
	padding: 4px 0;
	cursor: pointer;
	color: var(--ae-hp-ink);
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: inherit;
	font-size: 11px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	font-weight: 400;
	line-height: 1;
	text-decoration: none;
	transition: color 160ms var(--ae-hp-ease), opacity 160ms var(--ae-hp-ease);
}
.ae-util:hover { opacity: 0.65; }
.ae-util:focus-visible {
	outline: 1px solid var(--ae-hp-ink);
	outline-offset: 4px;
}
.ae-util svg {
	width: 17px;
	height: 17px;
	stroke-width: 1.5;
	flex-shrink: 0;
}

.ae-util-account { font-weight: 500; }
.ae-util-account .ae-util-name { letter-spacing: 0.18em; text-transform: uppercase; }

.ae-util-saved { position: relative; }
.ae-util-saved.has-items svg { fill: currentColor; stroke: none; }
.ae-util-saved-count {
	position: absolute;
	left: -9999px;
	width: 1px; height: 1px;
	overflow: hidden;
}

.ae-util-currency { position: relative; }
.ae-util-currency .ae-chev {
	width: 9px;
	height: 9px;
	transition: transform 240ms var(--ae-hp-ease);
	stroke-width: 1.8;
}
.ae-util-currency.is-open .ae-chev { transform: rotate(180deg); }

/* Currency dropdown — small, tight, classy */
.ae-currency-menu {
	position: absolute;
	top: calc(100% + 14px);
	right: -8px;
	background: var(--ae-hp-canvas);
	border: 1px solid var(--ae-hp-line);
	min-width: 200px;
	z-index: 60;
	opacity: 0;
	transform: translateY(-6px);
	pointer-events: none;
	transition: opacity 220ms var(--ae-hp-ease), transform 220ms var(--ae-hp-ease);
	box-shadow: 0 10px 24px -18px rgba(0,0,0,0.10);
}
.ae-currency-menu.is-open {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}
.ae-currency-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	cursor: pointer;
	background: transparent;
	transition: color 140ms var(--ae-hp-ease);
	border-bottom: 1px solid var(--ae-hp-line);
	width: 100%;
	text-decoration: none;
}
.ae-currency-item:last-child { border-bottom: none; }
.ae-currency-item-label {
	font-family: inherit;
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--ae-hp-ink-muted);
	font-weight: 400;
}
.ae-currency-item-code {
	font-family: inherit;
	font-size: 11px;
	letter-spacing: 0.04em;
	color: var(--ae-hp-ink-muted);
	font-weight: 400;
}
.ae-currency-item:hover .ae-currency-item-label,
.ae-currency-item:hover .ae-currency-item-code { color: var(--ae-hp-ink); }
.ae-currency-item.is-active .ae-currency-item-label,
.ae-currency-item.is-active .ae-currency-item-code {
	color: var(--ae-hp-ink);
	font-weight: 700;
}

/* Sub-nav row */
.ae-subnav {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 22px;
	padding: 4px 36px 18px;
}
.ae-subnav-item {
	font-size: 11px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--ae-hp-ink-soft);
	text-decoration: none;
	background: none;
	border: none;
	padding: 6px 0;
	cursor: pointer;
	font-family: inherit;
	font-weight: 400;
	position: relative;
	transition: color 160ms var(--ae-hp-ease);
}
.ae-subnav-item:hover { color: var(--ae-hp-ink); }
.ae-subnav-item.is-active { color: var(--ae-hp-ink); font-weight: 500; }
.ae-subnav-item--sale { color: var(--ae-hp-ink); }

/* ================================================================
   MOBILE HEADER
   ================================================================ */
.m-header {
	display: none; /* shown by media query below */
	position: relative;
	align-items: center;
	justify-content: space-between;
	padding: 14px;
	gap: 8px;
	background: var(--ae-hp-canvas);
	border-bottom: 1px solid var(--ae-hp-line);
	font-family: var(--ae-hp-font-body);
	color: var(--ae-hp-ink);
	min-height: 60px;
}
.m-header .m-wordmark {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	white-space: nowrap;
	pointer-events: auto;
	z-index: 1;
}
.m-header-right {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-left: auto;
}
.m-icon-btn {
	background: transparent;
	border: none;
	padding: 8px;
	cursor: pointer;
	color: var(--ae-hp-ink);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: relative;
	min-width: 44px;
	min-height: 44px;
	text-decoration: none;
}
.m-icon-btn svg { width: 19px; height: 19px; stroke-width: 1.5; }
.m-icon-btn:focus-visible {
	outline: 1px solid var(--ae-hp-ink);
	outline-offset: 2px;
}

.m-wordmark {
	/* 2026-04-26 — match the live an-editorial.com header wordmark
	   (.ae-siteBrand-text) computed style: 30px / 400 / -0.45px tracking
	   / Fraunces with opsz 72 + SOFT 40, no uppercase transform. The
	   Premium template was rendering this at 15.5px / weight 300 / wide
	   0.18em tracked uppercase, which read as a different identity. */
	font-family: "Fraunces", Didot, "Bodoni 72", "Playfair Display", Georgia, serif;
	font-weight: 400;
	font-size: 30px;
	letter-spacing: -0.45px;
	text-transform: none;
	font-optical-sizing: auto;
	font-variation-settings: "SOFT" 40, "opsz" 72;
	text-align: center;
	margin: 0;
	color: var(--ae-hp-ink);
	line-height: 1;
	text-decoration: none;
}

/* 2026-04-26 — Reduce wordmark size on phones. The 30px desktop spec
   reads too dominant in a 64px-tall mobile header; 21px (~30% smaller)
   keeps the proportions tight against the hamburger and right cluster
   without losing legibility. The narrow-phone override at ≤360px
   takes over below this. */
@media (max-width: 1099px) and (min-width: 361px) {
	.m-wordmark {
		font-size: 21px;
		letter-spacing: -0.3px;
	}
}

/* Mobile drawer */
.m-menu {
	position: fixed;
	inset: 0;
	background: var(--ae-hp-canvas);
	display: flex;
	flex-direction: column;
	z-index: 1000;
	font-family: var(--ae-hp-font-body);
	color: var(--ae-hp-ink);
	transform: translateX(-100%);
	transition: transform 320ms var(--ae-hp-ease);
}
.m-menu[hidden] { display: none; }
.m-menu.is-open { transform: translateX(0); }

.m-menu-head {
	display: grid;
	grid-template-columns: 44px 1fr 44px;
	align-items: center;
	padding: 14px;
	border-bottom: 1px solid var(--ae-hp-line);
	flex-shrink: 0;
}
.m-menu-head h3.m-wordmark { font-size: 15.5px; }
.m-menu-tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	border-bottom: 1px solid var(--ae-hp-line);
	flex-shrink: 0;
}
.m-menu-tab {
	background: transparent;
	border: none;
	padding: 14px 0;
	font-family: inherit;
	font-size: 10.5px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--ae-hp-ink-faint);
	cursor: pointer;
	border-bottom: 1px solid transparent;
	margin-bottom: -1px;
	font-weight: 400;
	transition: color 160ms var(--ae-hp-ease);
	text-align: center;
	text-decoration: none;
}
.m-menu-tab.is-active {
	color: var(--ae-hp-ink);
	border-bottom-color: var(--ae-hp-ink);
	font-weight: 500;
}

.m-menu-list {
	flex: 1;
	overflow-y: auto;
	padding: 6px 0 18px;
	list-style: none;
	margin: 0;
	scrollbar-width: thin;
	scrollbar-color: rgba(0,0,0,0.12) transparent;
}
.m-menu-list::-webkit-scrollbar { width: 3px; }
.m-menu-list::-webkit-scrollbar-track { background: transparent; }
.m-menu-list::-webkit-scrollbar-thumb {
	background: rgba(0,0,0,0.12);
	border-radius: 999px;
}
.m-menu-list::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.20); }
.m-menu-list li {
	border-bottom: 1px solid var(--ae-hp-line);
}
.m-menu-list li a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 22px;
	font-size: 11.5px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--ae-hp-ink);
	background: transparent;
	transition: background 160ms var(--ae-hp-ease);
	min-height: 44px;
	text-decoration: none;
}
.m-menu-list li a:hover { background: var(--ae-hp-paper); }
.m-menu-list li.is-sale a { color: var(--ae-hp-ink); }
.m-menu-list li svg {
	width: 11px; height: 11px;
	color: var(--ae-hp-ink-faint);
	stroke-width: 1.5;
}

.m-menu-foot {
	border-top: 1px solid var(--ae-hp-line);
	padding: 18px 22px 22px;
	background: var(--ae-hp-paper);
	flex-shrink: 0;
}
.m-menu-foot-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 0;
	font-size: 11px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--ae-hp-ink);
	min-height: 44px;
	text-decoration: none;
}
.m-menu-foot-row + .m-menu-foot-row {
	border-top: 1px solid var(--ae-hp-line);
}
.m-menu-cur-label {
	font-size: 10px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--ae-hp-ink-faint);
	margin-top: 14px;
	margin-bottom: 8px;
}
.m-menu-cur {
	display: flex;
	gap: 22px;
	padding-top: 8px;
}
.m-menu-cur a {
	background: transparent;
	border: none;
	padding: 10px 0;
	font-family: inherit;
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--ae-hp-ink-muted);
	cursor: pointer;
	text-decoration: none;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
}
.m-menu-cur a.is-active {
	color: var(--ae-hp-ink);
	font-weight: 700;
}

/* ================================================================
   RESPONSIVE SWITCH
   ================================================================ */
@media (max-width: 760px) {
	.ae-header-bar,
	.ae-subnav { display: none; }
	.m-header { display: flex; }
}

/* At very narrow widths the Fraunces wordmark would overlap the right cluster.
   Compress its size so it still fits between hamburger + (search · saved). */
@media (max-width: 360px) {
	.m-wordmark { font-size: 11px; letter-spacing: 0.1em; }
}

@media (min-width: 761px) {
	.m-header { display: none; }
	.m-menu { display: none !important; }
}

/* When the drawer is open, lock body scroll. The body class is set by JS;
   we use it to hide overflow defensively even if some other CSS undoes it. */
body.ae-mobileMenuOpen {
	overflow: hidden;
}

/* ================================================================
   REDUCED MOTION
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
	.ae-header *,
	.m-header *,
	.m-menu,
	.m-menu *,
	.ae-currency-menu,
	.ae-currency-menu * {
		transition: none !important;
		animation: none !important;
	}
	.m-menu { transform: translateX(0); }
}
