/* HSD Tools – header widgets: HSD Category Menu + HSD Smart Search.
   Colours and sizes come from the widgets' Elementor Style tab as CSS variables. */

.hsd-cm, .hsd-mm, .hsd-md, .hsd-sr, .hsd-ss-wrap {
	--hsd-accent: #1a7fa0;
	--hsd-accent-dark: #13627c;
	--hsd-bg: #ffffff;
	--hsd-dep-bg: #f6f7f8;
	--hsd-text: #222529;
	--hsd-link: #4a4e52;
	--hsd-dep-size: 13.5px;
	--hsd-g-size: 14px;
	--hsd-link-size: 13px;
	--hsd-dep-w: 270px;
	--hsd-col-w: 210px;
	--hsd-radius: 8px;
}

/* Hide the old dropdown of the menu item the panel is attached to */
body.hsd-hp-on .hsd-mm-trigger > .popup,
body.hsd-hp-on .hsd-mm-trigger > .sub-menu,
body.hsd-hp-on .hsd-mm-trigger > ul { display: none !important; }
.hsd-mm-trigger.is-open > a { color: var(--hsd-accent, #1a7fa0) !important; }

/* ---------- Category menu widget (own button mode) ---------- */
.hsd-cm__btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 0 20px;
	border: 0;
	border-radius: 0;
	background: var(--hsd-accent);
	color: #ffffff;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	text-transform: none;
	letter-spacing: 0;
	box-shadow: none;
}
.hsd-cm__btn:hover, .hsd-cm__btn.is-open { background: var(--hsd-accent-dark); color: #ffffff; }
.hsd-cm__btn svg { flex: none; }
.hsd-cm__note { display: block; padding: 8px 12px; border: 1px dashed #b8c2c8; border-radius: 6px; font-size: 12px; color: #5d6266; background: #f8fafb; }

/* ---------- Desktop panel ---------- */
.hsd-mm {
	position: fixed;
	z-index: 99990;
	display: flex;
	box-sizing: border-box;
	background: var(--hsd-bg);
	border-top: 3px solid var(--hsd-accent);
	border-radius: 0 0 var(--hsd-radius) var(--hsd-radius);
	box-shadow: 0 16px 36px rgba(18, 56, 90, 0.18);
	overflow: hidden;
	font-family: inherit;
	color: var(--hsd-text);
}
.hsd-mm[hidden] { display: none !important; }
.hsd-mm a { text-decoration: none; }

.hsd-mm__deps {
	width: var(--hsd-dep-w);
	flex: none;
	margin: 0;
	padding: 8px 0;
	list-style: none;
	background: var(--hsd-dep-bg);
	border-right: 1px solid #e7e7e7;
	overflow-y: auto;
	overscroll-behavior: contain;
}
.hsd-mm__deps li { margin: 0; padding: 0; list-style: none; }
.hsd-mm__dep {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	min-height: 40px;
	padding: 8px 16px 8px 22px;
	font-size: var(--hsd-dep-size);
	font-weight: 500;
	line-height: 1.3;
	color: var(--hsd-text) !important;
}
.hsd-mm__dep svg { flex: none; color: #9aa0a6; }
.hsd-mm__dep:hover, .hsd-mm__dep:focus-visible { background: rgba(0, 0, 0, 0.035); }
.hsd-mm__dep.is-active {
	background: var(--hsd-bg);
	color: var(--hsd-accent) !important;
	font-weight: 600;
	box-shadow: inset 3px 0 0 var(--hsd-accent);
}
.hsd-mm__dep.is-active svg { color: var(--hsd-accent); }

.hsd-mm__main {
	flex: 1;
	min-width: 0;
	padding: 22px 30px 30px;
	overflow-y: auto;
	overscroll-behavior: contain;
}
.hsd-mm__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin: 0 0 18px;
	padding: 0 0 12px;
	border-bottom: 1px solid #eef0f2;
}
.hsd-mm__title { margin: 0 !important; font-size: 20px !important; font-weight: 600 !important; line-height: 1.3 !important; color: var(--hsd-text) !important; letter-spacing: 0 !important; text-transform: none !important; }
.hsd-mm__all { flex: none; font-size: 13.5px; font-weight: 600; color: var(--hsd-accent) !important; }
.hsd-mm__all:hover { text-decoration: underline; }
.hsd-mm__empty { margin: 0; font-size: 14px; color: #5d6266; }

/* "Show first" categories and the line under them */
.hsd-mm__dep.is-pinned span { font-weight: 600; }
.hsd-mm__sep { border-top: 1px solid rgba(0, 0, 0, 0.09) !important; margin-top: 6px !important; padding-top: 6px !important; }

/* "Popular in …" row under short sub-category lists */
.hsd-mm__popular { margin-top: 8px; padding-top: 18px; border-top: 1px solid rgba(0, 0, 0, 0.07); }
.hsd-mm__popular-title { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #5d6266; }
.hsd-mm__popular .hsd-mm__prods { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

/* Product cards for categories without sub-categories */
.hsd-mm__prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.hsd-mm__prod { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: var(--hsd-text) !important; }
.hsd-mm__prod img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: #fff; border: 1px solid rgba(0, 0, 0, 0.07); border-radius: var(--hsd-radius, 6px); }
.hsd-mm__prod:hover img { border-color: var(--hsd-accent); }
.hsd-mm__prod-name { font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hsd-mm__prod:hover .hsd-mm__prod-name { color: var(--hsd-accent); }
.hsd-mm__prod-price { font-size: 14px; font-weight: 700; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hsd-mm__prod--sk { height: 210px; border-radius: var(--hsd-radius, 6px); background: linear-gradient(90deg, #f0f2f3 25%, #e6e9eb 37%, #f0f2f3 63%); background-size: 400% 100%; animation: hsd-sk 1.2s ease infinite; }


.hsd-mm__group { display: block; break-inside: avoid; margin: 0 0 22px; }
.hsd-mm__g { display: block; margin: 0 0 6px; font-size: var(--hsd-g-size); font-weight: 600; line-height: 1.35; color: var(--hsd-text) !important; }
.hsd-mm__g:hover { color: var(--hsd-accent) !important; }
.hsd-mm__group ul { list-style: none; margin: 0; padding: 0; }
.hsd-mm__group li { margin: 0; padding: 0; list-style: none; }
.hsd-mm__group li a { display: block; padding: 3px 0; font-size: var(--hsd-link-size); line-height: 1.4; color: var(--hsd-link) !important; }
.hsd-mm__group li a:hover { color: var(--hsd-accent) !important; text-decoration: underline; }
.hsd-mm__l4 { margin: 0 0 4px !important; }
.hsd-mm__l4 li a { padding: 2px 0 2px 12px !important; font-size: calc(var(--hsd-link-size) - 0.5px) !important; opacity: .85; }

.hsd-mm__deps, .hsd-mm__main, .hsd-md__body, .hsd-sr { scrollbar-width: thin; scrollbar-color: #c3c9ce transparent; }
.hsd-mm__deps::-webkit-scrollbar, .hsd-mm__main::-webkit-scrollbar, .hsd-md__body::-webkit-scrollbar, .hsd-sr::-webkit-scrollbar { width: 8px; }
.hsd-mm__deps::-webkit-scrollbar-thumb, .hsd-mm__main::-webkit-scrollbar-thumb, .hsd-md__body::-webkit-scrollbar-thumb, .hsd-sr::-webkit-scrollbar-thumb { background: #c3c9ce; border-radius: 4px; }

/* ---------- Phone drawer ---------- */
html.hsd-md-lock, html.hsd-md-lock body { overflow: hidden !important; }
.hsd-md-overlay {
	position: fixed;
	inset: 0;
	z-index: 99995;
	background: rgba(18, 30, 45, 0.45);
	opacity: 0;
	transition: opacity .25s ease;
}
.hsd-md-overlay.is-open { opacity: 1; }
.hsd-md-overlay[hidden], .hsd-md[hidden] { display: none !important; }
.hsd-md {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	z-index: 99996;
	width: min(420px, 88vw);
	display: flex;
	flex-direction: column;
	background: var(--hsd-bg);
	color: var(--hsd-text);
	font-family: inherit;
	box-shadow: 8px 0 28px rgba(18, 30, 45, 0.2);
	transform: translateX(-100%);
	transition: transform .25s ease;
}
.hsd-md.is-open { transform: none; }
body.admin-bar .hsd-md { top: 32px; }
@media (max-width: 782px) { body.admin-bar .hsd-md { top: 46px; } }
.hsd-md__bar {
	display: flex;
	align-items: center;
	gap: 2px;
	min-height: 58px;
	padding: 6px 6px 6px 8px;
	border-bottom: 1px solid #e7e7e7;
	flex: none;
}
.hsd-md__btn {
	width: 44px !important;
	height: 44px !important;
	flex: none;
	display: flex !important;
	align-items: center;
	justify-content: center;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: transparent !important;
	color: var(--hsd-text) !important;
	box-shadow: none !important;
	cursor: pointer;
}
.hsd-md__btn[hidden] { display: none !important; }
.hsd-md__btn:hover { background: #f0f2f4 !important; }
.hsd-md__title { flex: 1; min-width: 0; padding: 0 6px; font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hsd-md__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: 24px; }
.hsd-md__label { padding: 18px 18px 6px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #5d6266; }
.hsd-md__row {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	min-height: 52px;
	box-sizing: border-box;
	margin: 0 !important;
	padding: 10px 14px 10px 18px !important;
	border: 0 !important;
	border-bottom: 1px solid #f0f2f4 !important;
	border-radius: 0 !important;
	background: var(--hsd-bg) !important;
	box-shadow: none !important;
	font-family: inherit !important;
	font-size: 15px !important;
	font-weight: 500 !important;
	line-height: 1.35 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	text-align: left !important;
	text-decoration: none !important;
	color: var(--hsd-text) !important;
	cursor: pointer;
}
.hsd-md__row svg { flex: none; color: #9aa0a6; }
.hsd-md__row:active { background: #f3f5f6 !important; }
.hsd-md__all { color: var(--hsd-accent) !important; font-weight: 600 !important; background: #f3f8fa !important; }
.hsd-md__count { font-size: 12.5px; font-weight: 500; color: #5d6266; }

@media (min-width: 992px) { .hsd-md, .hsd-md-overlay { display: none !important; } }
@media (max-width: 991px) { .hsd-mm { display: none !important; } }

/* ---------- Smart search widget ---------- */
.hsd-ss-wrap { width: 100%; }
.hsd-ss {
	display: flex;
	align-items: center;
	width: 100%;
	height: 48px;
	box-sizing: border-box;
	margin: 0;
	padding: 0 5px 0 0;
	border: 1px solid #c9ced2;
	border-radius: 26px;
	background: #ffffff;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.hsd-ss:focus-within { border-color: var(--hsd-accent); box-shadow: 0 0 0 3px rgba(26, 127, 160, 0.15); }
.hsd-ss input[type="search"] {
	flex: 1;
	min-width: 0;
	height: 100% !important;
	margin: 0 !important;
	padding: 0 12px 0 20px !important;
	border: 0 !important;
	border-radius: 26px 0 0 26px;
	background: transparent !important;
	box-shadow: none !important;
	outline: none;
	font-family: inherit;
	font-size: 14px;
	color: #222529;
	-webkit-appearance: none;
	appearance: none;
}
.hsd-ss input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.hsd-ss input[type="search"]::placeholder { color: #7a8085; opacity: 1; }
.hsd-ss__btn {
	flex: none;
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50%;
	background: var(--hsd-accent);
	color: #ffffff;
	cursor: pointer;
	box-shadow: none !important;
}
.hsd-ss__btn:hover { background: var(--hsd-accent-dark); }
.hsd-ss__btn svg { width: 18px; height: 18px; }

/* Suggestions box */
.hsd-sr {
	position: fixed;
	z-index: 99992;
	box-sizing: border-box;
	padding: 6px 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--hsd-bg);
	border: 1px solid #dfe3e6;
	border-radius: calc(var(--hsd-radius) + 4px);
	box-shadow: 0 16px 36px rgba(18, 56, 90, 0.18);
	font-family: inherit;
	color: var(--hsd-text);
	text-align: left;
}
.hsd-sr[hidden] { display: none !important; }
.hsd-sr a { text-decoration: none; }
.hsd-sr__label { padding: 12px 16px 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #5d6266; }
.hsd-sr__dym { margin: 4px 10px 2px; padding: 10px 12px; font-size: 13px; color: #4a4e52; background: #f3f8fa; border-radius: var(--hsd-radius); }
.hsd-sr__dym a { font-weight: 600; color: var(--hsd-accent) !important; text-decoration: underline; }
.hsd-sr__chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 14px 8px; }
.hsd-sr__chip {
	display: inline-flex;
	flex-direction: column;
	gap: 1px;
	max-width: 100%;
	padding: 7px 13px;
	border: 1px solid #dfe3e6;
	border-radius: 10px;
	color: var(--hsd-text) !important;
	line-height: 1.3;
}
.hsd-sr__chip:hover, .hsd-sr__chip.is-active { border-color: var(--hsd-accent); background: #f3f8fa; }
.hsd-sr__chip-name { font-size: 13px; font-weight: 600; }
.hsd-sr__chip-path { font-size: 11px; color: #6b7075; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hsd-sr__p {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 16px;
	color: var(--hsd-text) !important;
}
.hsd-sr__p:hover, .hsd-sr__p.is-active { background: #f3f8fa; }
.hsd-sr__p img { width: 48px; height: 48px; flex: none; object-fit: contain; border: 1px solid #eef0f2; border-radius: 6px; background: #ffffff; }
.hsd-sr__p-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hsd-sr__p-name { font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hsd-sr__p-code { font-size: 11.5px; color: var(--hsd-accent); font-weight: 600; letter-spacing: .02em; }
.hsd-sr__p-meta { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--hsd-text); }
.hsd-sr__p-meta:empty { display: none; }
.hsd-sr__oos { font-size: 11px; font-weight: 600; color: #b3261e; }
.hsd-sr__all { display: block; margin: 6px 10px 4px; padding: 11px 12px; border-radius: var(--hsd-radius); text-align: center; font-size: 13.5px; font-weight: 600; color: #ffffff !important; background: var(--hsd-accent); }
.hsd-sr__all:hover, .hsd-sr__all.is-active { background: var(--hsd-accent-dark); }
.hsd-sr__empty { display: flex; flex-direction: column; gap: 4px; padding: 16px; font-size: 13px; color: #4a4e52; }
.hsd-sr__empty strong { color: var(--hsd-text); font-size: 14px; }
.hsd-sr__loading { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px; }
.hsd-sr__sk { display: block; height: 48px; border-radius: 6px; background: linear-gradient(90deg, #f0f2f4 25%, #e6e9ec 50%, #f0f2f4 75%); background-size: 200% 100%; animation: hsd-sk 1.2s linear infinite; }
@keyframes hsd-sk { to { background-position: -200% 0; } }
@media (max-width: 767px) { .hsd-sr__p { padding: 10px 14px; } }

/* "Showing results for …" on the results page */
.hsd-hp-dym { margin: 0 0 16px; padding: 10px 14px; background: #f3f8fa; border-radius: 8px; font-size: 14px; color: #4a4e52; }
.hsd-hp-dym strong { color: #222529; }

/* No search results */
.hsd-noresults { max-width: 720px; margin: 10px auto 40px; padding: 32px 28px; text-align: center; background: #fff; border: 1px solid #e7eaee; border-radius: 16px; }
.hsd-noresults__icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin-bottom: 12px; border-radius: 50%; color: #0088cc; background: #eef7fb; }
.hsd-noresults__title { margin: 0 0 14px !important; font-size: 20px !important; font-weight: 600 !important; line-height: 1.35 !important; color: #222529; letter-spacing: 0 !important; text-transform: none !important; }
.hsd-noresults__tips { display: inline-block; margin: 0 0 20px !important; padding: 0 0 0 18px !important; text-align: left; font-size: 14px; color: #4a4e52; }
.hsd-noresults__tips li { margin: 3px 0; list-style: disc; }
.hsd-noresults__label { margin: 0 0 10px !important; font-size: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: #777; }
.hsd-noresults__cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 20px; }
.hsd-noresults__cats a { padding: 7px 14px; font-size: 13px; color: #222529 !important; background: #f4f6f8; border-radius: 999px; text-decoration: none !important; transition: background .15s, color .15s; }
.hsd-noresults__cats a:hover { color: #fff !important; background: #0088cc; }
.hsd-noresults__help { margin: 0 !important; font-size: 14px; color: #4a4e52; }
.hsd-noresults__help a { font-weight: 600; color: #0088cc !important; }
@media (max-width: 575px) { .hsd-noresults { padding: 24px 16px; } .hsd-noresults__title { font-size: 17px !important; } }

@media (prefers-reduced-motion: reduce) {
	.hsd-md, .hsd-md-overlay { transition: none; }
	.hsd-sr__sk { animation: none; }
}


/* ---------- Mega panel layout v3.3: sub-categories + best sellers column ---------- */
.hsd-mm__main.has-aside { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.hsd-mm__main.has-aside .hsd-mm__head { margin: 0; padding: 20px 28px 14px; }
.hsd-mm__body { flex: 1; display: flex; min-height: 0; }
.hsd-mm__subs { flex: 1; min-width: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px 28px 24px; }
.hsd-mm__cols { column-width: var(--hsd-col-w, 210px); column-gap: 28px; }
.hsd-mm__group { margin: 0 0 20px; }
.hsd-mm__g { display: flex !important; align-items: baseline; gap: 6px; margin: 0 0 6px !important; padding: 0 0 6px; border-bottom: 2px solid color-mix(in srgb, var(--hsd-accent) 16%, #fff); }
.hsd-mm__count { font-size: 11px; font-weight: 400; color: #98a2a9; }
.hsd-mm__group > ul > li > a { color: var(--hsd-link) !important; }
.hsd-mm__l4 { margin: 2px 0 6px 2px !important; padding: 0 0 0 12px !important; border-left: 1px solid #dfe5e9; }
.hsd-mm__l4 li a { padding: 2px 0 !important; font-size: calc(var(--hsd-link-size) - 0.8px) !important; color: #6b7881 !important; opacity: 1 !important; }
.hsd-mm__more { break-inside: avoid; margin: 0 0 20px; padding: 12px 14px; background: #f7f9fa; border-radius: 8px; }
.hsd-mm__more-title { margin: 0 0 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #6b7881; }
.hsd-mm__more a { display: flex; align-items: baseline; gap: 6px; padding: 3px 0; font-size: var(--hsd-link-size); line-height: 1.4; color: var(--hsd-link) !important; }
.hsd-mm__more a:hover { color: var(--hsd-accent) !important; text-decoration: underline; }
.hsd-mm__aside { flex: none; width: 290px; display: flex; flex-direction: column; gap: 12px; padding: 20px; border-left: 1px solid #edf0f2; background: #fbfcfd; overflow-y: auto; }
.hsd-mm__aside-title { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #6b7881; }
.hsd-mm__aside-list { display: flex; flex-direction: column; gap: 10px; }
.hsd-mm__mini { display: flex; gap: 12px; align-items: center; padding: 8px; background: #fff; border: 1px solid #e9edf0; border-radius: 8px; color: var(--hsd-text) !important; }
.hsd-mm__mini:hover { border-color: var(--hsd-accent); }
.hsd-mm__mini img { flex: none; width: 60px; height: 60px; object-fit: contain; }
.hsd-mm__mini-text { min-width: 0; }
.hsd-mm__mini-name { font-size: 12.6px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hsd-mm__mini:hover .hsd-mm__mini-name { color: var(--hsd-accent); }
.hsd-mm__mini-price { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 3px; font-size: 14px; font-weight: 700; }
.hsd-mm__mini--sk { height: 78px; background: linear-gradient(90deg, #f0f2f3 25%, #e6e9eb 37%, #f0f2f3 63%); background-size: 400% 100%; animation: hsd-sk 1.2s ease infinite; border: 0; }
.hsd-mm__aside-all { margin-top: auto; display: block; padding: 9px; text-align: center; font-size: 13px; font-weight: 600; color: #fff !important; background: var(--hsd-accent); border-radius: 6px; }
.hsd-mm__aside-all:hover { background: var(--hsd-accent-dark, var(--hsd-accent)); }
@media (max-width: 1199px) { .hsd-mm__aside { width: 240px; } }
