/* МеталоСетка: шапка на телефоне и планшете. Дополняет css/ms-home-overrides.css, ничего в нём не меняет.
   до 960px — кнопка меню (разделы, вход, избранное, корзина); до 620px — компактная шапка телефона;
   961–1220px — колонки шапки по содержимому, без переносов кнопок. */
.ms-menu-toggle,.ms-menu-phone{display:none}
/* Слоган 11px длиннее фиксированных 171px блока названия — ширина по содержимому */
html body.ms-new-home .ms-brand-copy{width:auto}

/* Небольшие ноутбуки и планшеты горизонтально */
@media (min-width:961px) and (max-width:1220px){
  .ms-header-top{grid-template-columns:auto minmax(160px,1fr) auto auto auto;gap:12px}
  .ms-search{width:100%;max-width:none}
  .ms-phone{width:auto}
  .ms-catalog-btn,.ms-calc-top{white-space:nowrap;padding-left:14px;padding-right:14px}
}

/* Планшеты вертикально и телефоны: меню по кнопке */
@media (max-width:960px){
  .ms-header-top{grid-template-columns:minmax(0,1fr) auto auto auto}
  .ms-search{width:auto;max-width:none;grid-column:1/-1;grid-row:2}
  .ms-calc-top{white-space:nowrap}
  .ms-menu-toggle{display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;margin:0;border:1px solid #d9e3e7;border-radius:6px;background:#fff;color:#0a2a3a;cursor:pointer}
  .ms-menu-toggle .ms-menu-icon{width:20px;gap:4px}
  .ms-header .ms-nav-wrap{display:none}
  .ms-header.ms-menu-open .ms-nav-wrap{display:block}
  .ms-header .ms-nav-row{height:auto;flex-direction:column;align-items:stretch;gap:0;padding-top:4px;padding-bottom:10px}
  .ms-header .ms-main-nav{flex-direction:column;align-items:stretch;gap:0;overflow:visible}
  .ms-header .ms-main-nav a{display:flex;align-items:center;min-height:46px;font-size:16px;opacity:1;border-bottom:1px solid rgba(255,255,255,.1)}
  .ms-header .ms-user-nav{display:flex;flex-wrap:wrap;gap:4px 22px;padding-top:6px}
  .ms-header .ms-user-nav a{min-height:44px;font-size:15px;white-space:nowrap}
  .ms-header .ms-user-nav b{width:20px;height:20px;font-size:11px}
}

/* Телефоны */
@media (max-width:620px){
  .ms-header-top{grid-template-columns:minmax(0,1fr) auto auto;gap:8px;min-height:64px;padding-top:8px;padding-bottom:8px}
  .ms-brand{min-width:0}
  .ms-brand-copy,body.ms-new-home .ms-brand-copy{display:flex;margin-left:4px;width:auto;min-width:0}
  .ms-brand-copy strong,body.ms-new-home .ms-brand-copy strong{font-size:19px;line-height:1.1;letter-spacing:-.5px;white-space:nowrap}
  .ms-brand-copy small,body.ms-new-home .ms-brand-copy small{display:none}
  .ms-search input[type=search]{font-size:16px}
  .ms-calc-top{width:44px;height:44px;min-height:44px}
  .ms-menu-phone{display:flex;align-items:center;min-height:46px;color:#fff;font-size:17px;font-weight:800}
}

/* Закреплённая кнопка покупки на странице товара (телефон, 10.11.2026) */
.ms-sticky-buy{display:none}
@media (max-width:620px){
  .ms-sticky-buy{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:60;align-items:center;gap:12px;padding:10px 14px calc(10px + env(safe-area-inset-bottom));background:#082d3e;box-shadow:0 -4px 16px rgba(0,0,0,.18);transform:translateY(110%);visibility:hidden;transition:transform .2s ease,visibility .2s}
  .ms-sticky-buy.is-visible{transform:none;visibility:visible}
  .ms-sticky-buy-info{display:flex;flex-direction:column;min-width:0;flex:1}
  .ms-sticky-buy-name{color:#c9d8de;font-size:13px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .ms-sticky-buy-price{color:#4cd964;font-size:20px;font-weight:800;line-height:1.2}
  .ms-sticky-buy-btn{flex:0 0 auto;min-height:48px;padding:0 18px;border:0;border-radius:6px;background:#077a85;color:#fff;font-size:16px;font-weight:800;cursor:pointer}
  body.ms-sticky-buy-on .ms-site-footer{padding-bottom:76px}
  body.ms-sticky-buy-on .grecaptcha-badge{bottom:86px!important}
}
/* Закреплённая кнопка: ожидание выбора параметров у товара с вариантами */
.ms-sticky-buy.is-waiting .ms-sticky-buy-btn{background:#4f6570}
