:root {
  --h-header: 64px;
  --h-header-mobile: 56px;
  --c-text: #242424;
  --c-text-muted: #6f5e5b;
  --c-bg-light: #ffffff;
  --c-bg-light-soft: #f4f4f4;
  /* Синий цвет кнопок на /korably: rgb(55, 94, 110) */
  --c-accent: #375e6e;
  --c-accent-soft: #eaf0f2;
  --c-line: #e6e6e6;
  --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-strong: 0 4px 16px rgba(0, 0, 0, 0.10);
  --t-bg: 250ms ease;
  --t-color: 200ms ease;
  --font-base: Arial, "Helvetica Neue", Helvetica, sans-serif;
}
.site-header, .site-header *, .site-header *::before, .site-header *::after,
.mobile-menu, .mobile-menu *, .mobile-menu *::before, .mobile-menu *::after {
  box-sizing: border-box;
}
.site-header a, .mobile-menu a { color: inherit; text-decoration: none; }
.site-header button, .mobile-menu button { font: inherit; cursor: pointer; }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  height: var(--h-header);
  background: #ffffff;
  color: var(--c-text);
  box-shadow: var(--shadow-light);
  transition: box-shadow var(--t-bg);
  font-family: var(--font-base);
}
.site-header--scrolled { box-shadow: var(--shadow-strong); }

.site-header__inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}

/* ---------- Логотип ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-base);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--c-text);
  transition: color var(--t-color);
}
.logo:hover { color: var(--c-accent); }
.logo--img { padding: 0; }
.logo--img:hover { background: transparent; }
.logo__img { height: 30px; width: auto; display: block; }

.logo__icon {
  display: inline-block;
  width: 26px;
  height: 18px;
  flex-shrink: 0;
  color: currentColor;
}
.logo__icon svg { width: 100%; height: 100%; display: block; }

/* ---------- Основное меню ---------- */
.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex: 1;
  justify-content: center;
}
.nav__item { list-style: none; position: relative; }

.nav__link,
.nav__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-base);
  font-size: 17px;
  line-height: 1.2;
  font-weight: 500;
  color: inherit;
  white-space: nowrap;
  padding: 6px 2px;
  position: relative;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color var(--t-color);
}

.nav__link::after,
.nav__toggle::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--c-accent);
  opacity: 0;
  transition: opacity var(--t-bg);
}

.nav__link:hover,
.nav__toggle:hover { color: var(--c-accent); }

.nav__link:hover::after,
.nav__link:focus-visible::after,
.nav__toggle:hover::after,
.nav__toggle[aria-expanded="true"]::after {
  opacity: 1;
  background: var(--c-accent);
}

.nav__link--active,
.nav__toggle--active { color: var(--c-accent); }

.nav__link--active::after,
.nav__toggle--active::after {
  opacity: 1;
  background: var(--c-accent);
}

/* Каретка у пункта-ссылки «Каталог» — та же, что у кнопки-подменю */
.nav__toggle .caret,
.nav__link .caret {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform var(--t-bg);
}
.nav__toggle[aria-expanded="true"] .caret { transform: rotate(180deg); }

/* ---------- Подменю ---------- */
.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background: var(--c-bg-light);
  color: var(--c-text);
  min-width: 270px;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--t-bg), transform var(--t-bg), visibility 0s linear var(--t-bg);
  z-index: 1;
  border: 1px solid var(--c-line);
}

.nav__item--has-submenu:hover .submenu,
.nav__item--has-submenu:focus-within .submenu,
.nav__item--open .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity var(--t-bg), transform var(--t-bg), visibility 0s linear 0s;
}

.submenu__item { list-style: none; }

.submenu__link {
  display: block;
  padding: 11px 16px;
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 1.3;
  color: var(--c-text);
  white-space: nowrap;
  transition: background var(--t-bg), color var(--t-color), padding-left var(--t-bg);
  position: relative;
}

.submenu__link:hover,
.submenu__link:focus-visible {
  background: var(--c-accent-soft);
  color: var(--c-accent);
  padding-left: 20px;
}

.submenu__link--active {
  background: var(--c-accent-soft);
  color: var(--c-accent);
  font-weight: 600;
}

.submenu__link--active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--c-accent);
}

/* ---------- Телефон (синий) ---------- */
.phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-base);
  font-size: 17px;
  line-height: 1.2;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--c-accent);
  transition: color var(--t-color);
}
.phone:hover { color: var(--c-accent); }

.phone__icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  color: var(--c-accent);
  flex-shrink: 0;
}
.phone__icon svg { width: 100%; height: 100%; display: block; }

/* ---------- Иконки почты и Telegram (синие) ---------- */
.header-socials {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.header-socials__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--c-accent);
  transition: background var(--t-color);
}
.header-socials__link:hover,
.header-socials__link:focus-visible {
  color: var(--c-accent);
  background: var(--c-accent-soft);
}
.header-socials__icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  color: var(--c-accent);
}
.header-socials__icon svg { width: 100%; height: 100%; display: block; }

/* ---------- Бургер (синий) ---------- */
.burger {
  display: none;
  background: transparent;
  border: 0;
  padding: 0;
  width: 28px;
  height: 20px;
  position: relative;
  color: var(--c-accent);
  flex-shrink: 0;
}
.burger span {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
  transition: transform var(--t-bg), opacity var(--t-bg), top var(--t-bg);
}
.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 9px; }
.burger span:nth-child(3) { top: 9px; }
.burger span:nth-child(4) { top: 18px; }
.burger--open span:nth-child(1) { top: 9px; opacity: 0; }
.burger--open span:nth-child(2) { transform: rotate(45deg); }
.burger--open span:nth-child(3) { transform: rotate(-45deg); }
.burger--open span:nth-child(4) { top: 9px; opacity: 0; }

/* ---------- Мобильное мену (fixed — правильно, перекрывает всё) ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 998;
  background: var(--c-bg-light);
  color: var(--c-text);
  padding: calc(var(--h-header-mobile) + 24px) 24px 32px;
  overflow-y: auto;
  transform: translateY(-100%);
  transition: transform 300ms ease;
  display: none;
  font-family: var(--font-base);
}
.mobile-menu--open { transform: translateY(0); }

.mobile-menu__list { list-style: none; margin: 0; padding: 0; }
.mobile-menu__item { list-style: none; }

.mobile-menu__item > a,
.mobile-menu__toggle {
  display: block;
  padding: 14px 4px;
  font-family: var(--font-base);
  font-size: 20px;
  line-height: 1.2;
  font-weight: 500;
  border-bottom: 1px solid var(--c-line);
  width: 100%;
  text-align: left;
  background: transparent;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  color: inherit;
  transition: color var(--t-color);
}

.mobile-menu__toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mobile-menu__toggle .caret {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform var(--t-bg);
  margin-right: 8px;
}
.mobile-menu__toggle[aria-expanded="true"] .caret { transform: rotate(180deg); }

.mobile-menu__sub {
  list-style: none;
  margin: 0;
  padding: 0 0 8px 16px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 250ms ease;
}
/* 9 пунктов в подменю «Каталог» — 700px, чтобы список раскрылся целиком */
.mobile-menu__item--open .mobile-menu__sub { max-height: 700px; }

.mobile-menu__sub a {
  display: block;
  padding: 11px 4px;
  font-family: var(--font-base);
  font-size: 17px;
  line-height: 1.3;
  color: var(--c-text-muted);
  border-bottom: 1px solid var(--c-line);
  transition: color var(--t-color);
}

.mobile-menu__item > a:hover,
.mobile-menu__sub a:hover,
.mobile-menu__toggle:hover { color: var(--c-accent); }

.mobile-menu__link--active {
  color: var(--c-accent) !important;
  font-weight: 600;
  position: relative;
}
.mobile-menu__link--active::before {
  content: "\25B8";
  position: absolute;
  left: -16px;
  color: var(--c-accent);
}

.mobile-menu__phone {
  margin-top: 24px;
  display: block;
  font-family: var(--font-base);
  font-size: 22px;
  font-weight: 600;
  color: var(--c-accent);
}
.mobile-menu__email {
  margin-top: 8px;
  display: block;
  font-family: var(--font-base);
  font-size: 16px;
  color: var(--c-text-muted);
  transition: color var(--t-color);
}
.mobile-menu__email:hover { color: var(--c-accent); }

.mobile-menu__socials {
  margin-top: 24px;
  display: flex;
  gap: 16px;
  align-items: center;
}
.mobile-menu__socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--c-line);
  border-radius: 50%;
  color: var(--c-accent);
  transition: border-color var(--t-color), background var(--t-color);
}
.mobile-menu__socials a:hover {
  border-color: var(--c-accent);
  background: var(--c-accent-soft);
}
.mobile-menu__socials svg { width: 18px; height: 18px; }

body.menu-open { overflow: hidden; }

/* ---------- Адаптив ---------- */
@media (max-width: 980px) {
  .site-header { height: var(--h-header-mobile); }

  /* Логотип слева, телефон и бургер прижаты вправо */
  .logo { margin-right: auto; }

  .nav { display: none; }
  .burger { display: block; }
  .mobile-menu { display: block; }
  .site-header__inner { gap: 16px; }
  .phone { margin-left: auto; }
  .phone__text { display: none; }
  .phone__icon { width: 22px; height: 22px; }
  .header-socials { display: none; }
  .logo__img { height: 26px; }
}

@media (min-width: 981px) {
  .mobile-menu { display: none; }
}
