:root {
  --vf2-accent: #f23b18;
  --vf2-accent-dark: #d72c0b;
  --vf2-blue: #175aa6;
  --vf2-ink: #171b22;
  --vf2-text: #2a3038;
  --vf2-muted: #68717c;
  --vf2-line: #e3e7eb;
  --vf2-soft: #f3f6fa;
  --vf2-contact-height: 44px;
  --vf2-mobile-height: 70px;
}

/* До успешной инициализации JavaScript новые элементы не вмешиваются в старую шапку. */
.vf2-contactbar,
.vf2-mobile-tools,
.vf2-desktop-actions,
.vf2-drawer-title,
.vf2-drawer-contacts,
.vf2-search-panel,
.vf2-menu-overlay {
  display: none;
}

html.vf2-ready .header *,
html.vf2-ready .navbar *,
html.vf2-ready .vf2-contactbar *,
html.vf2-ready .vf2-search-panel * {
  box-sizing: border-box;
}

html.vf2-ready .vf2-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

html.vf2-ready .vf2-contactbar,
html.vf2-ready .vf2-mobile-tools,
html.vf2-ready .vf2-drawer-title,
html.vf2-ready .vf2-drawer-contacts,
html.vf2-ready .vf2-menu-overlay {
  display: none;
}

/* ---------- Компактная десктопная шапка ---------- */
@media (min-width: 992px) {
  html.vf2-ready .header.container {
    width: calc(100% - 40px);
    max-width: 1280px;
    padding-inline: 0;
  }

  html.vf2-ready .header > .d-flex {
    display: grid !important;
    grid-template-columns: 195px minmax(290px, 1fr) 118px 220px 150px;
    min-height: 96px;
    align-items: center !important;
    gap: 24px;
    padding-block: 20px !important;
  }

  html.vf2-ready .header .headlogo {
    display: block;
    width: 195px;
    margin: 0;
  }

  html.vf2-ready .header .headlogo img {
    display: block;
    width: 100%;
    height: auto;
    float: none;
    margin: 0;
  }

  html.vf2-ready .header .worktime-block {
    min-width: 0;
  }

  html.vf2-ready .header .worktime-block p {
    margin: 0;
  }

  html.vf2-ready .header .worktime-block .address {
    overflow: hidden;
    margin-bottom: 4px;
    color: var(--vf2-ink);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.vf2-ready .header .worktime-block .worktime {
    color: var(--vf2-muted);
    font-size: 13px;
    line-height: 1.35;
  }

  html.vf2-ready .header .msg_outer {
    gap: 8px;
  }

  html.vf2-ready .header .msg_outer .msg {
    margin: 0;
  }

  html.vf2-ready .header .msg a {
    color: var(--vf2-text);
    font-size: 14px;
  }

  html.vf2-ready .header .phone_outer {
    min-width: 0;
    margin: 0;
  }

  html.vf2-ready .header .phones-block,
  html.vf2-ready .header .email-block {
    padding: 0;
    text-align: right;
  }

  html.vf2-ready .header .phones-block .view {
    display: none !important;
  }

  html.vf2-ready .header .phones-block a {
    border: 0;
    color: var(--vf2-ink);
    font-size: 19px;
    font-weight: 700;
    white-space: nowrap;
  }

  html.vf2-ready .header .email-block {
    margin-top: 3px;
  }

  html.vf2-ready .header .email-block a {
    border: 0;
    color: var(--vf2-muted);
    font-size: 13px;
    font-weight: 400;
    white-space: nowrap;
  }

  html.vf2-ready .header .minicart_outer {
    width: auto !important;
    margin: 0 !important;
    text-align: left !important;
  }

  html.vf2-ready .header .msMiniCart {
    display: flex;
    min-height: 48px;
    align-items: center;
    margin: 0;
    color: var(--vf2-ink);
  }

  html.vf2-ready .header .msMiniCart::before {
    position: static;
    display: block;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    margin: 0 10px 0 0;
    border-radius: 11px;
    background-color: var(--vf2-accent);
  }

  html.vf2-ready .header .msMiniCart h5 {
    margin: 0;
    padding: 0 0 2px;
    color: var(--vf2-ink);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
  }

  html.vf2-ready .header .msMiniCart p,
  html.vf2-ready .header .msMiniCart strong {
    color: var(--vf2-muted);
    font-size: 12px;
    line-height: 1.2;
  }

  html.vf2-ready .header .msMiniCart .not_empty {
    display: none;
  }

  html.vf2-ready .header .msMiniCart.full .empty {
    display: none;
  }

  html.vf2-ready .header .msMiniCart.full .not_empty {
    display: block;
  }
}

/* ---------- Десктопная навигация ---------- */
html.vf2-ready .navbar.navbar-expand-lg {
  position: relative;
  z-index: 1050;
  margin-bottom: 0 !important;
  padding: 0;
  background: var(--vf2-ink) !important;
  box-shadow: none;
}

html.vf2-ready .navbar > .container-fluid {
  width: calc(100% - 40px);
  max-width: 1280px;
  min-height: 54px;
  margin-inline: auto;
  padding: 0;
}

@media (min-width: 992px) {
  html.vf2-ready .navbar .navbar-collapse {
    display: flex !important;
    min-width: 0;
    justify-content: flex-start;
  }

  html.vf2-ready .navbar .navbar-nav {
    display: flex;
    min-width: 0;
    align-items: stretch;
    gap: 2px;
    margin: 0 !important;
  }

  html.vf2-ready .navbar .navbar-nav > li {
    position: relative;
    display: flex;
    align-items: stretch;
    margin: 0;
  }

  html.vf2-ready .navbar .navbar-nav > li > .nav-link {
    display: flex;
    min-height: 54px;
    align-items: center;
    padding: 0 12px;
    border: 0;
    border-radius: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
  }

  html.vf2-ready .navbar .navbar-nav > li > .nav-link:hover,
  html.vf2-ready .navbar .navbar-nav > li > .nav-link:focus,
  html.vf2-ready .navbar .navbar-nav > li > .nav-link.active,
  html.vf2-ready .navbar .navbar-nav > li > .nav-link.show {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
  }

  html.vf2-ready .navbar .navbar-nav > li > .nav-link.active span {
    color: inherit;
    border: 0;
  }

  html.vf2-ready .navbar .dropdown-menu {
    top: calc(100% - 1px);
    left: 0;
    min-width: 250px;
    margin: 0;
    padding: 8px;
    border: 1px solid var(--vf2-line);
    border-top: 0;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 20px 45px rgba(17, 23, 31, 0.18);
  }

  html.vf2-ready .navbar .dropdown-menu li {
    margin: 0;
    border: 0;
  }

  html.vf2-ready .navbar .dropdown-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 7px;
    color: var(--vf2-text);
    font-size: 14px;
    line-height: 1.35;
  }

  html.vf2-ready .navbar .dropdown-menu a:hover,
  html.vf2-ready .navbar .dropdown-menu a:focus {
    color: var(--vf2-accent);
    background: var(--vf2-soft);
  }
}

html.vf2-ready .vf2-desktop-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding-left: 12px;
}

html.vf2-ready .vf2-callback-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 9px 15px;
  border-radius: 8px;
  color: #fff;
  background: var(--vf2-accent);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

html.vf2-ready .vf2-callback-link:hover,
html.vf2-ready .vf2-callback-link:focus {
  color: #fff;
  background: var(--vf2-accent-dark);
}

html.vf2-ready .vf2-icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  color: #fff;
  background: transparent;
  cursor: pointer;
}

html.vf2-ready .vf2-icon-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

html.vf2-ready .vf2-icon-button:hover,
html.vf2-ready .vf2-icon-button:focus-visible {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

/* ---------- Общая панель поиска ---------- */
html.vf2-ready .vf2-old-search-host {
  display: none !important;
}

html.vf2-ready .vf2-search-panel[hidden] {
  display: none !important;
}

html.vf2-ready .vf2-search-panel {
  position: relative;
  z-index: 1040;
  display: block;
  border-bottom: 1px solid var(--vf2-line);
  background: #fff;
  box-shadow: 0 12px 30px rgba(17, 23, 31, 0.1);
}

html.vf2-ready .vf2-search-panel__inner {
  width: calc(100% - 40px);
  max-width: 1280px;
  margin-inline: auto;
  padding-block: 14px;
}

html.vf2-ready .vf2-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin: 0;
}

html.vf2-ready .vf2-search-input {
  width: 100%;
  height: 46px;
  padding: 0 15px;
  border: 1px solid #cfd6dd;
  border-radius: 9px;
  outline: none;
  color: var(--vf2-ink);
  background: #fff;
  font: inherit;
  font-size: 16px;
}

html.vf2-ready .vf2-search-input:focus {
  border-color: var(--vf2-blue);
  box-shadow: 0 0 0 3px rgba(23, 90, 166, 0.12);
}

html.vf2-ready .vf2-search-submit {
  min-width: 104px;
  height: 46px;
  padding-inline: 20px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: var(--vf2-blue);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

@media (min-width: 992px) and (max-width: 1199px) {
  html.vf2-ready .header > .d-flex {
    grid-template-columns: 180px minmax(250px, 1fr) 215px 145px;
    gap: 20px;
  }

  html.vf2-ready .header .headlogo {
    width: 180px;
  }

  html.vf2-ready .header .msg_outer,
  html.vf2-ready .vf2-callback-link {
    display: none;
  }

  html.vf2-ready .navbar .navbar-nav > li > .nav-link {
    padding-inline: 9px;
    font-size: 13px;
  }
}

/* ---------- Мобильная версия по принципу farkop.ru ---------- */
@media (max-width: 991px) {
  html.vf2-menu-open,
  html.vf2-menu-open body {
    overflow: hidden;
  }

  html.vf2-ready .vf2-contactbar {
    position: sticky;
    z-index: 1080;
    top: 0;
    display: block;
    min-height: var(--vf2-contact-height);
    color: var(--vf2-text);
    background: #e6eefc;
  }

  html.vf2-ready .vf2-contactbar__inner {
    display: flex;
    width: 100%;
    min-height: var(--vf2-contact-height);
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 14px;
  }

  html.vf2-ready .vf2-contactbar__city {
    overflow: hidden;
    color: var(--vf2-ink);
    font-size: 14px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.vf2-ready .vf2-contactbar__info {
    display: grid;
    justify-items: end;
    line-height: 1.1;
  }

  html.vf2-ready .vf2-contactbar__phone {
    color: var(--vf2-ink);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
  }

  html.vf2-ready .vf2-contactbar__hours {
    margin-top: 2px;
    color: #267930;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
  }

  html.vf2-ready .header {
    display: none !important;
  }

  html.vf2-ready .navbar.navbar-expand-lg {
    position: sticky;
    z-index: 1150;
    top: var(--vf2-contact-height);
    min-height: var(--vf2-mobile-height);
    padding: 0 !important;
    background: #fff !important;
    box-shadow: 0 4px 16px rgba(17, 23, 31, 0.08);
  }

  html.vf2-ready .navbar > .container-fluid {
    display: block;
    width: 100%;
    min-height: var(--vf2-mobile-height);
    padding: 0 14px;
  }

  html.vf2-ready .vf2-mobile-tools {
    display: grid;
    min-height: var(--vf2-mobile-height);
    grid-template-columns: 44px 44px minmax(105px, 1fr) 44px;
    align-items: center;
    gap: 8px;
  }

  html.vf2-ready .navbar .navbar-toggler,
  html.vf2-ready .vf2-mobile-tools .vf2-icon-button,
  html.vf2-ready .vf2-mobile-cart-link {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 9px;
    color: var(--vf2-ink);
    background: transparent;
    box-shadow: none;
  }

  html.vf2-ready .navbar .navbar-toggler:focus,
  html.vf2-ready .vf2-mobile-tools .vf2-icon-button:focus-visible,
  html.vf2-ready .vf2-mobile-cart-link:focus-visible {
    outline: 2px solid var(--vf2-blue);
    outline-offset: 2px;
  }

  html.vf2-ready .navbar .navbar-toggler-icon {
    position: relative;
    width: 23px;
    height: 2px;
    background: currentColor;
    background-image: none;
    transition: background 160ms ease;
  }

  html.vf2-ready .navbar .navbar-toggler-icon::before,
  html.vf2-ready .navbar .navbar-toggler-icon::after {
    position: absolute;
    left: 0;
    width: 23px;
    height: 2px;
    background: currentColor;
    content: '';
    transition: transform 160ms ease;
  }

  html.vf2-ready .navbar .navbar-toggler-icon::before {
    transform: translateY(-7px);
  }

  html.vf2-ready .navbar .navbar-toggler-icon::after {
    transform: translateY(7px);
  }

  html.vf2-ready .navbar .navbar-toggler[aria-expanded='true'] .navbar-toggler-icon {
    background: transparent;
  }

  html.vf2-ready .navbar .navbar-toggler[aria-expanded='true'] .navbar-toggler-icon::before {
    transform: rotate(45deg);
  }

  html.vf2-ready .navbar .navbar-toggler[aria-expanded='true'] .navbar-toggler-icon::after {
    transform: rotate(-45deg);
  }

  html.vf2-ready .vf2-mobile-tools .vf2-icon-button svg,
  html.vf2-ready .vf2-mobile-cart-link svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
  }

  html.vf2-ready .vf2-mobile-logo {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    padding-inline: 8px;
  }

  html.vf2-ready .vf2-mobile-logo img {
    display: block;
    width: min(100%, 155px);
    height: auto;
    float: none;
    margin: 0;
  }

  html.vf2-ready .vf2-mobile-cart-slot {
    position: relative;
    width: 44px;
    height: 44px;
  }

  html.vf2-ready .vf2-mobile-cart-link {
    position: relative;
    color: var(--vf2-blue);
    text-decoration: none;
  }

  html.vf2-ready .vf2-cart-dot {
    position: absolute;
    top: 7px;
    right: 4px;
    display: none;
    width: 9px;
    height: 9px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--vf2-accent);
  }

  html.vf2-ready .vf2-mobile-cart-link.is-full .vf2-cart-dot {
    display: block;
  }

  html.vf2-ready .vf2-mobile-cart-slot > .msMiniCart {
    position: absolute !important;
    inset: 0;
    width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
  }

  html.vf2-ready .vf2-desktop-actions {
    display: none;
  }

  html.vf2-ready .navbar .navbar-collapse,
  html.vf2-ready .navbar .navbar-collapse.collapse,
  html.vf2-ready .navbar .navbar-collapse.collapsing {
    position: fixed;
    z-index: 1140;
    top: calc(var(--vf2-contact-height) + var(--vf2-mobile-height));
    bottom: 0;
    left: 0;
    display: block !important;
    width: min(88vw, 390px);
    height: auto !important;
    padding: 20px 18px 28px;
    overflow-x: hidden;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    background: #fff;
    box-shadow: 22px 0 55px rgba(17, 23, 31, 0.22);
    transform: translateX(-104%);
    transition: transform 200ms ease, opacity 180ms ease, visibility 180ms ease;
  }

  html.vf2-ready .navbar .navbar-collapse.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
  }

  html.vf2-ready .vf2-drawer-title {
    display: block;
    padding: 0 8px 15px;
    border-bottom: 1px solid var(--vf2-line);
    color: var(--vf2-ink);
    font-size: 21px;
    font-weight: 700;
  }

  html.vf2-ready .navbar .navbar-nav {
    display: flex;
    flex-direction: column;
    margin: 8px 0 0 !important;
    padding: 0;
  }

  html.vf2-ready .navbar .navbar-nav > li {
    display: block;
    margin: 0;
    border-bottom: 1px solid var(--vf2-line);
  }

  html.vf2-ready .navbar .navbar-nav > li > .nav-link {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 8px;
    color: var(--vf2-ink);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
  }

  html.vf2-ready .navbar .navbar-nav > li > .nav-link:hover,
  html.vf2-ready .navbar .navbar-nav > li > .nav-link:focus,
  html.vf2-ready .navbar .navbar-nav > li > .nav-link.active,
  html.vf2-ready .navbar .navbar-nav > li > .nav-link.show {
    color: var(--vf2-accent);
    background: transparent;
  }

  html.vf2-ready .navbar .navbar-nav > li > .nav-link.active span {
    color: inherit;
    border: 0;
  }

  html.vf2-ready .navbar .dropdown-menu {
    position: static !important;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0 6px 12px 16px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: none !important;
  }

  html.vf2-ready .navbar .dropdown-menu li {
    margin: 0;
    border: 0;
  }

  html.vf2-ready .navbar .dropdown-menu a {
    display: block;
    padding: 9px 10px;
    border-radius: 7px;
    color: var(--vf2-muted);
    font-size: 15px;
    line-height: 1.35;
    text-decoration: none;
  }

  html.vf2-ready .navbar .dropdown-menu a:hover,
  html.vf2-ready .navbar .dropdown-menu a:focus {
    color: var(--vf2-accent);
    background: var(--vf2-soft);
  }

  html.vf2-ready .vf2-drawer-contacts {
    display: grid;
    gap: 10px;
    margin-top: 20px;
    padding: 18px;
    border-radius: 14px;
    color: var(--vf2-muted);
    background: var(--vf2-soft);
  }

  html.vf2-ready .vf2-drawer-phone {
    color: var(--vf2-ink);
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
  }

  html.vf2-ready .vf2-drawer-address {
    font-size: 13px;
    line-height: 1.45;
  }

  html.vf2-ready .vf2-drawer-whatsapp,
  html.vf2-ready .vf2-drawer-callback {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
  }

  html.vf2-ready .vf2-drawer-whatsapp {
    color: #176b36;
    border: 1px solid #bfe2ca;
    background: #fff;
  }

  html.vf2-ready .vf2-drawer-callback {
    color: #fff;
    background: var(--vf2-accent);
  }

  html.vf2-ready .vf2-menu-overlay {
    position: fixed;
    z-index: 1120;
    top: calc(var(--vf2-contact-height) + var(--vf2-mobile-height));
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: rgba(14, 18, 24, 0.56);
  }

  html.vf2-ready .vf2-menu-overlay[hidden] {
    display: none;
  }

  html.vf2-ready .vf2-search-panel {
    position: fixed;
    z-index: 1145;
    top: calc(var(--vf2-contact-height) + var(--vf2-mobile-height));
    right: 0;
    left: 0;
  }

  html.vf2-ready .vf2-search-panel__inner {
    width: 100%;
    padding: 12px 14px;
  }

  html.vf2-ready .vf2-search-form {
    grid-template-columns: minmax(0, 1fr) 82px;
    gap: 8px;
  }

  html.vf2-ready .vf2-search-submit {
    min-width: 0;
    padding-inline: 12px;
  }
}

@media (max-width: 370px) {
  html.vf2-ready .vf2-contactbar__city {
    max-width: 112px;
    font-size: 13px;
  }

  html.vf2-ready .vf2-contactbar__phone {
    font-size: 14px;
  }

  html.vf2-ready .vf2-contactbar__hours {
    font-size: 10px;
  }

  html.vf2-ready .vf2-mobile-tools {
    grid-template-columns: 42px 42px minmax(90px, 1fr) 42px;
    gap: 4px;
  }

  html.vf2-ready .vf2-mobile-logo img {
    width: min(100%, 132px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html.vf2-ready .navbar .navbar-collapse,
  html.vf2-ready .navbar .navbar-toggler-icon,
  html.vf2-ready .navbar .navbar-toggler-icon::before,
  html.vf2-ready .navbar .navbar-toggler-icon::after {
    transition-duration: 0.01ms !important;
  }
}
/* Отступ между верхним меню и содержимым страницы */
html.vf2-ready .vf2-old-search-host + :not(.fp-home) {
  padding-top: 24px !important;
}

@media (max-width: 991px) {
  html.vf2-ready .vf2-old-search-host + :not(.fp-home) {
    padding-top: 16px !important;
  }
}