/*
 * Header — sticky bar with logo, primary nav, utility (search/account/cart).
 *
 * Always rendered as a solid white bar above the page content; the hero
 * block sits beneath it rather than under it. On scroll we add
 * `is-scrolled` to deepen the shadow.
 */

/* Announcement bar ------------------------------------------------ */

.eqx-announcement {
	background: var(--eqx-brand-dark);
	color: var(--eqx-warm-white);
	font-size: var(--font-small);
	height: var(--announcement-h);
	display: flex;
	align-items: center;
}
.eqx-announcement[hidden] { display: none; }
.eqx-announcement__inner {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: var(--spacing-md);
	position: relative;
	width: 100%;
	padding-inline: clamp(var(--spacing-md), 6vw, 100px);
}
.eqx-announcement__text { margin: 0; }
.eqx-announcement__text a { color: var(--eqx-brand-accent); }
.eqx-announcement__close {
	position: absolute; right: var(--spacing-md); top: 50%; transform: translateY(-50%);
	background: transparent; border: 0; color: inherit;
	font-size: 1.25rem; line-height: 1; padding: 4px 8px;
	opacity: 0.8;
}
.eqx-announcement__close:hover { opacity: 1; }

/* Header bar ------------------------------------------------------ */

.eqx-header {
	position: sticky;
	top: 0;
	z-index: var(--z-header);
	background: var(--eqx-warm-white);
	border-bottom: 1px solid var(--eqx-border);
	transition: background var(--transition-base), border-color var(--transition-base);
}
.eqx-header.is-scrolled { box-shadow: var(--shadow-card); }

.eqx-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--spacing-md);
	height: var(--header-h);
	width: 100%;
	/* Generous side padding so the logo and utility icons sit well off
	 * the viewport edges. Collapses on narrower screens so it doesn't
	 * crush the nav. */
	padding-inline: clamp(var(--spacing-md), 6vw, 100px);
}

.eqx-header__logo { display: inline-flex; align-items: center; text-decoration: none; }
.eqx-header__logo-img { max-height: 56px; width: auto; }
.eqx-header__logo-fallback {
	font-family: var(--ff-display);
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--eqx-brand-dark);
	letter-spacing: -0.01em;
}

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

.eqx-nav { flex: 1 1 auto; display: flex; justify-content: center; }
.eqx-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: var(--spacing-lg);
	align-items: center;
}
.eqx-nav__list > li > a,
.eqx-nav__list a {
	font-size: 0.9375rem;
	font-weight: 500;
	letter-spacing: 0.01em;
	text-transform: none;
	text-decoration: none;
	color: var(--eqx-text-primary);
	padding: 6px 2px;
	display: inline-block;
	transition: color var(--transition-base), background var(--transition-base);
}
.eqx-nav__list a:hover { color: var(--eqx-brand-teal); }

/* Top-level current-page item: teal pill (matches the "Home" treatment
 * in the homepage design). Only applied to direct children of the nav
 * list so dropdown items stay text-only. Sized to sit snugly around the
 * label rather than dominating the bar. */
.eqx-nav__list > li.current-menu-item > a,
.eqx-nav__list > li.current_page_item > a,
.eqx-nav__list > li.current-menu-ancestor > a,
.eqx-nav__list > li.current-menu-parent > a {
	background: var(--eqx-brand-teal);
	color: var(--eqx-warm-white);
	padding: 5px 14px;
	border-radius: var(--radius-pill);
	letter-spacing: 0.01em;
}
.eqx-nav__list > li.current-menu-item > a:hover,
.eqx-nav__list > li.current_page_item > a:hover {
	background: var(--eqx-brand-teal-dk);
	color: var(--eqx-warm-white);
}

.eqx-nav__list .menu-item-has-children { position: relative; }
.eqx-nav__list .menu-item-has-children > a::after {
	content: '';
	display: inline-block;
	width: 0; height: 0;
	margin-left: 6px;
	border-left: 3px solid transparent;
	border-right: 3px solid transparent;
	border-top: 4px solid currentColor;
	transform: translateY(-2px);
}
.eqx-nav__list .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	background: var(--eqx-warm-white);
	border: 1px solid var(--eqx-border);
	border-radius: var(--radius-card);
	box-shadow: var(--shadow-overlay);
	list-style: none;
	margin: 0;
	padding: var(--spacing-xs) 0;
}
.eqx-nav__list .menu-item-has-children:hover > .sub-menu,
.eqx-nav__list .menu-item-has-children:focus-within > .sub-menu { display: block; }
.eqx-nav__list .sub-menu a {
	display: block;
	padding: 8px var(--spacing-md);
	color: var(--eqx-text-primary);
	letter-spacing: 0.04em;
	text-transform: none;
	font-weight: 400;
}
.eqx-nav__list .sub-menu a:hover { background: var(--eqx-brand-light); color: var(--eqx-brand-dark); }

/* Utility (search / account / cart) ------------------------------- */

.eqx-header__utility {
	display: flex;
	align-items: center;
	gap: var(--spacing-xs);
}
.eqx-header__icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px; height: 40px;
	background: transparent;
	border: 0;
	color: var(--eqx-text-primary);
	text-decoration: none;
	border-radius: var(--radius-button);
	transition: background var(--transition-base), color var(--transition-base);
	position: relative;
}
.eqx-header__icon-btn:hover { background: var(--eqx-brand-light); color: var(--eqx-brand-dark); }

.eqx-header__cart-count {
	position: absolute;
	top: 4px; right: 4px;
	min-width: 18px; height: 18px;
	padding: 0 5px;
	font-size: 11px;
	line-height: 18px;
	font-weight: 600;
	background: var(--eqx-brand-accent);
	color: var(--eqx-brand-dark);
	border-radius: 9px;
	text-align: center;
}

/* Burger ---------------------------------------------------------- */

.eqx-header__burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
	width: 40px; height: 40px;
	background: transparent;
	border: 0;
	padding: 8px;
}
.eqx-header__burger span {
	display: block;
	width: 24px;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
	transition: transform var(--transition-base), opacity var(--transition-base);
}

/* Inline search — drops down beneath the header ---------------------- */

.eqx-header__search {
	position: relative;
	display: flex;
	align-items: center;
}
/* Anchored to the icon and dropped below the header bar rather than sliding
   leftward, which used to cover the "Contact" nav item. */
.eqx-header__search-form {
	position: absolute;
	/* Clear the header bar entirely: the 40px icon is centred in the
	   --header-h row, so half the leftover height puts us on the bottom
	   edge, then 8px of breathing room. Tracks the mobile --header-h too. */
	top: calc(100% + (var(--header-h) - 40px) / 2 + 8px);
	right: 0;
	width: clamp(240px, 32vw, 340px);
	max-width: calc(100vw - 2 * var(--spacing-md));
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	pointer-events: none;
	transition: opacity 180ms ease, transform 200ms ease, visibility 0s linear 200ms;
}
.eqx-header__search.is-open .eqx-header__search-form {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	pointer-events: auto;
	transition: opacity 180ms ease, transform 200ms ease, visibility 0s;
}
.eqx-header__search-form input[type="search"] {
	width: 100%;
	height: 40px;
	padding: 0 14px;
	border: 1px solid var(--eqx-border);
	border-radius: var(--radius-pill);
	background: var(--eqx-warm-white);
	color: var(--eqx-text-primary);
	font-family: var(--ff-body);
	font-size: 0.9375rem;
	box-shadow: var(--shadow-card);
}
.eqx-header__search-form input[type="search"]:focus {
	outline: none;
	border-color: var(--eqx-brand-accent);
}
/* The closed panel is `visibility: hidden` above, which already keeps
   keyboard users from tabbing into the field. */

/* Mobile slide-out nav ------------------------------------------- */

.eqx-mobile-nav {
	position: fixed;
	inset: 0;
	z-index: var(--z-mobile-nav);
	display: none;
}
.eqx-mobile-nav:not([hidden]) { display: block; }
.eqx-mobile-nav__panel {
	position: absolute;
	top: 0; left: 0;
	/* Above the backdrop, which follows it in the DOM and would otherwise
	   paint over the panel and swallow every tap on a menu link. */
	z-index: 1;
	width: min(360px, 86vw);
	height: 100%;
	background: var(--eqx-warm-white);
	box-shadow: var(--shadow-overlay);
	padding: var(--spacing-lg) var(--spacing-md);
	overflow-y: auto;
	transform: translateX(-100%);
	transition: transform 240ms ease-out;
}
.eqx-mobile-nav.is-open .eqx-mobile-nav__panel { transform: translateX(0); }
.eqx-mobile-nav__close {
	position: absolute;
	top: var(--spacing-sm); right: var(--spacing-sm);
	background: transparent; border: 0;
	font-size: 1.75rem; line-height: 1;
	color: var(--eqx-text-primary);
}
.eqx-mobile-nav__list,
.eqx-mobile-nav__list .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}
.eqx-mobile-nav__list > li { border-bottom: 1px solid var(--eqx-border); }
.eqx-mobile-nav__list a {
	display: block;
	padding: 14px 0;
	font-size: 1.0625rem;
	color: var(--eqx-text-primary);
	text-decoration: none;
}
.eqx-mobile-nav__list .sub-menu a { padding-left: var(--spacing-md); font-size: 0.95rem; color: var(--eqx-text-muted); }
/* Sits behind the panel and stays untinted — the drawer is separated from the
   page by its own shadow, so the page below is left at full brightness. */
.eqx-mobile-nav__backdrop {
	position: absolute;
	inset: 0;
	z-index: 0;
	background: transparent;
	border: 0;
	cursor: pointer;
}

/* Responsive ------------------------------------------------------ */

@media (max-width: 1024px) {
	.eqx-nav { display: none; }
	.eqx-header__burger { display: inline-flex; }
}
