/* Шапка сайта — современный вид (.hd2) */
:root {
  --hd2-bg: #1b1916;
  --hd2-bg-2: #24211d;
  --hd2-accent: #d6a46c;
  --hd2-primary: #7c0a02;
  --hd2-text: #f4efe9;
  --hd2-muted: rgba(244, 239, 233, .58);
}

/* ---------- Верхняя строка ---------- */
.hd2-top { background: #13110f; color: var(--hd2-muted); font-size: 13px; }
.hd2-top__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 36px; padding-left: 1.5rem; padding-right: 1.5rem; }
.hd2-top__left, .hd2-top__right { display: flex; align-items: center; gap: 22px; }
.hd2-top span, .hd2-top a { display: inline-flex; align-items: center; gap: 6px; }
.hd2-top svg { width: 15px; height: 15px; fill: none; stroke: var(--hd2-accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hd2-top a { color: var(--hd2-muted); text-decoration: none; transition: color .15s; }
.hd2-top a:hover { color: var(--hd2-text); }
.hd2-top__price { color: var(--hd2-accent) !important; font-weight: 600; }
.hd2-top__msg { gap: 8px !important; }
.hd2-top__msg a { opacity: .85; transition: opacity .15s, transform .15s; }
.hd2-top__msg a:hover { opacity: 1; transform: translateY(-1px); }

/* ---------- Основная полоса ---------- */
header.hd2 .navbar {
  background: var(--hd2-bg) !important;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  padding-top: 14px; padding-bottom: 14px;
  transition: padding .25s ease, box-shadow .25s ease;
}
header.hd2.hd2--scrolled .navbar { padding-top: 6px; padding-bottom: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
header.hd2 .navbar-brand img { transition: height .25s ease, width .25s ease; }
header.hd2.hd2--scrolled .navbar-brand img { height: 46px; width: auto; }

@media (min-width: 1200px) {
  header.hd2 .navbar-nav { gap: 4px; }
  header.hd2 .navbar-nav > .nav-item > .nav-link {
    position: relative; font-size: 15px; font-weight: 500; letter-spacing: .01em;
    color: var(--hd2-text); padding: 10px 14px !important; border-radius: 10px;
    transition: background .15s, color .15s;
  }
  header.hd2 .navbar-nav > .nav-item > .nav-link:hover,
  header.hd2 .navbar-nav > .nav-item.show > .nav-link { background: rgba(255, 255, 255, .07); }
  header.hd2 .navbar-nav > .nav-item > .nav-link > span { display: none; }
  header.hd2 .navbar-nav > .nav-item.active > .nav-link,
  header.hd2 .navbar-nav > .nav-item > .nav-link.active { color: var(--hd2-accent); }

  /* обычные выпадающие списки */
  header.hd2 .dropdown-menu {
    border: 0; border-radius: 14px; padding: 8px; margin-top: 10px !important;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .18);
  }
  /* невидимый мостик между пунктом меню и подменю, чтобы оно не закрывалось при переходе курсора */
  header.hd2 .dropdown-menu::before {
    content: ""; position: absolute; left: 0; right: 0; top: -22px; height: 22px;
  }
  header.hd2 .navbar-nav > .nav-item.dropdown { padding-bottom: 0; }
  header.hd2 .dropdown-item { border-radius: 8px; padding: 9px 14px; font-size: 15px; }
  header.hd2 .dropdown-item:hover { background: #f4f1ed; color: var(--hd2-primary); }

  /* мега-меню каталога */
  header.hd2 .dropdown-menu.hd2-mega { width: 640px; padding: 14px; }
  .hd2-mega__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .hd2-mega__item {
    display: flex; align-items: center; gap: 12px; padding: 8px;
    border-radius: 12px; color: #1d1d1f; text-decoration: none; transition: background .15s;
  }
  .hd2-mega__item:hover { background: #f4f1ed; color: var(--hd2-primary); }
  .hd2-mega__img { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 10px; overflow: hidden; background: #f4f1ed; }
  .hd2-mega__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .hd2-mega__name { font-size: 14px; font-weight: 600; line-height: 1.25; }
  .hd2-mega__foot {
    display: flex; gap: 20px; margin-top: 12px; padding: 12px 8px 2px;
    border-top: 1px solid #eee9e3; font-size: 14px;
  }
  .hd2-mega__foot a { color: var(--hd2-primary); text-decoration: none; font-weight: 600; }
  .hd2-mega__foot a:hover { text-decoration: underline; }
}

/* Телефоны */
header.hd2 .header-contacts { gap: 22px; }
header.hd2 .header-link-phone { color: var(--hd2-text) !important; font-size: 16px; font-weight: 700; letter-spacing: .01em; text-decoration: none; }
header.hd2 .header-link-phone .icon { color: var(--hd2-accent); width: 18px; height: 18px; }
header.hd2 .header-contacts .small.text-white { color: var(--hd2-muted) !important; text-decoration: none !important; font-size: 12px; margin-top: 3px; }

/* Кнопка расчёта */
header.hd2 .hd2-cta {
  background: var(--hd2-accent); color: #1b1916; font-weight: 700; font-size: 15px;
  border-radius: 12px; padding: 10px 18px; border: 0; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(214, 164, 108, .25); transition: transform .15s, background .15s;
}
header.hd2 .hd2-cta:hover { background: #e3b57f; transform: translateY(-1px); color: #1b1916; }

/* Поиск и корзина — круглые кнопки */
header.hd2 .link-style-5 {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 255, 255, .07); color: var(--hd2-text) !important; transition: background .15s;
}
header.hd2 .link-style-5:hover { background: rgba(255, 255, 255, .14); }
header.hd2 .link-style-5 .icon { width: 20px; height: 20px; }

/* Телефон: кнопка звонка */
header.hd2 .hd2-iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--hd2-accent); color: #1b1916;
}
header.hd2 .hd2-iconbtn .icon { width: 20px; height: 20px; }
@media (max-width: 1199.98px) {
  header.hd2 .navbar-toggler { display: inline-flex; }
}
header.hd2 .navbar-toggler { border: 0; width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .08); padding: 0; align-items: center; justify-content: center; box-shadow: none !important; }
header.hd2 .navbar-toggler-icon { width: 22px; height: 22px; }

/* ---------- Мобильное меню ---------- */
@media (max-width: 1199.98px) {
  header.hd2 .offcanvas { width: min(360px, 88vw); }
  header.hd2 .offcanvas-header { padding: 18px 20px; border-bottom: 1px solid #eee9e3; }
  header.hd2 .offcanvas .navbar-nav { padding: 8px 12px; }
  header.hd2 .offcanvas .nav-link { color: #1d1d1f !important; font-size: 17px; font-weight: 600; padding: 12px 10px !important; border-radius: 10px; }
  header.hd2 .offcanvas .nav-link:hover { background: #f4f1ed; }
  header.hd2 .offcanvas .dropdown-menu { border: 0; background: #f7f5f2; border-radius: 12px; padding: 6px; margin: 2px 0 8px; }
  header.hd2 .offcanvas .dropdown-item { padding: 10px 12px; border-radius: 8px; font-size: 15px; }
  header.hd2 .offcanvas .bg-light { background: #f7f5f2 !important; margin: 0 12px 16px; border-radius: 16px; }
  header.hd2 .offcanvas .header-link-phone { color: #1d1d1f !important; }
}
@media (max-width: 767.98px) {
  header.hd2 .navbar { padding-top: 8px; padding-bottom: 8px; }
  header.hd2 .navbar-brand img { height: 44px; width: auto; }
}

/* ---------- Заголовок страницы и крошки ---------- */
body:has(header.hd2) .breadcrumbs-area { background: #f7f5f2 !important; padding-top: 28px; padding-bottom: 22px; }
body:has(header.hd2) .breadcrumbs-area h1 { font-size: clamp(26px, 3vw, 36px); font-weight: 800 !important; letter-spacing: -.01em; margin-bottom: 8px; }
body:has(header.hd2) .breadcrumbs-area .breadcrumb { font-size: 14px; }

/* Телефоны в одну строку; кнопка расчёта — только на очень широком экране */
header.hd2 .header-link-phone, header.hd2 .item-phone { white-space: nowrap; }
@media (max-width: 1599.98px) { header.hd2 .hd2-cta { display: none; } }
@media (min-width: 1200px) and (max-width: 1399.98px) {
  header.hd2 .header-link-phone { font-size: 15px; }
  header.hd2 .header-contacts { gap: 16px; }
}

/* ---------- Окно поиска ---------- */
.offcanvas.srch2 {
  height: auto !important; bottom: auto !important; max-height: 100vh; border: 0 !important;
  background: #1b1916; color: #f4efe9;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  border-radius: 0 0 24px 24px;
}
.srch2__in { padding-top: 22px; padding-bottom: 28px; max-width: 900px; }
.srch2__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.srch2__title { font-size: 15px; font-weight: 600; color: rgba(244, 239, 233, .6); text-transform: uppercase; letter-spacing: .08em; }
.srch2__close {
  width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .08);
  display: inline-flex; align-items: center; justify-content: center; color: #f4efe9; transition: background .15s;
}
.srch2__close:hover { background: rgba(255, 255, 255, .16); }
.srch2__close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.srch2__form {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 20px;
  background: #fff; border-radius: 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.srch2__icon { width: 24px; height: 24px; flex: 0 0 24px; fill: none; stroke: #8a8580; stroke-width: 2; stroke-linecap: round; }
.srch2__input {
  flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent;
  font-size: clamp(17px, 2vw, 22px); font-weight: 500; color: #1d1d1f; height: 52px;
}
.srch2__input::placeholder { color: #a9a39c; font-weight: 400; }
.srch2__input::-webkit-search-cancel-button { cursor: pointer; }
.srch2__btn {
  flex: 0 0 auto; height: 52px; padding: 0 26px; border: 0; border-radius: 13px;
  background: #7c0a02; color: #fff; font-weight: 700; font-size: 16px; transition: background .15s;
}
.srch2__btn:hover { background: #95130a; }
.srch2__hints { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.srch2__label { font-size: 14px; color: rgba(244, 239, 233, .55); margin-right: 4px; }
.srch2__hints a {
  padding: 7px 14px; border-radius: 999px; font-size: 14px; color: #f4efe9; text-decoration: none;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); transition: background .15s, border-color .15s;
}
.srch2__hints a:hover { background: rgba(214, 164, 108, .15); border-color: rgba(214, 164, 108, .5); color: #f4efe9; }
.offcanvas-backdrop.show { opacity: .55; }
@media (max-width: 575.98px) {
  .srch2__in { padding-top: 14px; padding-bottom: 20px; }
  .srch2__form { padding: 6px 6px 6px 14px; border-radius: 14px; }
  .srch2__icon { display: none; }
  .srch2__input { height: 46px; }
  .srch2__btn { height: 46px; padding: 0 16px; }
  .srch2__label { width: 100%; }
}
