/* ============================================================
 * Newzon — Amazon-style header
 * Dark bar: logo | category search | account | orders | cart,
 * with the category menu on a second, slightly lighter row.
 * Built on Shoptimizer's existing header markup — the only added
 * elements are the account/orders blocks and the search category
 * select (see functions.php).
 * ============================================================ */

:root {
	--nz-hdr-bg: #131921;      /* main bar */
	--nz-hdr-bg2: #232f3e;     /* second nav row */
	--nz-accent: #febd69;      /* search button / cart badge */
	--nz-accent-hi: #f3a847;
	--nz-hdr-text: #fff;
	--nz-hdr-muted: #ccc;
}

/* ---------- Bar shell ---------- */
.site-header,
.site-header .main-header,
.header-5 .site-header {
	background: var(--nz-hdr-bg) !important;
	border-bottom: 0 !important;
	box-shadow: none !important;
}

.site-header .main-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	padding: 8px 16px !important;
	max-width: 1500px;
}

/* Every direct child sits on the dark bar */
.site-header .main-header a,
.site-header .main-header .cart-contents,
.site-header .main-header .amount {
	color: var(--nz-hdr-text);
}

/* ---------- Logo ---------- */
.site-header .site-branding {
	order: 1;
	flex: 0 0 auto;
	height: auto !important;
	margin: 0 6px 0 0;
	padding: 0;
	display: flex;
	align-items: center;
}
.site-header .site-branding img,
.site-header .site-branding .custom-logo {
	max-height: 42px !important;
	width: auto !important;
}
/* Amazon-style hover outline on the logo + nav blocks */
.site-header .custom-logo-link,
.newzon-hdr-block {
	border: 1px solid transparent;
	border-radius: 2px;
	padding: 6px 9px;
	transition: border-color .1s ease;
}
.site-header .custom-logo-link:hover,
.newzon-hdr-block:hover {
	border-color: var(--nz-hdr-text);
}

/* ---------- Search ---------- */
.site-header .site-search {
	order: 2;
	flex: 1 1 320px;
	min-width: 220px;
	padding: 0 !important;
	margin: 0;
	max-width: none;
}
.site-header .site-search .widget,
.site-header .site-search .widget_product_search {
	margin: 0;
	padding: 0;
}
.site-header .site-search form.woocommerce-product-search {
	display: flex;
	align-items: stretch;
	width: 100%;
	height: 40px;
	border-radius: 4px;
	overflow: hidden;
	background: #fff;
	position: relative;
}
/* Amazon's orange focus ring */
.site-header .site-search form.woocommerce-product-search:focus-within {
	box-shadow: 0 0 0 3px var(--nz-accent-hi);
}

/* Category select */
.site-header .newzon-search-cat {
	flex: 0 0 auto;
	max-width: 170px;
	border: 0 !important;
	border-right: 1px solid #cdcdcd !important;
	background: #e6e6e6 url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 6px center;
	background-size: 14px;
	padding: 0 22px 0 10px !important;
	font-size: 12px;
	color: #111 !important;
	border-radius: 4px 0 0 4px;
	height: 100% !important;
	min-height: 0 !important;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
	text-overflow: ellipsis;
}
.site-header .newzon-search-cat:hover { background-color: #dadada; }

/* Text field */
.site-header .site-search input[type="search"],
.site-header .site-search input.search-field {
	flex: 1 1 auto;
	height: 100% !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 12px !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: #fff !important;
	color: #111 !important;
	font-size: 15px;
	box-shadow: none !important;
	outline: 0 !important;
}
.site-header .site-search input[type="search"]::placeholder { color: #767676; }

/* Submit button */
.site-header .site-search form.woocommerce-product-search button[type="submit"] {
	flex: 0 0 45px;
	width: 45px;
	height: 100%;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 4px 4px 0 !important;
	background: var(--nz-accent) !important;
	color: #111 !important;
	font-size: 0 !important;
	cursor: pointer;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.6-3.6'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: center !important;
	background-size: 21px !important;
}
.site-header .site-search form.woocommerce-product-search button[type="submit"]:hover {
	background-color: var(--nz-accent-hi) !important;
}

/* ---------- Account / Orders blocks ---------- */
.newzon-hdr-block {
	order: 3;
	flex: 0 0 auto;
	display: block;
	line-height: 1.15;
	text-decoration: none;
	white-space: nowrap;
}
.newzon-hdr-block .nz-l1 {
	display: block;
	font-size: 12px;
	color: var(--nz-hdr-muted);
	font-weight: 400;
}
.newzon-hdr-block .nz-l2 {
	display: block;
	font-size: 14px;
	color: var(--nz-hdr-text);
	font-weight: 700;
}
.newzon-hdr-orders { order: 4; }

/* ---------- Cart ---------- */
.site-header .site-header-cart,
.header-5 .site-header .site-header-cart {
	order: 5;
	flex: 0 0 auto;
	height: auto !important;
	margin: 0;
	padding: 0;
	display: flex !important;
	align-items: center !important;
	background: transparent !important;
}
.site-header .site-header-cart .shoptimizer-cart { background: transparent !important; }
.header-5 .shoptimizer-cart a.cart-contents,
.site-header a.cart-contents {
	position: relative;
	display: flex !important;
	align-items: center;
	gap: 6px;
	height: auto !important;
	line-height: 1.2 !important;
	padding: 8px 10px !important;
	border: 1px solid transparent;
	border-radius: 2px;
	background: transparent !important;
	color: var(--nz-hdr-text) !important;
	font-weight: 700;
	font-size: 14px;
}
.site-header a.cart-contents:hover { border-color: var(--nz-hdr-text); }
/* Cart glyph */
.site-header a.cart-contents::before {
	content: "";
	width: 30px;
	height: 26px;
	flex: 0 0 30px;
	background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 4h3l2.4 11.2a2 2 0 0 0 2 1.6h7.6a2 2 0 0 0 2-1.55L21.5 8H6'/%3E%3Ccircle cx='10' cy='20' r='1.4'/%3E%3Ccircle cx='18' cy='20' r='1.4'/%3E%3C/svg%3E") no-repeat center;
	background-size: 27px;
}
/* Item count badge over the cart glyph */
.site-header a.cart-contents .count {
	position: absolute;
	top: 0;
	left: 22px;
	min-width: 17px;
	padding: 0 3px;
	background: transparent !important;
	color: var(--nz-accent) !important;
	font-size: 15px;
	font-weight: 700;
	text-align: center;
	line-height: 1;
	border-radius: 0;
}
/* Cart total sits after the word Cart on Amazon; keep it subtle */
.site-header a.cart-contents .amount {
	font-weight: 400;
	font-size: 13px;
	color: var(--nz-hdr-muted) !important;
}

/* ---------- Second row: category navigation ---------- */
.site-header .secondary-navigation {
	order: 6;
	flex: 1 0 100%;
	width: 100%;
	margin: 8px -16px -8px;
	padding: 0 16px;
	background: var(--nz-hdr-bg2);
	float: none !important;
}
.site-header .secondary-navigation .menu-main-container { width: 100%; }
.site-header .secondary-navigation ul.menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
	float: none !important;
}
.site-header .secondary-navigation ul.menu > li { margin: 0; padding: 0; float: none !important; }
.site-header .secondary-navigation ul.menu > li > a {
	display: block;
	padding: 9px 9px;
	font-size: 14px;
	color: var(--nz-hdr-text) !important;
	border: 1px solid transparent;
	border-radius: 2px;
	text-decoration: none;
	line-height: 1.2;
}
.site-header .secondary-navigation ul.menu > li > a:hover { border-color: var(--nz-hdr-text); }

/* The theme's "Main" menu is assigned to BOTH the primary and secondary menu
 * locations, so Shoptimizer renders it a second time in its full-width
 * primary-navigation bar (which also carries a duplicate search box + cart).
 * We show the category menu once, in the header's secondary-navigation row
 * above, so hide the whole primary-navigation bar. */
.shoptimizer-primary-navigation,
#site-navigation.main-navigation { display: none !important; }

/* Sticky header keeps the same skin */
.is_stuck .site-header,
.is_stuck .main-header { background: var(--nz-hdr-bg) !important; }

/* ---------- Mobile / tablet ---------- */
@media (max-width: 991px) {
	.site-header .main-header {
		padding: 8px 12px !important;
		gap: 8px;
	}
	.site-header .site-branding { order: 1; flex: 1 1 auto; }
	.site-header .site-header-cart { order: 2; }
	.newzon-hdr-block { display: none; }           /* account/orders hidden on small screens */
	.site-header .site-search {
		order: 3;
		flex: 1 0 100%;
		min-width: 0;
	}
	.site-header .newzon-search-cat { display: none; }  /* full-width plain search on mobile */
	.site-header .site-search form.woocommerce-product-search { height: 38px; }
	.site-header .secondary-navigation {
		margin: 6px -12px -8px;
		padding: 0 6px;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	.site-header .secondary-navigation ul.menu { flex-wrap: nowrap; }
	.site-header .secondary-navigation ul.menu > li > a { white-space: nowrap; font-size: 13px; }
	/* Shoptimizer's burger sits on the dark bar */
	.site-header .menu-toggle .bar { background: var(--nz-hdr-text) !important; }
	.site-header .menu-toggle .bar-text { color: var(--nz-hdr-text) !important; }
}
