/* MedLab Site Header */

:root {
	--mlh-login-bg: #f58220;
	--mlh-login-bg-hover: #e07010;
	--mlh-login-color: #1a1a1a;
	--mlh-login-color-hover: #1a1a1a;
	--mlh-cart-bg: #6fae2e;
	--mlh-cart-bg-hover: #5f9628;
	--mlh-top-bar-bg: #ffffff;
	--mlh-top-bar-text: #004a73;
	--mlh-top-bar-border: #e6eef3;
	--mlh-bottom-bar-bg: #f3f5f7;
	--mlh-bottom-bar-text: #374151;
	--mlh-bottom-bar-border: #e5e7eb;
	--mlh-top-scroll-bg: #ffffff;
	--mlh-top-scroll-text: #004a73;
	--mlh-top-scroll-border: #d6e4ee;
	--mlh-bottom-scroll-bg: #ffffff;
	--mlh-bottom-scroll-text: #004a73;
	--mlh-bottom-scroll-border: #d6e4ee;
	--mlh-bottom-scroll-opacity: 0.6;
	--mlh-scroll-opacity: 0.6;
}

body.medlab-ss-has-header {
	--mlh-header-height: 128px;
}

body.medlab-ss-has-header #site-header {
	display: none !important;
}

.mlh-header {
	position: relative;
	z-index: 999;
	width: 100%;
	background: transparent;
	border-bottom: none;
}

.mlh-header--split-scroll {
	position: relative;
}

/* Two distinct containers */
.mlh-header__bar {
	width: 100%;
	transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease, opacity 0.28s ease, max-height 0.32s ease, transform 0.28s ease, box-shadow 0.3s ease;
}

.mlh-header__bar--top {
	--mlh-bar-bg: var(--mlh-top-bar-bg);
	--mlh-bar-text: var(--mlh-top-bar-text);
	--mlh-bar-border: var(--mlh-top-bar-border);
	background: var(--mlh-bar-bg);
	color: var(--mlh-bar-text);
	border-bottom: 1px solid var(--mlh-bar-border);
	overflow: hidden;
	max-height: 220px;
}

.mlh-header.is-scrolled .mlh-header__bar--top:not(.is-bar-hidden) {
	--mlh-bar-bg: var(--mlh-top-scroll-bg);
	--mlh-bar-text: var(--mlh-top-scroll-text);
	--mlh-bar-border: var(--mlh-top-scroll-border);
}

.mlh-header__bar--top.is-bar-hidden {
	max-height: 0;
	opacity: 0;
	border-bottom-width: 0;
	pointer-events: none;
}

.mlh-header__bar--bottom {
	--mlh-bar-bg: var(--mlh-bottom-bar-bg);
	--mlh-bar-text: var(--mlh-bottom-bar-text);
	--mlh-bar-border: var(--mlh-bottom-bar-border);
	background: var(--mlh-bar-bg);
	color: var(--mlh-bar-text);
	border-bottom: 1px solid var(--mlh-bar-border);
	z-index: 1000;
}

.mlh-header__bar--bottom.is-bar-pinned {
	--mlh-bar-bg: var(--mlh-bottom-scroll-bg);
	--mlh-bar-text: var(--mlh-bottom-scroll-text);
	--mlh-bar-border: var(--mlh-bottom-scroll-border);
	background: var(--mlh-bar-bg);
	color: var(--mlh-bar-text);
	border-color: var(--mlh-bar-border);
}

.mlh-header__bar--bottom.is-bar-pinned.is-bar-sticky {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	border-bottom: 1px solid var(--mlh-bar-border);
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.mlh-header__bar--bottom.is-bar-pinned.is-bar-floating {
	position: fixed;
	top: 16px;
	left: 16px;
	right: 16px;
	width: auto;
	border-radius: 16px;
	overflow: hidden;
	border: 1px solid var(--mlh-bar-border);
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.mlh-header__inner {
	display: flex;
	align-items: center;
	gap: 20px;
	max-width: 1320px;
	margin: 0 auto;
	padding: 14px 24px;
}

.mlh-header__inner--top {
	justify-content: space-between;
	padding-top: 12px;
	padding-bottom: 12px;
}

.mlh-header__inner--bottom {
	justify-content: space-between;
	gap: 16px;
	padding-top: 10px;
	padding-bottom: 10px;
}

.mlh-header__brand {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: inherit;
	flex-shrink: 0;
}

.mlh-header__logo {
	width: 48px;
	height: 48px;
	object-fit: contain;
}

.mlh-header__brand-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.mlh-header__site-name {
	font-size: 1.15rem;
	font-weight: 700;
	color: inherit;
	line-height: 1.3;
}

.mlh-header__tagline {
	font-size: 0.72rem;
	color: color-mix(in srgb, currentColor 55%, #9ca3af);
	line-height: 1.4;
}

.mlh-header__nav {
	flex: 1;
	min-width: 0;
}

.mlh-header__menu {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 0;
	list-style: none;
	margin: 0;
	padding: 0;
	flex-wrap: wrap;
}

.mlh-header__menu > li {
	position: relative;
}

.mlh-header__menu > li + li {
	border-inline-start: 1px solid #d1d5db;
}

.mlh-header__menu > li > a {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 18px;
	text-decoration: none;
	color: inherit;
	font-size: 0.92rem;
	font-weight: 500;
	white-space: nowrap;
	transition: color 0.2s ease;
}

.mlh-header__menu > li > a:hover {
	color: color-mix(in srgb, currentColor 70%, #000);
}

.mlh-header__menu > li.menu-item-has-children > a {
	cursor: pointer;
}

.mlh-header__menu > li.menu-item-has-children > a::after {
	content: '';
	display: inline-block;
	width: 6px;
	height: 6px;
	margin-inline-start: 2px;
	border-inline-end: 2px solid currentColor;
	border-block-end: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
	opacity: 0.7;
}

.mlh-header__menu > li.menu-item-has-children.is-open > a {
	color: #111827;
	background: rgba(0, 0, 0, 0.04);
	border-radius: 8px;
}

.mlh-header__menu > li.menu-item-has-children.is-open > a::after {
	transform: rotate(-135deg);
}

.mlh-header__menu .sub-menu {
	display: none;
	list-style: none;
	margin: 0;
	padding: 8px 0;
	position: absolute;
	top: calc(100% + 6px);
	inset-inline-end: 0;
	min-width: 220px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
	z-index: 1000;
}

.mlh-header__menu > li.is-open > .sub-menu {
	display: block;
}

.mlh-header__menu .sub-menu li {
	border: none;
}

.mlh-header__menu .sub-menu a {
	display: block;
	padding: 10px 18px;
	text-decoration: none;
	color: #374151;
	font-size: 0.88rem;
	font-weight: 500;
	white-space: nowrap;
	transition: background 0.2s ease, color 0.2s ease;
}

.mlh-header__menu .sub-menu a:hover {
	background: #f3f4f6;
	color: #111827;
}

.mlh-header__actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

.mlh-header__consult {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: inherit;
}

.mlh-header__consult-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(0, 112, 173, 0.12);
	color: #0070ad;
}

.mlh-header__consult-text {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
}

.mlh-header__consult-text small {
	font-size: 0.72rem;
	color: color-mix(in srgb, var(--mlh-top-bar-text) 55%, #9ca3af);
}

.mlh-header__consult-text strong {
	font-size: 0.88rem;
	color: var(--mlh-top-bar-text);
	direction: ltr;
	text-align: end;
}

.mlh-header__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 16px;
	border: 0 !important;
	border-radius: 10px;
	text-decoration: none;
	font-size: 0.88rem;
	font-weight: 600;
	transition: background 0.25s ease, color 0.25s ease, transform 0.15s ease;
	white-space: nowrap;
	-webkit-appearance: none;
	appearance: none;
	box-shadow: none !important;
	outline: none;
}

.mlh-header__btn--login,
.mlh-header button.mlh-header__btn--login,
.mlh-header a.mlh-header__btn--login {
	background: var(--mlh-login-bg) !important;
	color: var(--mlh-login-color) !important;
	border: 0 !important;
	cursor: pointer;
	font-family: inherit;
}

.mlh-header__btn--login:hover,
.mlh-header__btn--login:focus,
.mlh-header__btn--login:active,
.mlh-header__account.is-open .mlh-header__btn--login,
.mlh-header button.mlh-header__btn--login:hover,
.mlh-header button.mlh-header__btn--login:focus,
.mlh-header button.mlh-header__btn--login:active,
.mlh-header a.mlh-header__btn--login:hover,
.mlh-header a.mlh-header__btn--login:focus {
	background: var(--mlh-login-bg-hover) !important;
	color: var(--mlh-login-color-hover) !important;
}

.mlh-header__btn--login svg {
	fill: currentColor;
	color: inherit;
}

.mlh-header__account {
	position: relative;
}

.mlh-header__btn--account {
	max-width: min(260px, 42vw);
}

.mlh-header__account-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 180px;
	color: inherit;
}

.mlh-header__account-caret {
	flex-shrink: 0;
	opacity: 0.85;
	color: inherit;
	transition: transform 0.2s ease;
}

.mlh-header__account.is-open .mlh-header__account-caret {
	transform: rotate(180deg);
}

.mlh-header__account-menu {
	position: absolute;
	top: calc(100% + 8px);
	inset-inline-end: 0;
	min-width: 200px;
	padding: 6px;
	border-radius: 12px;
	background: #fff;
	border: 1px solid rgba(0, 74, 115, 0.1);
	box-shadow: 0 12px 32px rgba(16, 40, 60, 0.14);
	z-index: 100;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.mlh-header__account-menu[hidden] {
	display: none !important;
}

.mlh-header__account-item {
	display: block;
	padding: 10px 12px;
	border-radius: 8px;
	color: #234a5c;
	text-decoration: none;
	font-size: 0.88rem;
	font-weight: 600;
	white-space: nowrap;
	transition: background 0.15s ease, color 0.15s ease;
}

.mlh-header__account-item:hover {
	background: #edf4f8;
	color: #004a73;
}

.mlh-header__account-item--logout {
	color: #b42318;
}

.mlh-header__account-item--logout:hover {
	background: #fef3f2;
	color: #912018;
}

.mlh-header__btn--cart {
	background: var(--mlh-cart-bg);
	color: #fff;
	padding-inline: 14px;
}

.mlh-header__btn--cart:hover {
	background: var(--mlh-cart-bg-hover);
}

.mlh-header__cart-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	padding-inline-start: 8px;
	border-inline-start: 1px solid rgba(255, 255, 255, 0.35);
	font-weight: 700;
}

.mlh-header__toggle {
	display: none !important;
	flex-direction: row;
	justify-content: center;
	align-items: center;
	gap: 8px;
	width: auto;
	min-width: 42px;
	height: 42px;
	padding: 8px 12px;
	margin: 0;
	border: 0 !important;
	outline: none;
	box-shadow: none;
	background: transparent;
	color: #ffffff;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	font: inherit;
	line-height: 1;
}

.mlh-header__toggle:focus,
.mlh-header__toggle:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.mlh-header__toggle-icon {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 22px;
	flex-shrink: 0;
}

.mlh-header__toggle-icon span {
	display: block;
	width: 100%;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
	transition: background 0.25s ease, transform 0.25s ease;
}

.mlh-header__toggle-label {
	display: none;
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0;
	white-space: nowrap;
	color: currentColor;
}

/* Bottom bar (dark teal at rest): white hamburger */
.mlh-header__bar--bottom .mlh-header__toggle {
	color: #ffffff;
}

/* Floating / sticky scrolled bar: site blue */
.mlh-header__bar--bottom.is-bar-pinned .mlh-header__toggle {
	color: var(--mlh-bottom-scroll-text, #004a73);
}

/* Top bar: follow bar text color */
.mlh-header__bar--top .mlh-header__toggle {
	color: var(--mlh-bar-text, #004a73);
}

.mlh-header__mobile {
	display: none;
	padding: 0 24px 16px;
	background: #f3f5f7;
}

.mlh-header__mobile-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mlh-header__mobile-menu > li {
	border-bottom: 1px solid #e5e7eb;
}

.mlh-header__mobile-menu a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 12px 0;
	text-decoration: none;
	color: #374151;
}

.mlh-header__mobile-menu .menu-item-has-children > a::after {
	content: '';
	display: inline-block;
	width: 6px;
	height: 6px;
	flex-shrink: 0;
	border-inline-end: 2px solid currentColor;
	border-block-end: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
	opacity: 0.7;
}

.mlh-header__mobile-menu .menu-item-has-children.is-open > a::after {
	transform: rotate(-135deg);
}

.mlh-header__mobile-menu .sub-menu {
	display: none;
	list-style: none;
	margin: 0;
	padding: 0 0 8px;
	padding-inline-start: 16px;
}

.mlh-header__mobile-menu li.is-open > .sub-menu {
	display: block;
}

.mlh-header__mobile-menu .sub-menu a {
	padding: 10px 0;
	font-size: 0.9rem;
	color: #6b7280;
}

.mlh-header__mobile-menu .sub-menu a::after {
	display: none;
}

/* Scroll states — glass + scroll colors on pinned bottom bar */
.mlh-header--glass.is-scrolled .mlh-header__bar--bottom.is-bar-pinned {
	backdrop-filter: blur(14px) saturate(1.15);
	-webkit-backdrop-filter: blur(14px) saturate(1.15);
	background: color-mix(in srgb, var(--mlh-bottom-scroll-bg) calc(var(--mlh-bottom-scroll-opacity) * 100%), transparent);
	color: var(--mlh-bottom-scroll-text);
	border-color: var(--mlh-bottom-scroll-border);
}

.mlh-header--solid.is-scrolled .mlh-header__bar--bottom.is-bar-pinned {
	background: var(--mlh-bottom-scroll-bg);
	color: var(--mlh-bottom-scroll-text);
	border-color: var(--mlh-bottom-scroll-border);
}

.mlh-header-spacer {
	height: 0;
	pointer-events: none;
}

@media (max-width: 1100px) {
	.mlh-header__nav {
		display: none;
	}

	.mlh-header__toggle {
		display: inline-flex !important;
		flex: 0 0 auto;
		align-self: center;
		width: max-content;
		max-width: max-content;
		min-width: 0;
		height: auto;
		min-height: 40px;
		padding: 0.45em 0.85em;
		gap: 0.45em;
	}

	.mlh-header__toggle-label {
		display: inline-block;
	}

	.mlh-header__bar--bottom {
		min-height: 52px;
	}

	.mlh-header__inner--bottom {
		justify-content: flex-start;
		min-height: 44px;
	}

	.mlh-header__mobile:not([hidden]) {
		display: block;
	}
}

@media (max-width: 640px) {
	.mlh-header__inner {
		padding: 10px 16px;
		gap: 10px;
	}

	.mlh-header__tagline {
		display: none;
	}

	.mlh-header__btn span:not(.mlh-header__cart-count):not(.mlh-header__account-name) {
		display: none;
	}

	.mlh-header__account-name {
		display: inline-block;
		max-width: 110px;
	}

	.mlh-header__consult-text small {
		display: none;
	}

	.mlh-header__site-name {
		font-size: 1rem;
	}

	.mlh-header__logo {
		width: 40px;
		height: 40px;
	}

	.mlh-header__bar--bottom.is-bar-pinned.is-bar-floating {
		left: 8px;
		right: 8px;
		top: 8px;
	}
}
