/* SprayTech Header — responsive styles
   Scoped under .stx-header so the plugin never leaks into the theme. */

.stx-header,
.stx-header *,
.stx-header *::before,
.stx-header *::after {
	box-sizing: border-box;
}

.stx-header {
	width: 100%;
	background: #fff;
	font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	line-height: 1.4;
}

.stx-header--sticky {
	position: sticky;
	top: 0;
	z-index: 1000;
}

.stx-header a { text-decoration: none; }

.stx-ic {
	width: 12px;
	height: 12px;
	flex: 0 0 auto;
	color: #f79621;
}

/* ============ TOP BAR ============ */
.stx-topbar {
	width: 100%;
	background: linear-gradient(180deg, #424140 0%, #424140 26%, #7c5b34 70%, #c47e2c 88%, #ef8f28 100%);
}

.stx-topbar__inner {
	max-width: 1180px;
	margin: 0 auto;
	height: 31px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 16px;
	font-size: 11px;
	color: #f2f0ee;
	gap: 12px;
}

.stx-contacts {
	display: flex;
	align-items: center;
	gap: 13px;
	flex-wrap: wrap;
}

.stx-contact {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #f2f0ee;
}

a.stx-contact:hover { color: #ffffff; }

.stx-strong { font-weight: 700; }

/* ============ NAV (desktop, from a WP menu) ============ */
.stx-nav {
	display: flex;
	align-items: center;
	font-size: 11px;
	flex-shrink: 0;
}

.stx-header .stx-menu,
.stx-header .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.stx-nav--desktop .stx-menu {
	display: flex;
	align-items: center;
	gap: 0;
}

.stx-nav--desktop .stx-menu > li { position: relative; }

.stx-menu a {
	display: inline-flex;
	align-items: center;
	padding: 0 9px;
	height: 31px;
	color: #f2f0ee;
	transition: color 0.15s ease;
	white-space: nowrap;
}
.stx-nav--desktop .stx-menu > li > a:hover { color: #f79621; }

/* active pill (current page, or first item of the legacy fallback) */
.stx-nav--desktop .stx-menu > .current-menu-item > a,
.stx-nav--desktop .stx-menu > .current-menu-ancestor > a,
.stx-nav--desktop .stx-menu > .current_page_item > a {
	background: #f79621;
	color: #1c1c1c;
	font-weight: 600;
	border-radius: 7px;
	padding: 0 13px;
	height: 34px;
	box-shadow: 0 3px 7px rgba(0, 0, 0, 0.32);
	position: relative;
	z-index: 2;
	margin-right: 4px;
}

/* caret indicator on parent items (injected by JS) */
.stx-caret {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 0;
	padding: 0 2px 0 4px;
	margin: 0;
	color: inherit;
	cursor: pointer;
}
.stx-caret svg { width: 9px; height: 9px; display: block; }
.stx-nav--desktop .stx-caret { pointer-events: none; } /* desktop uses hover */

/* ----- desktop dropdowns ----- */
.stx-nav--desktop .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 200px;
	padding: 6px 0;
	background: #fff;
	border-radius: 9px;
	box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.15s ease, transform 0.15s ease;
	z-index: 60;
}
.stx-nav--desktop .menu-item-has-children:hover > .sub-menu,
.stx-nav--desktop .menu-item-has-children:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.stx-nav--desktop .sub-menu li { position: relative; }
.stx-nav--desktop .sub-menu a {
	display: block;
	height: auto;
	padding: 9px 16px;
	color: #333;
	font-size: 12px;
	white-space: nowrap;
}
.stx-nav--desktop .sub-menu a:hover { background: #f7f4ef; color: #f79621; }
/* third level flies out to the side */
.stx-nav--desktop .sub-menu .sub-menu { top: -6px; left: 100%; }

/* ============ BURGER (in the main bar; mobile only) ============ */
.stx-burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
	width: 40px;
	height: 36px;
	padding: 6px 8px;
	background: #fff;
	border: 1.5px solid #f79621;
	border-radius: 10px;
	cursor: pointer;
}
.stx-burger span {
	display: block;
	height: 2px;
	width: 100%;
	background: #f79621;
	border-radius: 2px;
	transition: transform 0.2s ease, opacity 0.2s ease;
}
.stx-header.is-nav-open .stx-burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.stx-header.is-nav-open .stx-burger span:nth-child(2) { opacity: 0; }
.stx-header.is-nav-open .stx-burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ============ MAIN BAR ============ */
.stx-mainbar__inner {
	max-width: 1180px;
	margin: 0 auto;
	min-height: 80px;
	display: flex;
	align-items: center;
	padding: 10px 16px;
	gap: 26px;
}

.stx-logo { flex: 0 0 auto; }
.stx-logo img { height: 38px; width: auto; display: block; }

/* ============ SEARCH ============ */
.stx-search {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	align-items: stretch;
	max-width: 470px;
	height: 36px;
	border: 1.5px solid #f79621;
	border-radius: 18px;
	background: #fff;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
	margin: 0;
	padding: 0;
}
.stx-header .stx-search__input,
.stx-header input.stx-search__input[type="search"] {
	flex: 1 1 auto;
	border: 0;
	outline: 0;
	margin: 0;
	padding: 0 18px;
	height: 100%;
	min-height: 0;
	font-size: 14px;
	line-height: 1;
	color: #555;
	font-family: inherit;
	background: transparent;
	min-width: 0;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
}
.stx-header .stx-search__input::-webkit-search-cancel-button { -webkit-appearance: none; }
.stx-header .stx-search__btn {
	flex: 0 0 48px;
	border: 0;
	margin: 0;
	padding: 0;
	height: 100%;
	min-height: 0;
	background: #f79621;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 9px;
	box-shadow: none;
	line-height: 1;
}
.stx-search__btn svg { width: 18px; height: 18px; display: block; }

/* ============ CART ============ */
.stx-cart { flex: 0 0 auto; margin-left: auto; }
.stx-cart__link {
	display: flex;
	align-items: center;
	gap: 9px;
	background: #fff;
	border: 1.5px solid #f79621;
	border-radius: 21px;
	padding: 0 4px;
	height: 36px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.stx-cart-count {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 1.5px solid #f79621;
	background: #fff;
	color: #1f1f1f;
	font-weight: 700;
	font-size: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
}
.stx-cart__text { font-size: 13px; padding-right: 2px; white-space: nowrap; }
.stx-cart__label { font-weight: 400; color: #555; }
.stx-cart-total,
.stx-cart-total .amount,
.stx-cart-total .woocommerce-Price-amount { font-weight: 700; font-size: 15px; color: #1a1a1a; }
.stx-cart__icon {
	width: 46px;
	height: 40px;
	margin: -3px -4px -3px 0;
	border-radius: 13px;
	background: #f79621;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
}
.stx-cart__icon svg { width: 23px; height: 23px; }

/* ============ MOBILE NAV PANEL (hidden on desktop) ============ */
.stx-mobile-nav { display: none; }

/* ============ TABLET ============ */
@media (max-width: 1024px) {
	.stx-mainbar__inner { flex-wrap: wrap; gap: 14px; }
	.stx-search { order: 3; flex: 1 1 100%; max-width: none; }
	.stx-cart { order: 2; }
	.stx-contact--hours { display: none; }
}

/* ============ MOBILE ============ */
@media (max-width: 768px) {
	/* The whole top bar (contacts + desktop menu) is removed on mobile. */
	.stx-topbar { display: none; }

	/* Main bar becomes two rows:
	   row 1 -> logo + cart, row 2 -> search + menu (burger). */
	.stx-mainbar__inner {
		flex-wrap: wrap;
		gap: 12px;
		padding: 12px 14px;
		min-height: 0;
	}
	.stx-logo   { order: 1; flex: 1 1 auto; }
	.stx-cart   { order: 2; flex: 0 0 auto; margin-left: auto; }
	.stx-search { order: 3; flex: 1 1 auto; max-width: none; }
	.stx-burger { order: 4; flex: 0 0 auto; display: flex; align-self: center; }

	.stx-cart__label { display: none; } /* keep the cart compact */

	/* Mobile menu panel (accordion), toggled by the burger. */
	.stx-mobile-nav {
		display: block;
		width: 100%;
		background: #fff;
		border-top: 1px solid #eee;
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.3s ease;
	}
	.stx-header.is-nav-open .stx-mobile-nav {
		max-height: 80vh;
		overflow: auto;
	}
	.stx-mobile-nav .stx-menu {
		display: flex;
		flex-direction: column;
		padding: 4px 0;
	}
	.stx-mobile-nav .stx-menu li { width: 100%; border-bottom: 1px solid #f1f1f1; }
	.stx-mobile-nav .menu-item-has-children {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
	}
	.stx-mobile-nav .stx-menu a {
		flex: 1 1 auto;
		height: auto;
		padding: 13px 18px;
		color: #333;
		font-size: 14px;
	}
	.stx-mobile-nav .current-menu-item > a { color: #f79621; font-weight: 600; }

	/* caret as the expand control on mobile */
	.stx-mobile-nav .stx-caret {
		pointer-events: auto;
		height: auto;
		padding: 13px 18px;
		color: #888;
		transition: transform 0.2s ease;
	}
	.stx-mobile-nav .stx-caret svg { width: 13px; height: 13px; }
	.stx-mobile-nav li.is-open > .stx-caret { transform: rotate(180deg); }

	/* sub-menus: collapsed, expand when the parent li is open */
	.stx-mobile-nav .sub-menu {
		flex: 1 1 100%;
		max-height: 0;
		overflow: hidden;
		background: #fafafa;
		transition: max-height 0.25s ease;
	}
	.stx-mobile-nav li.is-open > .sub-menu { max-height: 1500px; }
	.stx-mobile-nav .sub-menu a { padding-left: 34px; font-size: 13px; color: #555; }
	.stx-mobile-nav .sub-menu .sub-menu a { padding-left: 50px; }
}

/* ============ SMALL MOBILE ============ */
@media (max-width: 480px) {
	.stx-logo img { height: 32px; }
	.stx-cart__text { font-size: 12px; }
	.stx-cart-total,
	.stx-cart-total .amount { font-size: 13px; }
}
