/**
 * HEADER + FOOTER — TEST only
 *
 * HEADER (2026-08-31): односегментный rem+vw clamp от эталона ПРИНЯТОГО TEST @1298×900.
 *   size(v)=etalon*(v/1298); clamp(min@950, interceptRem + slope*100 vw, max@1920)
 *   Source: reports/header-etalon-TEST-1298.json · header-fluid-from-TEST-1298-formulas.json
 *   Эталон = accepted TEST ideal (git 3d44c70 @1298), НЕ калибровка с прода.
 *   Prod на других ширинах — только cmp для глаза.
 *   Footer — one-seg rem+vw clamp от TEST@1298 (как шапка).
 */

@media (min-width: 950px) {
/* снять AMD-zoom если остался; контейнер на всю ширину без cap 1600 */
  html body .header .header__container,
  html body .footer .footer__container {
    zoom: 1 !important;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* ===== HEADER FLUID FROM TEST@1298 (one-seg rem+vw) ===== */
  html body .header {
    padding-top: clamp(0.9834842065rem, calc(0.0000000000rem + 1.6563944530vw), 1.3437500000rem) !important;
    padding-bottom: clamp(0.2287172573rem, calc(0.0000000000rem + 0.3852080123vw), 0.3125000000rem) !important;
  }

  html body .header .header__top {
    align-items: center !important;
    gap: clamp(0.5819573382rem, calc(-0.0000000000rem + 0.9801386749vw), 0.7951375000rem) !important;
    flex-wrap: nowrap !important;
    margin-bottom: clamp(0.6175365948rem, calc(0.0000000000rem + 1.0400616333vw), 0.8437500000rem) !important;
    /* равные зазоры; leftover — в поиск, не space-between */
    justify-content: flex-start !important;
    max-width: none !important;
  }

  html body .header .header__logo {
    flex: 0 0 auto !important;
  }

  html body .header .header__logo img {
    max-height: none !important;
    max-width: none !important;
    width: clamp(9.4231510015rem, calc(0.0000000000rem + 15.8705701079vw), 12.8750000000rem) !important;
    height: auto !important;
  }

  html body .header .header__info {
    display: block !important;
    max-width: none !important;
    overflow: visible !important;
    flex: 0 0 auto !important;
    min-width: auto !important;
    width: auto !important;
    line-height: 1.25 !important;
    align-self: center !important;
  }

  html body .header .header__address,
  html body .header .header__schedule {
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    max-width: none !important;
  }

  html body .header .header__address {
    font-size: clamp(0.6887911691rem, calc(0.0000000000rem + 1.1600693374vw), 0.9411062500rem) !important;
    margin-bottom: clamp(0.2744607088rem, calc(0.0000000000rem + 0.4622496148vw), 0.3750000000rem) !important;
    line-height: clamp(0.6887911691rem, calc(0.0000000000rem + 1.1600693374vw), 0.9411062500rem) !important;
  }

  html body .header .header__schedule {
    font-size: clamp(0.6188585805rem, calc(-0.0000000000rem + 1.0422881356vw), 0.8455562500rem) !important;
    line-height: clamp(0.6188585805rem, calc(-0.0000000000rem + 1.0422881356vw), 0.8455562500rem) !important;
  }

  html body .header .header__form {
    flex: 1 1 auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: auto !important;
    min-width: clamp(17.1552123459rem, calc(-0.0000000000rem + 28.8929892142vw), 23.4394375000rem) !important;
    max-width: none !important;
  }

  html body .header .header__label {
    display: block !important;
    width: 100% !important;
  }

  html body .header .header__search-input {
    padding-top: clamp(0.4574345146rem, calc(0.0000000000rem + 0.7704160247vw), 0.6250000000rem) !important;
    padding-bottom: clamp(0.4574345146rem, calc(0.0000000000rem + 0.7704160247vw), 0.6250000000rem) !important;
    padding-left: clamp(1.8438407646rem, calc(0.0000000000rem + 3.1054160247vw), 2.5192687500rem) !important;
    padding-right: 20px !important;
    line-height: 1.25 !important;
    font-size: clamp(0.8233821263rem, calc(-0.0000000000rem + 1.3867488444vw), 1.1250000000rem) !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  html body .header .header__search-icon {
    position: absolute !important;
    top: 50% !important;
    left: clamp(0.2801786402rem, calc(0.0000000000rem + 0.4718798151vw), 0.3828125000rem) !important;
    right: auto !important;
    width: clamp(1.3265600924rem, calc(0.0000000000rem + 2.2342064715vw), 1.8125000000rem) !important;
    height: clamp(1.2808166410rem, calc(0.0000000000rem + 2.1571648690vw), 1.7500000000rem) !important;
    max-width: none !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    background: transparent !important;
    border: none !important;
    transform: translateY(-50%) !important;
    -webkit-transform: translateY(-50%) !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
  }

  html body .header .header__search-icon svg {
    width: clamp(1.3265600924rem, calc(0.0000000000rem + 2.2342064715vw), 1.8125000000rem) !important;
    height: clamp(1.2808166410rem, calc(0.0000000000rem + 2.1571648690vw), 1.7500000000rem) !important;
    max-width: none !important;
    max-height: none !important;
    display: block !important;
    overflow: visible !important;
  }

  html body .header .header__top .header__favorite {
    width: clamp(1.2808166410rem, calc(0.0000000000rem + 2.1571648690vw), 1.7500000000rem) !important;
    height: clamp(1.4180469954rem, calc(0.0000000000rem + 2.3882896764vw), 1.9375000000rem) !important;
    max-width: none !important;
    min-width: 0 !important;
    flex: 0 0 auto !important;
    align-self: center !important;
    position: relative !important;
    overflow: visible !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    justify-content: normal !important;
  }

  html body .header .header__top .header__favorite .header__basket-count,
  html body .header .header__top .header__favorite .header__basket-count-favorites {
    top: calc(-1 * clamp(0.6861517720rem, calc(0.0000000000rem + 1.1556240370vw), 0.9375000000rem)) !important;
    right: calc(-1 * clamp(0.5489214176rem, calc(0.0000000000rem + 0.9244992296vw), 0.7500000000rem)) !important;
    left: auto !important;
    bottom: auto !important;
    margin: 0 !important;
  }

  html body .header .header__top .header__basket {
    width: clamp(2.2871725732rem, calc(0.0000000000rem + 3.8520801233vw), 3.1250000000rem) !important;
    height: clamp(2.4244029276rem, calc(0.0000000000rem + 4.0832049307vw), 3.3125000000rem) !important;
    max-width: clamp(2.2871725732rem, calc(0.0000000000rem + 3.8520801233vw), 3.1250000000rem) !important;
    min-width: 0 !important;
    flex: 0 0 auto !important;
    align-self: center !important;
    position: relative !important;
    overflow: visible !important;
    margin-right: 0 !important;
    justify-content: normal !important;
  }

  html body .header .header__top .header__favorite svg,
  html body .header .header__top .header__favorite svg.desktop {
    width: clamp(1.2808166410rem, calc(0.0000000000rem + 2.1571648690vw), 1.7500000000rem) !important;
    height: clamp(1.2808166410rem, calc(0.0000000000rem + 2.1571648690vw), 1.7500000000rem) !important;
    max-width: clamp(1.2808166410rem, calc(0.0000000000rem + 2.1571648690vw), 1.7500000000rem) !important;
    max-height: clamp(1.2808166410rem, calc(0.0000000000rem + 2.1571648690vw), 1.7500000000rem) !important;
  }

  html body .header .header__top .header__basket svg,
  html body .header .header__top .header__basket svg.desktop {
    width: clamp(2.2871725732rem, calc(0.0000000000rem + 3.8520801233vw), 3.1250000000rem) !important;
    height: clamp(2.2871725732rem, calc(0.0000000000rem + 3.8520801233vw), 3.1250000000rem) !important;
    max-width: clamp(2.2871725732rem, calc(0.0000000000rem + 3.8520801233vw), 3.1250000000rem) !important;
    max-height: clamp(2.2871725732rem, calc(0.0000000000rem + 3.8520801233vw), 3.1250000000rem) !important;
  }

  html body .header .header__phone.desktop {
    display: flex !important;
    align-items: center !important;
    align-self: center !important;
    gap: clamp(0.4157571986rem, calc(0.0000000000rem + 0.7002226502vw), 0.5680556250rem) !important;
    margin-left: 0 !important;
    flex: 0 0 auto !important;
  }

  html body .header .header__phone.desktop,
  html body .header .header__phone.desktop a,
  html body .header .header__phone-number {
    font-size: clamp(0.7802780720rem, calc(0.0000000000rem + 1.3141525424vw), 1.0661062500rem) !important;
    line-height: clamp(0.7802780720rem, calc(0.0000000000rem + 1.3141525424vw), 1.0661062500rem) !important;
  }

  html body .header .header__phone-icon svg,
  html body .header .header__phone.desktop svg {
    width: clamp(1.1893297381rem, calc(-0.0000000000rem + 2.0030816641vw), 1.6250000000rem) !important;
    height: clamp(1.1893297381rem, calc(-0.0000000000rem + 2.0030816641vw), 1.6250000000rem) !important;
    max-width: clamp(1.1893297381rem, calc(-0.0000000000rem + 2.0030816641vw), 1.6250000000rem) !important;
    max-height: clamp(1.1893297381rem, calc(-0.0000000000rem + 2.0030816641vw), 1.6250000000rem) !important;
  }

  /* Меню: разная ширина по тексту (эталон до «равных ячеек»), «О нас» в ряду.
     Виктор: не моноширина 266px / не мелкий ~13.7px — вернуть padding+кегль эталона. */
  html body .header .header__menu {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  html body .header .header__menu > .header__link,
  html body .header .header__link {
    flex: 0 0 auto !important;
    min-width: auto !important;
    max-width: none !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    white-space: nowrap !important;
    text-align: center !important;
    font-size: clamp(0.6748714368rem, calc(0.0000000000rem + 1.1366255778vw), 1.0996125rem) !important;
    line-height: clamp(0.6748714368rem, calc(0.0000000000rem + 1.1366255778vw), 0.9220875000rem) !important;
    padding: clamp(0.4574345146rem, calc(0.0000000000rem + 0.7704160247vw), 0.6250000000rem) clamp(0.6861517720rem, calc(0.0000000000rem + 1.1556240370vw), 0.9375000000rem) !important;
    letter-spacing: 0 !important;
    box-sizing: border-box !important;
    border-radius: clamp(0.1829738059rem, calc(0.0000000000rem + 0.3081664099vw), 0.2500000000rem) !important;
  }

  /* на средних десктопах чуть плотнее по бокам — иначе 7 пунктов не влезают, без равных ячеек */
  @media (min-width: 950px) and (max-width: 1439.98px) {
    html body .header .header__menu > .header__link,
    html body .header .header__link {
      padding-left: clamp(0.35rem, 0.55vw, 0.55rem) !important;
      padding-right: clamp(0.35rem, 0.55vw, 0.55rem) !important;
    }
  }

  html body .header .header__menu > .header__link:last-child {
    border-radius: clamp(0.1829738059rem, calc(0.0000000000rem + 0.3081664099vw), 0.2500000000rem) !important;
  }

  html body .header .mob_about {
    display: none !important;
  }

  /* ===== FOOTER — one-seg rem+vw clamp от TEST@1298 ===== */
  html body .footer .footer__inner {
    box-sizing: border-box !important;
    width: 90% !important;
    max-width: none !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
	margin: 0 auto;
  }

  html body .footer .footer__left {
    max-width: clamp(23.7865947612rem, calc(-0.0000000000rem + 40.0616332820vw), 48.0739599384rem) !important;
    flex: 0 1 auto !important;
  }

  html body .footer .footer__right {
    display: flex !important;
    flex-direction: row !important;
    flex: 0 1 auto !important;
    min-width: 0 !important;
    justify-content: normal !important;
    align-items: flex-start !important;
    gap: normal !important;
  }

  html body .footer .footer__nav {
    align-items: flex-start !important;
  }

  html body .footer .footer__menu {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: normal !important;
    gap: clamp(0.9148690293rem, calc(0.0000000000rem + 1.5408320493vw), 1.8489984592rem) !important;
  }

  html body .footer .footer__item,
  html body .footer .footer__menu a {
    text-decoration: none !important;
    border: 0 !important;
    background: none !important;
    font-size: clamp(0.5489214176rem, calc(0.0000000000rem + 0.9244992296vw), 0.93990755rem) !important;
    line-height: clamp(0.5489214176rem, calc(0.0000000000rem + 0.9244992296vw), 0.93990755rem) !important;
    height: auto !important;
    min-height: 0 !important;
  }

  html body .footer .footer__phones {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: clamp(0.4574345146rem, calc(0.0000000000rem + 0.7704160247vw), 0.9244992296rem) !important;
    flex-shrink: 0 !important;
    margin-right: clamp(4.5743451464rem, calc(0.0000000000rem + 7.7041602465vw), 9.2449922958rem) !important;
  }

  html body .footer .footer__phone-list {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: clamp(0.2287172573rem, calc(0.0000000000rem + 0.3852080123vw), 0.4622496148rem) !important;
  }

  html body .footer .footer__phone-list .footer__phone,
  html body .footer .footer__phone {
    display: block !important;
    white-space: nowrap !important;
    font-size: clamp(0.9148690293rem, calc(0.0000000000rem + 1.5408320493vw), 1.3489984592rem) !important;
    line-height: clamp(0.9148690293rem, calc(0.0000000000rem + 1.5408320493vw), 1.8489984592rem) !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  /* to-top sitewide = catalog accept ~40px @1298 (не 60/88 с главной/карточки) */
  html body .scrollToTopBtn,
  html body div.scrollToTopBtn,
  html body div.scrollToTopBtn.desktop,
  html body div.scrollToTopBtn.scrollToTopBtn-show,
  html body div.scrollToTopBtn.b-show {
    width: clamp(1.8297380586rem, calc(0.0000000000rem + 3.0816640986vw), 2.5000000000rem) !important;
    height: clamp(1.8297380586rem, calc(0.0000000000rem + 3.0816640986vw), 2.5000000000rem) !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 2.5000000000rem !important;
    max-height: 2.5000000000rem !important;
    right: clamp(1.2500000000rem, calc(0.0000000000rem + 2.0546995378vw), 1.8750000000rem) !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  html body .scrollToTopBtn svg,
  html body div.scrollToTopBtn svg,
  html body div.scrollToTopBtn.desktop svg {
    width: clamp(1.2198253724rem, calc(0.0000000000rem + 2.0544422188vw), 1.6875000000rem) !important;
    height: clamp(1.2500000000rem, calc(0.0000000000rem + 2.1032357473vw), 1.7500000000rem) !important;
    max-width: 1.6875000000rem !important;
    max-height: 1.7500000000rem !important;
    margin: clamp(0.2439750745rem, calc(0.0000000000rem + 0.4108884437vw), 0.3125000000rem) !important;
    padding: 0 !important;
    display: block !important;
    flex: 0 0 auto !important;
  }
}

/* ===== HYBRID @950 structure — fluid clamp НЕ трогать; бить media/laptop-adapt ===== */
@media (min-width: 950px) {
  html body .header .header__info {
    display: block !important;
  }

  html body .header .mob_about {
    display: none !important;
  }
}

/* HF one-seg fluid from accepted TEST@1298 */

/* >1600px (Денис, 05.09): раньше был кап 1600 — справа мёртвая зона, тесно.
   Теперь: шапка тянется до краёв экрана; логотип → адрес → поиск слева с
   воздухом; поиск РАСТЯГИВАЕТСЯ и оставляет ~94px до звезды (как на проде);
   правая группа (звезда/корзина/телефоны) — у правого края. Меню снизу —
   НЕ трогаем структуру: пункты остаются одной сплошной полосой с
   разделителями (flex:1 1 auto из базового правила @950), просто на всю
   ширину. Резину 950–1600 НЕ трогаем — правки строго в этом диапазоне. */
@media (min-width: 1601px) {
  html body .header .header__container {
    max-width: none !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: clamp(14px, 1vw, 26px) !important;
    padding-right: clamp(14px, 1vw, 26px) !important;
  }

  /* верхний ряд: чуть больше воздуха между логотип/адрес/поиск;
     справа было padding-right:58px (легаси, держало группу далеко от края) —
     в этом диапазоне ужимаем, чтобы телефоны/корзина/звезда были у самого края */
  html body .header .header__top {
    gap: clamp(1rem, 1.4vw, 1.9rem) !important;
    padding-right: clamp(10px, 0.8vw, 18px) !important;
  }

  /* поиск: тянется на всю середину, но оставляет фикс-зазор ~94px до звезды */
  html body .header .header__form {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    margin-right: clamp(52px, 3.4vw, 78px) !important;
  }

  /* правая группа встаёт сразу после зазора поиска и упирается в правый край */
  html body .header .header__top .header__favorite {
    margin-left: 0 !important;
  }

  /* ===== ФУТЕР — тот же принцип: тянуть на всю ширину, разнести =====
     логотип+копирайт — у левого края (max-width на .footer__left НЕ снимаем,
     он держит копирайт в читаемую колонку); меню — растянуть по правой зоне;
     телефоны — к правому краю. Резину ≤1600 не трогаем. */
  html body .footer .footer__container {
    padding-left: clamp(14px, 1vw, 26px) !important;
    padding-right: clamp(14px, 1vw, 26px) !important;
  }
  /* правая зона занимает всё оставшееся место */
  html body .footer .footer__right,
  html body .footer .footer__block {
    flex: 1 1 auto !important;
    width: auto !important;
  }
  html body .footer .footer__block {
    justify-content: space-between !important;
    padding-right: 0 !important;
  }
  /* меню: занимает всё пространство между копирайтом и телефонами, 3 колонки
     разнесены равномерно (space-between), с воздухом от копирайта и до телефонов */
  html body .footer .footer__block .footer__nav {
    flex: 1 1 auto !important;
    justify-content: space-between !important;
    margin-left: clamp(40px, 4vw, 96px) !important;
    margin-right: clamp(40px, 4vw, 96px) !important;
  }
  html body .footer .footer__block .footer__nav .footer__menu {
    flex: 0 0 auto !important;
  }
  /* телефоны — натуральная ширина, у правого края */
  html body .footer .footer__block .footer__phones {
    flex: 0 0 auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}
