/*
 * Header — matches the live site www.bmagniv.co.il (measured 18.10.2026).
 * Replaces header-base.css, navigation.css, announcement.css, logo.css.
 * Desktop ≥1025px, mobile ≤1024px (same breakpoint as the live site).
 */

.bmh-header,
.bmh-announce {
	--bmh-ink: #1F1530;        /* dark text */
	--bmh-violet: #6B21A8;     /* buttons, search border, active links */
	--bmh-violet-d: #4C1D95;   /* chip text */
	--bmh-lav: #F6F0FC;        /* light lavender backgrounds */
	--bmh-lav-2: #F5EFFC;
	--bmh-line: #EEE8F5;       /* separators */
	--bmh-line-2: #E4D7F3;
	--bmh-pink-bar: #FAE9FB;   /* announcement bar */
	--bmh-hover: #FEBD69;      /* menu hover text */
	--bmh-hover-line: #F89127; /* menu hover underline */
	--bmh-badge: #EC4899;
}

/* ---------- Announcement bar ---------- */
.bmh-announce {
	background: var(--bmh-pink-bar);
	color: var(--bmh-violet);
	text-align: center;
	padding: 9px 16px;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.5;
}
.bmh-announce p { margin: 0; }

/* ---------- Header shell ---------- */
.bmh-header-wrap { position: relative; z-index: 9990; }
.bmh-header {
	background: #fff;
	color: var(--bmh-ink);
	position: relative;
	z-index: 9990;
}
.bmh-header a,
.bmh-header a:hover,
.bmh-header a:focus { text-decoration: none; }
.bmh-header button { font-family: inherit; }
.bmh-header svg { display: block; }

.bmh-hdr-in {
	max-width: 1140px;
	margin: 0 auto;
	display: grid;
	align-items: center;
}

/* Logo */
.bmh-logo { grid-area: logo; display: block; line-height: 0; }
.bmh-logo-img { display: block; height: 78px; width: auto; max-width: none; }

/* "רוצים להגיע אלינו?" */
.bmh-arr-btn {
	grid-area: arr;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 40px;
	padding: 0 18px;
	border: 1.5px solid var(--bmh-violet);
	border-radius: 999px;
	color: var(--bmh-violet);
	background: #fff;
	font-weight: 600;
	font-size: 15px;
	white-space: nowrap;
	transition: background .2s, color .2s;
}
.bmh-arr-btn:hover { background: var(--bmh-violet); color: #fff; }
.bmh-arr-btn svg { width: 17px; height: 17px; }

/* Text links: מי אנחנו | יצירת קשר | מעקב הזמנה */
.bmh-hdr-links {
	grid-area: links;
	display: inline-flex;
	align-items: center;
	justify-self: end;
	gap: 10px;
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
}
.bmh-hdr-links a { color: var(--bmh-ink); }
.bmh-hdr-links a:hover { color: var(--bmh-violet); }
.bmh-hdr-links i { width: 1px; height: 14px; background: #D9CDEA; display: inline-block; }

/* ---------- Search ---------- */
.bmh-hs { grid-area: search; position: relative; width: 100%; }
.bmh-search-form { position: relative; margin: 0; }
.bmh-hs input[type="search"],
.bmh-hs input[name="s"] {
	width: 100%;
	height: 46px;
	margin: 0;
	padding: 0 18px 0 52px;
	border: 1px solid var(--bmh-violet) !important;
	border-radius: 999px !important;
	background: #fff !important;
	box-shadow: 0 2px 10px rgba(107, 33, 168, .08);
	color: #000;
	font-family: inherit;
	font-size: 15px;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}
.bmh-hs input[type="search"]:focus { box-shadow: 0 0 0 3px rgba(107, 33, 168, .15); }
.bmh-hs input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.bmh-header .bmh-search-submit {
	position: absolute;
	top: 50%;
	left: 6px;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--bmh-violet);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
}
.bmh-header .bmh-search-submit svg { width: 22px; height: 22px; }
.bmh-hs .desktop-search-results { top: calc(100% + 8px); border-radius: 14px; }

/* FiboSearch inside our wrapper: only the visual shell, the plugin keeps its logic */
.bmh-hs .dgwt-wcas-search-wrapp { max-width: none !important; min-width: 0 !important; margin: 0 !important; }
.bmh-hs .dgwt-wcas-sf-wrapp { background: transparent !important; padding: 0 !important; }
.bmh-hs .dgwt-wcas-search-submit { left: 6px !important; right: auto !important; background: transparent !important; color: var(--bmh-violet) !important; }
.bmh-hs .dgwt-wcas-search-submit path { fill: var(--bmh-violet) !important; }

/* Popular searches (on focus, empty field) */
.bmh-pop {
	display: none;
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	left: 0;
	z-index: 10000;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 14px 40px rgba(31, 21, 48, .14);
	padding: 14px;
	flex-wrap: wrap;
	gap: 8px;
}
.bmh-pop.on { display: flex; }
.bmh-pop b { width: 100%; font-size: 13px; color: #8A7F99; font-weight: 600; }
.bmh-pop a {
	background: var(--bmh-lav);
	color: var(--bmh-violet-d);
	border-radius: 999px;
	padding: 7px 13px;
	font-size: 14px;
	font-weight: 600;
}
.bmh-pop a:hover { background: var(--bmh-violet); color: #fff; }

/* ---------- Icons ---------- */
.bmh-hdr-ic { grid-area: icons; display: flex; align-items: center; gap: 18px; justify-self: end; }
.bmh-header .bmh-ic-btn {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: var(--bmh-ink);
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}
.bmh-header .bmh-ic-btn svg { width: 24px; height: 24px; }
.bmh-header .bmh-ic-search { display: none; }
.bmh-header .bmh-lbl { display: none; }

.bmh-header .cart-badge,
.bmh-header .wishlist-badge {
	position: absolute;
	top: -8px;
	left: auto;
	right: -10px;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border: 0;
	border-radius: 9px;
	box-shadow: none;
	background: var(--bmh-badge);
	color: #fff;
	font-size: 11px;
	font-weight: 800;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ---------- Main menu ---------- */
.bmh-nav { grid-area: nav; }
.bmh-menu, .bmh-menu ul, .bmh-nav-extra { list-style: none; margin: 0; padding: 0; }
.bmh-menu li { position: relative; }
.bmh-menu a { color: #000; }
.bmh-header .bmh-sub-tg {
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	color: inherit;
	display: flex;
	align-items: center;
	justify-content: center;
}
.bmh-header .bmh-sub-tg:hover,
.bmh-header .bmh-sub-tg:focus { background: transparent; color: inherit; }
.bmh-header .bmh-search-submit:hover,
.bmh-header .bmh-search-submit:focus { background: transparent; color: var(--bmh-violet); }
.bmh-header .bmh-sub-tg svg { width: 10px; height: 6px; fill: currentColor; transition: transform .2s; }

/* ---------- Mobile chips ---------- */
.bmh-chips-w { grid-area: chips; position: relative; display: none; }
.bmh-chips {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding: 2px 12px 12px;
	scrollbar-width: none;
	-webkit-mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent);
	mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent);
}
.bmh-chips::-webkit-scrollbar { display: none; }
.bmh-chips.at-end { -webkit-mask-image: none; mask-image: none; }
.bmh-chips a {
	flex: 0 0 auto;
	background: var(--bmh-lav-2);
	color: var(--bmh-violet-d);
	border-radius: 999px;
	padding: 8px 14px;
	font-size: 14px;
	font-weight: 600;
	line-height: 21px;
	white-space: nowrap;
}
.bmh-chips a.is-dark { background: var(--bmh-ink); color: #fff; }
.bmh-header .bmh-chips-arr {
	position: absolute;
	left: 10px;
	top: calc(50% - 5px);
	transform: translateY(-50%);
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #fff;
	border: 1px solid #EADFF7;
	color: var(--bmh-violet);
	box-shadow: 0 3px 10px rgba(31, 21, 48, .18);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	cursor: pointer;
	z-index: 2;
}
.bmh-header .bmh-chips-arr svg { width: 16px; height: 16px; }
.bmh-chips.at-end + .bmh-chips-arr { display: none; }

/* ======================================================
   DESKTOP ≥1025px
   ====================================================== */
@media (min-width: 1025px) {
	.bmh-hdr-in {
		grid-template-columns: auto auto minmax(280px, 416px) 1fr auto;
		grid-template-areas:
			"logo arr search links icons"
			"nav  nav nav    nav   nav";
		column-gap: 28px;
		padding: 10px 16px 0;
	}
	.bmh-header .bmh-menu-btn,
	.bmh-nav-extra { display: none; }

	.bmh-nav {
		margin-top: 10px;
		border-top: 1px solid transparent;
		/* full-width line without causing horizontal scroll */
		border-image: linear-gradient(var(--bmh-line), var(--bmh-line)) 1 0 0 0 / 1px 0 0 0 / 0 100vw;
		padding: 8px 0 10px;
	}
	.bmh-menu { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; }
	.bmh-menu > li { display: flex; align-items: center; }
	.bmh-menu > li + li::before {
		content: "";
		width: 2px;
		height: 16px;
		background: #000;
		margin: 0 2px;
	}
	.bmh-menu > li > a {
		position: relative;
		display: block;
		padding: 13px 14px;
		font-size: 16px;
		font-weight: 600;
		color: #000;
		transition: color .15s;
	}
	.bmh-menu > li > a::after {
		content: "";
		position: absolute;
		right: 14px;
		left: 14px;
		bottom: 6px;
		height: 3px;
		background: var(--bmh-hover-line);
		opacity: 0;
		transform: scaleX(.6);
		transition: opacity .2s, transform .2s;
	}
	.bmh-menu > li:hover > a,
	.bmh-menu > li:focus-within > a,
	.bmh-menu > li.current-menu-item > a,
	.bmh-menu > li.current-menu-ancestor > a { color: var(--bmh-hover); }
	.bmh-menu > li:hover > a::after,
	.bmh-menu > li:focus-within > a::after,
	.bmh-menu > li.current-menu-item > a::after,
	.bmh-menu > li.current-menu-ancestor > a::after { opacity: 1; transform: none; }
	.bmh-menu > li > .bmh-sub-tg { margin-inline-start: -8px; padding: 6px 4px; }
	.bmh-menu > li:hover > .bmh-sub-tg { color: var(--bmh-hover); }

	/* Dropdowns */
	.bmh-menu .sub-menu {
		position: absolute;
		top: 100%;
		right: 0;
		min-width: 230px;
		margin-top: 6px;
		padding: 10px;
		background: #fff;
		border-radius: 14px;
		box-shadow: 0 14px 40px rgba(31, 21, 48, .14);
		opacity: 0;
		visibility: hidden;
		transform: translateY(6px);
		transition: opacity .15s, transform .15s, visibility .15s;
		z-index: 10001;
	}
	.bmh-menu .sub-menu::before { /* hover bridge */
		content: "";
		position: absolute;
		top: -12px;
		right: 0;
		left: 0;
		height: 12px;
	}
	.bmh-menu .sub-menu .sub-menu { top: -10px; right: 100%; margin: 0 4px 0 0; }
	.bmh-menu .sub-menu .sub-menu::before { top: 0; bottom: 0; height: auto; right: -8px; left: auto; width: 8px; }
	.bmh-menu li:hover > .sub-menu,
	.bmh-menu li:focus-within > .sub-menu,
	.bmh-menu li.is-open > .sub-menu { opacity: 1; visibility: visible; transform: none; }

	.bmh-menu .sub-menu li { display: flex; align-items: center; }
	.bmh-menu .sub-menu a {
		flex: 1;
		display: block;
		padding: 10px 14px;
		border-radius: 9px;
		font-size: 15px;
		font-weight: 600;
		color: var(--bmh-ink);
		white-space: nowrap;
		transition: background .15s, color .15s;
	}
	.bmh-menu .sub-menu a:hover,
	.bmh-menu .sub-menu li:focus-within > a { background: var(--bmh-lav); color: var(--bmh-violet); }
	.bmh-menu .sub-menu .bmh-sub-tg { padding: 8px; transform: rotate(90deg); }
	.bmh-menu .sub-menu > li.bmh-all > a {
		color: var(--bmh-violet);
		font-weight: 800;
		border-bottom: 1px solid var(--bmh-line-2);
		border-radius: 9px 9px 0 0;
		margin-bottom: 4px;
	}
	.bmh-menu .sub-menu .sub-menu > li.bmh-all { display: none; } /* live: only on the first level */

	/* ----- Thin fixed bar after scrolling (snippets 60/69) ----- */
	body.bmh-stuck .bmh-header {
		position: fixed;
		top: var(--bmh-top, 0px);
		right: 0;
		left: 0;
		background: rgba(255, 255, 255, .97);
		box-shadow: 0 1px 0 var(--bmh-line), 0 6px 18px rgba(31, 21, 48, .06);
		animation: bmHdrIn .2s ease-out;
	}
	body.bmh-stuck .bmh-hdr-in {
		grid-template-columns: auto 1fr auto;
		grid-template-areas: "logo nav icons";
		min-height: 56px;
		padding: 2px 16px;
	}
	body.bmh-stuck .bmh-logo-img { height: 34px; }
	body.bmh-stuck .bmh-arr-btn,
	body.bmh-stuck .bmh-hdr-links { display: none; }
	body.bmh-stuck .bmh-nav { margin: 0; padding: 0; border: 0; border-image: none; }
	body.bmh-stuck .bmh-menu { flex-wrap: nowrap; }
	body.bmh-stuck .bmh-menu > li > a { padding-top: 8px; padding-bottom: 8px; font-size: 14px; }
	body.bmh-stuck .bmh-hdr-ic { gap: 14px; margin-inline-start: 8px; }
	body.bmh-stuck .bmh-ic-btn {
		width: 40px;
		height: 40px;
		border-radius: 50%;
		background: var(--bmh-lav);
	}
	body.bmh-stuck .bmh-ic-btn svg { width: 20px; height: 20px; }
	body.bmh-stuck .bmh-ic-search { display: flex; }
	body.bmh-stuck .bmh-header .cart-badge,
	body.bmh-stuck .bmh-header .wishlist-badge { top: -4px; right: auto; left: -4px; }

	/* Search hidden in the thin bar, opens as a panel under it */
	body.bmh-stuck .bmh-hs { display: none; }
	body.bmh-stuck.bmh-sopen .bmh-hs {
		display: block;
		position: fixed;
		top: calc(var(--bmh-top, 0px) + 58px);
		left: 50%;
		transform: translateX(-50%);
		width: min(640px, 90vw);
		background: #fff;
		padding: 14px 16px;
		border-radius: 0 0 16px 16px;
		box-shadow: 0 16px 34px rgba(31, 21, 48, .18);
	}
	body.bmh-sopen .bmh-ic-search { background: var(--bmh-violet); color: #fff; }
}

@keyframes bmHdrIn { from { transform: translateY(-100%); } to { transform: none; } }

/* ======================================================
   MOBILE ≤1024px
   ====================================================== */
@media (max-width: 1024px) {
	.bmh-announce { font-size: 14px; padding: 8px 12px; }

	.bmh-hdr-in {
		grid-template-columns: 52px 1fr 52px;
		grid-template-areas:
			"menu   logo   icons"
			"search search search"
			"chips  chips  chips";
		padding: 0 6px;
	}
	.bmh-arr-btn,
	.bmh-hdr-links,
	.bmh-header .bmh-ic-fav { display: none; }

	.bmh-logo { justify-self: center; }
	.bmh-logo-img { height: 50px; }

	/* Menu button (right) */
	.bmh-header .bmh-menu-btn {
		grid-area: menu;
		width: 52px;
		height: 52px;
		margin: 4px 0;
		border: 0;
		border-radius: 30px;
		background: var(--bmh-lav-2);
		color: var(--bmh-ink);
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 1px;
		cursor: pointer;
		padding: 0;
	}
	.bmh-header .bmh-menu-btn:hover,
	.bmh-header .bmh-menu-btn:focus,
	.bmh-header .bmh-menu-btn:active { background: var(--bmh-lav-2); color: var(--bmh-ink); }
	.bmh-header .bmh-menu-btn svg { width: 22px; height: 22px; }
	.bmh-header .bmh-menu-btn .bmh-ic-close { display: none; }
	.bmh-header .bmh-menu-btn[aria-expanded="true"] .bmh-ic-open { display: none; }
	.bmh-header .bmh-menu-btn[aria-expanded="true"] .bmh-ic-close { display: block; }
	.bmh-header .bmh-lbl { display: block; font-size: 11px; font-weight: 600; line-height: 1.2; color: var(--bmh-ink); }

	/* Cart (left) */
	.bmh-hdr-ic { gap: 4px; }
	.bmh-header .bmh-ic-btn { width: 52px; height: 52px; }
	.bmh-header .bmh-ic-btn svg { width: 24px; height: 24px; }
	.bmh-header .cart-badge { top: 2px; right: 6px; }

	/* Search row */
	.bmh-hs { padding: 6px 6px 12px; }
	.bmh-hs input[type="search"],
	.bmh-hs input[name="s"] { height: 44px; font-size: 16px; } /* 16px stops iOS zoom */

	.bmh-chips-w { display: block; }

	/* Menu panel under the header */
	.bmh-nav {
		display: none;
		position: absolute;
		top: 60px; /* live: the panel opens right under the logo row */
		right: 0;
		left: 0;
		max-height: calc(100vh - 80px);
		max-height: calc(100dvh - 80px);
		overflow-y: auto;
		overscroll-behavior: contain;
		background: #fff;
		box-shadow: 0 16px 30px rgba(31, 21, 48, .14);
		z-index: 10000;
	}
	body.bmh-menu-open .bmh-nav { display: block; }
	.bmh-menu li,
	.bmh-nav-extra li {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		border-bottom: 2px solid #E9E9E9;
	}
	.bmh-menu a,
	.bmh-nav-extra a {
		flex: 1;
		display: flex;
		align-items: center;
		min-height: 48px;
		padding: 0 16px;
		font-size: 15px;
		font-weight: 700;
		color: #000;
	}
	.bmh-nav-extra a { color: var(--bmh-violet); }
	.bmh-header .bmh-sub-tg,
	.bmh-header .bmh-sub-tg:hover,
	.bmh-header .bmh-sub-tg:focus {
		width: 44px;
		height: 44px;
		margin: 2px 8px;
		border-radius: 8px;
		background: var(--bmh-lav);
	}
	.bmh-header .bmh-sub-tg svg { width: 12px; height: 7px; }
	.bmh-menu li.is-open > .bmh-sub-tg svg { transform: rotate(180deg); }
	.bmh-menu .sub-menu { display: none; width: 100%; background: #FBF8FE; }
	.bmh-menu li.is-open > .sub-menu { display: block; }
	.bmh-menu .sub-menu li:last-child { border-bottom: 0; }
	.bmh-menu .sub-menu a { font-weight: 600; padding-inline-start: 28px; }
	.bmh-menu .sub-menu .sub-menu a { padding-inline-start: 40px; }
	.bmh-menu li.bmh-all > a { color: #9C27B0; background: #FAF4FB; font-weight: 700; }

	/* ----- Fixed bar after scrolling, hides on scroll down ----- */
	body.bmh-stuck .bmh-header {
		position: fixed;
		top: var(--bmh-top, 0px);
		right: 0;
		left: 0;
		box-shadow: 0 1px 0 var(--bmh-line), 0 4px 16px rgba(31, 21, 48, .1);
		transition: transform .25s;
	}
	body.bmh-stuck.bmh-mhide:not(.bmh-menu-open):not(.bmh-sopen) .bmh-header { transform: translateY(-110%); }
	body.bmh-stuck .bmh-hdr-in { grid-template-areas: "menu logo icons" "search search search"; }
	body.bmh-stuck .bmh-menu-btn,
	body.bmh-stuck .bmh-ic-btn { width: 44px; height: 44px; }
	body.bmh-stuck .bmh-logo-img { height: 38px; }
	body.bmh-stuck .bmh-nav { top: 52px; }
	body.bmh-stuck .bmh-lbl,
	body.bmh-stuck .bmh-chips-w { display: none !important; }
	body.bmh-stuck .bmh-ic-search { display: flex; }
	body.bmh-stuck .bmh-hs { display: none; }
	body.bmh-stuck.bmh-sopen .bmh-hs { display: block; }
}

/* Admin bar offset for the fixed bar */
@media (min-width: 783px) { body.admin-bar { --bmh-top: 32px; } }
@media (min-width: 601px) and (max-width: 782px) { body.admin-bar { --bmh-top: 46px; } }

@media (prefers-reduced-motion: reduce) {
	.bmh-header, .bmh-menu .sub-menu { animation: none !important; transition: none !important; }
}
