/**
 * KranParts — header.css
 * Чистая версия для 3-уровневого хедера по референсу bostzap.ru
 *
 * Структура:
 *   TOP ROW    : адрес | город | email | телефоны | войти
 *   MIDDLE ROW : лого+тагалайн | поиск+селектор | иконки (сравнение/избр./корзина)
 *   BOTTOM ROW : [каталог] | главное меню | [заказать звонок]
 */

/* ═══════════════════════════════════════════════════
   HEADER CONTAINER
   ═══════════════════════════════════════════════════ */
.kp-header {
  background: var(--c-white);
  position: relative;
  z-index: 500;
}
.kp-header * {
  box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════
   HEADER LAYOUT FIX (перенесено из inline <style id="kp-header-layout-fix">)
   Выравнивает все три полосы шапки строго по контейнеру.
   ═══════════════════════════════════════════════════ */
.kp-header__top-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  width: 100%;
}
.kp-header__location {
  flex: 1 1 440px;
  min-width: 320px;
  max-width: 590px;
}
.kp-header__address,
.kp-city__btn {
  max-width: 100%;
}
.kp-header__address span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kp-header__email-top {
  display: flex !important;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  white-space: nowrap;
  min-width: max-content;
}
.kp-header__email-link {
  display: inline-block;
  max-width: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}
.kp-header__work-hours,
.kp-messengers--header-top,
.kp-header__login {
  flex: 0 0 auto;
  white-space: nowrap;
}
.kp-header__phones-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 0 0 auto;
  gap: 2px;
  white-space: nowrap;
}
.kp-header__phone-row {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.kp-header__phones-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kp-header__phones-label {
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}
.kp-header__middle-inner {
  display: grid;
  grid-template-columns: minmax(250px, 360px) minmax(420px, 1fr) auto;
  align-items: center;
  gap: 28px;
  width: 100%;
}
.kp-header__search {
  min-width: 0;
  width: 100%;
}
.kp-search-form {
  display: flex;
  width: 100%;
  background: #ffffff !important;
  background-color: #ffffff !important;
}
.kp-search-form__input {
  flex: 1 1 auto;
  min-width: 0;
}
.kp-search-form__select {
  display: none !important;
}
.kp-search-form__btn {
  flex: 0 0 132px;
  width: 132px !important;
  min-width: 132px;
  padding-left: 18px;
  padding-right: 18px;
}

@media (max-width: 1280px) {
  .kp-header__top-inner {
    gap: 10px;
  }
  .kp-header__location {
    flex-basis: 360px;
    min-width: 280px;
    max-width: 460px;
  }
  .kp-header__middle-inner {
    grid-template-columns: minmax(220px, 320px) minmax(360px, 1fr) auto;
    gap: 18px;
  }
}
@media (max-width: 1100px) {
  .kp-header__top-inner {
    flex-wrap: wrap;
  }
  .kp-header__location {
    max-width: none;
  }
  .kp-header__middle-inner {
    grid-template-columns: 1fr;
  }
  .kp-header__icons {
    justify-self: end;
  }
}

/* ═══════════════════════════════════════════════════
   TOP ROW (инфо-полоса)
   ═══════════════════════════════════════════════════ */
.kp-header__top {
  background: var(--c-bg, #fcfcfa);
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text);
  font-size: 12px;
  position: relative;
  z-index: 9999; /* чтобы дропдаун города был поверх middle row */
  overflow: visible;
}
.kp-header__top a {
  color: var(--c-text);
  text-decoration: none;
  transition: color 0.15s ease;
}
.kp-header__top a:hover {
  color: var(--c-green);
}
/* SVG в top row — строго outline (кроме мессенджеров, у них filled) */
.kp-header__top svg:not(.kp-messengers *) {
  fill: none !important;
  flex-shrink: 0;
}
.kp-header__top svg:not(.kp-messengers *) path,
.kp-header__top svg:not(.kp-messengers *) rect,
.kp-header__top svg:not(.kp-messengers *) circle,
.kp-header__top svg:not(.kp-messengers *) line,
.kp-header__top svg:not(.kp-messengers *) polyline {
  fill: none !important;
  stroke: currentColor;
}

.kp-header__top-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: nowrap;
  min-height: 44px;
  padding: 6px 0;
  overflow: visible;
}

/* ─── Адрес ─── */
.kp-header__address {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--c-text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex-shrink: 1;
  transition: color 0.15s;
}
.kp-header__address:hover {
  color: var(--c-green);
}
.kp-header__address svg {
  color: #8a8a82 !important;
  stroke: #8a8a82 !important;
  width: 14px;
  height: 14px;
}
.kp-header__address svg *,
html body .kp-header__address svg,
html body .kp-header__address svg * {
  color: #8a8a82 !important;
  stroke: #8a8a82 !important;
}
.kp-header__address span {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Выбор города ─── */
.kp-city {
  position: relative;
  flex-shrink: 0;
}
.kp-city__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--c-text);
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s ease;
  white-space: nowrap;
}
.kp-city__btn:hover {
  color: var(--c-green);
}
.kp-city__btn svg:first-child {
  color: var(--c-green);
}
.kp-city__name {
  font-weight: 700;
}
/* ─── График работы в top row ─── */
.kp-header__work-hours {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--c-text);
  white-space: nowrap;
  flex-shrink: 0;
}
.kp-header__work-hours svg {
  color: var(--c-green);
  flex-shrink: 0;
}

/* ─── Email c копированием ─── */
.kp-header__email-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
}
.kp-header__email-link {
  color: var(--c-green) !important;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
  max-width: 100%;
}
.kp-header__email-link:hover {
  color: var(--c-green-dark) !important;
}
.kp-header__email-copy {
  position: relative;
  background: transparent;
  border: none;
  color: var(--c-muted);
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  line-height: 1;
  font-size: 0;
  outline: none;
}
.kp-header__email-copy svg {
  width: 14px;
  height: 14px;
  display: block;
}
.kp-header__email-copy:hover,
.kp-header__email-copy.is-copied,
.kp-header__email-copy:focus {
  color: var(--c-green);
  outline: none;
}
.kp-copy-tip {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--c-dark);
  color: var(--c-white);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 3px;
  white-space: nowrap;
  z-index: 1000;
  pointer-events: none;
  animation: kpCopyTipIn 0.2s ease;
}
.kp-copy-tip::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-bottom-color: var(--c-dark);
}
@keyframes kpCopyTipIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ─── Телефоны top row ─── */
.kp-header__phones-top {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto; /* толкает phones+login группу вправо */
}
.kp-header__phones-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-end;
}
.kp-header__phone-num {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--c-heading) !important;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
  transition: color 0.15s;
}
.kp-header__phone-num svg {
  color: #8a8a82 !important;
  stroke: #8a8a82 !important;
  width: 13px;
  height: 13px;
}
.kp-header__phone-num svg *,
.kp-phone--free svg,
.kp-phone--free svg * {
  color: #8a8a82 !important;
  stroke: #8a8a82 !important;
}
.kp-header__phone-num:hover {
  color: var(--c-green) !important;
}
.kp-header__phones-label {
  font-size: 10px;
  color: var(--c-green);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
  white-space: nowrap;
}

/* ─── Войти ─── */
.kp-header__login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--c-text) !important;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none !important;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s;
}
.kp-header__login svg {
  width: 16px;
  height: 16px;
}
.kp-header__login:hover {
  color: var(--c-green) !important;
}

/* ─── Верхнее меню (страницы: О компании, FAQ, Контакты...) ─── */
.kp-header__top-nav {
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
}
.kp-top-menu {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-wrap: nowrap;
}
.kp-top-menu li {
  list-style: none;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}
.kp-top-menu li a {
  color: var(--c-text);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}
.kp-top-menu li a:hover,
.kp-top-menu li.current-menu-item a {
  color: var(--c-green);
}

/* ─── Мессенджеры в top row (WhatsApp / Telegram / MAX) ─── */
.kp-messengers--header-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.kp-messengers--header-top .kp-messengers__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  text-decoration: none;
  transition: all 0.15s ease;
  flex-shrink: 0;
  background: transparent;
}
.kp-messengers--header-top .kp-messengers__item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}
.kp-messengers--header-top .kp-messengers__item svg {
  width: 18px;
  height: 18px;
  display: block;
}
/* WhatsApp (SVG) — зелёный круг-фон */
.kp-messengers--header-top .kp-messengers__wa {
  background: #25d366;
}
.kp-messengers--header-top .kp-messengers__wa:hover {
  background: #1ebe5a;
}
.kp-messengers--header-top .kp-messengers__tg:hover,
.kp-messengers--header-top .kp-messengers__max:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

html body .kp-header .kp-header__callback,
html body .kp-header button.kp-header__callback,
html body .kp-header .kp-btn.kp-btn--callback.kp-header__callback {
  background: #fbc113 !important;
  background-color: #fbc113 !important;
  border: 1px solid #fbc113 !important;
  color: #1a1e22 !important;
}

html body .kp-header .kp-header__callback:hover,
html body .kp-header button.kp-header__callback:hover,
html body .kp-header .kp-btn.kp-btn--callback.kp-header__callback:hover {
  background: #ffd24a !important;
  background-color: #ffd24a !important;
  border-color: #ffd24a !important;
  color: #1a1e22 !important;
}

html body .kp-header .kp-header__callback svg,
html body .kp-header .kp-header__callback svg *,
html body .kp-header .kp-header__callback span {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

html body .kp-header .kp-btn.kp-btn--callback.kp-header__callback,
html body .kp-header button.kp-btn.kp-btn--callback.kp-header__callback {
  color: #ffffff !important;
}

html body .kp-catalog-btn,
html body button.kp-catalog-btn,
html body .kp-catalog-btn span {
  color: #ffffff !important;
}

html body .kp-catalog-btn .kp-catalog-btn__icon span {
  background: #ffffff !important;
  background-color: #ffffff !important;
}

html body .kp-header__icon,
html body a.kp-header__icon,
html body .kp-header__wishlist-icon,
html body .kp-header__cart {
  background: transparent !important;
  background-color: transparent !important;
  color: #1a1e22 !important;
  border-color: transparent !important;
  border-radius: 50% !important;
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  flex: 0 0 44px !important;
}

html body .kp-header__icon:hover,
html body a.kp-header__icon:hover,
html body .kp-header__wishlist-icon:hover,
html body .kp-header__cart:hover {
  background: #1a1e22 !important;
  background-color: #1a1e22 !important;
  color: #ffffff !important;
  border-color: #1a1e22 !important;
}

html body .kp-header__icon:hover svg,
html body .kp-header__icon:hover svg *,
html body a.kp-header__icon:hover svg,
html body a.kp-header__icon:hover svg * {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

html body .kp-header__icon-badge,
html body .kp-header__wishlist-icon .kp-header__icon-badge,
html body .kp-header__cart .kp-header__icon-badge,
html body .kp-cart-count {
  background: #fbc113 !important;
  background-color: #fbc113 !important;
  color: #1a1e22 !important;
  border-radius: 50% !important;
  width: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  height: 20px !important;
  min-height: 20px !important;
  max-height: 20px !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  flex: 0 0 20px !important;
}

/* Top row custom colors */
.kp-header__top-inner,
.kp-header__top-inner a,
.kp-header__top-inner button,
.kp-header__top-inner svg:not(.kp-messengers *),
.kp-header__top-inner .kp-header__phone-num,
.kp-header__top-inner .kp-header__email-copy {
  color: #1a1e22 !important;
}

html body .kp-header__top-inner .kp-header__address svg,
html body .kp-header__top-inner .kp-header__address svg *,
html body .kp-header__top-inner a[title="Показать на карте"] svg,
html body .kp-header__top-inner a[title="Показать на карте"] svg * {
  color: #8a8a82 !important;
  stroke: #8a8a82 !important;
  fill: none !important;
}

.kp-header__top-inner a:hover,
.kp-header__top-inner button:hover,
.kp-header__top-inner .kp-header__phone-num:hover,
.kp-header__top-inner .kp-header__email-copy:hover,
.kp-header__top-inner .kp-header__email-copy:focus,
.kp-header__top-inner .kp-header__email-copy.is-copied {
  color: #2a3036 !important;
}

.kp-header__top-inner .kp-header__email-link,
.kp-header__top-inner .kp-header__email-link:hover,
.kp-header__top-inner .kp-header__phones-label {
  color: #fbc113 !important;
}

/* ═══════════════════════════════════════════════════
   MIDDLE ROW (лого, поиск, иконки)
   ═══════════════════════════════════════════════════ */
.kp-header__middle {
  background: var(--c-bg, #fcfcfa);
  position: relative;
  z-index: 100;
}
.kp-header__middle-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 18px 0;
  width: 100%;
}

/* ─── Brand: лого + тагалайн ─── */
.kp-header__brand {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.kp-logo {
  display: block;
  text-decoration: none;
  flex-shrink: 0;
}
.kp-logo__img {
  max-height: 60px;
  width: auto;
  display: block;
}
.kp-logo__text {
  font-size: 22px;
  font-weight: 800;
  color: var(--c-heading);
  line-height: 1.1;
}
.kp-header__tagline {
  font-size: 12px;
  color: var(--c-muted);
  line-height: 1.35;
  max-width: 180px;
  font-weight: 500;
  border-left: 2px solid var(--c-green);
  padding-left: 12px;
}

/* ─── Поиск с селектором + кнопкой ─── */
.kp-header__search {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 720px;
  position: relative;
}
.kp-search-form {
  display: flex;
  align-items: stretch;
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1.5px solid var(--c-200);
  border-radius: 3px;
  overflow: hidden;
  transition: border-color 0.15s ease;
  position: relative;
  height: 48px;
}
.kp-header .kp-search-form,
form.kp-search-form {
  background: #ffffff !important;
  background-color: #ffffff !important;
}
.kp-search-form:focus-within {
  border-color: var(--c-green);
}
.kp-search-form__input,
input.kp-search-form__input,
.kp-header .kp-search-form__input {
  flex: 1 1 auto;
  border: none !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  padding: 0 22px !important;
  font-size: 14px !important;
  outline: none !important;
  box-shadow: none !important;
  color: var(--c-text) !important;
  min-width: 0;
  height: 100%;
  font-family: inherit;
  border-radius: 0 !important;
  margin: 0 !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
.kp-search-form__input::placeholder {
  color: var(--c-muted);
}
.kp-search-form__select,
select.kp-search-form__select,
.kp-header .kp-search-form__select {
  border: none !important;
  background: transparent !important;
  background-color: transparent !important;
  padding: 0 28px 0 14px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--c-text) !important;
  cursor: pointer;
  border-left: 1px solid var(--c-300) !important;
  border-right: 1px solid var(--c-300) !important;
  height: 100%;
  box-shadow: none !important;
  flex-shrink: 0;
  width: auto;
  max-width: 140px;
  font-family: inherit;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%235e5e57' stroke-width='3'><polyline points='6 9 12 15 18 9'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  outline: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
}
.kp-search-form__select:focus {
  outline: none;
}
.kp-search-form__btn {
  background: transparent !important;
  color: var(--c-heading, #1d1f1a) !important;
  border: none !important;
  padding: 0 !important;
  width: 64px !important;
  min-width: 64px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0;
  transition:
    background 0.15s ease,
    color 0.15s ease !important;
  flex-shrink: 0;
  border-radius: 0 !important;
  height: 100%;
  margin: 0 !important;
  font-family: inherit;
  box-shadow: none !important;
  line-height: 1;
}
.kp-search-form__btn:hover {
  background: #ecece8 !important;
  color: var(--c-heading, #1d1f1a) !important;
}
.kp-search-form__btn svg {
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
}
.kp-search-form__btn span {
  display: none !important;
}

/* Результаты AJAX-поиска */
.kp-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: 3px;
  box-shadow: 0 16px 40px rgba(29, 31, 26, 0.15);
  max-height: 480px;
  overflow-y: auto;
  z-index: 200;
}
.kp-search-results__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--c-text);
  text-decoration: none;
  border-bottom: 1px solid var(--c-border);
  transition: background 0.12s;
}
.kp-search-results__item:last-child {
  border-bottom: none;
}
.kp-search-results__item:hover {
  background: var(--c-100);
  color: var(--c-green);
}
.kp-search-results__item img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 3px;
  background: var(--c-100);
  flex-shrink: 0;
}
.kp-search-results__info {
  flex: 1;
  min-width: 0;
}
.kp-search-results__title {
  font-size: 14px;
  font-weight: 500;
  color: var(--c-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kp-search-results__item:hover .kp-search-results__title {
  color: var(--c-green);
}
.kp-search-results__sku {
  font-size: 12px;
  color: var(--c-muted);
  margin-top: 2px;
}
.kp-search-results__price {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-heading);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ─── Иконки справа в middle ─── */
.kp-header__icons {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.kp-header__icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  color: var(--c-text);
  background: var(--c-100);
  border-radius: 50%;
  transition: all 0.15s ease;
  text-decoration: none;
  border: 1.5px solid transparent;
  flex-shrink: 0;
  flex-basis: 44px;
  padding: 0;
  box-sizing: border-box;
}
.kp-header__icon:hover {
  background: var(--c-green-soft);
  color: var(--c-green);
  border-color: var(--c-green);
}
.kp-header__icon svg {
  fill: none;
  stroke: currentColor;
}
.kp-header__icon-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--c-green);
  color: var(--c-white);
  font-size: 10px;
  font-weight: 700;
  width: 20px;
  min-width: 20px;
  max-width: 20px;
  height: 20px;
  min-height: 20px;
  max-height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 2px solid var(--c-white);
  box-sizing: border-box;
  line-height: 1;
  flex: 0 0 20px;
}

/* ═══════════════════════════════════════════════════
   BOTTOM ROW (каталог + меню + звонок)
   ═══════════════════════════════════════════════════ */
.kp-header__bottom {
  background: var(--c-bg, #fcfcfa);
  border-top: 1px solid var(--c-border);
  position: relative;
  z-index: 80;
}
.kp-header__bottom-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 56px;
  width: 100%;
}

/* ─── Кнопка каталог ─── */
.kp-catalog-wrap {
  position: relative;
  flex-shrink: 0;
}
.kp-catalog-btn,
button.kp-catalog-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
  background: var(--c-green) !important;
  background-color: #1a1e22 !important;
  background-image: none !important;
  color: var(--c-white) !important;
  border: none !important;
  padding: 14px 24px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  cursor: pointer;
  transition: all 0.2s ease !important;
  font-family: inherit;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  text-decoration: none !important;
  min-width: 0 !important;
  width: auto !important;
  height: auto !important;
  line-height: 1.2 !important;
  margin: 0 !important;
}
.kp-catalog-btn:hover,
button.kp-catalog-btn:hover {
  background: var(--c-green-dark) !important;
  background-color: #2a3036 !important;
  color: var(--c-white) !important;
}
.kp-catalog-btn__icon {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}
.kp-catalog-btn__icon span {
  display: block;
  height: 2px;
  background: var(--c-white);
  border-radius: 3px;
  width: 100%;
}

/* ─── Главное меню ─── */
.kp-header__main-nav {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}
.kp-main-menu {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center;
}
.kp-main-menu > li {
  list-style: none;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}
.kp-main-menu > li > a {
  display: block;
  padding: 12px 14px;
  color: var(--c-text);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: color 0.15s ease;
  white-space: nowrap;
}
.kp-main-menu > li > a:hover,
.kp-main-menu > li.current-menu-item > a {
  color: var(--c-green);
}

/* ─── Кнопка Заказать звонок ─── */
.kp-header__callback,
button.kp-header__callback {
  background: var(--c-green) !important;
  background-color: #1a1e22 !important;
  background-image: none !important;
  color: var(--c-white) !important;
  border: none !important;
  padding: 12px 24px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  transition: all 0.2s ease !important;
  flex-shrink: 0;
  margin-left: auto;
  font-family: inherit;
  text-decoration: none !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  line-height: 1.2 !important;
  min-width: 0 !important;
  width: auto !important;
  height: auto !important;
  white-space: nowrap;
}
.kp-header__callback:hover,
button.kp-header__callback:hover {
  background: var(--c-green-dark) !important;
  background-color: #ffd24a !important;
  color: var(--c-white) !important;
}
.kp-header__callback svg {
  fill: none !important;
  stroke: currentColor !important;
}

/* ═══════════════════════════════════════════════════
   МОБИЛЬНАЯ КНОПКА + МЕНЮ
   ═══════════════════════════════════════════════════ */
.kp-mobile-toggle,
button.kp-mobile-toggle,
#kp-mobile-toggle {
  display: none;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  background: var(--c-green, #1a1e22) !important;
  background-color: #1a1e22 !important;
  background-image: none !important;
  border: none !important;
  border-radius: 50% !important;
  cursor: pointer;
  flex-direction: column !important;
  gap: 4px !important;
  padding: 0 !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  transition: background 0.15s ease !important;
}
.kp-mobile-toggle:hover,
button.kp-mobile-toggle:hover {
  background: var(--c-green-dark, #2a3036) !important;
  background-color: #2a3036 !important;
}
.kp-mobile-toggle span,
button.kp-mobile-toggle span {
  display: block !important;
  width: 18px !important;
  height: 2px !important;
  background: var(--c-white, #fff) !important;
  background-color: #fff !important;
  border-radius: 3px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.kp-mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--c-white);
  z-index: 10000;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.kp-mobile-menu[hidden] {
  display: none;
}
.kp-mobile-menu__inner {
  padding: 16px 20px 32px;
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
}
.kp-mobile-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--c-border);
}
.kp-mobile-menu__header span {
  font-size: 18px;
  font-weight: 800;
  color: var(--c-heading);
}
.kp-mobile-menu__close {
  background: transparent !important;
  border: none !important;
  font-size: 32px !important;
  color: var(--c-text) !important;
  cursor: pointer;
  line-height: 1 !important;
  padding: 0 8px !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
}

/* Поиск в drawer */
.kp-mobile-menu__search {
  margin-bottom: 18px;
  position: relative;
}
.kp-mobile-menu__search form {
  position: relative;
  display: flex;
  align-items: center;
}
.kp-mobile-menu__search svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--c-muted, #8a8a82);
  fill: none;
  stroke: currentColor;
  pointer-events: none;
}
.kp-mobile-menu__search input {
  width: 100%;
  padding: 12px 16px 12px 42px !important;
  border: 1.5px solid var(--c-border) !important;
  font-size: 14px !important;
  background: var(--c-100) !important;
  color: var(--c-heading) !important;
  outline: none;
  box-sizing: border-box;
}
.kp-mobile-menu__search input:focus {
  border-color: var(--c-green) !important;
  background: var(--c-white) !important;
}

/* Аккордеон «Каталог товаров» */
.kp-mobile-menu__catalog {
  margin-bottom: 16px;
  border: 1px solid #1a1e2248;
  border-radius: 3px;
  overflow: hidden;
  background: rgba(26, 30, 34, 0.04);
}
.kp-mobile-menu__catalog summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  font-size: 15px;
  font-weight: 800;
  color: var(--c-heading);
  cursor: pointer;
  list-style: none;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  user-select: none;
}
.kp-mobile-menu__catalog summary::-webkit-details-marker {
  display: none;
}
.kp-mobile-menu__catalog summary::marker {
  display: none;
  content: "";
}
.kp-mobile-menu__catalog-icon {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 20px;
  flex-shrink: 0;
}
.kp-mobile-menu__catalog-icon span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--c-green, #1a1e22);
  border-radius: 3px;
}
.kp-mobile-menu__chevron {
  margin-left: auto;
  transition: transform 0.25s ease;
  fill: none;
  stroke: currentColor;
  flex-shrink: 0;
}
.kp-mobile-menu__catalog[open] .kp-mobile-menu__chevron {
  transform: rotate(180deg);
}
.kp-mobile-menu__catalog-list {
  list-style: none;
  margin: 0;
  padding: 0 18px 14px;
  border-top: 1px solid rgba(26, 30, 34, 0.2);
  background: var(--c-white);
}
.kp-mobile-menu__catalog-list li {
  list-style: none;
  margin: 0;
  padding: 0;
  /* border-bottom: 1px solid var(--c-border); */
}
.kp-mobile-menu__catalog-list li:last-child {
  border-bottom: none;
}
.kp-mobile-menu__catalog-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  color: var(--c-heading);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
  border: none !important;
}
.kp-mobile-menu__catalog-list a:hover,
.kp-mobile-menu__catalog-list a:active {
  color: var(--c-green);
}
.kp-mobile-menu__count {
  display: none;
  font-size: 11px;
  color: var(--c-muted);
  font-weight: 500;
  background: var(--c-100);
  padding: 2px 8px;
  border-radius: 3px;
  min-width: 24px;
  text-align: center;
}
.kp-mobile-menu__all-products a {
  color: var(--c-green) !important;
  font-weight: 700 !important;
  padding: 13px 0 !important;
}

/* Основное меню страниц */
.kp-mobile-nav {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}
.kp-mobile-nav li {
  list-style: none;
  margin: 0;
  padding: 0;
}
.kp-mobile-nav a {
  display: block;
  padding: 15px 4px;
  color: var(--c-heading);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none !important;
  /* border-bottom: 1px solid var(--c-border); */
}
.kp-mobile-nav a:hover,
.kp-mobile-nav a:active {
  color: var(--c-green);
}
.kp-mobile-nav li:last-child a {
  border-bottom: none;
}

/* Контакты в drawer */
.kp-mobile-menu__contacts {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding-top: 20px;
  margin-top: 8px;
  border-top: 1px solid var(--c-border);
}
.kp-phone--free-mobile {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  color: var(--c-heading) !important;
  text-decoration: none !important;
  border: none !important;
}
.kp-phone--free-mobile svg {
  color: #8a8a82 !important;
  fill: none !important;
  stroke: #8a8a82 !important;
  flex-shrink: 0;
}
.kp-phone--free-mobile svg * {
  color: #8a8a82 !important;
  stroke: #8a8a82 !important;
}
.kp-phone--city-mobile {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: var(--c-muted) !important;
  text-decoration: none !important;
  border: none !important;
  margin-left: 26px;
}
.kp-phone--free-mobile:hover,
.kp-phone--city-mobile:hover {
  color: var(--c-green) !important;
}

/* Кнопка «Заказать звонок» — зелёная, вместо жёлтой Astra */
.kp-mobile-menu__callback,
a.kp-mobile-menu__callback {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  background: var(--c-green, #1a1e22) !important;
  color: var(--c-white, #fff) !important;
  padding: 14px 28px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  text-decoration: none !important;
  border: none !important;
  width: auto;
  margin-top: 4px;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}
.kp-mobile-menu__callback:hover,
.kp-mobile-menu__callback:active {
  background: var(--c-green-dark, #2a3036) !important;
  color: var(--c-white) !important;
}

/* Мессенджеры в drawer */
.kp-mobile-menu__contacts .kp-messengers--mobile {
  margin-top: 6px;
  display: flex;
  gap: 10px;
}
.kp-mobile-menu__contacts .kp-messengers__item {
  width: 44px;
  height: 44px;
}

/* ═══════════════════════════════════════════════════
   МОДАЛКА (Заказать звонок)
   ═══════════════════════════════════════════════════ */
.kp-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.kp-modal[hidden] {
  display: none;
}
.kp-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(29, 31, 26, 0.75);
  backdrop-filter: blur(4px);
}
.kp-modal__body {
  position: relative !important;
  background: var(--c-white);
  border-radius: 3px;
  padding: 40px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
  max-height: 90vh;
  overflow-y: auto;
}
.kp-modal__body--wide {
  max-width: 900px;
  padding: 44px 48px 40px;
}
.kp-modal__close {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  left: auto !important;
  width: 36px !important;
  height: 36px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: none !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  color: var(--c-muted);
  cursor: pointer;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 50%;
  transition: color 0.15s;
  z-index: 2;
  font-size: 0;
  float: none !important;
  transform: none !important;
}
.kp-modal__close svg {
  width: 20px;
  height: 20px;
  pointer-events: none;
}
.kp-modal__close:hover,
.kp-modal__close:focus {
  color: var(--c-dark);
  background: none !important;
  outline: none !important;
  box-shadow: none !important;
}
.kp-modal__title {
  font-size: 22px;
  font-weight: 800;
  color: var(--c-heading);
  margin: 0 0 8px;
}
.kp-modal__text {
  font-size: 14px;
  color: var(--c-muted);
  margin: 0 0 20px;
}

/* ═══════════════════════════════════════════════════
   АДАПТИВ
   ═══════════════════════════════════════════════════ */

/* XL desktop → 1400px: небольшие ужатия */
@media (max-width: 1400px) {
  .kp-header__top-inner {
    gap: 16px;
  }
}

/* Large desktop → 1200px */
@media (max-width: 1200px) {
  .kp-header__address {
    display: none;
  }
  .kp-header__tagline {
    display: none;
  }
  .kp-logo__img {
    max-height: 52px;
  }
  .kp-header__middle-inner {
    gap: 20px;
  }
  .kp-header__icons {
    gap: 10px;
  }
  .kp-main-menu > li > a {
    padding: 12px 14px;
    font-size: 12px;
  }
  .kp-header__search {
    max-width: none;
  }
  .kp-header__top-inner {
    gap: 12px;
  }
}

/* Tablet → 992px */
@media (max-width: 992px) {
  .kp-header__top {
    display: none !important;
  }
  .kp-header__tagline {
    display: none !important;
  }
  .kp-header__middle-inner {
    gap: 12px;
    padding: 12px 0;
  }
  .kp-search-form__select {
    display: none !important;
  }
  .kp-search-form__input {
    padding: 0 16px !important;
    font-size: 13px !important;
  }
  .kp-search-form__btn {
    padding: 0 16px !important;
  }
  .kp-search-form__btn span {
    display: none !important;
  }
  .kp-header__icon {
    width: 40px;
    height: 40px;
  }
  .kp-logo__img {
    max-height: 44px;
  }
  /* Скрываем меню в bottom row, оставляем каталог + callback */
  .kp-header__main-nav {
    display: none !important;
  }
  .kp-header__bottom-inner {
    justify-content: space-between;
    min-height: 50px;
    gap: 12px;
  }
}

/* Phone → 768px */
@media (max-width: 768px) {
  /* Полностью прячем bottom row на мобильном — всё работает через бургер */
  .kp-header__bottom {
    display: none !important;
  }

  .kp-header__middle {
    position: sticky;
    top: 0;
    z-index: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  }
  .kp-header__middle-inner {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
  }
  .kp-header__brand {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 55%;
  }
  .kp-logo {
    overflow: hidden;
  }
  .kp-logo__img {
    max-height: 38px;
  }
  .kp-logo__text {
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .kp-header__tagline {
    display: none !important;
  }

  /* Поиск — в новую строку, на всю ширину */
  .kp-header__search {
    order: 10;
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
  }
  .kp-search-form {
    height: 44px;
    display: flex !important;
  }
  .kp-search-form__input,
  input.kp-search-form__input {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    font-size: 14px !important;
    padding: 0 16px !important;
  }
  .kp-search-form__btn,
  button.kp-search-form__btn {
    flex: 0 0 52px !important;
    width: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
    padding: 0 !important;
    font-size: 0 !important;
  }
  .kp-search-form__btn span,
  button.kp-search-form__btn span {
    display: none !important;
  }
  .kp-search-form__btn svg {
    width: 18px !important;
    height: 18px !important;
  }

  /* Иконки + бургер — прижаты вправо */
  .kp-header__icons {
    display: flex !important;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    flex-shrink: 0;
  }
  .kp-header__icon,
  a.kp-header__icon {
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    padding: 0 !important;
    flex: 0 0 38px !important;
  }
  .kp-header__icon svg {
    width: 18px !important;
    height: 18px !important;
  }
  .kp-header__icon-badge {
    font-size: 10px !important;
    width: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
    padding: 0 !important;
    flex: 0 0 18px !important;
  }

  /* Мобильный бургер */
  .kp-mobile-toggle {
    display: flex !important;
    width: 40px !important;
    height: 40px !important;
  }
}

/* Small phone → 480px */
@media (max-width: 480px) {
  .kp-header__middle-inner {
    gap: 8px;
    padding: 8px 0;
  }
  .kp-header__brand {
    max-width: 50%;
  }
  .kp-logo__img {
    max-height: 32px;
  }
  .kp-logo__text {
    font-size: 14px;
  }
  .kp-header__icons {
    gap: 4px;
  }
  .kp-header__icon,
  a.kp-header__icon {
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    flex: 0 0 36px !important;
  }
  .kp-header__icon svg {
    width: 16px !important;
    height: 16px !important;
  }
  .kp-mobile-toggle {
    width: 36px !important;
    height: 36px !important;
  }
  .kp-search-form__btn svg {
    width: 16px;
    height: 16px;
  }
}

/* ═══════════════════════════════════════════════════
   ГОРОД-МОДАЛКА (grid cities)
   ═══════════════════════════════════════════════════ */
.kp-modal--city .kp-modal__title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
}
.kp-modal--city .kp-modal__text {
  font-size: 15px;
  color: var(--c-muted);
  margin-bottom: 28px;
  max-width: 600px;
}
.kp-city-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 32px;
  column-count: 3;
}
.kp-city-grid__item {
  display: block;
  color: var(--c-green);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 4px 0;
  transition: color 0.12s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kp-city-grid__item:hover {
  color: var(--c-green-dark);
  text-decoration: underline;
}

@media (min-width: 769px) {
  .kp-search-results {
    top: calc(100% + 5px);
  }
}

/* Mobile: адаптив модалок */
@media (max-width: 768px) {
  .kp-modal {
    padding: 16px;
  }
  .kp-modal__body {
    padding: 28px 22px;
    border-radius: 3px;
    max-height: 85vh;
  }
  .kp-modal__body--wide {
    padding: 32px 24px 24px;
    max-width: 100%;
  }
  .kp-modal__title {
    font-size: 20px !important;
  }
  .kp-modal--city .kp-modal__title {
    font-size: 22px;
  }
  .kp-city-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 20px;
  }
}
@media (max-width: 480px) {
  .kp-modal {
    padding: 12px;
  }
  .kp-modal__body {
    padding: 24px 18px;
  }
  .kp-modal__title {
    font-size: 18px !important;
  }
  .kp-city-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .kp-city-grid__item {
    padding: 8px 0;
    border-bottom: 1px solid var(--c-border);
  }
  .kp-city-grid__item:last-child {
    border-bottom: none;
  }
}

/* Final search submit color */
.kp-header .kp-search-form__btn,
.kp-header button.kp-search-form__btn {
  background: #f1f1ed !important;
  background-color: #f1f1ed !important;
  color: var(--c-heading, #1d1f1a) !important;
  width: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  flex: 0 0 48px !important;
}
.kp-header .kp-search-form__btn:hover,
.kp-header button.kp-search-form__btn:hover {
  background: #ebebe6 !important;
  background-color: #ebebe6 !important;
  color: var(--c-heading, #1d1f1a) !important;
}
.kp-header .kp-search-form__btn svg,
.kp-header button.kp-search-form__btn svg {
  color: var(--c-heading, #1d1f1a) !important;
  stroke: var(--c-heading, #1d1f1a) !important;
}
