/* Единая шапка сайта. Файл подключается после основных стилей страницы. */
.site-header.ves-shared-header {
  position: sticky !important;
  top: 0;
  z-index: 10000 !important;
  box-sizing: border-box;
  display: block !important;
  width: 100%;
  padding: 16px clamp(20px, 3.5vw, 56px) 12px !important;
  color: #032f55 !important;
  background:
    radial-gradient(circle at 88% 12%, rgba(244, 176, 0, 0.10), transparent 28%),
    rgba(255, 255, 255, 0.98) !important;
  border: 0 !important;
  border-bottom: 1px solid #dce6ef !important;
  box-shadow: 0 8px 26px rgba(4, 39, 72, 0.05) !important;
  overflow: visible !important;
}

.ves-shared-header,
.ves-shared-header * {
  box-sizing: border-box;
}

.ves-shared-header .header-topline,
.ves-shared-header .header-catalog-row {
  width: min(100%, 1440px) !important;
  max-width: 1440px !important;
  margin-inline: auto !important;
}

.ves-shared-header .header-topline {
  display: grid !important;
  grid-template-columns: minmax(190px, 240px) minmax(280px, 430px) auto minmax(270px, 1fr) !important;
  gap: 24px !important;
  align-items: center !important;
}

.ves-shared-header .brand {
  display: flex;
  min-width: 0;
  color: #032f55 !important;
  text-decoration: none;
}

.ves-shared-header .brand span {
  display: grid;
  min-width: 0;
}

.ves-shared-header .brand strong {
  color: #032f55 !important;
  font-size: 28px !important;
  font-weight: 750 !important;
  line-height: 1.05 !important;
  letter-spacing: -0.03em !important;
}

.ves-shared-header .brand small {
  margin-top: 4px;
  color: #536982 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
}

.ves-shared-header .header-search {
  position: relative;
  width: 100%;
  margin: 0 !important;
}

.ves-shared-header .header-search input {
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 10px 48px 10px 14px;
  color: #032f55;
  background: #fff;
  border: 1px solid #d1dfeb;
  border-radius: 9px;
  font: inherit;
}

.ves-shared-header .header-search button {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  color: #06345d;
  background: transparent;
  border: 0;
  font-size: 21px;
  transform: translateY(-50%);
  cursor: pointer;
}

.ves-shared-header .header-contact {
  display: grid !important;
  gap: 3px !important;
  margin: 0 !important;
  white-space: nowrap;
}

.ves-shared-header .phone {
  color: #032f55 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-decoration: none;
}

.ves-shared-header .callback-link {
  color: #06345d !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  text-decoration: underline;
  text-decoration-color: #f2a900;
  text-underline-offset: 3px;
}

.ves-shared-header .main-nav.home-links {
  display: flex !important;
  gap: clamp(20px, 2.2vw, 32px) !important;
  align-items: center !important;
  justify-content: flex-end !important;
  margin: 0 !important;
  color: #032f55 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  white-space: nowrap;
}

.ves-shared-header .main-nav a {
  position: relative;
  padding: 10px 0 !important;
  color: #032f55 !important;
  font-weight: 500 !important;
  text-decoration: none;
}

.ves-shared-header .main-nav a[aria-current="page"] {
  box-shadow: none !important;
}

.ves-shared-header .main-nav a::after {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  display: block !important;
  height: 2px;
  content: "";
  background: #f2a900;
  border-radius: 999px;
  opacity: 0;
}

.ves-shared-header .main-nav a:hover::after,
.ves-shared-header .main-nav a[aria-current="page"]::after {
  opacity: 1;
}

.ves-shared-header .header-catalog-row {
  display: grid !important;
  grid-template-columns: minmax(190px, 240px) minmax(280px, 430px) auto minmax(270px, 1fr) !important;
  gap: 24px !important;
  align-items: center !important;
  min-height: 44px;
  margin-top: 12px !important;
}

.ves-shared-header .header-catalog-row > .catalog-button,
.ves-shared-header .header-catalog-row > .ves-catalog-menu,
.ves-shared-header .header-catalog-row > .company-catalog-menu {
  grid-column: 1;
  justify-self: start;
}

.ves-shared-header .catalog-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0 !important;
  min-height: 44px;
  margin: 0 !important;
  padding: 10px 24px;
  color: #fff !important;
  background: #06345d !important;
  border: 1px solid #f2a900;
  border-radius: 9px;
  box-shadow: none !important;
  font-size: 14px;
  font-weight: 650 !important;
  text-decoration: none;
}

.ves-shared-header .catalog-button::before {
  margin-right: 12px;
  color: #f2a900;
  content: "☰" !important;
  font-size: 17px;
}

.ves-shared-header .header-quote {
  grid-column: 4;
  justify-self: end;
  display: inline-flex !important;
  min-width: 165px;
  min-height: 44px;
  margin: 0 !important;
  padding: 10px 20px;
  align-items: center;
  justify-content: center;
  color: #032f55 !important;
  background: linear-gradient(180deg, #ffc328, #ffb400) !important;
  border: 1px solid #efa700;
  border-radius: 9px;
  box-shadow: 0 8px 20px rgba(242, 169, 0, 0.18);
  font-size: 14px;
  font-weight: 700 !important;
  text-decoration: none;
  white-space: nowrap;
}

/* Выпадающий каталог входит в общий хедер и не зависит от стилей конкретной страницы. */
.ves-shared-header .ves-catalog-menu,
.ves-shared-header .company-catalog-menu {
  position: relative;
  z-index: 10020;
  width: 100%;
  overflow: visible;
}

.ves-shared-header .ves-catalog-dropdown,
.ves-shared-header .company-catalog-mega {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 10030;
  width: min(370px, calc(100vw - 32px));
  padding-top: 9px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.ves-shared-header .ves-catalog-menu:hover > .ves-catalog-dropdown,
.ves-shared-header .ves-catalog-menu:focus-within > .ves-catalog-dropdown,
.ves-shared-header .ves-catalog-menu.is-open > .ves-catalog-dropdown,
.ves-shared-header .company-catalog-menu:hover > .company-catalog-mega,
.ves-shared-header .company-catalog-menu:focus-within > .company-catalog-mega,
.ves-shared-header .company-catalog-menu.is-open > .company-catalog-mega {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.ves-shared-header .ves-catalog-dropdown__panel,
.ves-shared-header .company-catalog-menu__panel {
  overflow: hidden;
  background: #fff;
  border: 1px solid #dce6ef;
  border-radius: 16px;
  box-shadow: 0 22px 52px rgba(4, 31, 58, 0.2);
}

.ves-shared-header .ves-catalog-dropdown__panel > a,
.ves-shared-header .company-catalog-menu__panel > a {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 10px 18px;
  color: #06335c !important;
  background: #fff;
  border-left: 3px solid transparent;
  font-size: 15px;
  font-weight: 400 !important;
  line-height: 1.35;
  text-decoration: none;
}

.ves-shared-header .ves-catalog-dropdown__panel > a:not(.ves-catalog-dropdown__all)::after,
.ves-shared-header .company-catalog-menu__panel > a:not(.company-catalog-menu__all)::after {
  flex: 0 0 auto;
  color: #f2a900;
  content: "›";
  font-size: 18px;
}

.ves-shared-header .ves-catalog-dropdown__panel > a:hover,
.ves-shared-header .ves-catalog-dropdown__panel > a:focus-visible,
.ves-shared-header .company-catalog-menu__panel > a:hover,
.ves-shared-header .company-catalog-menu__panel > a:focus-visible {
  background: #fff8e6;
  border-left-color: #f2a900;
  outline: none;
}

.ves-shared-header .ves-catalog-dropdown__panel > .ves-catalog-dropdown__all,
.ves-shared-header .company-catalog-menu__panel > .company-catalog-menu__all {
  min-height: 52px;
  margin-top: 5px;
  color: #06335c !important;
  background: #fff8e6;
  border-top: 1px solid #f0cf7e;
  font-weight: 700 !important;
}

.ves-shared-header .ves-catalog-dropdown__all span,
.ves-shared-header .company-catalog-menu__all span {
  color: #f2a900;
  font-size: 19px;
}

@media (max-width: 1120px) {
  .ves-shared-header .header-topline,
  .ves-shared-header .header-catalog-row {
    grid-template-columns: minmax(180px, 220px) minmax(250px, 1fr) auto;
    gap: 16px !important;
  }

  .ves-shared-header .main-nav.home-links {
    grid-column: 1 / -1;
    justify-content: flex-end !important;
    min-height: 26px;
  }

  .ves-shared-header .header-catalog-row > .header-quote {
    grid-column: 3;
  }
}

@media (max-width: 900px) {
  .site-header.ves-shared-header {
    position: relative !important;
    padding: 13px 16px 12px !important;
  }

  .ves-shared-header .header-topline {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .ves-shared-header .header-contact,
  .ves-shared-header .main-nav.home-links {
    display: none !important;
  }

  .ves-shared-header .header-catalog-row {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 10px !important;
    margin-top: 10px !important;
  }

  .ves-shared-header .header-catalog-row > .catalog-button,
  .ves-shared-header .header-catalog-row > .ves-catalog-menu,
  .ves-shared-header .header-catalog-row > .company-catalog-menu {
    grid-column: 1;
    width: 100%;
  }

  .ves-shared-header .header-catalog-row > .header-quote {
    grid-column: 2;
    min-width: 144px;
  }

  .ves-shared-header .ves-catalog-dropdown,
  .ves-shared-header .company-catalog-mega {
    width: 100%;
    max-width: 100%;
  }
}

/* Компактная навигация по категориям на телефонах и небольших планшетах. */
.mobile-category-toggle {
  display: none;
}

@media (max-width: 900px) {
  nav.quick-categories.mobile-category-nav,
  nav.home-categories.mobile-category-nav,
  .catalog-page nav.home-categories.mobile-category-nav,
  nav.product-sticky-categories.mobile-category-nav {
    position: relative !important;
    top: auto !important;
    z-index: 95 !important;
    display: block !important;
    width: calc(100% - 32px) !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 8px auto 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #fff !important;
    border: 1px solid #d8e4ee !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 22px rgba(4, 39, 72, 0.08) !important;
  }

  nav.mobile-category-nav > .mobile-category-toggle {
    display: flex !important;
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    margin: 0 !important;
    padding: 9px 14px !important;
    align-items: center;
    justify-content: space-between;
    color: #052f57;
    background: #fff;
    border: 0;
    border-radius: 9px;
    font: inherit;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    text-align: left;
    cursor: pointer;
  }

  .mobile-category-toggle__icon {
    flex: 0 0 auto;
    margin-left: 12px;
    color: #e9a400;
    font-size: 22px;
    line-height: 1;
    transform: translateY(-2px);
    transition: transform 160ms ease;
  }

  nav.mobile-category-nav.is-mobile-open .mobile-category-toggle__icon {
    transform: rotate(180deg) translateY(2px);
  }

  nav.quick-categories.mobile-category-nav > a,
  nav.home-categories.mobile-category-nav > a {
    display: none !important;
    width: 100% !important;
    min-height: 42px !important;
    padding: 10px 14px !important;
    align-items: center !important;
    color: #052f57 !important;
    background: #fff !important;
    border: 0 !important;
    border-top: 1px solid #e3ebf2 !important;
    box-shadow: none !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
    text-decoration: none !important;
    white-space: normal !important;
  }

  nav.quick-categories.mobile-category-nav.is-mobile-open > a,
  nav.home-categories.mobile-category-nav.is-mobile-open > a {
    display: flex !important;
  }

  nav.mobile-category-nav > a:hover,
  nav.mobile-category-nav > a:focus-visible,
  nav.mobile-category-nav > a[aria-current="page"] {
    color: #052f57 !important;
    background: #fff8e6 !important;
    box-shadow: inset 3px 0 0 #f2a900 !important;
    outline: none;
  }
}
