/*
 * Innovea Header Menu — mobile-first base styles.
 * Small screens get the compact bar (icons + menu button) first.
 * The full menu row is switched on per widget from the breakpoint chosen in
 * "Responsive & mobile menu" (a small scoped <style> printed by the widget).
 * Everything visual can be overridden from the widget's Style tab.
 */

.ihm {
	--ihm-z: 9999;
	--ihm-dur: 300ms;
	--ihm-trans: 0.2s;
	--ihm-panel-top: 0px;
	--ihm-overlay: rgba(26, 31, 26, 0.35);
	position: relative;
	display: block;
	width: 100%;
}

/* Screen-reader-only text */
.ihm .ihm-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Bar ---------- */
.ihm__bar {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: nowrap;
	gap: 16px;
	box-sizing: border-box;
}

.ihm__menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ihm__menu li {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Desktop row: hidden on small screens first */
.ihm__menu--bar {
	display: none;
	align-items: center;
	flex-wrap: nowrap;
	gap: 20px;
}

.ihm__link {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	color: inherit;
	cursor: pointer;
	box-sizing: border-box;
	transition: color var(--ihm-trans) ease, background-color var(--ihm-trans) ease,
		border-color var(--ihm-trans) ease, box-shadow var(--ihm-trans) ease,
		transform var(--ihm-trans) ease, opacity var(--ihm-trans) ease;
}

.ihm__link:hover,
.ihm__link:focus {
	text-decoration: none;
}

.ihm__text {
	white-space: nowrap;
}

.ihm__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	flex: 0 0 auto;
	transition: color var(--ihm-trans) ease, transform var(--ihm-trans) ease, fill var(--ihm-trans) ease;
}

.ihm__icon svg,
.ihm__toggle-icon svg,
.ihm__close svg,
.ihm .e-font-icon-svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
	display: block;
}

.ihm__icon i {
	display: block;
	line-height: 1;
}

/* Pointer (underline / overline) on the desktop row */
.ihm--pointer-underline .ihm__menu--bar .ihm__link::after,
.ihm--pointer-overline .ihm__menu--bar .ihm__link::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: 2px;
	background-color: currentColor;
	transform: scaleX(0);
	transform-origin: center;
	transition: transform var(--ihm-trans) ease, background-color var(--ihm-trans) ease;
	pointer-events: none;
}

.ihm--pointer-underline .ihm__menu--bar .ihm__link::after {
	bottom: 0;
}

.ihm--pointer-overline .ihm__menu--bar .ihm__link::after {
	top: 0;
}

.ihm--pointer-underline .ihm__menu--bar .ihm__link:hover::after,
.ihm--pointer-underline .ihm__menu--bar .ihm__link:focus-visible::after,
.ihm--pointer-underline .ihm__menu--bar .ihm__link.is-active::after,
.ihm--pointer-overline .ihm__menu--bar .ihm__link:hover::after,
.ihm--pointer-overline .ihm__menu--bar .ihm__link:focus-visible::after,
.ihm--pointer-overline .ihm__menu--bar .ihm__link.is-active::after {
	transform: scaleX(1);
}

.ihm--pointer-from-left .ihm__menu--bar .ihm__link::after {
	transform-origin: left;
}

/* Divider between menu and icons (only on the full row) */
.ihm__divider {
	display: none;
	flex: 0 0 auto;
	align-self: center;
	width: 1px;
	height: 20px;
	background-color: currentColor;
	opacity: 0.3;
}

/* ---------- Cart & account ---------- */
.ihm__utils {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
}

.ihm--utils-hide-mobile .ihm__utils {
	display: none;
}

.ihm__util {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	text-decoration: none;
	color: inherit;
	line-height: 1;
	box-sizing: border-box;
	transition: color var(--ihm-trans) ease, background-color var(--ihm-trans) ease,
		border-color var(--ihm-trans) ease, box-shadow var(--ihm-trans) ease,
		transform var(--ihm-trans) ease;
}

.ihm__util:hover,
.ihm__util:focus {
	text-decoration: none;
}

.ihm__util-text {
	white-space: nowrap;
}

.ihm__badge {
	position: absolute;
	top: 0;
	right: 0;
	transform: translate(35%, -35%);
	box-sizing: border-box;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	line-height: 18px;
	text-align: center;
	color: #ffffff;
	background-color: #2d5a3e;
	pointer-events: none;
}

.ihm--badge-hide-empty .ihm__badge[data-count="0"] {
	display: none;
}

/* ---------- Menu button ---------- */
.ihm__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	margin: 0;
	padding: 8px;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: inherit;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	box-shadow: none;
	transition: color var(--ihm-trans) ease, background-color var(--ihm-trans) ease,
		border-color var(--ihm-trans) ease, box-shadow var(--ihm-trans) ease,
		transform var(--ihm-trans) ease;
}

.ihm__toggle:hover,
.ihm__toggle:focus {
	background: transparent;
	color: inherit;
}

.ihm__toggle-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.ihm__toggle-icon--close {
	display: none;
}

.ihm.is-open .ihm__toggle-icon--open {
	display: none;
}

.ihm.is-open .ihm__toggle-icon--close {
	display: inline-flex;
}

.ihm--toggle-start .ihm__toggle {
	order: -1;
}

/* ---------- Panel ---------- */
.ihm__overlay {
	position: fixed;
	inset: 0;
	z-index: calc(var(--ihm-z) - 1);
	background-color: var(--ihm-overlay);
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--ihm-dur) ease, visibility 0s linear var(--ihm-dur);
}

.ihm--panel-dropdown .ihm__overlay {
	top: var(--ihm-panel-top);
}

.ihm.is-open .ihm__overlay {
	opacity: 1;
	visibility: visible;
	transition-delay: 0s;
}

.ihm__panel {
	position: fixed;
	z-index: var(--ihm-z);
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	background-color: #ffffff;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	opacity: 0;
	visibility: hidden;
	transition: transform var(--ihm-dur) ease, opacity var(--ihm-dur) ease, visibility 0s linear var(--ihm-dur);
}

.ihm.is-open .ihm__panel {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition-delay: 0s;
}

/* Dropdown: full width, right under the header row */
.ihm--panel-dropdown .ihm__panel {
	top: var(--ihm-panel-top);
	left: 0;
	right: 0;
	max-height: calc(100vh - var(--ihm-panel-top));
	max-height: calc(100dvh - var(--ihm-panel-top));
	padding: 8px 0 16px;
	box-shadow: 0 16px 24px -12px rgba(0, 0, 0, 0.12);
}

.ihm--panel-dropdown.ihm--anim-slide .ihm__panel {
	transform: translateY(-12px);
}

/* Slide-in panel */
.ihm--panel-offcanvas .ihm__panel {
	top: var(--wp-admin--admin-bar--height, 0px);
	bottom: 0;
	right: 0;
	width: 320px;
	max-width: 90vw;
	padding: 16px 0 24px;
	box-shadow: -12px 0 32px rgba(0, 0, 0, 0.12);
}

.ihm--panel-offcanvas.ihm--anim-slide .ihm__panel {
	transform: translateX(100%);
}

.ihm--panel-offcanvas.ihm--side-left .ihm__panel {
	right: auto;
	left: 0;
	box-shadow: 12px 0 32px rgba(0, 0, 0, 0.12);
}

.ihm--panel-offcanvas.ihm--side-left.ihm--anim-slide .ihm__panel {
	transform: translateX(-100%);
}

.ihm.is-open .ihm__panel,
.ihm.is-open.ihm--anim-slide .ihm__panel,
.ihm.is-open.ihm--panel-offcanvas.ihm--side-left.ihm--anim-slide .ihm__panel {
	transform: none;
}

.ihm__panel-head {
	display: flex;
	justify-content: flex-end;
	padding: 0 16px 8px;
}

.ihm__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 8px;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: color var(--ihm-trans) ease, background-color var(--ihm-trans) ease, transform var(--ihm-trans) ease;
}

.ihm__close:hover,
.ihm__close:focus {
	background: transparent;
	color: inherit;
}

.ihm__menu--panel {
	display: flex;
	flex-direction: column;
}

.ihm__menu--panel .ihm__link {
	display: flex;
	width: 100%;
	justify-content: flex-start;
	padding: 14px 24px;
}

.ihm__menu--panel li + li .ihm__link {
	border-top: 0 solid transparent;
}

html.ihm-lock,
html.ihm-lock body {
	overflow: hidden;
}

/* ---------- Hover effects (icons, items, menu button) ---------- */
.ihm-hover-grow:hover { transform: scale(1.1); }
.ihm-hover-shrink:hover { transform: scale(0.92); }
.ihm-hover-float:hover { transform: translateY(-3px); }
.ihm-hover-sink:hover { transform: translateY(3px); }
.ihm-hover-rotate:hover { transform: rotate(-8deg); }
.ihm-hover-grow-rotate:hover { transform: scale(1.1) rotate(4deg); }

@media (prefers-reduced-motion: reduce) {
	.ihm,
	.ihm * {
		--ihm-dur: 0ms;
		--ihm-trans: 0s;
	}
	.ihm [class*="ihm-hover-"]:hover {
		transform: none;
	}
}
