/*
 * BeachNova Stage51 shared header and mobile navigation.
 *
 * This is the only final header layer. It deliberately loads after every
 * template stylesheet so older release locks cannot change the header again.
 * Visual density follows the captured BloomChic desktop/mobile references,
 * while the BeachNova logo, routes and copy remain original.
 */
html body:not(.woocommerce-checkout) .site-header,
html body:not(.woocommerce-checkout) .site-header * {
	box-sizing: border-box;
}

html body:not(.woocommerce-checkout) .site-header {
	position: sticky !important;
	top: 0 !important;
	z-index: 1000 !important;
	display: block !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	background: #fff !important;
	border: 0 !important;
	border-bottom: 1px solid #e9e9e9 !important;
	box-shadow: none !important;
}

html body:not(.woocommerce-checkout) .site-header .brand-row {
	position: relative !important;
	display: grid !important;
	align-items: center !important;
	width: 100% !important;
	margin: 0 !important;
	background: #fff !important;
	overflow: visible !important;
}

html body:not(.woocommerce-checkout) .site-header .logo-link {
	display: block !important;
	align-self: center !important;
	justify-self: center !important;
	margin: 0 !important;
	line-height: 0 !important;
}

html body:not(.woocommerce-checkout) .site-header .logo {
	display: block !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	object-fit: contain !important;
}

html body:not(.woocommerce-checkout) .site-header .header-left,
html body:not(.woocommerce-checkout) .site-header .header-right {
	align-items: center !important;
}

html body:not(.woocommerce-checkout) .site-header .header-left a,
html body:not(.woocommerce-checkout) .site-header .header-left button,
html body:not(.woocommerce-checkout) .site-header .header-right a {
	position: relative !important;
	display: grid !important;
	place-items: center !important;
	margin: 0 !important;
	padding: 0 !important;
	color: #111 !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	font-size: 0 !important;
	line-height: 0 !important;
	text-decoration: none !important;
	text-indent: 0 !important;
	overflow: visible !important;
}

html body:not(.woocommerce-checkout) .site-header .header-left a::before,
html body:not(.woocommerce-checkout) .site-header .header-left a::after,
html body:not(.woocommerce-checkout) .site-header .header-left button::before,
html body:not(.woocommerce-checkout) .site-header .header-left button::after,
html body:not(.woocommerce-checkout) .site-header .header-right a::before,
html body:not(.woocommerce-checkout) .site-header .header-right a::after {
	display: none !important;
	content: none !important;
}

html body:not(.woocommerce-checkout) .site-header .header-left img,
html body:not(.woocommerce-checkout) .site-header .header-right img {
	display: block !important;
	width: 21px !important;
	height: 21px !important;
	margin: 0 !important;
	opacity: 1 !important;
	visibility: visible !important;
	object-fit: contain !important;
}

html body:not(.woocommerce-checkout) .site-header .bag .beachnova-cart-count {
	position: absolute !important;
	top: -6px !important;
	right: -7px !important;
	z-index: 2 !important;
	display: grid !important;
	place-items: center !important;
	min-width: 15px !important;
	height: 15px !important;
	margin: 0 !important;
	padding: 0 3px !important;
	color: #fff !important;
	background: #111 !important;
	border-radius: 999px !important;
	font: 700 8px/1 Arial, sans-serif !important;
	text-indent: 0 !important;
}

@media (min-width: 801px) {
	html body:not(.woocommerce-checkout) .site-header {
		height: 106px !important;
	}

	html body:not(.woocommerce-checkout) .site-header .brand-row {
		grid-template-columns: minmax(148px, 1fr) auto minmax(148px, 1fr) !important;
		height: 60px !important;
		padding: 0 30px !important;
	}

	html body:not(.woocommerce-checkout) .site-header .header-left {
		display: none !important;
	}

	html body:not(.woocommerce-checkout) .site-header .logo-link {
		grid-column: 2 !important;
		max-width: 134px !important;
	}

	html body:not(.woocommerce-checkout) .site-header .logo {
		max-width: 134px !important;
		max-height: 48px !important;
	}

	html body:not(.woocommerce-checkout) .site-header .header-right {
		position: static !important;
		grid-column: 3 !important;
		display: flex !important;
		justify-self: end !important;
		gap: 15px !important;
		width: auto !important;
		max-width: none !important;
		height: 32px !important;
		transform: none !important;
	}

	html body:not(.woocommerce-checkout) .site-header .header-right a {
		width: 26px !important;
		min-width: 26px !important;
		max-width: 26px !important;
		height: 26px !important;
	}

	html body:not(.woocommerce-checkout) .site-header .header-right img {
		width: 19px !important;
		height: 19px !important;
	}

	html body:not(.woocommerce-checkout) .site-header .main-nav {
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		width: 100% !important;
		height: 46px !important;
		margin: 0 !important;
		padding: 0 30px !important;
		background: #fff !important;
		border-top: 1px solid #f4f4f4 !important;
		overflow: visible !important;
	}

	html body:not(.woocommerce-checkout) .site-header .main-nav > ul {
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		gap: clamp(18px, 2.2vw, 36px) !important;
		width: auto !important;
		height: 46px !important;
		margin: 0 !important;
		padding: 0 !important;
		list-style: none !important;
	}

	html body:not(.woocommerce-checkout) .site-header .main-nav li {
		display: flex !important;
		align-items: center !important;
		height: 46px !important;
		margin: 0 !important;
		padding: 0 !important;
		white-space: nowrap !important;
	}

	html body:not(.woocommerce-checkout) .site-header .main-nav a {
		display: flex !important;
		align-items: center !important;
		height: 46px !important;
		padding: 0 !important;
		color: #111 !important;
		border: 0 !important;
		border-bottom: 1px solid transparent !important;
		font: 400 12px/1 Arial, sans-serif !important;
		text-decoration: none !important;
	}

	html body:not(.woocommerce-checkout) .site-header .main-nav a:hover,
	html body:not(.woocommerce-checkout) .site-header .main-nav a:focus-visible,
	html body:not(.woocommerce-checkout) .site-header .main-nav .current-menu-item > a {
		border-bottom-color: #111 !important;
		outline: 0 !important;
	}

	html body:not(.woocommerce-checkout) .site-header .main-nav .sale > a,
	html body:not(.woocommerce-checkout) .site-header .main-nav a[href*="sale"] {
		color: #e51d45 !important;
	}
}

@media (max-width: 800px) {
	html body:not(.woocommerce-checkout) .site-header {
		height: 52px !important;
	}

	html body:not(.woocommerce-checkout) .site-header .brand-row {
		grid-template-columns: 80px minmax(0, 1fr) 66px !important;
		height: 52px !important;
		padding: 0 12px !important;
		overflow: visible !important;
	}

	html body:not(.woocommerce-checkout) .site-header .header-left {
		grid-column: 1 !important;
		display: flex !important;
		justify-self: start !important;
		gap: 10px !important;
		height: 30px !important;
	}

	html body:not(.woocommerce-checkout) .site-header .header-left a,
	html body:not(.woocommerce-checkout) .site-header .header-left button {
		width: 24px !important;
		min-width: 24px !important;
		height: 24px !important;
	}

	html body:not(.woocommerce-checkout) .site-header .header-left img {
		width: 20px !important;
		height: 20px !important;
	}

	html body:not(.woocommerce-checkout) .site-header .header-left .menu::before,
	html body:not(.woocommerce-checkout) .site-header .header-left .menu::after {
		display: none !important;
		content: none !important;
		width: 0 !important;
		height: 0 !important;
		background: none !important;
		border: 0 !important;
		box-shadow: none !important;
	}

	html body:not(.woocommerce-checkout) .site-header .header-left .menu > img {
		display: block !important;
		width: 22px !important;
		height: 22px !important;
		margin: 0 !important;
		opacity: 1 !important;
		visibility: visible !important;
	}

	html body:not(.woocommerce-checkout) .site-header .logo-link {
		grid-column: 2 !important;
		max-width: 110px !important;
	}

	html body:not(.woocommerce-checkout) .site-header .logo {
		max-width: 110px !important;
		max-height: 43px !important;
	}

	html body:not(.woocommerce-checkout) .site-header .header-right {
		position: static !important;
		grid-column: 3 !important;
		display: flex !important;
		justify-self: end !important;
		gap: 12px !important;
		width: auto !important;
		max-width: none !important;
		height: 30px !important;
		transform: none !important;
	}

	html body:not(.woocommerce-checkout) .site-header .header-right a {
		width: 23px !important;
		min-width: 23px !important;
		max-width: 23px !important;
		height: 23px !important;
	}

	html body:not(.woocommerce-checkout) .site-header .header-right img {
		width: 20px !important;
		height: 20px !important;
	}

	html body:not(.woocommerce-checkout) .site-header .bag .beachnova-cart-count {
		top: -4px !important;
		right: 4px !important;
	}

	html body:not(.woocommerce-checkout) .site-header .bn-account-link--desktop,
	html body:not(.woocommerce-checkout) .site-header .bn-wishlist-link {
		display: none !important;
	}

	html body:not(.woocommerce-checkout) .site-header .main-nav {
		display: none !important;
	}

	html body:not(.woocommerce-checkout) .drawer {
		position: fixed !important;
		inset: 0 !important;
		left: 0 !important;
		right: 0 !important;
		z-index: 2147483000 !important;
		display: flex !important;
		flex-direction: column !important;
		width: 100% !important;
		min-width: 100% !important;
		max-width: none !important;
		height: 100vh !important;
		height: 100dvh !important;
		margin: 0 !important;
		padding: 0 0 18px !important;
		background: #fff !important;
		box-shadow: none !important;
		overflow-x: hidden !important;
		overflow-y: auto !important;
		scrollbar-width: none !important;
		visibility: hidden !important;
		opacity: 0 !important;
		pointer-events: none !important;
		transform: translateX(-102%) !important;
		transition: transform 220ms ease, opacity 160ms ease, visibility 0s linear 220ms !important;
	}

	html body:not(.woocommerce-checkout) .drawer.open {
		left: 0 !important;
		right: 0 !important;
		width: 100% !important;
		min-width: 100% !important;
		max-width: none !important;
		visibility: visible !important;
		opacity: 1 !important;
		pointer-events: auto !important;
		transform: translateX(0) !important;
		transition: transform 220ms ease, opacity 160ms ease, visibility 0s !important;
	}

	html body:not(.woocommerce-checkout) .drawer::-webkit-scrollbar {
		display: none !important;
		width: 0 !important;
		height: 0 !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-head {
		position: relative !important;
		display: grid !important;
		grid-template-columns: 70px minmax(0, 1fr) 70px !important;
		align-items: center !important;
		flex: 0 0 58px !important;
		width: 100% !important;
		height: 58px !important;
		padding: 0 14px !important;
		background: #fff !important;
		border-bottom: 1px solid #ededed !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-head-left {
		grid-column: 1 !important;
		display: flex !important;
		align-items: center !important;
		gap: 12px !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-head .close,
	html body:not(.woocommerce-checkout) .drawer .drawer-head-account {
		position: static !important;
		display: grid !important;
		place-items: center !important;
		width: 23px !important;
		height: 23px !important;
		margin: 0 !important;
		padding: 0 !important;
		background: transparent !important;
		border: 0 !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-head .close img,
	html body:not(.woocommerce-checkout) .drawer .drawer-head-account img {
		display: block !important;
		width: 20px !important;
		height: 20px !important;
		object-fit: contain !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-head-logo {
		grid-column: 2 !important;
		justify-self: center !important;
		display: block !important;
		width: 110px !important;
		line-height: 0 !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-head-logo img {
		display: block !important;
		width: 110px !important;
		height: auto !important;
		max-height: 43px !important;
		object-fit: contain !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-links {
		display: grid !important;
		grid-template-columns: 1fr !important;
		flex: 0 0 auto !important;
		width: 100% !important;
		margin: 0 !important;
		padding: 10px 16px 14px !important;
		background: #fff !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-group,
	html body:not(.woocommerce-checkout) .drawer .drawer-single {
		width: 100% !important;
		margin: 0 !important;
		border: 0 !important;
		border-bottom: 1px solid #ededed !important;
		background: #fff !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-group > summary,
	html body:not(.woocommerce-checkout) .drawer .drawer-single {
		display: flex !important;
		align-items: center !important;
		justify-content: space-between !important;
		width: 100% !important;
		height: 47px !important;
		margin: 0 !important;
		padding: 0 !important;
		color: #111 !important;
		font: 400 15px/1 Arial, sans-serif !important;
		list-style: none !important;
		text-decoration: none !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-group > summary::-webkit-details-marker {
		display: none !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-indicator {
		display: block !important;
		flex: 0 0 16px !important;
		width: 16px !important;
		height: 16px !important;
		margin: 0 !important;
		object-fit: contain !important;
		transition: transform 160ms ease !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-group[open] > summary .drawer-indicator--expand {
		transform: rotate(180deg) !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-sub {
		display: grid !important;
		grid-template-columns: 1fr !important;
		gap: 0 !important;
		width: 100% !important;
		margin: 0 !important;
		padding: 2px 0 12px 12px !important;
		background: #fff !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-sub a {
		display: flex !important;
		align-items: center !important;
		width: 100% !important;
		min-height: 36px !important;
		margin: 0 !important;
		padding: 7px 0 !important;
		color: #333 !important;
		border: 0 !important;
		font: 400 13px/1.35 Arial, sans-serif !important;
		text-decoration: none !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-benefit {
		display: flex !important;
		align-items: center !important;
		justify-content: space-between !important;
		flex: 0 0 52px !important;
		min-height: 52px !important;
		margin: 0 16px !important;
		padding: 0 !important;
		color: #111 !important;
		border-bottom: 1px solid #ededed !important;
		font: 400 13px/1 Arial, sans-serif !important;
		text-decoration: none !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-market-trigger {
		display: flex !important;
		align-items: center !important;
		justify-content: space-between !important;
		flex: 0 0 54px !important;
		width: auto !important;
		min-height: 54px !important;
		margin: 0 16px !important;
		padding: 0 !important;
		color: #111 !important;
		background: #fff !important;
		border: 0 !important;
		border-bottom: 1px solid #ededed !important;
		font: 400 14px/1 Arial, sans-serif !important;
		text-align: left !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-market-trigger > span {
		display: flex !important;
		align-items: center !important;
		gap: 8px !important;
		min-width: 0 !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-market-trigger > span > img {
		display: block !important;
		flex: 0 0 19px !important;
		width: 19px !important;
		height: 19px !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-follow {
		display: block !important;
		flex: 0 0 auto !important;
		margin: 0 !important;
		padding: 18px 16px calc(8px + env(safe-area-inset-bottom)) !important;
		background: #fff !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-follow h2 {
		margin: 0 0 17px !important;
		color: #111 !important;
		font: 400 15px/1.25 Arial, sans-serif !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-social-links {
		display: flex !important;
		align-items: center !important;
		flex-wrap: wrap !important;
		gap: 22px !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-social-links a {
		display: grid !important;
		place-items: center !important;
		width: 24px !important;
		height: 24px !important;
		color: #111 !important;
		text-decoration: none !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-social-links img {
		display: block !important;
		width: 22px !important;
		height: 22px !important;
		object-fit: contain !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-market-panel {
		position: fixed !important;
		inset: 0 !important;
		z-index: 2 !important;
		display: none !important;
		flex-direction: column !important;
		width: 100% !important;
		height: 100vh !important;
		height: 100dvh !important;
		padding: 0 16px calc(24px + env(safe-area-inset-bottom)) !important;
		background: #fff !important;
		overflow-y: auto !important;
		visibility: hidden !important;
		pointer-events: none !important;
	}

	html body:not(.woocommerce-checkout) .drawer.market-open .drawer-market-panel {
		display: flex !important;
		visibility: visible !important;
		pointer-events: auto !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-market-head {
		display: grid !important;
		grid-template-columns: 40px minmax(0, 1fr) 40px !important;
		align-items: center !important;
		flex: 0 0 58px !important;
		min-height: 58px !important;
		margin: 0 -16px 18px !important;
		padding: 0 10px !important;
		border-bottom: 1px solid #ededed !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-market-head h2 {
		grid-column: 2 !important;
		margin: 0 !important;
		color: #111 !important;
		font: 500 17px/1.2 Arial, sans-serif !important;
		text-align: center !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-market-back {
		grid-column: 1 !important;
		display: grid !important;
		place-items: center !important;
		width: 40px !important;
		height: 40px !important;
		padding: 0 !important;
		background: #fff !important;
		border: 0 !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-market-back img {
		display: block !important;
		width: 20px !important;
		height: 20px !important;
		transform: rotate(180deg) !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-market-values {
		display: grid !important;
		gap: 0 !important;
		margin: 0 !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-market-values > div {
		display: flex !important;
		align-items: center !important;
		justify-content: space-between !important;
		min-height: 58px !important;
		border-bottom: 1px solid #ededed !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-market-values dt,
	html body:not(.woocommerce-checkout) .drawer .drawer-market-values dd {
		margin: 0 !important;
		color: #111 !important;
		font: 400 15px/1.3 Arial, sans-serif !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-market-values dd {
		font-weight: 600 !important;
	}

	html body:not(.woocommerce-checkout) .drawer .drawer-market-panel > p {
		margin: 18px 0 0 !important;
		color: #666 !important;
		font: 400 12px/1.55 Arial, sans-serif !important;
	}

	html body:not(.woocommerce-checkout) .shade,
	html body:not(.woocommerce-checkout) .shade.open {
		display: none !important;
	}

	html body.menu-open {
		overflow: hidden !important;
	}
}

/* Stage57: keep mutually exclusive mobile/desktop header controls isolated. */
@media (min-width: 801px) {
	html body:not(.woocommerce-checkout) .site-header .brand-row > .header-left,
	html body:not(.woocommerce-checkout) .site-header .brand-row > .header-left > * {
		display: none !important;
		visibility: hidden !important;
		pointer-events: none !important;
	}
}

@media (max-width: 800px) {
	html body:not(.woocommerce-checkout) .site-header .brand-row > .header-right .bn-account-link--desktop {
		display: none !important;
		visibility: hidden !important;
		pointer-events: none !important;
	}
}
