/*
 * Unified v2 header + sticky product bar (inc/sst-v2-header.php).
 *
 * Loaded only on hosts where homepage v2 is on, and every rule is scoped to
 * body.sst-v2-header-on, so this sheet cannot touch any other page.
 * Values mirror brand-preview/assets/preview.css (.header, .announce) so the
 * product pages and the home page read as one site.
 */

/* Belt: the old site header is not printed at all (its hook is emptied). If the
 * parent theme ever renames that hook, it still must not show. The old floating
 * cart icon has no old header to move into; the v2 header has its own Cart link. */
body.sst-v2-header-on #masthead,
body.sst-v2-header-on [data-elementor-type="header"] {
	display: none !important;
}
/* Kit chrome has no Elementor header to move the icon into: the cart-icon mu-plugin places it in
 * the kit header's nav, so it stays visible there. */
body.sst-v2-header-on:not(.sst-kit-chrome) #sst-cart-icon {
	display: none !important;
}

/* ── Black bar ─────────────────────────────────────────────────────── */
body.sst-v2-header-on .sst-v2-header {
	background: #000;
	color: #fff;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 28px;
	padding: 16px max(24px, calc((100vw - 1280px) / 2));
	position: relative;
	z-index: 121;
	font: 700 14px/1.6 'Nunito Sans', Arial, Helvetica, sans-serif;
	letter-spacing: 0;
	text-transform: none;
}
body.sst-v2-header-on .sst-v2-logo {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	min-height: 44px;
	text-decoration: none;
}
body.sst-v2-header-on .sst-v2-logo img {
	display: block;
	width: 270px;
	max-width: 100%;
	height: auto;
	filter: none;
}
body.sst-v2-header-on .sst-v2-nav {
	display: flex;
	align-items: center;
	gap: 25px;
}
body.sst-v2-header-on .sst-v2-nav a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: #fff;
	font: inherit;
	text-decoration: none;
}
body.sst-v2-header-on .sst-v2-nav a:hover {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 5px;
}
body.sst-v2-header-on .sst-v2-nav a[hidden] {
	display: none;
}
body.sst-v2-header-on .sst-v2-nav a.sst-v2-account {
	border-left: 1px solid #666;
	padding-left: 24px;
	color: #fec430;
}
body.sst-v2-header-on .sst-v2-nav a.sst-v2-cart {
	color: #fec430;
}
body.sst-v2-header-on .sst-v2-nav a.sst-v2-lang {
	text-decoration: underline;
	text-underline-offset: 5px;
}
body.sst-v2-header-on .sst-v2-menu-toggle,
body.sst-v2-header-on .sst-v2-menu-toggle:hover,
body.sst-v2-header-on .sst-v2-menu-toggle:focus {
	display: none;
	min-height: 44px;
	min-width: 44px;
	padding: 8px 14px;
	background: none;
	border: 1px solid #888;
	border-radius: 0;
	box-shadow: none;
	color: #fff;
	font: inherit;
	letter-spacing: 0;
	text-transform: none;
	cursor: pointer;
}
body.sst-v2-header-on .sst-v2-header a:focus-visible,
body.sst-v2-header-on .sst-v2-header button:focus-visible {
	outline: 3px solid #fec430;
	outline-offset: 3px;
}

@media (max-width: 1100px) {
	body.sst-v2-header-on .sst-v2-header { gap: 20px; }
	body.sst-v2-header-on .sst-v2-nav { gap: 16px; }
	body.sst-v2-header-on .sst-v2-logo img { width: 215px; }
	body.sst-v2-header-on .sst-v2-nav a.sst-v2-account { padding-left: 16px; }
}
@media (max-width: 850px) {
	body.sst-v2-header-on .sst-v2-header { padding: 12px 24px; flex-wrap: wrap; row-gap: 8px; }
	body.sst-v2-header-on .sst-v2-menu-toggle,
	body.sst-v2-header-on .sst-v2-menu-toggle:hover,
	body.sst-v2-header-on .sst-v2-menu-toggle:focus { display: block; }
	body.sst-v2-header-on .sst-v2-nav {
		display: none;
		width: 100%;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding-top: 4px;
		border-top: 1px solid #333;
		margin-top: 2px;
	}
	body.sst-v2-header-on .sst-v2-nav.open { display: flex; }
	body.sst-v2-header-on .sst-v2-nav a { padding: 2px 0; }
	body.sst-v2-header-on .sst-v2-nav a.sst-v2-account { border: 0; padding-left: 0; }
}
@media (max-width: 600px) {
	body.sst-v2-header-on .sst-v2-header { padding: 10px 20px; }
	body.sst-v2-header-on .sst-v2-logo img { width: 190px; }
}

/* ── The one sticky bar: title, price, buy ─────────────────────────── */
body.sst-v2-header-on .sst-v2-bar {
	position: sticky;
	top: 0;
	z-index: 120;
	display: flex;
	align-items: center;
	gap: 12px 28px;
	background: #fff;
	color: #212327;
	border-bottom: 4px solid #000;
	padding: 10px max(24px, calc((100vw - 1280px) / 2));
	font: 700 14px/1.3 'Nunito Sans', Arial, Helvetica, sans-serif;
	transition: box-shadow .18s ease;
}
body.sst-v2-header-on .sst-v2-bar.is-stuck {
	box-shadow: 0 6px 0 rgba(0, 0, 0, .12);
}
body.sst-v2-header-on.admin-bar .sst-v2-bar { top: 32px; }
body.sst-v2-header-on .sst-v2-bar-title {
	flex: 0 1 auto;
	min-width: 0;
	margin: 0;
	max-width: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: #000;
	font: 400 30px/1.1 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
	letter-spacing: .01em;
	text-transform: uppercase;
}
/* Product icon before the title (inc/sst-brand-icons.php). Fixed box, so the
 * bar never shifts while it loads. The negative margin trades the bar's wide
 * gap for a tight one between icon and title. */
body.sst-v2-header-on .sst-v2-bar-icon {
	flex: 0 0 40px;
	display: block;
	width: 40px;
	height: 40px;
	max-width: none;
	margin: 0 -16px 0 0;
	border-radius: 9px;
}
body.sst-v2-header-on .sst-v2-bar-nav {
	display: none;
	flex: 0 0 auto;
	align-items: center;
	gap: 4px 22px;
}
body.sst-v2-header-on .sst-v2-bar-nav a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: #212327;
	font: inherit;
	text-decoration: none;
}
body.sst-v2-header-on .sst-v2-bar-nav a:hover,
body.sst-v2-header-on .sst-v2-bar-nav a:focus-visible {
	text-decoration: underline;
	text-decoration-thickness: 3px;
	text-underline-offset: 6px;
	text-decoration-color: #fec430;
}
body.sst-v2-header-on .sst-v2-bar-price {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 10px;
	margin-left: auto;
	position: relative;
	background: #000;
	color: #fff;
	padding: 5px 16px 3px 30px;
	clip-path: polygon(16px 0, 100% 0, 100% 100%, 16px 100%, 0 50%);
}
body.sst-v2-header-on .sst-v2-bar-price::before {
	content: '';
	position: absolute;
	left: 14px;
	top: 50%;
	width: 7px;
	height: 7px;
	margin-top: -3.5px;
	border-radius: 50%;
	background: #fff;
}
body.sst-v2-header-on .sst-v2-bar-price .am {
	color: #fec430;
	font: 400 34px/1 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
	letter-spacing: .01em;
}
body.sst-v2-header-on .sst-v2-bar-price s,
body.sst-v2-header-on .sst-v2-bar-price .sst-osha-coupon-original {
	color: #fff;
	font-size: 13px;
	opacity: .8;
	text-decoration: line-through;
	text-decoration-thickness: 2px;
}
body.sst-v2-header-on .sst-v2-bar-price .sst-osha-coupon-original[hidden] { display: none; }
body.sst-v2-header-on .sst-v2-bar-buy {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 22px;
	background: #000;
	color: #fec430;
	font: 900 15px/1 'Nunito Sans', Arial, Helvetica, sans-serif;
	letter-spacing: 0;
	text-decoration: none;
	text-transform: none;
	white-space: nowrap;
}
body.sst-v2-header-on .sst-v2-bar-buy:hover,
body.sst-v2-header-on .sst-v2-bar-buy:focus-visible {
	background: #212327;
	color: #fec430;
}
body.sst-v2-header-on .sst-v2-bar a:focus-visible {
	outline: 3px solid #78318f;
	outline-offset: 3px;
}
@media (min-width: 1100px) {
	body.sst-v2-header-on .sst-v2-bar-nav { display: flex; }
}
@media (max-width: 782px) {
	body.sst-v2-header-on.admin-bar .sst-v2-bar { top: 46px; }
}
@media (max-width: 720px) {
	/* The bottom buy bar is gone on these pages, so nothing reserves room for it. */
	body.sst-v2-header-on { padding-bottom: 0; }
	body.sst-v2-header-on.sst-single-product .sst-support-widget-btn {
		--sst-fab-bottom-clearance: 0px;
		bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	}
	body.sst-v2-header-on .mockup-tag { bottom: 12px; }
}
@media (max-width: 600px) {
	/* One row: short title, price, button. */
	body.sst-v2-header-on.admin-bar .sst-v2-bar { top: 0; }
	body.sst-v2-header-on .sst-v2-bar { flex-wrap: nowrap; gap: 10px; padding: 6px 14px; }
	body.sst-v2-header-on .sst-v2-bar-title { flex: 1 1 auto; font-size: 19px; }
	body.sst-v2-header-on .sst-v2-bar-icon { flex-basis: 32px; width: 32px; height: 32px; margin-right: -2px; border-radius: 7px; }
	body.sst-v2-header-on .sst-v2-bar-price { gap: 6px; padding: 4px 10px 2px 24px; }
	body.sst-v2-header-on .sst-v2-bar-price::before { left: 11px; }
	body.sst-v2-header-on .sst-v2-bar-price .am { font-size: 24px; }
	body.sst-v2-header-on .sst-v2-bar-price s { display: none; }
	body.sst-v2-header-on .sst-v2-bar-buy { padding: 0 14px; font-size: 13px; }
}
/* ── OSHA pages: the shield sits where SST pages show the card art ──── */
body.sst-v2-header-on .hero-brand-icon {
	flex: 0 0 auto;
	display: block;
	width: clamp(84px, 13vw, 168px);
	height: auto;
	aspect-ratio: 1;
	max-width: none;
	border-radius: 22%;
	box-shadow: 0 16px 40px rgba(0, 0, 0, .22), 0 3px 10px rgba(0, 0, 0, .14);
}
@media (prefers-reduced-motion: reduce) {
	body.sst-v2-header-on .sst-v2-bar { transition: none; }
}
