/* NH Mobile Menu — единый row-компонент на всех уровнях (эталон — корневой уровень).
   Селекторы по реальной разметке: #nav-mobile, ul#mobile-main-nav, ul.sub-menu. */

@media (max-width:991px){
	#nh-mob-top, #nh-mob-bottom{font-family:'Montserrat',sans-serif}

	/* ===== M1/M2/M3: fixed-drawer, перекрывает страницу, затемнение =====
	   slideout.js сдвигает .main-wrap inline translateX — глушим !important (борьба с inline). */
	.main-wrap.slideout-panel{transform:none !important;transition:none !important}
	#nav-mobile.slideout-menu{
		position:fixed !important;top:0 !important;bottom:0 !important;left:0 !important;
		width:min(100vw,400px) !important;max-width:100vw;height:100dvh;
		transform:translateX(-102%) !important;
		transition:transform .32s cubic-bezier(.22,1,.36,1) !important;
		overflow:hidden;z-index:99999;box-shadow:0 0 60px rgba(10,12,18,.35);
		display:flex;flex-direction:column;background:#fff;
	}
	html.slideout-open #nav-mobile.slideout-menu{transform:translateX(0) !important}
	html.slideout-open body{overflow:hidden}
	.nh-mob-ovl{position:fixed;inset:0;background:rgba(8,10,14,.48);opacity:0;pointer-events:none;
		transition:opacity .28s ease;z-index:99998}
	html.slideout-open .nh-mob-ovl{opacity:1;pointer-events:auto}
	#nav-mobile{overscroll-behavior:contain;--nh-m-pad-x:20px}
	/* M1: тема делает ul flex-колонкой с align-items:center — строки схлопываются.
	   Принудительно блочный список на всю ширину. */
	#nav-mobile ul#mobile-main-nav,
	#nav-mobile ul.nh-mob-sub{display:block !important;width:100%}
	#nav-mobile li{width:100% !important;max-width:100%;text-align:left}
	#nav-mobile ul a{width:100%;box-sizing:border-box}

	/* ===== верхний блок: лого + CTA + кнопка закрытия (MX6) ===== */
	#nh-mob-top{background:#fff;border-bottom:1px solid #eef0f3;padding:10px var(--nh-m-pad-x) 12px;position:relative;flex:none;
		/* их тема даёт первому div панели боковые отступы ~21px — выравниваем по сетке M2 */ margin:0 !important;width:100%;box-sizing:border-box}
	/* Drill-down: строка шапки — [Назад | бренд/заголовок уровня | ×] */
	#nh-mob-bar{display:flex;align-items:center;gap:6px;min-height:44px}
	#nh-mob-back{display:none;flex:none;width:44px;height:44px;margin-left:-12px;align-items:center;justify-content:center;
		border:0;background:transparent;color:#C1272D;font-size:28px;line-height:1;cursor:pointer;padding:0}
	#nh-mob-back.nh-show{display:inline-flex}
	#nh-mob-crumb{display:none;min-width:0;flex:1;font-family:'Montserrat',sans-serif;font-weight:700;font-size:14px;
		color:#0f172a;text-transform:uppercase;letter-spacing:.04em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
	#nh-mob-crumb.nh-show{display:block}
	#nh-mob-brand{min-width:0;flex:1}
	#nh-mob-close{margin-left:auto}
	#nh-mob-top .nh-mob-logo{display:flex;align-items:center;gap:10px;text-decoration:none;min-width:0}
	#nh-mob-top .nh-mob-logo > span{min-width:0;max-width:calc(100% - 52px)}
	#nh-mob-top .nh-mob-tagline{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
	#nh-mob-top .nh-mob-logo img{width:44px;height:44px;border-radius:8px}
	#nh-mob-top .nh-mob-name{font-size:17px;font-weight:600;color:#C1272D;letter-spacing:.02em}
	#nh-mob-top .nh-mob-tagline{font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:#8a94a3;margin-top:2px}
	#nh-mob-top .nh-mob-cta{display:block;margin-top:14px;background:#C1272D;color:#fff;text-align:center;
		min-height:48px;line-height:48px;border-radius:10px;font-weight:600;font-size:15px;text-decoration:none}
	#nh-mob-top .nh-mob-cta:active{filter:brightness(.92)}
	#nh-mob-close{
		position:absolute;top:12px;right:12px;width:44px;height:44px;
		display:flex;align-items:center;justify-content:center;
		font-size:26px;line-height:1;color:#0f172a;background:#f2f4f7;border:0;border-radius:50%;
		cursor:pointer;padding:0;
	}
	#nh-mob-close:focus-visible{outline:2px solid #C1272D}

	/* ===== ЕДИНЫЙ ROW на всех уровнях (MX1/MX2/MX3/MX10) ===== */
	#nav-mobile ul{list-style:none;margin:0;padding:0}
	#nav-mobile li{display:block;width:100%}
	#nav-mobile ul a{
		display:flex;align-items:center;justify-content:space-between;gap:12px;
		min-height:52px;padding:12px var(--nh-m-pad-x);box-sizing:border-box;
		font-family:'Montserrat',sans-serif;font-size:16px;font-weight:500;line-height:1.35;
		color:#1a1a1a;background:#fff;border-bottom:1px solid #f0f2f5;border-radius:0;
		text-decoration:none;text-align:left;overflow-wrap:anywhere;
	}
	#nav-mobile ul a:hover{background:#f6f8fa}
	/* caret-спаны их walker'а (баг: все липнут к первому пункту) — прочь, стрелка CSS */
	#nav-mobile .nasa-caret{display:none !important}
	#nav-mobile li.menu-item-has-children > a::after,
	#nav-mobile li.has-dropdown > a::after{
		content:'›';flex:none;font-size:20px;line-height:1;color:#9aa3b0;margin-left:8px;
	}
	/* ===== Drill-down: экраны-слои, виден только активный ===== */
	#nh-mob-viewport{position:relative;flex:1;min-height:0;overflow:hidden;background:#fff}
	html #nh-mob-viewport > ul{
		position:absolute !important;top:0 !important;bottom:0 !important;left:0 !important;right:0 !important;
		width:100% !important;height:100% !important;display:block !important;
		margin:0 !important;padding:0 !important;list-style:none;
		overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;background:#fff;
		/* important: LS page-cache держит устаревшие инлайн-копии старых правил списка,
		   тема навешивает display:flex!important на .navbar-nav */
		transform:translateX(100%) !important;visibility:hidden !important;
		display:block !important;
		transition:transform .3s cubic-bezier(.22,1,.36,1),visibility 0s linear .3s;
	}
	html #nh-mob-viewport > ul[data-state="prev"]{transform:translateX(-30%) !important}
	html #nh-mob-viewport > ul[data-state="active"]{transform:translateX(0) !important;visibility:visible !important;
		transition:transform .3s cubic-bezier(.22,1,.36,1),visibility 0s}
	/* «Смотреть все: <раздел>» */
	#nav-mobile ul.nh-mob-sub .nh-view-all a{font-weight:600;color:#C1272D;background:#fff}
	@media (prefers-reduced-motion:reduce){
		#nh-mob-viewport > ul{transition:none !important}
	}

	/* ===== нижний блок: контакты (MX8: safe-area, прокрутка) ===== */
	#nh-mob-bottom{background:#fff;border-top:1px solid #eef0f3;padding:14px var(--nh-m-pad-x) calc(20px + env(safe-area-inset-bottom));flex:none}
	#nh-mob-bottom a,#nh-mob-bottom div.nh-mob-line{display:flex;align-items:center;gap:10px;
		color:#1a1a1a;font-size:14.5px;line-height:1.45;text-decoration:none;padding:8px 0;min-height:44px;box-sizing:border-box;border:0;background:transparent;text-align:left}
	#nh-mob-bottom .nh-mob-ic{flex:none;width:18px;height:18px}
	#nh-mob-bottom .nh-mob-ic{flex:none;width:18px;height:18px;color:#C1272D;margin-top:1px}
	#nh-mob-bottom .nh-mob-soc{display:flex;gap:10px;margin-top:10px}
	#nh-mob-bottom .nh-mob-soc a{width:38px;height:38px;min-height:38px;border-radius:50%;background:#f2f4f7;
		align-items:center;justify-content:center;border:0;padding:0}
	#nh-mob-bottom .nh-mob-soc .ic{width:17px;height:17px;color:#1a1a1a}
	/* переключатели валюты/языка, перенесённые из топбара */
	#nh-mob-bottom .nh-mob-switchers{display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center;padding:10px 0 2px;border-top:1px solid #f0f2f5;margin-top:8px}
	/* M3: обёртки GTranslate/валют — ряд, перенос, без наложений */
	#nh-mob-bottom .nh-mob-switchers > div{display:flex;flex-wrap:wrap;gap:4px;align-items:center;min-width:0}
	#nh-mob-bottom .nh-mob-switchers #nasa-cur-seg{display:flex;flex-wrap:wrap;gap:6px}
	#nh-mob-bottom .nh-mob-switchers #nasa-cur-seg button{
		min-width:44px;min-height:44px;padding:6px 10px;border-radius:18px;border:1px solid #d8dde5;background:#fff;
		font-family:'Montserrat',sans-serif;font-size:12px;font-weight:600;color:#1a1a1a;cursor:pointer;box-sizing:border-box}
	#nh-mob-bottom .nh-mob-switchers #nasa-cur-seg button.active{background:#C1272D;border-color:#C1272D;color:#fff}
	/* M3: флаги-языки — одна высота, подпись рядом, без наложений */
	#nh-mob-bottom .nh-mob-switchers a.glink{
		display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:4px 8px;
		text-decoration:none;font-size:12px;font-weight:600;color:#1a1a1a;white-space:nowrap}
	#nh-mob-bottom .nh-mob-switchers a.glink img{display:inline-block;vertical-align:middle;margin:0}
	#nh-mob-bottom .nh-mob-switchers a.glink.gt-current-lang{color:#C1272D}

	@media (prefers-reduced-motion:reduce){
		#nav-mobile, #nav-mobile *, #nav-mobile *::after{transition:none !important}
	}
}
