/* Шапка в стиле презентации MPS (29.10.2026): разметка — header.php, меню — inc/header-menu.php, скрипт — assets/js/header.js.
   Набор стиля — макет https://claude.ai/artifact/3rNHE1jaGTC1dhjKCgEXNx (лист «Набор стиля»).
   В теме правило * задаёт каждому элементу шрифт SegoeUI, вес 400, тёмный цвет и outline: none !important, а a:hover — цвет темы
   с !important: поэтому здесь шрифт и цвет заданы каждому элементу шапки явно (и значкам svg — color: inherit).
   Поиск и кнопка «Каталог» — компонент магазина (assets/css/header-search.css, shop-printer.css): здесь только цвета и размеры. */

/* Заголовки — Century Gothic, если он есть у посетителя (ставится с Office), иначе — Montserrat с нашего сайта (решение
   пользователя 29.10.2026). Montserrat — SIL Open Font License 1.1 (assets/fonts/montserrat/OFL.txt), Google Fonts v31,
   один файл на все начертания 500–800; браузер скачивает его, только если Century Gothic нет. */
@font-face {
	font-family: 'Montserrat';
	font-style: normal;
	font-weight: 500 800;
	font-display: swap;
	src: url(../fonts/montserrat/montserrat-cyrillic.woff2) format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
	font-family: 'Montserrat';
	font-style: normal;
	font-weight: 500 800;
	font-display: swap;
	src: url(../fonts/montserrat/montserrat-latin.woff2) format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	--oph-ink: #14123a;
	--oph-text: #4a4f6e;
	--oph-link: #2563d6;
	--oph-violet: #2f1c86;
	--oph-line: #ebe9fb;
	--oph-soft: #f1effd;
	--oph-btn: linear-gradient(90deg, #0f6fc6, #5b3fd6);
	--oph-btn-hover: linear-gradient(90deg, #0c5fab, #4b32bd);
	--oph-hex: linear-gradient(135deg, #148fd8, #6a4cf0); /* белый значок — не меньше 3,5 : 1 */
	--oph-dark: linear-gradient(120deg, #1a1458 0%, #2f1c86 55%, #1d3ba8 100%);
	--oph-font: 'Century Gothic', 'Montserrat', 'SegoeUI', 'Segoe UI', Arial, sans-serif;
}
/* было в прилипающем меню (functions.php op_sticky_header_css, отключено 29.10.2026) */
html { scroll-padding-top: var(--op-sticky-h, 0px); }
.modal { z-index: 1000; }
html.oph-lock, html.oph-lock body { overflow: hidden; }

/* слой шапки — над страницей (подсказки поиска, прилипшая строка), под всплывающими формами (.modal — 1000) */
.oph { position: relative; z-index: 100; background: #fff; }
.oph.is-open { z-index: 998; }
.oph :focus-visible { outline: 2px solid #5b3fd6 !important; outline-offset: 2px; }
.oph__icon svg, .oph__icon svg *, .oph-soc svg, .oph-soc svg *, .oph__info-item svg, .oph__info-item svg *, .oph__burger svg, .oph__burger svg * { color: inherit; }

/* ---------- первая строка ---------- */
.oph__main { background: #fff; box-shadow: 0 1px 0 var(--oph-line); position: relative; z-index: 2; }
.oph .oph__row { display: flex; align-items: center; gap: 16px; min-height: 76px; padding-top: 12px; padding-bottom: 12px; } /* .oph — встроенное в страницу правило .container { padding: 0 20px } */
.oph__logo { flex: 0 0 auto; display: flex; align-items: center; line-height: 0; }
.oph__logo img { flex: 0 0 auto; width: 172px; max-width: none; height: auto; }
.oph__search { flex: 1 1 auto; min-width: 0; }

.oph__soc-list { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.oph-soc {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--oph-hex);
	color: #fff;
	overflow: hidden;
	transition: transform .2s ease, box-shadow .2s ease;
}
.oph-soc:hover { color: #fff !important; transform: translateY(-1px); box-shadow: 0 6px 14px rgba(59, 47, 176, .3); }
.oph-soc--max { background: none; }
.oph-soc--max img { flex: 0 0 auto; width: 40px; height: 40px; max-width: none; }

.oph__contact { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.oph__tel,
.oph__tel:hover {
	font-family: var(--oph-font);
	font-weight: 700;
	font-size: 20px;
	line-height: 1.15;
	color: var(--oph-ink) !important;
	white-space: nowrap;
	text-decoration: none;
}
.oph__call {
	padding: 0;
	border: 0;
	border-bottom: 1px dashed currentColor;
	background: none;
	font-family: 'SegoeUI', 'Segoe UI', Arial, sans-serif;
	font-weight: 400;
	font-size: 14.5px;
	line-height: 1.25;
	color: var(--oph-link);
	cursor: pointer;
	white-space: nowrap;
}
.oph__call:hover { color: #5b3fd6; }

.oph__icon {
	flex: 0 0 auto;
	position: relative;
	width: 46px;
	height: 46px;
	border-radius: 12px;
	border: 1.5px solid #d9d5f5;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--oph-ink);
	background: #fff;
	text-decoration: none;
}
.oph__icon:hover { color: var(--oph-violet) !important; border-color: #b9b2ef; }
.oph__icon--tel { display: none; }
/* корзина: счётчик main.js пишет в data-count (у пустой — не показываем); style.css красит path — у нас значок контурный */
.oph a.cart path, .oph a.cart.active path { fill: none; }
.oph a.cart:after {
	top: -7px;
	right: -7px;
	min-width: 20px;
	height: 20px;
	padding: 0 4px;
	border: 2px solid #fff;
	border-radius: 10px;
	background: #8a90b2;
	color: #fff;
	font-family: 'SegoeUI', 'Segoe UI', Arial, sans-serif;
	font-weight: 700;
	font-size: 11px;
	line-height: 16px;
}
.oph a.cart.active:after { background: #5b3fd6; }
.oph a.cart[data-count="0"]:after { display: none; }

.oph__burger {
	display: none;
	flex: 0 0 auto;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: var(--oph-btn);
	color: #fff;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.oph__burger-close { display: none; }
.oph.is-open .oph__burger-open { display: none; }
.oph.is-open .oph__burger-close { display: block; }

/* поиск и «Каталог» (компонент магазина) — в цветах шапки */
.oph .op-hs-cat {
	height: 46px;
	border-radius: 12px;
	background: var(--oph-btn);
	font-family: var(--oph-font);
	font-weight: 700;
	font-size: 15px;
}
.oph .op-hs-cat:hover, .oph .op-hs-cat.is-open { background: var(--oph-btn-hover); }
.oph .op-hs-cat:hover, .oph .op-hs-cat:hover span, .oph .op-hs-cat:hover svg { color: #fff !important; }
.oph .op-hs-cat span { font-family: var(--oph-font); font-weight: 700; }
.oph .op-hs__row { height: 46px; border: 1.5px solid #d9d5f5; border-radius: 12px; }
.oph .op-hs__row:focus-within { border-color: #5b3fd6; box-shadow: 0 0 0 4px rgba(91, 63, 214, .14); }
.oph .op-hs__input { font-size: 15.5px; color: var(--oph-ink); }
.oph .op-hs__input::placeholder { color: #6b7082; }
.oph .op-hs__btn { flex-basis: 52px; background: var(--oph-soft); }
.oph .op-hs__btn:hover { background: #e4e0fb; }
.oph .op-hs__btn svg, .oph .op-hs__btn svg * { color: #3b2fb0; }

/* ---------- вторая строка: меню и часы работы ---------- */
.oph__navrow { background: #fff; box-shadow: 0 1px 0 var(--oph-line); }
.oph__navin { display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; }
.oph__nav { flex: 1 1 auto; min-width: 0; }
.oph .oph__menu { display: flex; flex-wrap: wrap; margin: 0 0 0 -14px !important; padding: 0; list-style: none; }
.oph__menu > li { position: relative; margin: 0; padding: 0; }
.oph__menu > li > a {
	display: block;
	padding: 14px 14px 12px;
	border-bottom: 3px solid transparent;
	font-family: var(--oph-font);
	font-weight: 700;
	font-size: 15px;
	line-height: 1.3;
	color: var(--oph-ink);
	text-decoration: none;
	white-space: nowrap;
}
.oph__menu > li > a:hover { color: var(--oph-violet) !important; }
.oph__menu > li.oph-on > a,
.oph__menu > li.current-menu-item > a {
	color: var(--oph-violet);
	border-image: linear-gradient(90deg, #1aa6e8, #6a4cf0) 1;
	border-bottom: 3px solid #5b3fd6;
}
/* выпадающий список — только у пунктов из op_menu_keep_dropdown() (по умолчанию ни у одного) */
.oph__menu .sub-menu { display: none; margin: 0; padding: 8px 0; list-style: none; }
.oph__menu .sub-menu a { display: block; padding: 8px 20px; font-family: 'SegoeUI', 'Segoe UI', Arial, sans-serif; font-size: 15px; color: var(--oph-ink); text-decoration: none; }
.oph__menu .sub-menu a:hover { color: var(--oph-violet) !important; background: var(--oph-soft); }

.oph__info { flex: 0 0 auto; display: flex; align-items: center; gap: 6px 22px; padding: 8px 0; }
.oph__info-item,
.oph__info-item:hover {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 14.5px;
	line-height: 1.3;
	color: var(--oph-text) !important;
	text-decoration: none;
	white-space: nowrap;
}
.oph__info-item svg { flex: 0 0 auto; color: #5b3fd6; }
a.oph__info-item:hover { color: var(--oph-violet) !important; }

.oph__card, .oph__psearch { display: none; }

/* ---------- прилипшая первая строка (assets/js/header.js) ---------- */
.oph-ph { height: 0; }
.oph__main.oph-fixed {
	position: fixed;
	top: var(--oph-admin, 0px);
	left: 0;
	right: 0;
	z-index: 100;
	box-shadow: 0 6px 18px rgba(26, 20, 88, .12);
	animation: ophIn .25s ease;
}
@keyframes ophIn { from { transform: translateY(-100%); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- компьютер ---------- */
@media (min-width: 992px) {
	.oph__menu > li.menu-item-has-children:hover > .sub-menu,
	.oph__menu > li.menu-item-has-children:focus-within > .sub-menu {
		display: block;
		position: absolute;
		top: 100%;
		left: 0;
		min-width: 260px;
		z-index: 60;
		background: #fff;
		border: 1px solid var(--oph-line);
		border-radius: 14px;
		box-shadow: 0 18px 40px rgba(26, 20, 88, .14);
	}
}
@media (min-width: 992px) and (max-width: 1199.98px) {
	.oph .op-hs-line--d .op-hs-cat { width: 46px; } /* header-search.css даёт значку 44 px, высота здесь — 46 */
	.oph .oph__row { gap: 12px; }
	.oph__logo img { width: 148px; }
	.oph__tel, .oph__tel:hover { font-size: 18px; }
	.oph__soc-list { gap: 4px; }
	.oph-soc, .oph-soc--max img { width: 36px; height: 36px; }
	.oph__info { display: none; }
	.oph__menu > li > a { padding-left: 12px; padding-right: 12px; }
}

/* ---------- телефон и планшет: логотип, звонок, корзина, меню; меню — панелью на весь экран ---------- */
@media (max-width: 991.98px) {
	.oph .oph__row { min-height: 64px; gap: 8px; padding-top: 10px; padding-bottom: 10px; }
	.oph__logo { margin-right: auto; }
	.oph__logo img { width: 132px; }
	.oph__search, .oph__soc-list, .oph__contact, .oph__info { display: none; }
	.oph__icon { width: 44px; height: 44px; border: 0; background: var(--oph-soft); color: #3b2fb0; }
	.oph__icon--tel { display: flex; }
	.oph__burger { display: flex; width: 44px; height: 44px; }

	/* поиск на страницах магазина — строкой под шапкой (header-search.css показывает её только в старой шапке) */
	.oph .op-hs-line.op-hs-line--m { display: flex; }
	.oph .oph__msearch { padding-bottom: 10px; }
	.oph .op-hs-line--m .op-hs-cat { width: 44px; height: 44px; padding: 0; justify-content: center; }
	.oph .op-hs-line--m .op-hs-cat span { display: none; }
	.oph .op-hs--m .op-hs__row { height: 44px; }

	.oph__navrow {
		display: none;
		position: fixed;
		top: var(--oph-panel-top, 64px);
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 99;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior: contain;
		box-shadow: none;
	}
	.oph.is-open .oph__navrow { display: block; }
	.oph .oph__navin { display: block; padding-top: 10px; padding-bottom: 28px; }
	.oph__psearch { display: block; margin-bottom: 4px; }
	.oph__psearch .op-hs-line .op-hs-cat { width: 44px; height: 44px; padding: 0; justify-content: center; }
	.oph__psearch .op-hs-line .op-hs-cat span { display: none; }
	.oph__psearch .op-hs__row { height: 44px; }
	.oph .oph__menu { display: block; margin: 0 !important; }
	.oph__menu > li > a {
		position: relative;
		padding: 15px 40px 15px 2px;
		border-bottom: 1px solid #f0eefb;
		font-size: 18px;
		white-space: normal;
	}
	.oph__menu > li:last-child > a { border-bottom: 0; }
	.oph__menu > li > a:after {
		content: '';
		position: absolute;
		right: 8px;
		top: 50%;
		width: 9px;
		height: 9px;
		margin-top: -5px;
		border-right: 2.2px solid #5b3fd6;
		border-top: 2.2px solid #5b3fd6;
		transform: rotate(45deg);
	}
	.oph__menu > li.oph-on > a,
	.oph__menu > li.current-menu-item > a { border-image: none; border-bottom: 1px solid #f0eefb; }
	.oph__menu .sub-menu { display: block; padding: 0 0 8px 14px; }

	.oph__card {
		display: block;
		margin-top: 16px;
		padding: 18px;
		border-radius: 18px;
		background: var(--oph-dark);
	}
	.oph__card-tel, .oph__card-tel:hover {
		font-family: var(--oph-font);
		font-weight: 700;
		font-size: 22px;
		color: #fff !important;
		text-decoration: none;
	}
	.oph__card-text { margin-top: 4px; font-size: 14.5px; line-height: 1.4; color: #cfd0f2; }
	.oph__card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
	.oph__card-call {
		flex: 1 1 100%; /* на всю ширину, мессенджеры — под ней */
		height: 46px;
		padding: 0 12px;
		border: 0;
		border-radius: 12px;
		background: #fff;
		font-family: var(--oph-font);
		font-weight: 700;
		font-size: 15px;
		color: var(--oph-violet);
		cursor: pointer;
	}
	.oph__card .oph-soc { width: 46px; height: 46px; border-radius: 12px; background: rgba(255, 255, 255, .14); }
	.oph__card .oph-soc--max { background: none; }
	.oph__card .oph-soc--max img { width: 46px; height: 46px; border-radius: 12px; }
}
@media (max-width: 359.98px) {
	.oph__logo img { width: 112px; }
	.oph .oph__row { gap: 6px; }
	.oph__icon, .oph__burger { width: 42px; height: 42px; }
	.oph__card .oph-soc, .oph__card .oph-soc--max img { width: 42px; height: 42px; }
}
