/* Header v5 — minimal modern utility bar */

:root {
	--nebra-h5-green: #0e332e;
	--nebra-h5-green-soft: #134d44;
	--nebra-h5-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.nebra-h5-utility {
	position: sticky;
	top: 0;
	z-index: 1002;
	width: 100%;
	background: var(--nebra-h5-green);
	color: #fff;
	transition: box-shadow 0.35s var(--nebra-h5-ease), background 0.35s var(--nebra-h5-ease);
}

.nebra-h5-utility.is-scrolled {
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
	background: color-mix(in srgb, var(--nebra-h5-green) 94%, #000);
}

.nebra-h5-utility__inner {
	max-width: var(--max_width, 1200px);
	width: min(96%, 1120px);
	margin: 0 auto;
	display: grid;
	grid-template-columns: minmax(0, auto) minmax(0, 1fr) minmax(0, auto);
	align-items: center;
	gap: clamp(12px, 2.5vw, 28px);
	padding: clamp(14px, 2vw, 18px) clamp(10px, 2vw, 16px);
	direction: rtl;
}

/* Same slot as header v3 `.header-icons.start` — hidden on desktop (search bar replaces it). */
.nebra-h5-utility__inner > .header-icons.start {
	display: none;
	align-items: center;
	gap: 6px;
}

.nebra-h5-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	border-radius: 10px;
	background: transparent;
	border: 0;
	color: #fff;
	transition: background 0.22s var(--nebra-h5-ease), transform 0.2s var(--nebra-h5-ease);
}

.nebra-h5-icon-btn:hover {
	background: rgba(255, 255, 255, 0.1);
}

.nebra-h5-icon-btn:active {
	transform: scale(0.96);
}

.nebra-h5-icon-btn:focus-visible {
	outline: 2px solid rgba(255, 255, 255, 0.85);
	outline-offset: 2px;
}

/* Match header v3: icon lives in .header-icon box; color via .ico-color + data-color (theme colored_icons script). */
.nebra-h5-utility .header-icon {
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.nebra-h5-utility .header-icon img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.nebra-h5-search__icon.header-icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

.nebra-h5-brand {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	min-width: 0;
}

.nebra-h5-brand__link {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: #fff;
	transition: opacity 0.2s var(--nebra-h5-ease);
}

.nebra-h5-brand__link:hover {
	opacity: 0.88;
}

/* Logo: img inside .header-icon, same tinting as header v3 (.ico-color + data-color). */
.nebra-h5-brand .header-icon {
	width: auto;
	height: auto;
	max-width: min(52vw, 260px);
	max-height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.nebra-h5-brand .header-icon img {
	max-height: 42px;
	width: auto;
	max-width: 100%;
	object-fit: contain;
	display: block;
}

.nebra-h5-brand__text {
	font-size: clamp(1.05rem, 2.2vw, 1.55rem);
	font-weight: 700;
	letter-spacing: 0.01em;
	white-space: nowrap;
	line-height: 1.2;
}

.nebra-h5-search-wrap {
	position: relative;
	max-width: 480px;
	width: 100%;
	margin: 0 auto;
	z-index: 30;
}

.nebra-h5-search {
	display: flex;
	align-items: center;
	background: #fff;
	border-radius: 10px;
	padding: 0 4px 0 12px;
	width: 100%;
	min-height: 44px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	transition: box-shadow 0.25s var(--nebra-h5-ease), border-color 0.25s var(--nebra-h5-ease), transform 0.25s var(--nebra-h5-ease);
	direction: rtl;
}

.nebra-h5-search-wrap:focus-within .nebra-h5-search {
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22), 0 8px 28px rgba(0, 0, 0, 0.12);
	border-color: rgba(255, 255, 255, 0.35);
	transform: translateY(-1px);
}

/* AJAX dropdown — same Woo action as header v3 drawer (#ajax-search-results). */
.nebra-h5-search__dropdown {
	display: none;
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
	max-height: min(65vh, 420px);
	overflow-y: auto;
	overflow-x: hidden;
	z-index: 1105;
	border: 1px solid #e6e6e6;
	direction: rtl;
	padding: 8px 8px 12px;
	text-align: right;
}

.nebra-h5-search__dropdown.is-open {
	display: block;
}

.nebra-h5-search__section-title {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	opacity: 0.85;
	margin: 4px 8px 8px;
	color: var(--primary_color, #0e332e);
}

.nebra-h5-search__dropdown .search-results-list,
.nebra-h5-search__list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.nebra-h5-search__dropdown .search-results-list li a,
.nebra-h5-search__list li a {
	display: flex;
	align-items: center;
	padding: 10px 12px;
	text-decoration: none;
	transition: background 0.2s var(--nebra-h5-ease);
	gap: 12px;
	border-radius: 8px;
	color: inherit;
}

.nebra-h5-search__dropdown .search-results-list li a:hover,
.nebra-h5-search__list li a:hover {
	background: rgba(14, 51, 46, 0.06);
}

.nebra-h5-search__dropdown .search-thumb {
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	border-radius: 6px;
	overflow: hidden;
	background: #f3f3f3;
}

.nebra-h5-search__dropdown .search-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.nebra-h5-search__dropdown .search-meta {
	display: flex;
	flex-direction: column;
	justify-content: center;
	overflow: hidden;
	min-width: 0;
}

.nebra-h5-search__dropdown .search-meta .title {
	font-size: 14px;
	font-weight: 600;
	color: var(--primary_color, #0e332e);
	margin-bottom: 4px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.nebra-h5-search__dropdown .search-meta .price {
	font-size: 13px;
	font-weight: 700;
	color: var(--primary_color, #0e332e);
}

.nebra-h5-search__ajax {
	color: var(--primary_color, #0e332e);
}

.nebra-h5-search__submit {
	border: 0;
	background: transparent;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 8px;
	min-width: 40px;
	height: 40px;
	border-radius: 8px;
	color: #6a6a6a;
	transition: background 0.2s var(--nebra-h5-ease), color 0.2s var(--nebra-h5-ease);
}

.nebra-h5-search__submit:hover {
	background: rgba(14, 51, 46, 0.06);
	color: var(--nebra-h5-green);
}

.nebra-h5-search__submit:focus-visible {
	outline: 2px solid var(--nebra-h5-green);
	outline-offset: 1px;
}

.nebra-h5-search__input {
	flex: 1;
	border: 0;
	outline: none;
	font-size: 15px;
	min-width: 0;
	color: #1a1a1a;
	background: transparent;
	font-weight: 500;
}

.nebra-h5-search__input::placeholder {
	color: #9a9a9a;
	font-weight: 400;
}

.nebra-h5-utils {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: clamp(8px, 1.5vw, 20px);
	flex-wrap: wrap;
}

.nebra-h5-lang {
	color: rgba(255, 255, 255, 0.92);
	font-weight: 600;
	font-size: 13px;
	text-decoration: none;
	white-space: nowrap;
	padding: 8px 12px;
	border-radius: 999px;
	transition: background 0.22s var(--nebra-h5-ease), color 0.2s;
}

.nebra-h5-lang:hover {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
}

.nebra-h5-utils__geo .gsw-dropdown-toggle {
	background: rgba(255, 255, 255, 0.1) !important;
	color: #fff !important;
	border: 1px solid rgba(255, 255, 255, 0.22) !important;
	border-radius: 999px !important;
	padding: 6px 12px !important;
	transition: background 0.22s var(--nebra-h5-ease), border-color 0.22s !important;
}

.nebra-h5-utils__geo .gsw-dropdown-toggle:hover {
	background: rgba(255, 255, 255, 0.16) !important;
	border-color: rgba(255, 255, 255, 0.35) !important;
}

.nebra-h5-branch {
	border: 1px solid rgba(255, 255, 255, 0.28);
	background: transparent;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	padding: 8px 14px;
	border-radius: 999px;
	cursor: pointer;
	transition: background 0.22s var(--nebra-h5-ease), border-color 0.22s;
}

.nebra-h5-branch:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.45);
}

.nebra-h5-cart.cart-contents.header-icon {
	position: relative;
	cursor: pointer;
	padding: 0;
	border-radius: 10px;
	transition: background 0.22s var(--nebra-h5-ease);
}

.nebra-h5-cart.cart-contents.header-icon:hover {
	background: rgba(255, 255, 255, 0.08);
}

.nebra-h5-cart.cart-contents.header-icon:focus-within {
	outline: 2px solid rgba(255, 255, 255, 0.45);
	outline-offset: 2px;
}

/* Cart count badge — same idea as header v3 (.header-icons .js-cart-count). */
.nebra-h5-cart__count {
	position: absolute;
	top: -7px;
	inset-inline-start: -8px;
	min-width: 17px;
	height: 17px;
	padding: 0 4px;
	border-radius: 20px;
	background: var(--primary_color);
	color: var(--primary_text_color);
	font-size: 11px;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

@media (max-width: 900px) {
	.nebra-h5-utility__inner > .header-icons.start {
		display: flex;
	}

	.nebra-h5-search-wrap {
		display: none;
	}

	.nebra-h5-brand {
		justify-content: center;
	}

	.nebra-h5-utils {
		gap: 6px;
	}
}

@supports not (color: color-mix(in srgb, red, blue)) {
	.nebra-h5-utility.is-scrolled {
		background: #0a2c27;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nebra-h5-utility,
	.nebra-h5-search-wrap,
	.nebra-h5-search,
	.nebra-h5-icon-btn {
		transition: none !important;
	}
}
