/* ============================================================
   Nonsens — Custom Header
   Overrides the Astra header. Font: Inter.
   ============================================================ */

:root {
	--nonsens-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	--nonsens-ink: #2e1c16;          /* wordmark / primary text (dark brown) */
	--nonsens-text: #4a4a4a;         /* menu link text */
	--nonsens-accent: #3a6b8a;       /* link hover / "NL" accent */
	--nonsens-topbar-bg: #f6f4f2;
	--nonsens-topbar-text: #2e1c16;
	--nonsens-header-bg: #ffffff;
	--nonsens-border: #ece8e4;
	--nonsens-max: 1240px;
	--nonsens-header-h: 72px;
}

/* Reset any Astra header spacing that might interfere. */
.nonsens-header * { box-sizing: border-box; }

.nonsens-header {
	font-family: var(--nonsens-font);
	background: var(--nonsens-header-bg);
	position: relative;
	z-index: 999;
}

.nonsens-container {
	width: 100%;
	max-width: var(--nonsens-max);
	margin: 0 auto;
	padding: 0 24px;
}

/* ── Top announcement bar ─────────────────────────────────── */
.nonsens-topbar {
	background: var(--nonsens-topbar-bg);
	border-bottom: 1px solid var(--nonsens-border);
}
.nonsens-topbar__text {
	margin: 0;
	padding: 9px 0;
	text-align: center;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .2px;
	color: var(--nonsens-topbar-text);
}
.nonsens-topbar__text a,
.nonsens-topbar__text b { color: var(--nonsens-accent); }

/* ── Main header row (3-column grid) ──────────────────────── */
.nonsens-header__main {
	background: var(--nonsens-header-bg);
	border-bottom: 1px solid var(--nonsens-border);
}
.nonsens-header__row {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	min-height: var(--nonsens-header-h);
	gap: 16px;
}
.nonsens-header__left   { justify-self: start; }
.nonsens-header__center { justify-self: center; }
.nonsens-header__right  { justify-self: end; display: flex; align-items: center; gap: 6px; }

/* ── Logo ─────────────────────────────────────────────────── */
.nonsens-logo--text {
	font-family: var(--nonsens-font);
	font-weight: 700;
	font-size: 26px;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: var(--nonsens-ink);
	text-decoration: none;
	white-space: nowrap;
	line-height: 1;
}
.nonsens-logo--text:hover { color: var(--nonsens-ink); opacity: .85; }
.nonsens-logo--image img { max-height: 44px; width: auto; display: block; }

/* ── Desktop menu ─────────────────────────────────────────── */
.nonsens-nav--desktop .nonsens-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 30px;
}
.nonsens-menu li { position: relative; margin: 0; }
.nonsens-menu a {
	font-size: 15px;
	font-weight: 500;
	color: var(--nonsens-text);
	text-decoration: none;
	line-height: var(--nonsens-header-h);
	transition: color .15s ease;
	white-space: nowrap;
}
.nonsens-menu a:hover,
.nonsens-menu .current-menu-item > a,
.nonsens-menu .current_page_item > a { color: var(--nonsens-accent); }

/* Desktop dropdowns (depth 2) */
.nonsens-nav--desktop .nonsens-menu .sub-menu {
	list-style: none;
	margin: 0;
	padding: 8px 0;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 210px;
	background: #fff;
	border: 1px solid var(--nonsens-border);
	box-shadow: 0 12px 30px rgba(0,0,0,.08);
	border-radius: 8px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: all .18s ease;
	z-index: 100;
}
.nonsens-nav--desktop .nonsens-menu li:hover > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.nonsens-nav--desktop .nonsens-menu .sub-menu a {
	display: block;
	line-height: 1.4;
	padding: 9px 18px;
	font-size: 14px;
}
.nonsens-nav--desktop .nonsens-menu .menu-item-has-children > a::after {
	content: '';
	display: inline-block;
	width: 6px; height: 6px;
	margin-left: 7px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	vertical-align: middle;
	opacity: .6;
}

/* ── Right-side icon buttons ──────────────────────────────── */
.nonsens-icon {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 50%;
	color: var(--nonsens-ink);
	cursor: pointer;
	text-decoration: none;
	transition: background .15s ease, color .15s ease;
}
.nonsens-icon:hover { background: #f4f1ee; color: var(--nonsens-accent); }
.nonsens-icon svg { width: 22px; height: 22px; display: block; }

/* Cart count badge */
.nonsens-cart-count {
	position: absolute;
	top: 4px;
	right: 2px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--nonsens-accent);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}
.nonsens-cart-count.is-empty { display: none; }

/* ── Hamburger (mobile) ───────────────────────────────────── */
.nonsens-burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 42px;
	height: 42px;
	padding: 0 9px;
	background: none;
	border: 0;
	cursor: pointer;
}
.nonsens-burger span {
	display: block;
	height: 2px;
	width: 100%;
	background: var(--nonsens-ink);
	border-radius: 2px;
	transition: transform .2s ease, opacity .2s ease;
}

/* ── Search slide-down ────────────────────────────────────── */
.nonsens-search {
	border-bottom: 1px solid var(--nonsens-border);
	background: #fff;
	animation: nonsens-fade-down .2s ease;
}
.nonsens-search[hidden] { display: none; }
.nonsens-search__inner {
	display: flex;
	align-items: center;
	gap: 14px;
	padding-top: 16px;
	padding-bottom: 16px;
}
.nonsens-search__inner form,
.nonsens-search__inner .woocommerce-product-search {
	flex: 1;
	display: flex;
	gap: 10px;
}
.nonsens-search__inner input[type="search"],
.nonsens-search__inner input[type="text"] {
	flex: 1;
	height: 46px;
	padding: 0 16px;
	font-family: var(--nonsens-font);
	font-size: 15px;
	border: 1px solid var(--nonsens-border);
	border-radius: 8px;
	outline: none;
}
.nonsens-search__inner input[type="search"]:focus,
.nonsens-search__inner input[type="text"]:focus { border-color: var(--nonsens-accent); }
.nonsens-search__inner button[type="submit"] {
	height: 46px;
	padding: 0 22px;
	background: var(--nonsens-ink);
	color: #fff;
	border: 0;
	border-radius: 8px;
	font-family: var(--nonsens-font);
	font-weight: 600;
	cursor: pointer;
}
.nonsens-search__close {
	flex: none;
	width: 42px; height: 42px;
	background: none; border: 0; cursor: pointer;
	color: var(--nonsens-ink);
}
.nonsens-search__close svg { width: 22px; height: 22px; }

@keyframes nonsens-fade-down {
	from { opacity: 0; transform: translateY(-6px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ── Mobile slide-in nav ──────────────────────────────────── */
.nonsens-mobile-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.42);
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease;
	z-index: 99998;
}
.nonsens-mobile-overlay.is-visible { opacity: 1; visibility: visible; }

.nonsens-mobile-nav {
	position: fixed;
	top: 0; left: 0;
	width: 84%;
	max-width: 340px;
	height: 100%;
	background: #fff;
	z-index: 99999;
	transform: translateX(-100%);
	transition: transform .28s cubic-bezier(.4,0,.2,1);
	display: flex;
	flex-direction: column;
	box-shadow: 0 0 40px rgba(0,0,0,.15);
	overflow-y: auto;
}
.nonsens-mobile-nav.is-open { transform: translateX(0); }
.nonsens-mobile-nav__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px;
	border-bottom: 1px solid var(--nonsens-border);
}
.nonsens-mobile-nav__title {
	font-family: var(--nonsens-font);
	font-weight: 700;
	font-size: 15px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--nonsens-ink);
}
.nonsens-mobile-nav__close {
	background: none; border: 0; cursor: pointer; color: var(--nonsens-ink);
	width: 40px; height: 40px;
}
.nonsens-mobile-nav__close svg { width: 22px; height: 22px; }

.nonsens-mobile-nav .nonsens-menu--mobile {
	list-style: none;
	margin: 0;
	padding: 8px 0;
}
.nonsens-mobile-nav .nonsens-menu--mobile li { border-bottom: 1px solid #f4f1ee; }
.nonsens-mobile-nav .nonsens-menu--mobile a {
	display: block;
	padding: 15px 22px;
	font-family: var(--nonsens-font);
	font-size: 16px;
	font-weight: 500;
	color: var(--nonsens-ink);
	text-decoration: none;
	line-height: 1.3;
}
.nonsens-mobile-nav .nonsens-menu--mobile a:hover { color: var(--nonsens-accent); }
.nonsens-mobile-nav .nonsens-menu--mobile .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	background: #faf8f6;
}
.nonsens-mobile-nav .nonsens-menu--mobile .sub-menu a {
	padding-left: 40px;
	font-size: 15px;
	font-weight: 400;
}

body.nonsens-mobile-open { overflow: hidden; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 921px) {
	.nonsens-nav--desktop { display: none; }
	.nonsens-burger { display: flex; }
	.nonsens-header__row { grid-template-columns: auto 1fr auto; }
	.nonsens-logo--text { font-size: 22px; letter-spacing: 2px; }
	.nonsens-header__right { gap: 0; }
	.nonsens-container { padding: 0 16px; }
}

@media (max-width: 480px) {
	.nonsens-logo--text { font-size: 19px; letter-spacing: 1.5px; }
	.nonsens-icon { width: 38px; height: 38px; }
	.nonsens-icon svg { width: 20px; height: 20px; }
}

/* Desktop: never show the mobile nav / burger. */
@media (min-width: 922px) {
	.nonsens-mobile-nav,
	.nonsens-mobile-overlay,
	.nonsens-burger { display: none !important; }
}
