/**
 * VV Child Theme — Navigation Styles
 * Mobile-only custom header shown ≤1024px.
 * Salient's #header-outer is hidden at that breakpoint.
 */

/* ── Hide custom header on desktop (>1024px) ──────────────── */
.vv-mobile-header {
	display: none !important;
}

/* ═══════════════════════════════════════════════════════════
   MOBILE & TABLET  (max-width: 1024px)
   ═══════════════════════════════════════════════════════════ */
@media only screen and (max-width: 1024px) {

	/* Hide Salient's header visual wrappers, but keep container for overlays like search */
	#header-outer {
		height: 0 !important;
		min-height: 0 !important;
		border: none !important;
		background: none !important;
		box-shadow: none !important;
		padding: 0 !important;
		pointer-events: none !important; /* Let clicks pass through except to active children */
	}
	#header-outer > #search-outer:not(.open):not(.active) {
		pointer-events: none !important;
		visibility: hidden !important;
		z-index: -1 !important;
	}
	#header-outer > #search-outer.open,
	#header-outer > #search-outer.active {
		pointer-events: auto !important;
		visibility: visible !important;
		z-index: 100005 !important;
	}
	#header-outer > #top,
	#header-outer > #header-secondary-navigation,
	#header-outer > .container,
	#header-space {
		display: none !important;
		height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
	}

	/* Push page content below our fixed bar */
	body {
		padding-top: 0 !important;
	}
	.admin-bar body,
	.admin-bar {
		padding-top: 0 !important;
	}

	/* ── Fixed top bar ──────────────────────────────────────── */
	.vv-mobile-header {
		display: block !important;
		position: fixed;
		top: 0 !important;
		left: 0;
		right: 0;
		margin-top: 0 !important;
		height: 64px;
		background: #ffffff !important;
		border-bottom: 1px solid #ebebeb;
		z-index: 9990;
	}
	.admin-bar .vv-mobile-header {
		top: 32px;
	}
	@media screen and (max-width: 782px) {
		.admin-bar .vv-mobile-header {
			top: 46px;
		}
	}

	.vv-mobile-header__container {
		height: 100%;
		padding: 0 16px;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	/* ── Logo ───────────────────────────────────────────────── */
	.vv-mobile-header__brand {
		display: flex;
		align-items: center;
		text-decoration: none !important;
		flex: 0 0 auto;
	}
	.vv-mobile-header__logo {
		display: block !important;
		height: 34px !important;
		width: auto !important;
		max-width: 140px !important;
		object-fit: contain !important;
	}
	.vv-mobile-header__brand-text {
		font-family: 'Manrope', sans-serif;
		font-size: 20px;
		font-weight: 800;
		color: #111;
	}

	/* ── Right-side icons ───────────────────────────────────── */
	.vv-mobile-header__actions {
		display: flex;
		align-items: center;
		gap: 18px;
		flex: 0 0 auto;
	}
	.vv-mobile-header__icon {
		position: relative;
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		width: 36px;
		height: 36px;
		color: #111111;
		text-decoration: none !important;
	}
	/* Kill ANY Salient font-glyph override on the cart link */
	.vv-mobile-header a#mobile-cart-link,
	header.vv-mobile-header #mobile-cart-link {
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		position: relative !important;
		width: 36px !important;
		height: 36px !important;
		padding: 0 !important;
		background: none !important;
		color: #111111 !important;
	}
	/* Remove Salient's font pseudo-elements on the cart link */
	.vv-mobile-header a#mobile-cart-link::before,
	.vv-mobile-header a#mobile-cart-link::after,
	.vv-mobile-header #mobile-cart-link i,
	.vv-mobile-header #mobile-cart-link .icon-salient-cart {
		display: none !important;
		content: none !important;
	}
	/* Ensure our SVG is visible */
	.vv-mobile-header__icon svg,
	.vv-mobile-header a#mobile-cart-link svg {
		display: block !important;
		width: 22px !important;
		height: 22px !important;
		stroke: #111111 !important;
		fill: none !important;
	}
	.vv-mobile-header__cart-badge {
		position: absolute;
		top: 0;
		right: 0;
		background: #e8001c;
		color: #fff;
		font-size: 9px;
		font-weight: 700;
		min-width: 16px;
		height: 16px;
		border-radius: 50%;
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 0 3px;
		border: 1.5px solid #fff;
	}


	/* ── Hamburger ──────────────────────────────────────────── */
	.vv-mobile-header__toggle {
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		width: 22px;
		height: 15px;
		background: none;
		border: none;
		padding: 0;
		cursor: pointer;
		flex-shrink: 0;
	}
	.vv-mobile-header__toggle span {
		display: block;
		width: 100%;
		height: 2px;
		background: #111111;
		border-radius: 2px;
		transition: opacity 0.2s, transform 0.2s;
	}

	/* ═══════════════════════════════════════════════════════
	   DRAWER
	   ═══════════════════════════════════════════════════════ */

	.vv-mobile-drawer {
		display: block !important;
		position: fixed;
		inset: 0;
		z-index: 999999 !important;
		pointer-events: none;
		opacity: 0;
		transition: opacity 0.22s ease;
	}
	.vv-mobile-drawer.is-open {
		pointer-events: auto !important;
		opacity: 1;
	}

	/* Dim overlay */
	.vv-mobile-drawer__overlay {
		position: absolute;
		inset: 0;
		background: rgba(0, 0, 0, 0.5);
	}

	/* White slide-out panel */
	.vv-mobile-drawer__panel {
		position: absolute;
		top: 0;
		right: 0;
		width: min(80vw, 300px);
		height: 100%;
		background: #ffffff !important;
		display: flex;
		flex-direction: column;
		box-shadow: -6px 0 24px rgba(0, 0, 0, 0.14);
		transform: translateX(100%);
		transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1);
		overflow-y: auto;
	}
	.vv-mobile-drawer.is-open .vv-mobile-drawer__panel {
		transform: translateX(0);
	}

	/* Drawer top row: logo + close */
	.vv-mobile-drawer__top {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 18px 20px;
		border-bottom: 1px solid #f0f0f0;
		background: #ffffff !important;
		flex-shrink: 0;
	}
	.vv-mobile-drawer__close {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 36px;
		height: 36px;
		background: #f5f5f5;
		border: none;
		border-radius: 50%;
		cursor: pointer;
		color: #333;
		flex-shrink: 0;
	}
	.vv-mobile-drawer__close svg {
		stroke: #333;
	}

	/* Navigation links */
	.vv-mobile-drawer__nav {
		flex: 1;
		padding: 12px 0;
		background: #ffffff !important;
	}
	.vv-mobile-drawer__nav ul {
		list-style: none !important;
		padding: 0 !important;
		margin: 0 !important;
	}
	.vv-mobile-drawer__nav ul li {
		display: block !important;
		margin: 0 !important;
		padding: 0 !important;
	}
	.vv-mobile-drawer__nav ul li a {
		display: block !important;
		padding: 14px 24px !important;
		font-family: 'Manrope', sans-serif !important;
		font-size: 16px !important;
		font-weight: 600 !important;
		color: #111111 !important;
		text-decoration: none !important;
		border-bottom: 1px solid #f5f5f5 !important;
		transition: background 0.15s, color 0.15s !important;
		opacity: 1 !important;
		visibility: visible !important;
	}
	.vv-mobile-drawer__nav ul li a:hover,
	.vv-mobile-drawer__nav ul li.current-menu-item > a {
		background: #fafafa !important;
		color: #e8001c !important;
	}

	/* Footer area: account link + CTA */
	.vv-mobile-drawer__footer {
		padding: 20px;
		border-top: 1px solid #f0f0f0;
		display: flex;
		flex-direction: column;
		gap: 10px;
		background: #ffffff !important;
		flex-shrink: 0;
	}
	.vv-mobile-drawer__account-link {
		display: flex;
		align-items: center;
		gap: 8px;
		font-family: 'Manrope', sans-serif;
		font-size: 14px;
		font-weight: 600;
		color: #444444 !important;
		text-decoration: none !important;
		padding: 10px 14px;
		background: #f5f5f5;
		border-radius: 8px;
	}
	.vv-mobile-drawer__account-link svg {
		stroke: #444;
		flex-shrink: 0;
	}
	.vv-mobile-drawer__account-link:hover {
		background: #efefef;
		color: #111 !important;
	}
	.vv-mobile-drawer__cta {
		display: flex;
		align-items: center;
		justify-content: center;
		height: 46px;
		background: #e8001c;
		color: #ffffff !important;
		border-radius: 10px;
		text-decoration: none !important;
		font-family: 'Manrope', sans-serif;
		font-weight: 700;
		font-size: 15px;
		letter-spacing: 0.01em;
		transition: background 0.15s;
	}
	.vv-mobile-drawer__cta:hover {
		background: #c30016;
	}

	/* ── Small phone tweaks (≤360px) ────────────────────────── */
	@media (max-width: 360px) {
		.vv-mobile-header__container {
			padding: 0 12px;
		}
		.vv-mobile-header__logo {
			height: 28px !important;
			max-width: 120px !important;
		}
		.vv-mobile-header__actions {
			gap: 12px;
		}
	}
}

/* Hide cart and account icons globally from navigation */
#header-outer .cart-outer,
#header-outer .user-account-btn,
#header-outer a.cart-contents,
#header-outer .nectar-woo-cart {
	display: none !important;
}
