/* commonBody8Nav.css - start
   Store header: logo, search, menus, role dropdowns, mobile drawer.
   Same ids/classes as commonBody8Nav.php and js/commonBody8Nav.js. Colours come from the store's --brand variables. */

:root {
	--nav-bg: #ffffff;
	--nav-surface: #ffffff;
	--nav-surface-alt: #f8fafb;
	--nav-border: #e3e8eb;
	--nav-radius: 12px;
	--nav-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 4px 16px rgba(16, 24, 40, 0.05);
	--nav-transition: 0.18s ease;
	--header-height: 72px;
}

#divtop, #divtop * {
	box-sizing: border-box;
}

/* ---------- Header bar ---------- */
#divtop {
	width: 100%;
	min-height: var(--header-height);
	background: var(--nav-bg);
	position: sticky;
	top: 0;
	z-index: 100;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	column-gap: 20px;
	row-gap: 0;
	padding: 0 max(var(--gutter, 24px), calc((100% - var(--container-max, 1280px)) / 2 + var(--gutter, 24px)));
	border-bottom: 1px solid var(--nav-border);
	box-shadow: var(--nav-shadow);
}

/* ---------- Logo ---------- */
#logo {
	/* the markup still carries the legacy "col span_1_of_3" classes; width:auto and no margin keep them from reserving a third of the row */
	width: auto;
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	float: none;
	overflow: hidden;
}
#logo a {
	text-decoration: none;
	display: flex;
	align-items: center;
}
#logo img {
	width: auto;
	height: 48px;
	max-width: 100%;
	display: block;
}

/* ---------- Search ---------- */
#livesearch {
	flex: 1 1 280px;
	min-width: 0;
	max-width: 680px;
	width: auto;
	margin: 0 auto 0 0;
	float: none;
}
#livesearch form {
	display: flex;
	align-items: center;
	width: 100%;
	margin: 0;
	padding: 3px;
	background: var(--color-surface-sunk);
	border: 1px solid var(--nav-border);
	border-radius: 999px;
	transition: background-color var(--nav-transition), border-color var(--nav-transition), box-shadow var(--nav-transition);
}
#livesearch form:hover {
	border-color: #c9d2d7;
}
#livesearch form:focus-within {
	background: #fff;
	border-color: var(--brand);
	box-shadow: 0 0 0 3px var(--brand-ring);
}
#livesearch input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	height: 38px;
	min-height: 0;
	margin: 0;
	padding: 0 16px;
	background: transparent;
	border: 0;
	border-radius: 999px;
	box-shadow: none;
	font-size: 0.95rem;
	color: var(--color-text);
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}
#livesearch input[type="search"]:focus,
#livesearch input[type="search"]:hover {
	border: 0;
	box-shadow: none;
	outline: none;
}
#livesearch input#searchbutton {
	flex: 0 0 38px;
	width: 38px;
	height: 38px;
	min-height: 0;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") center / 18px no-repeat;
	box-shadow: none;
	font-size: 0;
	text-indent: -999px;
	overflow: hidden;
	cursor: pointer;
	transition: background-color var(--nav-transition);
}
#livesearch input#searchbutton:hover {
	background-color: var(--brand-hover);
	box-shadow: none;
}

/* ---------- Hamburger (mobile) ---------- */
.topopenbtn {
	display: none;
	flex: 0 0 auto;
	margin-left: auto;
	min-height: 0;
	cursor: pointer;
	background: transparent;
	border: 1px solid var(--nav-border);
	border-radius: 10px;
	padding: 9px 10px;
	box-shadow: none;
}
.topopenbtn:hover,
.topopenbtn:focus-visible {
	background: var(--color-surface-sunk);
	box-shadow: none;
	border-color: var(--nav-border);
}
.topopenbtn span {
	display: block;
	width: 22px;
	height: 2px;
	margin: 5px 0;
	background: var(--color-text);
	border-radius: 2px;
}
.topclosebtn {
	display: none;
}

/* inserted by commonBody8Nav.js; kept out of the flex row on desktop */
#divnav-backdrop {
	display: none;
}

/* ---------- Main menu (desktop: inline row) ---------- */
#divnav {
	width: auto;
	margin: 0;
	float: none;
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	background: transparent;
	text-align: left;
}
#divnav ul.navigate {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 2px;
	margin: 0;
	padding: 0;
}
#divnav ul.navigate li {
	display: flex;
	align-items: center;
	margin: 0;
}
#divnav ul.navigate li form {
	margin: 0;
}
#divnav ul.navigate li a {
	text-decoration: none;
	display: block;
	margin: 0;
	padding: 9px 14px;
	border-radius: 999px;
	color: var(--color-text);
	font-size: 0.93rem;
	font-weight: 500;
	transition: background-color var(--nav-transition), color var(--nav-transition);
}
#divnav ul.navigate li a:hover,
#divnav ul.navigate li a:focus-visible {
	background-color: var(--brand-soft);
	color: var(--brand-text);
	outline: none;
}
#divnav button {
	min-height: 0;
	border: 0;
	padding: 9px 20px;
	background: var(--brand);
	color: var(--brand-ink);
	font-size: 0.93rem;
	font-weight: 600;
	border-radius: 999px;
	cursor: pointer;
	box-shadow: none;
	transition: background-color var(--nav-transition);
}
#divnav button:hover {
	background: var(--brand-hover);
	box-shadow: none;
}
#divnav button.topclosebtn {
	background: none;
	color: var(--color-text);
	padding: 4px 8px;
}

/* older pages still load structure_responsive/styles.css, whose mobile rules turn these spans into grey blocks */
#divnav ul.navigate li a span {
	display: inline;
	margin: 0;
	color: inherit;
	font-size: inherit;
}
#divnav ul.navigate li {
	font-size: inherit;
}
#divnav ul.navigate li a #spancart {
	margin-left: 4px;
	font-weight: 700;
	color: var(--brand-text);
	font-variant-numeric: tabular-nums;
}

/* ---------- Dropdown menus (account / seller / logistics / admin) ---------- */
#divnav select,
.select-field {
	min-height: 0;
	padding: 9px 34px 9px 16px;
	margin: 0;
	border-radius: 999px;
	border: 1px solid var(--nav-border);
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6770' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 14px;
	color: var(--color-text);
	font-size: 0.9rem;
	font-weight: 500;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	box-shadow: none;
	max-width: 100%;
	transition: border-color var(--nav-transition), background-color var(--nav-transition);
}
#divnav select:hover,
.select-field:hover {
	border-color: var(--brand);
	box-shadow: none;
}
.select-field:focus,
#divnav select:focus {
	border-color: var(--brand);
	box-shadow: 0 0 0 3px var(--brand-ring);
	outline: none;
}

/* ---------- Role bar: seller / logistics / admin dropdowns, a second row under the main bar ---------- */
#divsectionlogged {
	order: 5;
	flex: 1 0 100%;
	width: 100%;
	margin: 0;
	padding: 0;
	float: none;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}
#divsectionlogged::before,
#divsectionlogged::after {
	display: none;
}
#divsectionlogged > div {
	width: auto;
	margin: 0;
	float: none;
}
#divsectionlogged > div:empty {
	display: none;
}
#divnav2, #divnav3, #divnav4, #divnav5, #divnav6 {
	display: flex;
	align-items: center;
}
#divsectionlogged .select-field {
	background-color: var(--brand-soft);
	border: 1px solid transparent;
	border-radius: 999px;
	box-shadow: none;
	color: var(--brand-text);
	font-weight: 600;
	font-size: 0.85rem;
	padding: 7px 32px 7px 14px;
}
#divsectionlogged .select-field:hover {
	border-color: var(--brand);
}
#divsectionlogged > div:not(:empty) {
	padding: 8px 0;
}
#divsectionlogged:has(> div:not(:empty)) {
	border-top: 1px solid var(--nav-border);
}

/* ---------- Focus visibility ---------- */
#divtop a:focus-visible,
#divtop button:focus-visible,
#divtop select:focus-visible {
	outline: 2px solid var(--brand);
	outline-offset: 2px;
}

/* =========================================================
   Tablet and phone: the menu becomes a drawer from the right,
   the search box moves to its own full-width row.
   ========================================================= */
@media screen and (max-width: 960px) {
	#divtop {
		column-gap: 12px;
		row-gap: 10px;
		padding-top: 10px;
		padding-bottom: 0;
		padding-left: var(--gutter, 16px);
		padding-right: var(--gutter, 16px);
	}
	#logo img {
		height: 40px;
	}
	.topopenbtn {
		display: block;
		order: 2;
	}
	#logo {
		order: 1;
	}
	#livesearch {
		order: 3;
		flex: 1 0 100%;
		max-width: none;
		margin: 0 0 10px;
	}
	#divsectionlogged {
		order: 4;
		margin-top: -10px;
	}

	#divnav {
		position: fixed;
		top: 0;
		right: 0;
		height: 100vh;
		height: 100dvh;
		width: min(86vw, 340px);
		max-width: 340px;
		background: #fff;
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		gap: 0;
		padding: 16px 20px 24px;
		box-shadow: -8px 0 32px rgba(16, 24, 40, 0.22);
		transform: translateX(105%);
		visibility: hidden;
		transition: transform 0.25s ease, visibility 0s linear 0.25s;
		z-index: 200;
		overflow-y: auto;
	}
	#divnav.is-open {
		transform: translateX(0);
		visibility: visible;
		transition: transform 0.25s ease, visibility 0s;
	}
	#divnav ul.navigate {
		flex-direction: column;
		align-items: stretch;
		gap: 2px;
		width: 100%;
	}
	#divnav ul.navigate li {
		display: block;
	}
	#divnav ul.navigate li a {
		color: var(--color-text);
		padding: 14px 12px;
		font-size: 1rem;
		border-radius: 10px;
	}
	#divnav ul.navigate li a:hover,
	#divnav ul.navigate li a:focus-visible {
		background-color: var(--brand-soft);
		color: var(--brand-text);
	}
	#divnav ul.navigate li form,
	#divnav ul.navigate li button {
		width: 100%;
	}
	#divnav ul.navigate li button {
		margin: 8px 0;
		padding: 13px 20px;
	}
	#divnav select {
		width: 100%;
		margin-top: 8px;
		border-radius: 10px;
		padding: 12px 36px 12px 14px;
	}
	#divnav button.topclosebtn {
		display: block;
		align-self: flex-end;
		width: auto;
		font-size: 30px;
		line-height: 1;
		margin: 0 0 8px;
		padding: 2px 10px;
	}
	#divnav-backdrop {
		display: none;
		position: fixed;
		inset: 0;
		background: rgba(16, 24, 40, 0.45);
		z-index: 150;
	}
	#divnav-backdrop.is-open {
		display: block;
	}

	/* role dropdowns sit in a swipeable single row */
	#divsectionlogged {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		margin-left: calc(var(--gutter, 16px) * -1);
		margin-right: calc(var(--gutter, 16px) * -1);
		width: auto;
		flex: 1 0 calc(100% + var(--gutter, 16px) * 2);
		padding: 0 var(--gutter, 16px);
	}
	#divsectionlogged::-webkit-scrollbar {
		display: none;
	}
	#divsectionlogged > div {
		flex: 0 0 auto;
	}
}

@media screen and (max-width: 640px) {
	/* tall two-row header would eat the screen on a phone, so it scrolls away */
	#divtop {
		position: relative;
	}
}

@media screen and (max-width: 520px) {
	#logo img {
		height: 36px;
	}
	#livesearch input[type="search"] {
		height: 40px;
		font-size: 16px;
	}
	#livesearch input#searchbutton {
		flex-basis: 40px;
		width: 40px;
		height: 40px;
	}
}

@media (prefers-reduced-motion: reduce) {
	#divnav, .topopenbtn, #divtop a, #divtop button, #divtop select {
		transition: none !important;
	}
}

/* commonBody8Nav.css - end */
