/* Шапка каталога, вынесенная для страниц вне catalog.css (эталон — каталог).
   Токены объявлены на самой шапке, чтобы не пересекаться со стилями старых страниц. */

.site-header,
.mobile-menu {
  --white: #ffffff;
  --gray-300: #737373;
  --gray-500: #404040;
  --gray-600: #1f2022;
  --radius-control: 6px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-header: 0 12px 32px rgba(0, 0, 0, 0.24);
  --shadow-header-mobile: 0 8px 16px rgba(0, 0, 0, 0.16);
  --page-max: 1920px;

  --header-h: clamp(60px, calc(65.6575px + -0.442vw), 64px);
  --logo-h: 44px;
  --page-pad: clamp(16px, calc(-10.5193px + 7.0718vw), 80px);
  --fs-nav: clamp(13px, calc(14.4144px + -0.1105vw), 14px);
  --lh-nav: clamp(16px, calc(18.8287px + -0.221vw), 18px);
  --fs-button: clamp(13px, calc(14.4144px + -0.1105vw), 14px);
  --lh-button: clamp(16px, calc(18.8287px + -0.221vw), 18px);
}

@media (min-width: 1280px) {
  .site-header,
  .mobile-menu {
    --header-h: clamp(60px, calc(-20px + 6.25vw), 80px);
    --logo-h: clamp(44px, calc(-36px + 6.25vw), 64px);
    --page-pad: 80px;
    --fs-nav: clamp(13px, calc(5px + 0.625vw), 15px);
    --lh-nav: clamp(16px, calc(0px + 1.25vw), 20px);
    --fs-button: clamp(13px, calc(5px + 0.625vw), 15px);
    --lh-button: clamp(16px, calc(0px + 1.25vw), 20px);
  }
}

@media (min-width: 1600px) {
  .site-header,
  .mobile-menu {
    --header-h: clamp(80px, calc(-20px + 6.25vw), 100px);
    --logo-h: clamp(64px, calc(-36px + 6.25vw), 84px);
    --fs-nav: clamp(15px, calc(10px + 0.3125vw), 16px);
    --lh-nav: clamp(20px, calc(0px + 1.25vw), 24px);
    --fs-button: clamp(15px, calc(10px + 0.3125vw), 16px);
    --lh-button: 20px;
  }
}

@media (min-width: 1920px) {
  .site-header,
  .mobile-menu {
    --header-h: 100px;
    --logo-h: 84px;
    --fs-nav: 16px;
    --lh-nav: 24px;
    --fs-button: 16px;
    --lh-button: 20px;
  }
}

.site-header .icon-mask {
  display: block;
  flex: none;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;          mask-repeat: no-repeat;
  -webkit-mask-position: center;           mask-position: center;
  -webkit-mask-size: contain;              mask-size: contain;
}
.site-header .icon-cart { -webkit-mask-image: url("/img/icon-11.svg"); mask-image: url("/img/icon-11.svg"); }
.site-header .icon-ne   { -webkit-mask-image: url("/img/icon-8.svg");  mask-image: url("/img/icon-8.svg"); }

.site-header .shell {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--page-pad);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  background: var(--gray-500);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  transition: box-shadow 0.24s var(--ease);
}

.site-header.is-stuck { box-shadow: var(--shadow-header); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-header__logo {
  display: block;
  flex: none;
  height: var(--logo-h);
  aspect-ratio: 134 / 84;
  background: url("/img/logo.png?v=20260822-r") center / contain no-repeat;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--white);
  font-size: var(--fs-nav);
  line-height: var(--lh-nav);
  font-weight: 400;
  white-space: nowrap;
  text-decoration: none;
  transition: opacity 0.16s var(--ease);
}
.site-nav__link:hover { opacity: 0.7; color: var(--white); }
.site-nav__link .icon-mask { width: 20px; height: 20px; }

.site-header .btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: 1px solid var(--white);
  border-radius: var(--radius-control);
  color: var(--white);
  background: transparent;
  font-size: var(--fs-button);
  line-height: var(--lh-button);
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}
.site-header .btn-outline:hover { background: var(--white); color: var(--gray-600); }

.site-header .header-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  transition: opacity 0.16s var(--ease);
}
.site-header .header-cart:hover { opacity: 0.7; background: transparent; }
.site-header .header-cart .icon-mask { width: 32px; height: 32px; }

.site-header .header-cart__badge {
  position: absolute;
  display: inline-block;   /* перебивает .product-page .cartTotalItems{display:none} */
  top: 2px;
  right: 0;
  /* гасим старый .cartTotalItems из style.css: круг 24px с рамкой и своим шрифтом */
  left: auto;
  bottom: auto;
  width: auto;
  border: 0;
  font-family: inherit;
  font-style: normal;
  letter-spacing: normal;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--white);
  color: var(--gray-600);
  font-size: 11px;
  line-height: 18px;
  font-weight: 500;
  text-align: center;
}
.site-header .header-cart__badge:empty,
.site-header .header-cart__badge[hidden] { display: none; }

.site-header .burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: none;
  padding: 0;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-control);
  background: transparent;
  cursor: pointer;
}
.site-header .burger span {
  position: relative;
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--white);
  transition: transform 0.24s var(--ease), opacity 0.18s var(--ease);
}
.site-header .burger span::before,
.site-header .burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 1.5px;
  background: var(--white);
  transition: transform 0.24s var(--ease);
}
.site-header .burger span::before { top: -6px; }
.site-header .burger span::after  { top: 6px; }
.site-header .burger.is-open span { background: transparent; }
.site-header .burger.is-open span::before { transform: translateY(6px) rotate(45deg); }
.site-header .burger.is-open span::after  { transform: translateY(-6px) rotate(-45deg); }

.site-header .header-mobile-actions {
  display: none;
  align-items: center;
  gap: 12px;
}

@media (max-width: 1023px) {
  .site-nav { display: none; }
  .site-header .burger,
  .site-header .header-mobile-actions { display: flex; }
}

@media (max-width: 767px) {
  .site-header.is-stuck { box-shadow: var(--shadow-header-mobile); }
  .site-header .header-cart { width: 40px; height: 40px; }
  .site-header .header-cart .icon-mask { width: 24px; height: 24px; }
}
