/*
 * SVT Header. Все правила начинаются с .svth, чтобы не пересекаться с темой.
 * Значения приходят из переменных --svth-*, которые плагин выводит из страницы настроек.
 * Запасные значения после запятой работают, если блок с переменными по какой-то причине не вывелся.
 */

.svth,
.svth *,
.svth *::before,
.svth *::after { box-sizing: border-box; }

.svth {
	position: relative;
	z-index: 100;
	background: var(--svth-bg, #fff);
	color: var(--svth-text, #1a1a1a);
	font-family: var(--svth-font-body, 'Open Sans', Arial, sans-serif);
	font-size: 16px;
	line-height: 1.4;
	box-shadow: var(--svth-shadow, 0 6px 14px rgba(0, 0, 0, .12));
	-webkit-font-smoothing: antialiased;
}
.svth a,
.svth a:hover,
.svth a:focus { color: inherit; text-decoration: none; }
.svth ul { margin: 0; padding: 0; list-style: none; font-family: inherit; font-size: inherit; line-height: inherit; }
.svth li { margin: 0; font-family: inherit; }
.svth a { font-family: inherit; }
.svth svg {
	display: block;
	flex: none;
	width: var(--svth-icon, 20px);
	height: var(--svth-icon, 20px);
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.svth :focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.svth__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.svth__in {
	max-width: var(--svth-max-w, 1440px);
	margin: 0 auto;
	padding: 0 var(--svth-pad-x, 60px);
}

/* ---------- Top Row (выводится, только если высота больше 0) ---------- */
.svth__top {
	height: var(--svth-top-h, 40px);
	overflow: hidden;
	border-bottom: 1px solid var(--svth-line, #e6e6e6);
	font-size: var(--svth-top-fs, 13px);
}
.svth__top-in {
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

/* ---------- Main Row: контакты | логотип | поиск и значки ---------- */
.svth__main-in {
	height: var(--svth-main-h, 96px);
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 20px;
}

.svth .svth__contacts {
	display: grid;
	gap: var(--svth-contacts-gap, 6px);
	justify-self: start;
	font-size: var(--svth-contacts-fs, 16px);
	font-weight: var(--svth-contacts-fw, 700);
	line-height: 1.2;
	transform: translate(var(--svth-contacts-dx, 0px), var(--svth-contacts-dy, 0px));
}
.svth__contacts a { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.svth__contacts svg {
	width: calc(var(--svth-icon, 20px) * .8);
	height: calc(var(--svth-icon, 20px) * .8);
}

.svth__brand {
	display: flex;
	align-items: center;
	gap: var(--svth-logo-gap, 26px);
	transform: translate(var(--svth-logo-dx, 0px), var(--svth-logo-dy, 0px));
}
.svth__brand img {
	display: block;
	flex: none;
	width: var(--svth-logo-w, 72px);
	height: auto;
}
/* Живой логотип (SVG): общие правила значков .svth svg к нему не относятся. */
.svth .svth__logo-svg {
	display: block;
	flex: none;
	width: var(--svth-logo-w, 72px);
	height: var(--svth-logo-w, 72px);
	padding: 0;
	stroke: none;
	stroke-width: 0;
	overflow: visible;
}
.svth .svth-dot { opacity: var(--svth-dot-op, 100%); transition: fill .2s ease; }
.svth__slogan {
	font-family: var(--svth-font-slogan, inherit);
	font-size: var(--svth-slogan-fs, 17px);
	font-weight: var(--svth-slogan-fw, 700);
	line-height: calc(1.2em + var(--svth-slogan-gap, 0px));
}

.svth__right {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	justify-self: end;
	gap: var(--svth-icon-gap, 28px);
}

.svth__search {
	display: flex;
	flex: none;
	width: var(--svth-search-w, 282px);
	height: var(--svth-search-h, 50px);
	margin: 0;
	transform: translate(var(--svth-search-dx, 0px), var(--svth-search-dy, 0px));
}
#svth .svth__search input[type="search"] {
	flex: 1 1 auto;
	width: auto;
	min-width: 0;
	height: 100%;
	margin: 0;
	padding: 0 16px;
	border: 1px solid var(--svth-field-line, #d9d9d9);
	border-right: 0;
	border-radius: var(--svth-radius, 4px) 0 0 var(--svth-radius, 4px);
	background: var(--svth-field-bg, #fff);
	box-shadow: none;
	color: var(--svth-text, #1a1a1a);
	font: 400 var(--svth-search-fs, 15px) var(--svth-font-body, 'Open Sans', Arial, sans-serif);
	-webkit-appearance: none;
	appearance: none;
}
#svth .svth__search input[type="search"]::placeholder { color: var(--svth-field-text, #6b6b6b); opacity: 1; }
#svth .svth__search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
#svth .svth__search button {
	all: unset;
	box-sizing: border-box;
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: var(--svth-search-h, 50px);
	height: 100%;
	border-radius: 0 var(--svth-radius, 4px) var(--svth-radius, 4px) 0;
	background: var(--svth-btn-bg, #2b2b2b);
	color: var(--svth-btn-fg, #fff);
	cursor: pointer;
	transition: background-color .2s;
}
#svth .svth__search button:hover,
#svth .svth__search button:focus-visible { background: var(--svth-btn-bg-hover, #000); }
#svth .svth__search button:focus-visible { outline: 2px solid var(--svth-btn-fg, #fff); outline-offset: -4px; }

.svth__actions {
	display: flex;
	align-items: center;
	gap: var(--svth-icon-gap, 28px);
	transform: translate(var(--svth-actions-dx, 0px), var(--svth-actions-dy, 0px));
}
.svth__actions a { position: relative; display: flex; padding: 4px; }
.svth__badge {
	position: absolute;
	top: -6px;
	right: -8px;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 9px;
	background: var(--svth-badge-bg, #d32f2f);
	color: var(--svth-badge-fg, #fff);
	font: 700 11px/18px var(--svth-font-body, 'Open Sans', Arial, sans-serif);
	text-align: center;
}
.svth__badge[hidden] { display: none; }

/* ---------- Bottom Row: меню ---------- */
.svth__bottom { border-top: 1px solid var(--svth-line, #e6e6e6); }
.svth__bottom-in {
	min-height: var(--svth-bottom-h, 76px);
	display: flex;
	align-items: center;
	justify-content: var(--svth-menu-jc, center);
}
.svth .svth__menu {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px var(--svth-menu-gap, 34px);
	font: 700 var(--svth-menu-fs, 14px)/1 var(--svth-font-head, 'Montserrat', 'Open Sans', Arial, sans-serif);
	font-weight: var(--svth-menu-fw, 700);
	letter-spacing: var(--svth-menu-ls, 0px);
	text-transform: var(--svth-menu-tt, uppercase);
	transform: translate(var(--svth-menu-dx, 0px), var(--svth-menu-dy, 0px));
}
.svth__menu > li { position: relative; display: flex; align-items: center; }
.svth__menu a {
	display: inline-flex;
	align-items: center;
	padding: 8px 0;
	border-bottom: var(--svth-menu-line, 2px) solid transparent;
	transition: color .2s, border-color .2s;
}
.svth__menu a:hover,
.svth__menu a:focus-visible,
.svth__menu .current-menu-item > a,
.svth__menu .current-menu-ancestor > a { border-bottom-color: var(--svth-menu-hover, #1a1a1a); }
#svth .svth__menu > li > a:hover,
#svth .svth__menu > li > a:focus-visible,
#svth .svth__menu > .current-menu-item > a,
#svth .svth__menu > .current-menu-ancestor > a,
#svth .svth__menu > li:hover > .svth__toggle { color: var(--svth-menu-hover-text, inherit); }

#svth .svth__toggle {
	all: unset;
	box-sizing: border-box;
	display: flex;
	padding: 4px;
	margin-left: 2px;
	color: inherit;
	cursor: pointer;
}
#svth .svth__toggle:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
#svth .svth__toggle svg { width: 12px; height: 12px; stroke-width: 2; transition: transform .2s; }
#svth .svth__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

/* Выпадающий список */
.svth__menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 20;
	display: none;
	min-width: var(--svth-drop-w, 240px);
	padding: 8px 0;
	border: 1px solid var(--svth-drop-line, #e6e6e6);
	background: var(--svth-drop-bg, #fff);
	box-shadow: var(--svth-shadow, 0 6px 14px rgba(0, 0, 0, .12));
	font-weight: 600;
	text-transform: none;
}
.svth__menu li:hover > .sub-menu,
.svth__menu li.is-open > .sub-menu { display: block; }
.svth__menu .sub-menu li { position: relative; display: flex; align-items: center; justify-content: space-between; }
.svth__menu .sub-menu a { flex: 1 1 auto; padding: 10px 18px; border-bottom: 0; }
.svth__menu .sub-menu a:hover,
.svth__menu .sub-menu a:focus-visible { background: rgba(0, 0, 0, .05); }
.svth__menu .sub-menu .svth__toggle { margin-right: 10px; }
.svth__menu .sub-menu .sub-menu { top: 0; left: 100%; }

@media (prefers-reduced-motion: reduce) {
	.svth .svth-dot,
	.svth__menu a,
	#svth .svth__search button,
	#svth .svth__toggle svg { transition: none; }
}
