.header {
  position: relative;
  z-index: 1000;
  width: 100%;
  display: block !important;
  min-height: 72px;
}

header.header.header-sticky {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1000 !important;
  padding-bottom: 0 !important;
  background-color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(19, 33, 52, 0.08) !important;
  animation: slideDown 0.25s ease forwards;
}

body.admin-bar header.header.header-sticky {
  top: 32px !important;
}
@media screen and (max-width: 782px) {
  body.admin-bar header.header.header-sticky {
    top: 46px !important;
  }
}

header.header.header-sticky > .header-nav,
header.header.header-sticky .header-nav {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  background-color: #ffffff !important;
  box-shadow: none !important;
  animation: none !important;
}

header.header .header-added-link,
header.header .header__logo-sticky,
header.header.header-sticky .header-added-link,
header.header.header-sticky .header__logo-sticky {
  display: none !important;
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

.header .header__inner.header-layout {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 32px;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  border-bottom: 1px solid #E9EDF3;
}

.header .header-layout .layout-item {
  flex-basis: auto;
  max-width: none;
  padding: 0;
}

/* Логотип */
.header .header__logo {
  display: block !important;
  flex-shrink: 0;
}

.header .header__logo .logo {
  display: block !important;
  max-width: 180px;
  min-height: auto;
}

.header .header__logo .logo img {
  display: block !important;
  width: 100%;
  height: auto;
}

/* Город и адрес */
.header .header__city {
  text-align: left;
  margin-right: auto;
  padding-left: 20px;
}

.city {
  position: relative;
  text-align: left;
  cursor: pointer;
  max-width: none;
  margin: 0 0 4px 0;
}

.city-name {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}

.city-name p {
  font-size: 16px;
  color: #132134;
  font-weight: 400;
  margin: 0;
}

.city-name .icon-down-arrow {
  display: inline-flex;
  align-items: center;
}

.city-name .icon-down-arrow:before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 8px;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%233B82F6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.header-address-wrapper {
  display: block;
  font-size: 14px;
  color: #586982;
  line-height: 1.4;
}

/* Телефон и Email */
.header .header__info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-right: 98px;
}

.header-tel-wrapper,
.header-tel-wrapper._2 {
  margin-top: 0;
  margin-bottom: 4px;
  text-align: left;
}

.header-tel-wrapper .header-tel,
.header-tel-wrapper._2 .header-tel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  color: #132134!important;
  font-weight: 400;
  text-decoration: none;
}

.header-tel-wrapper .header-tel:before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  background-image: url("../../img/phone.svg");
  background-repeat: no-repeat;
  background-size: contain;
}

.header-email-wrapper {
  margin: 0;
  text-align: left;
  padding-left: 2px;
}

.header-email-wrapper .header-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #5b6777!important;
  text-decoration: none;
}

.header-email-wrapper .header-email:before {
  content: "";
  display: inline-block;
  width: 13px;
  height: 13px;
  background-image: url("../../img/mail.svg");
  background-repeat: no-repeat;
  background-size: contain;
}

/* Кнопка и соцсети */
.header .header-layout .header__btn {
  display: flex !important;
  align-items: center !important;
  gap: 12px;
  max-width: none;
}

.header .header-layout .header__btn .socials-wrp {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header .header-layout .socials-action {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  width: 48px;
  padding: 11px;
  margin: 0;
  border-radius: 50%;
  background-color: #f4f7fb;
  transition: background-color 0.2s ease;
}

.header .header-layout .socials-action:hover {
  background-color: #e4eff4;
}

.header .header-layout .header__btn .btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 13px 36px;
  font-size: 16px;
  color: #ffffff !important;
  border-radius: 6px;
  background-color: #E66161;
  white-space: nowrap;
  text-decoration: none;
}

.header .header-layout .header__btn .btn:hover {
  background-color: #d4524e !important;
  box-shadow: none;
}

/* Меню */
.header-nav {
  background-color: #ffffff !important;
  display: block !important;
}

.nav {
  position: relative;
  display: flex !important;
  align-items: center;
}

.nav .nav-wrapper {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  flex: 1 1 auto;
}

.nav .nav-list {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  padding: 0;
  margin: 0;
  list-style-type: none;
}

.nav .nav-list > li > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 16px 0px 24px 0px;
  font-weight: 400;
  font-size: 14px;
  line-height: 140%;
  letter-spacing: 0%;
  vertical-align: middle;
  color: #132134 !important;
  text-transform: none;
  white-space: nowrap;
  background-color: transparent;
  transition: color 0.15s ease;
}

.nav .nav-list > .current-menu-item,
.nav .nav-list > li > a:hover,
.nav .nav-list > .current-menu-item > a,
.nav .nav-list > .menu-item.current-menu-item > a {
  background-color: transparent;
  color: #3b82f6 !important;
}

.nav .nav-list .item-arrow > a:after,
.nav .nav-list > li.menu-item-has-children > a:after {
  content: "";
  display: inline-block;
  width: 10px;
  height: 6px;
  margin-left: 8px;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%233B82F6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.nav-search > .icon-search {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 0 16px 16px;
  cursor: pointer;
}

.nav-search > .icon-search:before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  background-image: url("../../img/search.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* Бургер-меню */
.mobile-only {
  display: none !important;
}

.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: 8px;
  z-index: 101;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #132134;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger-btn.is-active .hamburger-line:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.hamburger-btn.is-active .hamburger-line:nth-child(2) {
  opacity: 0;
}
.hamburger-btn.is-active .hamburger-line:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

body.menu-open {
  overflow: hidden;
}

@media screen and (max-width: 1280px) {
  .home .main-container {
    padding: 0 16px;
  }
}
@media screen and (max-width: 1250px) {
  
  .hide-on-mobile {
    display: none !important;
  }
  
  .mobile-only {
    display: flex !important;
  }

  .header .header__inner.header-layout {
    padding: 12px 0 !important;
    gap: 12px !important;
    border-bottom: 0px;
  }
  
  .header .header__logo {
    max-width: 155px;
  }

  .header .header-layout .header__btn {
    margin-left: auto;
    gap: 12px;
  }

  .header .header-layout .header__btn .btn {
    padding: 0 20px !important;
    font-size: 14px !important;
    height: 40px !important;
    border-radius: 6px !important;
  }

  .header .header-nav {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #ffffff !important;
    box-shadow: 0 12px 24px rgba(19, 33, 52, 0.12);
    z-index: 999;
    border-top: 1px solid #e5e9f0;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }

  .header.mobile-menu-opened .header-nav {
    display: block !important;
  }

  .header .header-nav > .main-container {
    padding: 0 15px !important;
  }

  .nav,
  .nav .nav-wrapper {
    display: block !important;
    width: 100% !important;
  }

  .nav .nav-list {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    width: 100% !important;
  }

  .nav .nav-list > li {
    position: relative;
    width: 100% !important;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
     margin: 0!important;
  }
  
  .nav .nav-list > li:last-child {
    border-bottom: none;
  }

  .nav .nav-list > li > a {
    padding: 14px 0 !important;
    font-size: 15px !important;
    font-weight: 500;
    color: #132134 !important;
    flex: 1;
    white-space: normal !important;
  }

  .nav .nav-list .item-arrow > a:after,
  .nav .nav-list > li.menu-item-has-children > a:after {
    display: none !important;
  }

  .nav .nav-list li > .arrow {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 44px;
    cursor: pointer;
    position: static !important;
    transform: none !important;
  }

  .nav .nav-list li > .arrow::before {
    content: "";
    display: block;
    width: 12px;
    height: 8px;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%233B82F6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.25s ease;
  }

  .nav .nav-list li.submenu-open > .arrow::before {
    transform: rotate(180deg);
  }

  .nav .nav-list li > .sub-menu {
    display: none;
    position: static !important;
    width: 100% !important;
    background-color: #f8fafc !important;
    box-shadow: none !important;
    padding: 8px 12px !important;
    margin: 0 0 8px 0 !important;
    border-radius: 8px;
    list-style: none;
  }

  .nav .nav-list li.submenu-open > .sub-menu {
    display: block !important;
  }

  .nav .nav-list .sub-menu li {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: 1px solid #e2e8f0;
  }

  .nav .nav-list .sub-menu li:last-child {
    border-bottom: none;
  }

  .nav .nav-list .sub-menu li a {
    display: block !important;
    padding: 10px 4px !important;
    font-size: 14px !important;
    color: #475569 !important;
    white-space: normal !important;
    line-height: 1.35 !important;
    text-decoration: none;
  }
}

@media screen and (max-width: 525px) {
    .header .header__logo .logo {
        max-width: 130px;
    }
    .socials-wrp {
        display: none!important;
    }
}

@media screen and (max-width: 480px) {
  .header .header__logo {
    max-width: 135px;
  }
  .header .header-layout .header__btn .btn {
    padding: 0 16px !important;
    font-size: 13px !important;
    height: 36px !important;
  }
}

/* === РЕДИЗАЙН ВСПЫВАЮЩЕГО ПОИСКА === */

.nav-search #searchform {
  position: absolute !important;
  right: 0px !important; /* Немного сдвигаем вправо под иконку лупы */
  top: calc(100% + 15px) !important; /* Отступ вниз от шапки */
  z-index: 100 !important;
  width: 600px !important; /* Вытягиваем форму по ширине как на макете */
  background-color: #ffffff !important;
  border-radius: 12px !important;
  padding: 16px 60px 16px 20px !important; /* Оставляем справа место под крестик */
  box-shadow: 0 10px 40px rgba(19, 33, 52, 0.15) !important;
  display: none;
  box-sizing: border-box !important;
}

/* Треугольник сверху, указывающий на иконку в шапке */
.nav-search #searchform::before {
  content: "" !important;
  position: absolute !important;
  top: -8px !important;
  right: 20px !important;
  width: 16px !important;
  height: 16px !important;
  background-color: #ffffff !important;
  transform: rotate(45deg) !important;
  box-shadow: -4px -4px 10px rgba(19, 33, 52, 0.03) !important;
  border-radius: 2px !important;
}

.nav-search #searchform.active-search {
  display: flex !important;
  align-items: center !important;
  animation: searchFade 0.25s ease;
}

@keyframes searchFade {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Обертка инпута (label) */
.nav-search #searchform label {
  margin: 0 !important;
  position: relative !important;
  flex: 1 1 auto !important;
  display: flex !important;
  align-items: center !important;
}

/* Иконка лупы ВНУТРИ поля ввода */
.nav-search #searchform label .icon-search {
  position: absolute !important;
  left: 16px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 20px !important;
  height: 20px !important;
  background-image: url("../../img/search.svg") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;
  pointer-events: none !important;
}

.nav-search > .icon-search:before {
  content: "" !important;
  font-family: inherit !important;
}

/* внутри формы шрифтовая лупа не нужна: рисуем только фоном */
.nav-search #searchform label .icon-search:before {
  content: none !important;
}

/* Поле ввода */
.nav-search #searchform input[type="text"] {
  width: 100% !important;
  max-width: none !important;
  height: 48px !important;
  padding: 0 16px 0 48px !important; /* Отступ слева под лупу */
  margin: 0 !important;
  font-size: 15px !important;
  color: #132134 !important;
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-right: none !important; /* Убираем правую рамку, чтобы сливалось с кнопкой */
  border-radius: 8px 0px 0px 8px;
  box-sizing: border-box !important;
  outline: none !important;
  transition: border-color 0.2s ease !important;
}

.nav-search #searchform input[type="text"]:focus {
  border-color: #94a3b8 !important;
}

.nav-search #searchform input[type="text"]::placeholder {
  color: #64748b !important;
}

/* Кнопка "Искать" */
.nav-search #searchform input.searchsubmit {
  flex: 0 0 120px !important;
  height: 48px !important;
  padding: 0 20px !important;
  margin: 0 !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  color: #ffffff !important;
  background-color: #E66161 !important; /* Красный цвет как на макете */
  border: none !important;
  border-radius: 0 8px 8px 0 !important; /* Скругление только справа */
  cursor: pointer !important;
  transition: background-color 0.2s ease !important;
  box-shadow: none !important;
}

.nav-search #searchform input.searchsubmit:hover {
  background-color: #E64C4C !important;
}

/* Крестик закрытия справа (сделан через псевдоэлемент самой формы) */
.nav-search #searchform::after {
  content: "" !important;
  position: absolute !important;
  right: 16px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 24px !important;
  height: 24px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23132134' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E") !important;  background-repeat: no-repeat !important;
  background-position: center !important;
  cursor: pointer !important;
  transition: opacity 0.2s ease !important;
}

.nav-search #searchform:hover::after {
  opacity: 0.7 !important;
}

/* === АДАПТИВ (Планшеты и мобилки) === */
@media screen and (max-width: 1250px) {
    .header {
        min-height: auto;
    }
    
  .nav-search #searchform {
    position: fixed !important; /* На мобилках лучше фиксировать поверх всего экрана */
    top: 80px !important; /* Под шапкой */
    left: 20px !important;
    right: 20px !important;
    width: calc(100% - 40px) !important; /* Ширина на весь экран с отступами */
    transform: none !important;
    padding: 16px 50px 16px 16px !important; /* Уменьшаем отступы на мобилке */
  }

  .nav-search #searchform::before {
    display: none !important; /* Убираем треугольник на мобилках */
  }
}

@media screen and (max-width: 576px) {
  /* На узких экранах скрываем текст кнопки и оставляем только лупу (или сужаем её) */
  .nav-search #searchform input.searchsubmit {
    flex: 0 0 90px !important;
    padding: 0 10px !important;
  }
  
  .nav-search #searchform input[type="text"] {
    padding-left: 40px !important;
  }
  
  .nav-search #searchform label .icon-search {
    left: 10px !important;
  }
}