/* Maverick header — Figma node 1:51 (1440 x 94, navy). Spec: docs/design/homepage-figma-spec.md §1 */

/* Fixed header + in-flow spacer. (position: sticky is not usable: Uncode's .box-wrapper has overflow:hidden.)
   The old Uncode menu was sticky too, so the header stays visible while scrolling. */
.mvk-header-wrap { height: 94px; }
.mvk-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	background: var(--mvk-navy);
}
.admin-bar .mvk-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .mvk-header { top: 46px; } }

.mvk-header__inner {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: 1440px;
	height: 94px;
	margin: 0 auto;
	padding: 18px 72px;
}

.mvk-logo,
.mvk-logo img {
	display: block;
	width: 203px;
	height: 58px;
}

/* Links ---------------------------------------------------------------- */
.mvk-nav__links {
	display: flex;
	align-items: center;
	gap: 32px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.mvk-nav__li {
	position: relative;
	display: flex;
	margin: 0;
	padding: 0;
}

.mvk-nav__item {
	position: relative;
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: #fff;
	font: 600 14px/normal var(--mvk-font-body);
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: color var(--mvk-ease);
}
.mvk-nav__item:hover,
.mvk-nav__item[aria-expanded="true"] { color: var(--mvk-orange); }

/* 4px gap + 2px ring = 6px, 4px radius (handoff 1:317, 1:343). */
html body .mvk-nav__item:focus-visible,
html body .mvk-nav__phone:focus-visible { outline: none; }
.mvk-nav__item:focus-visible::before,
.mvk-nav__phone:focus-visible::before {
	content: "";
	position: absolute;
	inset: -6px;
	border: 2px solid #fff;
	border-radius: 4px;
	pointer-events: none;
}

/* Current page: white text + 2px orange bar, 6px below the text (handoff 1:309). */
.mvk-nav__item[aria-current="page"]::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 25px;
	height: 2px;
	background: var(--mvk-orange);
}

/* Chevron: 9 x 4.5 layout box, the 10.6 x 6.1 SVG centered in it (Figma inset -17.78% / -8.89%).
   Default = white @75%; hover/open = solid orange asset; open rotates 180deg. */
.mvk-nav__chev {
	position: relative;
	flex: none;
	width: 9px;
	height: 4.5px;
	transition: transform var(--mvk-ease);
}
.mvk-nav__chev::before,
.mvk-nav__chev::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 10.6px;
	height: 6.1px;
	margin: -3.05px 0 0 -5.3px;
	background: center / 100% 100% no-repeat;
	transition: opacity var(--mvk-ease);
}
.mvk-nav__chev::before { background-image: url("../img/chevron-nav.svg"); }
.mvk-nav__chev::after { background-image: url("../img/chevron-nav-hover.svg"); opacity: 0; }
.mvk-nav__item:hover .mvk-nav__chev::before,
.mvk-nav__item[aria-expanded="true"] .mvk-nav__chev::before { opacity: 0; }
.mvk-nav__item:hover .mvk-nav__chev::after,
.mvk-nav__item[aria-expanded="true"] .mvk-nav__chev::after { opacity: 1; }
.mvk-nav__item[aria-expanded="true"][data-pinned="true"] .mvk-nav__chev { transform: rotate(180deg); }

/* Figma rounds auto-width text up to whole pixels; match those widths so every item lands on the drawn x. */
.mvk-nav__item--priefert-equipment .mvk-nav__label { min-width: 129px; }
.mvk-nav__item--nxg-truck-beds .mvk-nav__label { min-width: 108px; }
.mvk-nav__item--cowboys-choice-feed .mvk-nav__label { min-width: 148px; }
.mvk-nav__item--about .mvk-nav__label { min-width: 41px; }
.mvk-nav__item--contact .mvk-nav__label { min-width: 53px; }

/* Actions ---------------------------------------------------------------- */
.mvk-nav__actions {
	display: flex;
	align-items: center;
	gap: 22px;
}
.mvk-nav__actions .mvk-btn { flex: none; justify-content: flex-start; width: 155px; } /* Figma frame width (text 115 + 2 x 20), label starts at the 20px padding */

/* Phone: 98 x 37 box. Text at y9; a separate 1px bar (white @82%) at y28 (handoff 1:94). The
   leading "(" sits outside the underlined run, exactly as drawn. */
.mvk-nav__phone {
	position: relative;
	display: block;
	flex: none;
	width: 98px;
	height: 37px;
	color: #fff;
	font: 700 14px/normal var(--mvk-font-body);
	text-decoration: none;
	transition: color var(--mvk-ease);
}
.mvk-nav__phone-text {
	position: absolute;
	top: 9px;
	left: 0;
	white-space: nowrap;
}
.mvk-nav__phone-num {
	text-decoration: underline solid;
	text-decoration-thickness: from-font;
	text-underline-position: from-font;
}
.mvk-nav__phone::after {
	content: "";
	position: absolute;
	left: 0;
	top: 28px;
	width: 98px;
	height: 1px;
	background: rgba(255, 255, 255, 0.82);
	transition: background-color var(--mvk-ease);
}
.mvk-nav__phone:hover { color: var(--mvk-orange); }
.mvk-nav__phone:hover::after { background: var(--mvk-orange); }

/* Search: 22px icon centered in a 40 x 40 transparent hit area; layout width stays 22. */
.mvk-nav__search {
	display: grid;
	place-items: center;
	flex: none;
	box-sizing: border-box;
	width: 40px;
	height: 40px;
	margin: -9px;
	padding: 0;
	border: 0;
	border-radius: 20px;
	background: transparent;
	cursor: pointer;
	transition: background-color var(--mvk-ease);
}
.mvk-nav__search img { display: block; width: 22px; height: 22px; }
.mvk-nav__search:hover,
.mvk-nav__search[aria-expanded="true"] { background: rgba(255, 255, 255, 0.12); }
html body .mvk-nav__search:focus-visible {
	outline: 2px solid #fff;
	outline-offset: -2px;
}

/* Dropdown + search panels ---------------------------------------------------
   NOT DRAWN in Figma ("opens on hover and on click/Enter", "Search opens a search field").
   Derived from the drawn select menu (white, 1px #CFC3AE, 4px radius, hovered row #F3EFE6)
   and the card shadow. Awaiting operator approval (Decision D4). */
.mvk-panel {
	position: absolute;
	top: calc(100% + 37.5px); /* header bottom edge */
	left: 0;
	z-index: 2;
	box-sizing: border-box;
	min-width: 240px;
	padding: 7px 0;
	background: #fff;
	border: 1px solid var(--mvk-input-border);
	border-radius: 4px;
	box-shadow: 0 2px 6px rgba(61, 41, 20, 0.08), 0 14px 36px rgba(61, 41, 20, 0.16);
	color: var(--mvk-navy);
}
.mvk-panel[hidden] { display: none; }
/* Invisible bridge so the pointer can travel from the link down to the panel. */
.mvk-nav__li--has-panel:has(> .mvk-panel:not([hidden]))::after {
	content: "";
	position: absolute;
	left: -12px;
	right: -12px;
	top: 100%;
	height: 37.5px;
}
.mvk-panel__list { margin: 0; padding: 0; list-style: none; }
.mvk-panel__link {
	display: block;
	padding: 9px 14px;
	color: var(--mvk-navy);
	font: 400 14px/19px var(--mvk-font-body);
	text-decoration: none;
	white-space: nowrap;
	transition: background-color var(--mvk-ease), color var(--mvk-ease);
}
.mvk-panel__link:hover,
.mvk-panel__link:focus-visible { background: var(--mvk-section-bg); outline: none; }
html body .mvk-panel__link:focus-visible { box-shadow: inset 0 0 0 2px var(--mvk-navy); }
.mvk-panel__link[aria-current="page"] { font-weight: 700; }

/* Product-category tree: three columns, group headings, nested lists indented. */
.mvk-panel__list--depth-1 { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, auto); }
.mvk-panel__list--depth-1 > .mvk-panel__li > .mvk-panel__link { font-weight: 700; }
.mvk-panel__list--depth-2 .mvk-panel__link { padding-left: 14px; }
.mvk-panel__list--depth-3 .mvk-panel__link { padding-left: 28px; color: rgba(36, 60, 71, 0.8); }
.mvk-panel__list--depth-4 .mvk-panel__link { padding-left: 42px; color: rgba(36, 60, 71, 0.8); }

/* Simple dropdown (no nested levels, e.g. Cowboy's Choice Feed): one stacked column, regular weight. */
.mvk-panel__list--flat { display: block; }
.mvk-panel__list--flat > .mvk-panel__li > .mvk-panel__link { font-weight: 400; }
.mvk-panel__list--flat > .mvk-panel__li > .mvk-panel__link[aria-current="page"] { font-weight: 700; }

/* Search field */
.mvk-search {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 2;
	background: var(--mvk-navy-deep);
}
.mvk-search[hidden] { display: none; }
.mvk-search__form {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: 1440px;
	margin: 0 auto;
	padding: 18px 72px;
}
.mvk-search__input {
	box-sizing: border-box;
	flex: 1;
	height: 42px;
	padding: 0 14px;
	background: #fff;
	border: 1px solid var(--mvk-input-border);
	border-radius: 4px;
	color: var(--mvk-navy);
	font: 400 14px/normal var(--mvk-font-body);
	transition: border-color var(--mvk-ease), box-shadow var(--mvk-ease);
}
.mvk-search__input::placeholder { color: rgba(36, 60, 71, 0.5); }
.mvk-search__input:hover { border-color: var(--mvk-input-border-hover); }
.mvk-search__input:focus { outline: none; border-color: var(--mvk-navy); box-shadow: 0 0 0 3px rgba(255, 140, 53, 0.35); }

/* Responsive — NOT DESIGNED in Figma (only 1440 exists). Derived; awaiting operator approval (Decision D7).
   >=1361: exact desktop. 1240-1360: tighter side padding. <1240: links move into a drawer opened by a menu button.
   <700: the quote button and phone also move into the drawer. */
.mvk-nav__toggle,
.mvk-nav__extras { display: none; }

@media (max-width: 1360px) {
	.mvk-header__inner { padding-left: 40px; padding-right: 40px; }
}

@media (max-width: 1239px) {
	.mvk-header__inner { padding-left: 32px; padding-right: 32px; }
	.mvk-nav__actions { gap: 12px; }
	.mvk-nav__actions > .mvk-nav__phone { display: none; }
	.mvk-nav__toggle {
		display: grid;
		place-items: center;
		flex: none;
		width: 40px;
		height: 40px;
		margin: 0 -8px 0 0;
		padding: 0;
		border: 0;
		border-radius: 20px;
		background: transparent;
		cursor: pointer;
		transition: background-color var(--mvk-ease);
	}
	.mvk-nav__toggle:hover,
	.mvk-nav__toggle[aria-expanded="true"] { background: rgba(255, 255, 255, 0.12); }
	html body .mvk-nav__toggle:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
	.mvk-nav__bars,
	.mvk-nav__bars::before,
	.mvk-nav__bars::after { display: block; width: 18px; height: 2px; border-radius: 1px; background: #fff; }
	.mvk-nav__bars { position: relative; transition: background-color var(--mvk-ease); }
	.mvk-nav__bars::before,
	.mvk-nav__bars::after { content: ""; position: absolute; left: 0; transition: transform var(--mvk-ease); }
	.mvk-nav__bars::before { top: -6px; }
	.mvk-nav__bars::after { top: 6px; }
	.mvk-nav__toggle[aria-expanded="true"] .mvk-nav__bars { background: transparent; }
	.mvk-nav__toggle[aria-expanded="true"] .mvk-nav__bars::before { transform: translateY(6px) rotate(45deg); }
	.mvk-nav__toggle[aria-expanded="true"] .mvk-nav__bars::after { transform: translateY(-6px) rotate(-45deg); }

	/* Drawer */
	.mvk-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		box-sizing: border-box;
		max-height: calc(100vh - 94px);
		overflow-y: auto;
		padding: 8px 32px 28px;
		background: var(--mvk-navy-deep);
		border-top: 1px solid rgba(255, 255, 255, 0.12);
	}
	.mvk-header.is-menu-open .mvk-nav { display: block; }
	.mvk-nav__links { flex-direction: column; align-items: stretch; gap: 0; }
	.mvk-nav__li { display: block; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
	.mvk-nav__item { width: 100%; padding: 16px 0; justify-content: space-between; }
	.mvk-nav__item .mvk-nav__label { min-width: 0; }
	.mvk-nav__item[aria-current="page"]::after { top: auto; bottom: 10px; right: auto; width: 41px; }
	.mvk-nav__chev { margin-left: auto; }
	.mvk-panel { position: static; min-width: 0; padding: 0 0 12px; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
	.mvk-nav__li--has-panel:has(> .mvk-panel:not([hidden]))::after { display: none; }
	.mvk-panel__list--depth-1 { display: block; }
	.mvk-panel__link { padding: 9px 0; color: #fff; white-space: normal; }
	.mvk-panel__link:hover { background: transparent; color: var(--mvk-orange); }
	.mvk-panel__list--depth-2 .mvk-panel__link { padding-left: 14px; }
	.mvk-panel__list--depth-3 .mvk-panel__link { padding-left: 28px; color: rgba(255, 255, 255, 0.8); }
	.mvk-panel__list--depth-4 .mvk-panel__link { padding-left: 42px; color: rgba(255, 255, 255, 0.8); }
	.mvk-nav__extras { display: none; align-items: center; gap: 22px; padding-top: 22px; }
	.mvk-search__form { padding-left: 32px; padding-right: 32px; }
}

@media (max-width: 699px) {
	.mvk-header__inner { padding-left: 20px; padding-right: 20px; }
	.mvk-nav { padding-left: 20px; padding-right: 20px; }
	.mvk-nav__actions > .mvk-btn { display: none; }
	.mvk-header.is-menu-open .mvk-nav__extras { display: flex; flex-wrap: wrap; }
	.mvk-logo, .mvk-logo img { width: 160px; height: 46px; }
	.mvk-search__form { padding-left: 20px; padding-right: 20px; }
}
