/* ==========================================================================
   Header: top bar, logo/search/actions row, nav row, mobile drawer
   ========================================================================== */

/* ---- Sticky: whole header sticks, but the top bar slides out of view (pure CSS) ---- */
.yeti-header {
	position: sticky;
	top: calc(var(--yeti-topbar-h) * -1);
	z-index: 100;
	background: var(--yeti-header-bg);
}
.admin-bar .yeti-header {
	top: calc(32px - var(--yeti-topbar-h));
}
@media (max-width: 782px) {
	.admin-bar .yeti-header {
		top: calc(46px - var(--yeti-topbar-h));
	}
}
@media (max-width: 600px) {
	/* WP admin bar is not fixed on small phones */
	.admin-bar .yeti-header {
		top: calc(var(--yeti-topbar-h) * -1);
	}
}

/* ---- Top bar ---- */
.yeti-topbar {
	height: var(--yeti-topbar-h);
	background: var(--yeti-navy);
	color: #fff;
	font-size: 12.5px;
}
.yeti-topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 100%;
	gap: 24px;
}
.yeti-topbar ul {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}
.yeti-topbar__msgs li + li::before {
	content: "|";
	margin: 0 14px;
	opacity: 0.4;
}
.yeti-topbar__links {
	gap: 20px;
}
.yeti-topbar__links a {
	color: #fff;
	font-weight: 600;
}
.yeti-topbar__links a:hover {
	color: var(--yeti-mint);
	text-decoration: underline;
}

/* ---- Main row ---- */
.yeti-header__row {
	display: flex;
	align-items: center;
	gap: 32px;
	padding-block: 14px;
}
.yeti-brand {
	flex: none;
}
.yeti-brand .custom-logo-link {
	display: block;
	line-height: 0;
}
.yeti-brand .custom-logo {
	width: auto;
	height: auto;
	max-height: 56px;
}
.yeti-brand__text {
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--yeti-navy);
}

.yeti-search {
	display: flex;
	flex: 1;
	max-width: 640px;
}
.yeti-search__input {
	flex: 1;
	height: 44px;
	padding: 0 16px;
	border-right: 0;
	border-radius: var(--yeti-radius-sm) 0 0 var(--yeti-radius-sm);
	font-size: 14px;
}
.yeti-search__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 50px;
	height: 44px;
	border: 0;
	border-radius: 0 var(--yeti-radius-sm) var(--yeti-radius-sm) 0;
	background: var(--yeti-navy);
	color: #fff;
	transition: background var(--yeti-ease);
}
.yeti-search__btn:hover {
	background: var(--yeti-navy-dark);
}

.yeti-actions {
	display: flex;
	align-items: center;
	gap: 22px;
	margin-left: auto;
}
.yeti-actions a {
	color: var(--yeti-ink);
}
.yeti-actions a:hover {
	color: var(--yeti-navy);
}
.yeti-cart-link {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 10px;
}
.yeti-cart-count {
	position: absolute;
	top: -8px;
	left: 14px;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 9px;
	background: var(--yeti-navy);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	line-height: 18px;
	text-align: center;
}
.yeti-cart-total {
	font-size: 14px;
	font-weight: 600;
}
.yeti-cart-total .woocommerce-Price-amount {
	white-space: nowrap;
}

.yeti-burger {
	display: none;
	padding: 6px;
	border: 0;
	background: transparent;
	color: var(--yeti-ink);
}

/* ---- Nav row ---- */
.yeti-nav {
	background: var(--yeti-nav-bg);
}
.yeti-nav__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 52px;
}
.yeti-nav__cta {
	padding: 10px 18px;
	font-size: 13px;
}

/* ---- Menus (shared by nav row and drawer) ---- */
.yeti-menu {
	display: flex;
	align-items: center;
	gap: 30px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.yeti-menu a {
	position: relative;
	display: block;
	padding: 15px 0;
	font-size: 13.5px;
	font-weight: 500;
	color: var(--yeti-ink);
}
.yeti-menu > li > a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 10px;
	height: 2px;
	background: var(--yeti-navy);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform var(--yeti-ease);
}
.yeti-menu > li > a:hover,
.yeti-menu > .current-menu-item > a,
.yeti-menu > .current_page_item > a,
.yeti-menu > .current-menu-ancestor > a {
	color: var(--yeti-navy);
}
.yeti-menu > li > a:hover::after,
.yeti-menu > .current-menu-item > a::after,
.yeti-menu > .current_page_item > a::after,
.yeti-menu > .current-menu-ancestor > a::after {
	transform: scaleX(1);
}

/* Dropdowns */
.yeti-menu .menu-item-has-children {
	position: relative;
}
.yeti-menu .menu-item-has-children > a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.yeti-menu .menu-item-has-children > a::before {
	content: "";
	order: 2;
	width: 6px;
	height: 6px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
}
.yeti-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: -16px;
	z-index: 20;
	min-width: 230px;
	margin: 0;
	padding: 8px 0;
	list-style: none;
	background: #fff;
	border-radius: 10px;
	box-shadow: var(--yeti-shadow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity var(--yeti-ease), transform var(--yeti-ease), visibility var(--yeti-ease);
}
.yeti-menu .menu-item-has-children:hover > .sub-menu,
.yeti-menu .menu-item-has-children:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
}
.yeti-menu .sub-menu a {
	padding: 10px 20px;
	font-weight: 500;
}
.yeti-menu .sub-menu a:hover {
	background: var(--yeti-card);
	color: var(--yeti-navy);
}

/* ---- Mobile drawer ---- */
.yeti-overlay {
	position: fixed;
	inset: 0;
	z-index: 1000;
	background: rgba(0, 20, 40, 0.5);
	opacity: 0;
	transition: opacity 0.25s ease;
}
.yeti-overlay.is-open {
	opacity: 1;
}
.yeti-drawer {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 1001;
	display: flex;
	flex-direction: column;
	width: min(86vw, 360px);
	height: 100%;
	height: 100dvh;
	overflow-y: auto;
	background: #fff;
	transform: translateX(-100%);
	transition: transform 0.3s ease;
}
.yeti-drawer.is-open {
	transform: none;
	box-shadow: 8px 0 32px rgba(0, 0, 0, 0.2);
}
.yeti-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
	border-bottom: 1px solid var(--yeti-line);
}
.yeti-drawer__title {
	font-weight: 700;
	color: var(--yeti-ink);
}
.yeti-drawer__close {
	padding: 6px;
	border: 0;
	background: transparent;
	color: var(--yeti-ink);
}
.yeti-menu--stacked {
	flex-direction: column;
	align-items: stretch;
	gap: 0;
}
.yeti-menu--stacked a {
	padding: 14px 20px;
	font-size: 15px;
	border-bottom: 1px solid var(--yeti-line);
}
.yeti-menu--stacked > li > a::after,
.yeti-menu--stacked .menu-item-has-children > a::before {
	display: none;
}
.yeti-menu--stacked .menu-item-has-children > a {
	display: block;
}
.yeti-menu--stacked .sub-menu {
	position: static;
	min-width: 0;
	padding: 0 0 0 16px;
	border-radius: 0;
	box-shadow: none;
	opacity: 1;
	visibility: visible;
	transform: none;
}
.yeti-drawer__cta {
	margin: 24px 20px 12px;
}
.yeti-drawer__contact {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 20px 24px;
	font-weight: 600;
}
body.yeti-drawer-open {
	overflow: hidden;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
	.yeti-nav {
		display: none;
	}
	.yeti-burger {
		display: inline-flex;
	}
	.yeti-header__row {
		flex-wrap: wrap;
		gap: 12px 16px;
		padding-block: 12px;
	}
	.yeti-brand {
		margin-right: auto;
	}
	.yeti-actions {
		margin-left: 0;
	}
	.yeti-search {
		order: 4;
		flex-basis: 100%;
		max-width: none;
	}
}
@media (max-width: 768px) {
	:root {
		--yeti-topbar-h: 0px;
	}
	.yeti-topbar {
		display: none;
	}
	.yeti-header__row {
		gap: 12px 14px;
	}
	.yeti-brand {
		min-width: 0;
	}
	.yeti-brand .custom-logo {
		max-height: 44px;
	}
	.yeti-brand__text {
		font-size: 1.15rem;
		white-space: nowrap;
	}
	.yeti-actions {
		gap: 16px;
	}
}
@media (max-width: 480px) {
	.yeti-cart-total {
		display: none;
	}
}
