/**
 * Out-N-Out global header + footer. Token-driven; loaded on every page.
 * Desktop nav + dropdowns are CSS-only; JS is only for the mobile drawer and
 * the search toggle (see assets/js/modules/header.js).
 */

/* =========================================================================
   ANNOUNCEMENT BAR
   ========================================================================= */
.oon-announce {
	background-color: var(--oon-color-announce, #dbb883);
	color: var(--oon-color-heading, #332d55);
	font-family: var(--oon-font-body);
	font-size: 0.9rem;
	letter-spacing: 0.01em;
	overflow: hidden;
}

.oon-announce__static {
	text-align: center;
	padding: 11px 15px;
}

.oon-announce__viewport {
	display: flex;
	width: 100%;
	overflow: hidden;
}

.oon-announce__track {
	display: flex;
	flex: 0 0 auto;
	gap: 3rem;
	padding: 9px 1.5rem 9px 0;
	white-space: nowrap;
	animation: oon-marquee 28s linear infinite;
}

.oon-announce--scroll:hover .oon-announce__track {
	animation-play-state: paused;
}

.oon-announce__item {
	position: relative;
	padding-left: 3rem;
}
.oon-announce__item::before {
	content: "•";
	position: absolute;
	left: 1.4rem;
	opacity: 0.6;
}
.oon-announce__static .oon-announce__item {
	padding-left: 0;   /* no marquee bullet indent — keep the single line centred */
}
.oon-announce__static .oon-announce__item::before {
	content: none;
}

@keyframes oon-marquee {
	from { transform: translateX(0); }
	to   { transform: translateX(-100%); }
}

@media (prefers-reduced-motion: reduce) {
	.oon-announce__track {
		animation: none;
	}
	.oon-announce__viewport {
		justify-content: center;
	}
	.oon-announce__track[aria-hidden="true"] {
		display: none;
	}
}

/* =========================================================================
   HEADER
   ========================================================================= */
.oon-header {
	background-color: var(--oon-color-bg, #fff);
	border-bottom: 1px solid var(--oon-color-border, #eee);
}

.oon-header[data-sticky="always"] {
	position: sticky;
	top: 0;
	z-index: var(--oon-z-header, 100);
}

.oon-header__inner {
	display: flex;
	align-items: center;
	gap: 26px;
	min-height: 108px;
	/* The header row is wider than the 1170 content container (matching the live
	   full-width header distribution); body sections keep the standard container.
	   ~1660 wide with slim gutters places the logo/actions near the live x-positions. */
	max-width: 1660px;
	padding-inline: clamp(20px, 2vw, 26px);
}

.oon-header__branding {
	flex: 0 0 auto;
}

.oon-header__branding img {
	display: block;
	height: 64px;          /* ~200px wide at the logo's 3.13:1 ratio (matches live) */
	max-height: 64px;
	width: auto;
	max-width: 100%;
}

.oon-header__branding .oon-site-title {
	display: block;
	max-height: 64px;
	width: auto;
}

.oon-site-title {
	font-family: var(--oon-font-heading);
	font-weight: var(--oon-fw-heading, 500);
	font-size: 1.4rem;
	color: var(--oon-color-heading, #332d55);
	text-decoration: none;
}

/* ---- Primary nav (desktop) ---- */
.oon-header__nav {
	flex: 1 1 auto;          /* take the middle space so the menu sits centred */
	display: flex;
	justify-content: center;
}

.oon-menu {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 1.3rem;
	margin: 0;
	padding: 0;
	list-style: none;
	white-space: nowrap;
}

.oon-menu a {
	display: inline-block;
	padding: 6px 0;
	font-family: var(--oon-font-body);
	font-weight: var(--oon-fw-medium, 500);
	font-size: 1.05rem;
	letter-spacing: 0.01em;
	color: var(--oon-color-text, #212121);
	text-decoration: none;
	transition: color var(--oon-transition, 0.25s ease);
}

.oon-menu a:hover,
.oon-menu a:focus,
.oon-menu .current-menu-item > a,
.oon-menu .current-menu-ancestor > a {
	color: var(--oon-color-heading, #332d55);
}

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

/* Caret for parents */
.oon-menu .menu-item-has-children > a::after {
	content: "";
	display: inline-block;
	width: 7px;
	height: 7px;
	margin-left: 6px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform var(--oon-transition, 0.25s ease);
}

/* Dropdown submenu */
.oon-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 210px;
	margin: 0;
	padding: 10px 0;
	list-style: none;
	background: var(--oon-color-bg, #fff);
	border: 1px solid var(--oon-color-border, #eee);
	border-radius: var(--oon-radius-sm, 4px);
	box-shadow: 0 12px 30px rgba(var(--oon-color-heading-rgb, 51, 45, 85), 0.12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity var(--oon-transition, 0.25s ease), transform var(--oon-transition, 0.25s ease), visibility var(--oon-transition, 0.25s ease);
	z-index: 10;
}

.oon-menu .menu-item-has-children:hover > .sub-menu,
.oon-menu .menu-item-has-children:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.oon-menu .sub-menu a {
	display: block;
	padding: 8px 20px;
	font-size: 0.9rem;
	white-space: nowrap;
}

/* ---- Header actions ---- */
.oon-header__actions {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 0.45rem;
}

/* ---- Inline header search (desktop) ---- */
.oon-header__search {
	display: flex;
	align-items: center;
	gap: 8px;
	width: clamp(260px, 20vw, 290px);
	margin-right: 0.35rem;
	padding: 0 16px;
	height: 46px;
	background: var(--oon-color-form-field, #f2f2f2);
	border: 1px solid var(--oon-color-border, #eee);
	border-radius: var(--oon-radius-full, 9999px);
	transition: border-color var(--oon-transition, 0.25s ease);
}
.oon-header__search:focus-within {
	border-color: var(--oon-color-accent, #9a84c8);
}
.oon-header__search-ico {
	flex: 0 0 auto;
	display: inline-flex;
	color: var(--oon-color-text-secondary, #666);
}
.oon-header__search-ico .oon-ico {
	width: 18px;
	height: 18px;
}
.oon-header__search-input {
	flex: 1 1 auto;
	min-width: 0;
	height: 100%;
	padding: 0;
	border: none;
	background: transparent;
	font-family: var(--oon-font-body);
	font-size: 0.92rem;
	color: var(--oon-color-text, #212121);
}
.oon-header__search-input::placeholder {
	color: var(--oon-color-text-secondary, #666);
	opacity: 1;
}
.oon-header__search-input:focus {
	outline: none;
}
/* The submit is keyboard/AT reachable; the visible affordance is the leading icon. */
.oon-header__search-submit {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	border: 0;
}

/* Search toggle button is mobile-only (desktop uses the inline box). */
.oon-header__search-toggle {
	display: none;
}

.oon-header__action {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	color: var(--oon-color-heading, #332d55);
	background: none;
	border: none;
	border-radius: var(--oon-radius-full, 9999px);
	cursor: pointer;
	text-decoration: none;
	transition: background-color var(--oon-transition, 0.25s ease), color var(--oon-transition, 0.25s ease);
}

/* Slightly larger glyphs to match the live header's icon weight. */
.oon-header__action .oon-ico {
	width: 23px;
	height: 23px;
}

.oon-header__action:hover,
.oon-header__action:focus-visible {
	background: var(--oon-color-bg-secondary, #f5f5f5);
	color: var(--oon-color-accent, #9a84c8);
}

.oon-header__cart-count {
	position: absolute;
	top: 4px;
	right: 2px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var(--oon-font-body);
	font-size: 0.7rem;
	font-weight: var(--oon-fw-bold, 700);
	line-height: 1;
	color: #fff;
	background: var(--oon-color-accent, #9a84c8);
	border-radius: var(--oon-radius-full, 9999px);
}
.oon-header__cart-count[hidden] {
	display: none;
}

/* ---- Hamburger (mobile only) ---- */
.oon-header__burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 42px;
	height: 42px;
	padding: 0 9px;
	background: none;
	border: none;
	cursor: pointer;
}
.oon-header__burger-bar {
	display: block;
	height: 2px;
	width: 100%;
	background: var(--oon-color-heading, #332d55);
	transition: transform var(--oon-transition, 0.25s ease), opacity var(--oon-transition, 0.25s ease);
}

/* =========================================================================
   SEARCH PANEL
   ========================================================================= */
.oon-search-panel {
	border-top: 1px solid var(--oon-color-border, #eee);
	background: var(--oon-color-bg, #fff);
}
.oon-search-panel[hidden] {
	display: none;
}
.oon-search-panel__inner {
	display: flex;
	align-items: center;
	gap: 12px;
	padding-block: 16px;
}
.oon-search-panel form {
	flex: 1 1 auto;
	display: flex;
	gap: 8px;
}
.oon-search-panel input[type="search"],
.oon-search-panel input[type="text"] {
	flex: 1 1 auto;
}
.oon-search-panel__close {
	flex: 0 0 auto;
	width: 42px;
	height: 42px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	color: var(--oon-color-heading, #332d55);
	cursor: pointer;
	border-radius: var(--oon-radius-full, 9999px);
}
.oon-search-panel__close:hover,
.oon-search-panel__close:focus-visible {
	background: var(--oon-color-bg-secondary, #f5f5f5);
}

/* Shared search form component (header panel, search results, 404). Global
   because the header search panel appears on every page. */
.oon-search-form {
	display: flex;
	gap: 8px;
	width: 100%;
	max-width: 520px;
	margin-inline: auto;
}
.oon-search-panel .oon-search-form {
	max-width: none;
	margin: 0;
}
.oon-search-form__input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 13px 16px;
	font-family: var(--oon-font-body);
	font-size: 1rem;
	color: var(--oon-color-text, #212121);
	background: var(--oon-color-form-field, #f2f2f2);
	border: 1px solid var(--oon-color-border, #eee);
	border-radius: var(--oon-radius-sm, 4px);
}
.oon-search-form__input:focus {
	outline: 2px solid var(--oon-color-accent, #9a84c8);
	outline-offset: 1px;
	border-color: transparent;
}
.oon-search-form__submit {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 50px;
	height: 50px;
	color: #fff;
	background: var(--oon-color-btn, #332d55);
	border: none;
	border-radius: var(--oon-radius-sm, 4px);
	cursor: pointer;
	transition: background-color var(--oon-transition, 0.25s ease);
}
.oon-search-form__submit:hover,
.oon-search-form__submit:focus-visible {
	background: var(--oon-color-accent, #9a84c8);
}

/* =========================================================================
   MOBILE DRAWER
   ========================================================================= */
.oon-drawer-overlay {
	position: fixed;
	inset: 0;
	z-index: var(--oon-z-overlay, 300);
	background: rgba(0, 0, 0, 0.45);
	opacity: 0;
	transition: opacity var(--oon-transition, 0.25s ease);
}
.oon-drawer-overlay.is-open {
	opacity: 1;
}
.oon-drawer-overlay[hidden] {
	display: none;
}

.oon-drawer {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	z-index: var(--oon-z-drawer, 200);
	width: min(86vw, 340px);
	display: flex;
	flex-direction: column;
	background: var(--oon-color-bg, #fff);
	transform: translateX(-100%);
	transition: transform var(--oon-transition, 0.25s ease);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}
.oon-drawer.is-open {
	transform: translateX(0);
}
.oon-drawer[hidden] {
	display: none;
}
/* When JS is active it manages [hidden]; ensure the panel can animate in. */
.oon-drawer:not([hidden]) {
	display: flex;
}

.oon-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid var(--oon-color-border, #eee);
}
.oon-drawer__title {
	font-family: var(--oon-font-heading);
	font-weight: var(--oon-fw-heading, 500);
	color: var(--oon-color-heading, #332d55);
}
.oon-drawer__close {
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	color: var(--oon-color-heading, #332d55);
	cursor: pointer;
	border-radius: var(--oon-radius-full, 9999px);
}

.oon-drawer__nav {
	padding: 8px 0;
}
.oon-drawer__menu,
.oon-drawer__menu .sub-menu {
	margin: 0;
	padding: 0;
	list-style: none;
}
.oon-drawer__menu a {
	display: block;
	padding: 12px 20px;
	font-family: var(--oon-font-body);
	font-weight: var(--oon-fw-medium, 500);
	color: var(--oon-color-text, #212121);
	text-decoration: none;
	border-bottom: 1px solid var(--oon-color-border, #eee);
}
.oon-drawer__menu .sub-menu a {
	padding-left: 36px;
	font-weight: var(--oon-fw-regular, 400);
}

/* Mobile submenu toggle button (injected by JS for parents) */
.oon-submenu-toggle {
	position: absolute;
	top: 0;
	right: 0;
	width: 48px;
	height: 47px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	border-left: 1px solid var(--oon-color-border, #eee);
	color: var(--oon-color-heading, #332d55);
	cursor: pointer;
}
.oon-drawer__menu .menu-item-has-children {
	position: relative;
}
.oon-drawer__menu .sub-menu {
	display: none;
}
.oon-drawer__menu .menu-item-has-children.is-open > .sub-menu {
	display: block;
}
.oon-submenu-toggle[aria-expanded="true"] .oon-ico--chevron {
	transform: rotate(180deg);
}

.oon-drawer__actions {
	margin-top: auto;
	padding: 16px 20px;
	border-top: 1px solid var(--oon-color-border, #eee);
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.oon-drawer__action {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 0;
	color: var(--oon-color-text, #212121);
	text-decoration: none;
	font-weight: var(--oon-fw-medium, 500);
}
.oon-drawer__action .oon-header__cart-count {
	position: static;
	margin-left: auto;
}

body.oon-drawer-open {
	overflow: hidden;
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.oon-footer {
	background-color: #000;
	color: #fff;
	margin-top: 0;
}

/* Live footer composition (fractions chosen so the column start points match the
   live footer: Useful Links ~47%, Customer Services ~68% of the 1170 container).
   minmax(0, …) is REQUIRED — plain fr tracks default to minmax(auto, fr), which
   lets the long menu links ("Shipping & Cancellation Policy") steal width from the
   newsletter track and pull the menus left. The 4th track is trailing space; the
   newsletter content is capped so the wide first track leaves the live mid gap. */
.oon-footer__top {
	display: grid;
	grid-template-columns: minmax(0, 4.6fr) minmax(0, 2.2fr) minmax(0, 2.2fr) minmax(0, 1fr);
	gap: 0;
	padding-block: 80px;
}

.oon-footer__col--newsletter {
	max-width: 430px;
}

.oon-footer__heading {
	margin: 0 0 12px;
	font-family: var(--oon-font-heading);
	font-weight: var(--oon-fw-heading, 500);
	font-size: 18px;
	line-height: 1.4;
	color: #fff;
}
/* The newsletter block leads with a large serif headline, like live. */
.oon-footer__heading--nl {
	font-size: 18px;
	line-height: 1.3;
	margin-bottom: 18px;
}
/* Live jumps the footer headings up at >=1280px (menu 24px, newsletter 40/52). */
@media (min-width: 1280px) {
	.oon-footer__heading {
		font-size: 24px;
	}
	.oon-footer__heading--nl {
		font-size: 40px;
		line-height: 52px;
	}
}

.oon-footer__about {
	color: rgba(255, 255, 255, 0.72);
	font-size: 0.92rem;
	line-height: 1.6;
}

.oon-footer__menu {
	margin: 0;
	padding: 0;
	list-style: none;
}
.oon-footer__menu li {
	margin-bottom: 14px;
}
.oon-footer__menu a {
	color: rgba(255, 255, 255, 0.72);
	font-size: 0.95rem;
	text-decoration: none;
	transition: color var(--oon-transition, 0.25s ease);
}
.oon-footer__menu a:hover,
.oon-footer__menu a:focus {
	color: #fff;
}

.oon-footer__contact {
	margin: 14px 0;
	padding: 0;
	list-style: none;
	color: var(--oon-color-text-secondary, #666);
	font-size: 0.92rem;
	line-height: 1.6;
}
.oon-footer__contact a {
	color: inherit;
	text-decoration: none;
}
.oon-footer__contact a:hover {
	color: var(--oon-color-heading, #332d55);
}

/* Social — filled white brand glyphs on the dark footer (no chips), like live. */
.oon-social {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px;
	margin: 24px 0 0;
	padding: 0;
	list-style: none;
}
.oon-social__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	height: auto;
	color: #fff;
	background: transparent;
	border: none;
	border-radius: 0;
	transition: color var(--oon-transition, 0.25s ease);
}
.oon-social__link svg {
	width: 18px;
	height: 18px;
	display: block;
}
.oon-social__link:hover,
.oon-social__link:focus-visible {
	background: transparent;
	color: rgba(255, 255, 255, 0.7);
}
@media (max-width: 639px) {
	.oon-social__link svg {
		width: 16px;
		height: 16px;
	}
}

/* Footer newsletter */
.oon-footer__nl-text {
	color: rgba(255, 255, 255, 0.72);
	font-size: 0.95rem;
	line-height: 1.6;
	margin-bottom: 24px;
}
/* Live field: light-grey (#f5f5f5) rectangle, 5px radius (--inputs-radius), no
   visible border; email input + an inline arrow submit flush to the right. */
.oon-footer__nl-form {
	display: flex;
	align-items: stretch;
	gap: 0;
	max-width: 340px;
	background: #f5f5f5;
	border-radius: 5px;
	overflow: hidden;
}
.oon-footer__nl-input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 14px 12px;
	background: transparent;
	border: none;
	color: #1a1a1a;
	font-family: var(--oon-font-body);
	font-size: 0.95rem;
}
.oon-footer__nl-input::placeholder {
	color: #8a8a8a;
}
.oon-footer__nl-input:focus {
	outline: none;
}
.oon-footer__nl-button {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 15px;
	border: none;
	border-radius: 0;
	background: #f5f5f5;
	color: #1a1a1a;
	cursor: pointer;
	transition: background-color var(--oon-transition, 0.25s ease), color var(--oon-transition, 0.25s ease);
}
.oon-footer__nl-button svg {
	width: 14px;
	height: 14px;
	display: block;
}
.oon-footer__nl-button:hover:not([disabled]),
.oon-footer__nl-button:focus-visible:not([disabled]) {
	background: #1a1a1a;
	color: #fff;
}
.oon-footer__nl-input[disabled],
.oon-footer__nl-button[disabled] {
	cursor: not-allowed;
}
.oon-footer__nl-consent {
	margin-top: 12px;
	font-size: 0.78rem;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.6);
}
.oon-footer__nl-consent a {
	color: rgba(255, 255, 255, 0.9);
}

.oon-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.oon-footer__bottom-inner {
	padding-block: 28px;
	text-align: center;
}
.oon-footer__copyright {
	margin: 0;
	color: rgba(255, 255, 255, 0.6);
	font-size: 0.9rem;
}

/* =========================================================================
   BACK-TO-TOP  (global, single instance — mirrors the live scroll-top button)
   ========================================================================= */
.oon-scroll-top {
	position: fixed;
	right: 24px;
	bottom: 32px;
	z-index: 99;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	padding: 0;
	color: #1a1a1a;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 50%;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity var(--oon-transition, 0.25s ease), transform var(--oon-transition, 0.25s ease), visibility var(--oon-transition, 0.25s ease), background-color var(--oon-transition, 0.25s ease), color var(--oon-transition, 0.25s ease);
}
.oon-scroll-top.is-show {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.oon-scroll-top svg {
	width: 16px;
	height: 16px;
	display: block;
}
.oon-scroll-top:hover,
.oon-scroll-top:focus-visible {
	background: #1a1a1a;
	color: #fff;
}
@media (max-width: 767px) {
	.oon-scroll-top {
		width: 40px;
		height: 40px;
		right: 16px;
		bottom: 24px;
	}
	.oon-scroll-top svg {
		width: 14px;
		height: 14px;
	}
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 1024px) {
	.oon-footer__top {
		grid-template-columns: 1fr 1fr;
		gap: 40px 30px;
	}
	.oon-footer__col--newsletter {
		grid-column: 1 / -1;
		max-width: 560px;
	}
}

/* Below the widest desktop, the inline search box collapses to the search
   toggle + panel so the logo + full nav + icons keep a single row. */
@media (max-width: 1430px) {
	.oon-header__search {
		display: none;
	}
	.oon-header__search-toggle {
		display: inline-flex;
	}
}

/* Tablet/mobile: swap the desktop nav for the hamburger + drawer. The threshold
   sits where the 7-item nav would otherwise wrap; the live header collapses to a
   menu button at a comparable width. */
@media (max-width: 1200px) {
	.oon-header__nav {
		display: none;
	}
	.oon-header__burger {
		display: flex;
	}
	.oon-header__inner {
		justify-content: space-between;
		min-height: 76px;
	}
	.oon-header__branding {
		margin-inline: auto; /* centre the logo between burger and actions */
	}
	.oon-header__branding img {
		height: 46px;
		max-height: 46px;
	}
}

@media (max-width: 640px) {
	.oon-footer__top {
		grid-template-columns: 1fr;
		gap: 32px;
	}
	.oon-header__inner {
		min-height: 68px;
		gap: 8px;                 /* tighten so burger + logo + icons never overflow */
	}
	.oon-header__actions {
		gap: 0.1rem;
	}
	.oon-header__action {
		width: 38px;
		height: 38px;
	}
	.oon-header__branding img {
		height: 40px;
		max-height: 40px;
	}
}
