/* MedicalMag — шапка по макету Figma (фрейм 56:2: 56:4 верхняя строка, 56:27 основная, 56:75 разделы).
   Разметка — /local/templates/aspro-premier/page_blocks/header_1.php. Только десктопная шапка:
   фиксированная и мобильная — штатные Aspro. */
.mm-header {
	--mmh-ink: #102b21;
	--mmh-text: #566669;
	--mmh-muted: #8a9697;
	--mmh-brand: #45853f;
	--mmh-brand-2: #41843c;
	--mmh-line: #dce4e1;
	--mmh-field: #cbd5d5;
	--mmh-pill: #f1f5ef;
	background: #fff;
	color: var(--mmh-ink);
}
.mm-header .header__inner { border-bottom: 1px solid var(--mmh-line); }
.mm-header a, .mm-header a:hover { text-decoration: none !important; }
.mm-header a span { border-bottom: 0 !important; }

/* ---------- 1. Верхняя строка ---------- */
.mm-header__top { padding: 0; }
.mm-header__top-row { display: flex; align-items: center; gap: 28px; min-height: 40px; }
.mm-header__city, .mm-header__login {
	display: inline-flex; align-items: center; gap: 8px; flex: none;
	font-size: 13px; line-height: 1; color: var(--mmh-ink);
}
.mm-header__city:hover, .mm-header__login:hover { color: var(--mmh-brand-2); }
.mm-header__city svg, .mm-header__login svg { flex: none; }
.mm-header__top-menu { flex: 1; min-width: 0; }
.mm-header__top-menu .header-menu__wrapper { gap: 0; }
.mm-header__top-menu .header-menu__link--top-level {
	padding: 4px 18px; font-size: 13px; color: var(--mmh-text); background: none !important;
}
.mm-header__top-menu .header-menu__link--top-level:hover { color: var(--mmh-brand-2); opacity: 1; }
.mm-header__top-menu .header-menu__title { font-size: 13px; }
.mm-header__top-menu .header-menu__item + .header-menu__item:not(.header-menu__item--more-items) { position: relative; }
.mm-header__top-menu .header-menu__item + .header-menu__item:not(.header-menu__item--more-items)::before {
	content: ""; position: absolute; left: 0; top: 50%; width: 1px; height: 13px; margin-top: -6px; background: #d2ddda;
}
/* «Акции» переехали в строку разделов справа */
.mm-header__top-menu .header-menu__item:has(> a[href="/sales/"]) { display: none !important; }
.mm-header__top-menu .header-menu__item:has(> a[href="/sales/"]) + .header-menu__item::before { display: none; }
.mm-header__top-menu { margin-left: 2px; }
.mm-header__login { padding-left: 20px; border-left: 1px solid #d2ddda; }

/* ---------- 2. Основная строка ---------- */
.mm-header__main { padding: 14px 0 20px; }
.mm-header__row { display: flex; align-items: center; gap: 20px; width: 100%; }
.mm-header__brand { display: flex; flex-direction: column; gap: 4px; flex: none; }
.mm-header__brand .logo { height: auto !important; }
.mm-header__brand .logo img { max-height: 40px; width: auto; display: block; }
.mm-header__slogan .slogan { font-size: 11.5px; line-height: 1.25; }
.mm-header__slogan .slogan__text { color: #78858b; opacity: 1; max-width: 215px; }
.mm-header__brand .logo { align-self: flex-start; }
.mm-header__brand .logo a { justify-content: flex-start; }

/* Кнопка каталога */
.mm-header__catalog { flex: none; }
.mm-header__catalog .header-menu__link--only-catalog {
	height: 50px; padding: 0 20px; border: 0; border-radius: 7px;
	background: linear-gradient(165deg, #4b8845, #427e3d) !important; color: #fff !important;
	box-shadow: none;
}
.mm-header__catalog .header-menu__link--only-catalog:hover { background: linear-gradient(165deg, #427e3d, #386f34) !important; }
.mm-header__catalog .header-menu__link--only-catalog .icon-block__icon i { display: none; }
.mm-header__catalog .header-menu__link--only-catalog .icon-block__icon {
	width: 16px; height: 13px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='13' fill='none'%3E%3Cpath d='M.7.7h14.6M.7 6.5h14.6M.7 12.3h14.6' stroke='%23fff' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.mm-header__catalog .header-menu__title { font-size: 15px; font-weight: 700; color: #fff; }
.mm-header__catalog .header-menu__title::after { content: "товаров"; margin-left: .12em; }

/* Поиск: только поле и лупа */
.mm-header__search { flex: 1 1 auto; min-width: 300px; }
.mm-header__search .search-input {
	height: 51px; padding: 0 48px 0 18px !important; border: 1px solid var(--mmh-field) !important; border-radius: 7px;
	background: #fff !important; font-size: 14px; color: var(--mmh-ink); box-shadow: none;
}
.mm-header__search .search-input::placeholder { color: #7e8b90; opacity: 1; }
.mm-header__search .search-input:focus { border-color: var(--mmh-brand) !important; }
.mm-header__search .searchtype, .mm-header__search ._voice-trigger { display: none !important; }
.mm-header__search .btn-search i { display: none; }
.mm-header__search .btn-search {
	width: 44px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' fill='none' stroke='%23102B21' stroke-width='1.5' stroke-linecap='round'%3E%3Ccircle cx='6.7' cy='6.7' r='5.9'/%3E%3Cpath d='m11 11 4.8 4.8'/%3E%3C/svg%3E") center / 17px no-repeat !important;
}

/* Телефоны */
.mm-header__phones {
	position: relative; flex: none; display: grid; justify-items: start; row-gap: 2px;
	padding-left: 22px; line-height: 1.2;
}
.mm-header__phones::before {
	content: ""; position: absolute; left: 0; top: 4px; width: 13px; height: 13px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%2341843C' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 .6.6 2.4c0 4.9 5.5 10.4 10.4 10.4l1.8-2.4-3.6-2.5-1.3 1.3C6.1 8.5 4.9 7.3 4.3 5.5l1.2-1.2L3 .6Z'/%3E%3Cpath d='M8.5.6a4.3 4.3 0 0 1 4.3 4.3M8.5 3A1.8 1.8 0 0 1 10.4 4.9'/%3E%3C/svg%3E") center / contain no-repeat;
}
.mm-header__phone-main .phones__phone-link { font-size: 17px; font-weight: 700; color: var(--mmh-ink); }
.mm-header__phone-main .phones__phone-first span { border: 0; }
.mm-header__phone-main .phones__callback { display: none; }
.mm-header__phone-second { font-size: 14px; color: #364f49; }
.mm-header__phone-second:hover, .mm-header__phone-main .phones__phone-link:hover { color: var(--mmh-brand-2); }
.mm-header__schedule { font-size: 11.5px; color: var(--mmh-muted); white-space: nowrap; }
.mm-header__callback {
	padding: 0; margin-top: 1px; font-size: 13px; line-height: 1.3; color: var(--mmh-brand-2);
	border-bottom: 1px solid currentColor !important; background: none;
}
.mm-header__callback:hover { color: #2f6a2b; }

/* Избранное · Сравнение · Корзина */
.mm-header__actions { display: flex; align-items: stretch; flex: none; margin-left: 4px; }
.mm-header__action { position: relative; display: flex; align-items: center; padding: 0 18px; }
.mm-header__action::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 1px; background: var(--mmh-line); }
.mm-header__action:last-child { padding-right: 0; }
.mm-header__action a { gap: 10px; color: var(--mmh-ink) !important; opacity: 1 !important; }
.mm-header__action .header__icon-name { font-size: 13px; color: var(--mmh-ink); margin: 0; }
.mm-header__action .header__icon { display: none !important; }
.mm-header__action .icon-block-with-counter, .mm-header__action .header-cart__inner {
	position: relative; display: block; width: 27px; height: 25px; margin: 8px auto 0; background: center / contain no-repeat;
}
.mm-header__action--favorite .icon-block-with-counter {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='23' fill='none'%3E%3Cpath d='M22.3 2.8a6.4 6.4 0 0 0-9.1 0l-.7.7-.7-.7a6.4 6.4 0 0 0-9.1 9.1l9.8 9.8 9.8-9.8a6.4 6.4 0 0 0 0-9.1Z' stroke='%2341843C' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.mm-header__action--compare .icon-block-with-counter {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='21' fill='none'%3E%3Cpath d='M.9 19.9V8.7m8.9 11.2V.9m8.9 19V6.5' stroke='%2341843C' stroke-width='1.9' stroke-linecap='round'/%3E%3C/svg%3E");
}
.mm-header__action--basket .header-cart__inner {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='23' fill='none' stroke='%2341843C' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M.9.9h4.5l2.2 13.4H21l3.3-10H6.5'/%3E%3Ccircle cx='9.8' cy='21' r='1.1'/%3E%3Ccircle cx='19.8' cy='21' r='1.1'/%3E%3C/svg%3E");
}
/* Счётчики: зелёный кружок, «0» показываем, как в макете */
.mm-header__action .icon-count, .mm-header__action .header-cart__count {
	position: absolute !important; top: -9px !important; right: -12px !important; left: auto !important;
	display: flex !important; align-items: center; justify-content: center;
	min-width: 21px; height: 21px; padding: 0 5px; border-radius: 11px;
	background: var(--mmh-brand) !important; color: #fff !important;
	font-size: 11px; line-height: 1; font-weight: 400; opacity: 1 !important; transform: none !important;
}

/* ---------- 3. Разделы каталога + «Акции» ---------- */
/* как в макете: линия над строкой, пункты в одну строку, равномерно по ширине */
.mm-header__main { padding-bottom: 14px; }
.mm-header__bottom { padding: 0; border-top: 1px solid var(--mmh-line); }
.mm-header__bottom-inner { display: flex; align-items: center; gap: 28px; min-height: 58px; background: none !important; padding: 0 !important; }
.mm-header__sections { flex: 1; min-width: 0; }
.mm-header__sections .drag-scroll__content { gap: 24px !important; justify-content: space-between; min-width: 100%; }
.mm-header__sections .scroll-header-tags__item-container { padding: 0; background: none !important; }
.mm-header__sections .scroll-header-tags__item .font_15 { display: block; font-size: 14px; line-height: 1.2; color: var(--mmh-ink); white-space: nowrap; }
/* в названиях разделов мегаменю стоят <br> — в строке не нужны */
.mm-header__sections .scroll-header-tags__item br { display: none; }
.mm-header__sections .scroll-header-tags__item:hover .font_15 { color: var(--mmh-brand-2); }
.mm-header__sale {
	display: inline-flex; align-items: center; gap: 12px; flex: none;
	height: 38px; padding: 0 22px; border-radius: 6px; background: var(--mmh-pill);
	font-size: 15px; font-weight: 700; color: var(--mmh-brand-2) !important;
}
.mm-header__sale:hover { background: #e4ede0; }
.mm-header .header__inner { border-bottom-color: var(--mmh-line); }

/* ---------- Геометрия по макету (координаты фрейма 56:2 при 1440 px) ----------
   Контейнер шапки 41…1421 px — шире контентной колонки сайта, как в макете.
   Полосы: верхняя 0–41 (фон #f5f7f6), основная 41–156, линия, разделы 157–208. */
.mm-header .header__inner { border-bottom: 0; }
.mm-header__top > .maxwidth-theme,
.mm-header__main > .maxwidth-theme,
.mm-header__bottom > .maxwidth-theme { max-width: 1440px; padding-left: 40px; padding-right: 20px; }
.mm-header__top { background: #f5f7f6; }
.mm-header__top-row { min-height: 41px; gap: 0; }
.mm-header__city { margin-left: 21px; width: 156px; }
.mm-header__top-menu .header-menu__link--top-level { padding: 4px 24px; }
.mm-header__login { margin-left: 24px; padding-left: 20px; }

.mm-header__main { padding: 23px 0 19px; }
.mm-header__row { gap: 0; }
.mm-header__brand { width: 195px; margin-right: 24px; }
.mm-header__catalog { margin-right: 18px; }
.mm-header__catalog .header-menu__link--only-catalog { width: 183px; padding: 0; justify-content: center; }
.mm-header__search { flex: 1 1 409px; min-width: 0; margin-right: 26px; }
.mm-header__phones { width: 191px; margin-right: 20px; }
.mm-header__actions { margin-left: 0; align-self: stretch; }
.mm-header__action { width: 113px; padding: 0; justify-content: center; }
.mm-header__action:last-child { width: 88px; padding: 0; justify-content: flex-end; }
.mm-header__action::before { top: 3px; bottom: 3px; }

.mm-header__bottom { border-top: 1px solid #ececec; border-bottom: 1px solid var(--mmh-line); box-shadow: inset 0 1px 2px rgba(16, 43, 33, .04); }
.mm-header__bottom > .maxwidth-theme { padding-left: 44px; }
.mm-header__bottom-inner { min-height: 50px; gap: 52px; }
.mm-header__sections .drag-scroll__content { gap: 24px !important; }
.mm-header__sections .scroll-header-tags__item .font_15 { font-size: 14px; }
.mm-header__sale { width: 112px; padding: 0; justify-content: center; }

/* высоты полос — жёстко, как в макете: Aspro добавляет свои отступы частям шапки */
.mm-header .mm-header__top { margin: 0 !important; }
.mm-header .mm-header__main { height: 115px; padding: 0 !important; margin: 0 !important; display: flex; align-items: center; }
.mm-header .mm-header__main > .maxwidth-theme { width: 100%; }
.mm-header .mm-header__bottom { margin: 0 !important; }
.mm-header__bottom-inner { min-height: 51px; }
.mm-header__slogan .slogan { font-size: 11px; }
.mm-header__slogan .slogan__text { max-width: 195px; }
.mm-header__city { width: 132px; }
.mm-header__search .search-input { font-size: 13px; }
.mm-header__phone-main .phones__phone-link { font-size: 16px; }
.mm-header__phone-second { font-size: 13px; }
.mm-header__schedule { font-size: 11px; }
.mm-header__action .header__icon-name { font-size: 12.5px; }

/* верхняя полоса 41 px, телефоны — шаг строк как в макете (23 / 19 / 17 px) */
.mm-header__top-row { height: 41px; }
.mm-header__phones { row-gap: 0; line-height: 1.15; }
.mm-header__phone-main .phones__phone-link { line-height: 18px; }
.mm-header__phone-second { margin-top: 5px; line-height: 15px; }
.mm-header__schedule { margin-top: 4px; line-height: 13px; }
.mm-header__callback { margin-top: 5px; line-height: 14px; }
.mm-header__phones::before { top: 3px; }

/* разделы — жирнее */
.mm-header__sections .scroll-header-tags__item .font_15 { font-weight: 500; }

/* «Акции» — в стиле стикера «Акция» на карточках товаров (фон #ffeca8, тёмный текст, скругление 4px) */
.mm-header .mm-header__sale {
	gap: 8px; background: #ffeca8; color: #222 !important; box-shadow: none; border-radius: 4px !important;
	font-weight: 600; letter-spacing: 0; transition: background-color .2s ease;
}
.mm-header .mm-header__sale:hover { background: #ffe07a; color: #222 !important; }
.mm-header__sale-ico { width: 14px; height: 14px; padding: 0; border-radius: 0; background: none; color: #222; }

/* Избранное · Сравнение · Корзина — легче: иконка 22 px, тонкая линия, короткие разделители, маленький счётчик */
.mm-header__action a { gap: 6px; }
.mm-header__action::before { top: 50%; bottom: auto; height: 44px; margin-top: -22px; }
.mm-header__action .icon-block-with-counter, .mm-header__action .header-cart__inner { width: 22px; height: 21px; margin-top: 4px; }
.mm-header__action--favorite .icon-block-with-counter {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='23' fill='none'%3E%3Cpath d='M22.3 2.8a6.4 6.4 0 0 0-9.1 0l-.7.7-.7-.7a6.4 6.4 0 0 0-9.1 9.1l9.8 9.8 9.8-9.8a6.4 6.4 0 0 0 0-9.1Z' stroke='%2341843C' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.mm-header__action--compare .icon-block-with-counter {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='21' fill='none'%3E%3Cpath d='M.9 19.9V8.7m8.9 11.2V.9m8.9 19V6.5' stroke='%2341843C' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}
.mm-header__action--basket .header-cart__inner {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='23' fill='none' stroke='%2341843C' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M.9.9h4.5l2.2 13.4H21l3.3-10H6.5'/%3E%3Ccircle cx='9.8' cy='21' r='1.1'/%3E%3Ccircle cx='19.8' cy='21' r='1.1'/%3E%3C/svg%3E");
}
.mm-header__action .icon-count, .mm-header__action .header-cart__count {
	top: -7px !important; right: -10px !important; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
	font-size: 10px; box-shadow: 0 0 0 2px #fff;
}
.mm-header__action .header__icon-name { font-size: 12px; color: #3c4f49; }
.mm-header .mm-header__top-row { height: 41px !important; min-height: 41px !important; }

/* Aspro: у header__inner padding-bottom 15px (белая полоса под разделами), у верхней полосы height 38px */
.mm-header .header__inner { padding-bottom: 0 !important; }
.mm-header .mm-header__top { height: 41px !important; display: flex; align-items: center; }
.mm-header .mm-header__top > .maxwidth-theme { width: 100%; }

@media (max-width: 1439px) {
	.mm-header__top > .maxwidth-theme,
	.mm-header__main > .maxwidth-theme,
	.mm-header__bottom > .maxwidth-theme { padding-left: 24px; padding-right: 24px; }
	.mm-header__city { margin-left: 0; width: auto; margin-right: 24px; }
	.mm-header__brand { width: auto; }
}

/* ---------- Адаптив (мобильная шапка у Aspro своя, до 991px) ---------- */
@media (max-width: 1399px) {
	.mm-header__row { gap: 16px; }
	.mm-header__action { width: 96px; }
	.mm-header__action:last-child { width: 76px; }
	.mm-header__slogan { display: none; }
}
@media (max-width: 1199px) {
	.mm-header__phone-second, .mm-header__schedule { display: none; }
	.mm-header__catalog .header-menu__title::after { content: none; }
	.mm-header__top-menu .header-menu__link--top-level { padding: 4px 12px; }
	.mm-header__action .header__icon-name { display: none; }
	.mm-header__sections .scroll-header-tags__item .font_15 { font-size: 13px; }
	.mm-header__search { min-width: 180px; }
	.mm-header__row { gap: 12px; }
	.mm-header__action { width: 56px; }
	.mm-header__action:last-child { width: 48px; }
	.mm-header__phones { width: auto; }
	.mm-header__catalog .header-menu__link--only-catalog { width: auto; }
	.mm-header__catalog .header-menu__link--only-catalog { padding: 0 16px; }
	.mm-header__brand, .mm-header__catalog, .mm-header__search, .mm-header__phones { margin-right: 12px; }
	.mm-header__sections .drag-scroll__content { gap: 20px !important; }
}
