/* header — стили вариантов шапки (общее — в site/site.css).
   Классы: .h-<вариант> на <header>, .burger, .h-phone, .h-bar, .h-side.
   Меню на <900px (и всегда в .h-minimal) — выпадающая панель под шапкой;
   класс .open на .site-header ставит JS из base_site.html. */

/* «бургер»: три полоски фоном, цвет — текст шапки; открыт — одна полоска */
.site-header .burger {
  display: none; flex: none; width: 42px; height: 42px; margin-left: auto; cursor: pointer;
  border: 1px solid var(--s-line); border-radius: var(--radius-btn); color: var(--s-text);
  background:
    linear-gradient(currentColor, currentColor) center 14px / 18px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center 20px / 18px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center 26px / 18px 2px no-repeat;
}
.site-header.open .burger {
  background: linear-gradient(currentColor, currentColor) center 20px / 18px 2px no-repeat;
}
.site-header .burger:focus-visible { outline: 2px solid var(--s-text); outline-offset: 2px; }

.site-header .logo { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.site-header .h-phone { font-size: 14px; font-weight: 600; color: var(--s-text); white-space: nowrap; text-decoration: none; }
.site-header .nav ul a { color: var(--s-muted); }
.site-header .nav ul a:hover { color: var(--s-text); }

/* ---- topbar: тонкая полоса над классической шапкой */
.h-bar { background: var(--s-surface); border-bottom: 1px solid var(--s-line); font-size: 13px; color: var(--s-muted); }
.h-bar-in { max-width: 1200px; margin: 0 auto; padding: 7px 5%; display: flex; flex-wrap: wrap; gap: 4px 22px; justify-content: space-between; }
.h-bar a { color: var(--s-text); font-weight: 600; text-decoration: none; }
.h-bar-addr { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- centered: логотип по центру, меню строкой ниже */
.h-centered .nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0 20px; }
.h-centered .h-side { display: flex; align-items: center; gap: 16px; min-width: 0; }
.h-centered .h-right { justify-content: flex-end; }
.h-centered .nav ul {
  grid-column: 1 / -1; justify-content: center; margin: 12px 0 0; padding-top: 12px;
  border-top: 1px solid var(--s-line); flex-wrap: wrap; gap: 8px 28px;
}

/* ---- minimal: логотип, кнопка и «бургер» всегда */
.h-minimal .h-side { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.h-minimal .burger { display: block; margin-left: 0; }
.h-minimal .nav ul {
  display: none; position: absolute; top: calc(100% + 6px); right: 5%; left: auto; width: min(320px, 90vw);
  flex-direction: column; gap: 0; margin: 0; padding: 8px 20px;
  background: var(--c-header-bg); border: 1px solid var(--s-line); border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .18);
}
.h-minimal.open .nav ul { display: flex; }
.h-minimal .nav ul li + li { border-top: 1px solid var(--s-line); }
.h-minimal .nav ul a { display: block; padding: 13px 0; font-size: 16px; color: var(--s-text); }

@media (max-width: 900px) {
  .site-header .burger { display: block; }
  .site-header .nav .city-slot { margin-left: 0; }
  .site-header .h-phone { display: none; }
  .site-header .nav ul {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    margin: 0; padding: 6px 5% 14px; background: var(--c-header-bg);
    border-bottom: 1px solid var(--s-line); box-shadow: 0 16px 30px rgba(0, 0, 0, .14);
    max-height: calc(100vh - 70px); overflow-y: auto;
  }
  .site-header.open .nav ul { display: flex; }
  .site-header .nav ul li + li { border-top: 1px solid var(--s-line); }
  .site-header .nav ul a { display: block; padding: 13px 0; font-size: 16px; color: var(--s-text); }
  .site-header .logo { font-size: 20px; letter-spacing: .18em; }
  .site-header .logo .accent { letter-spacing: 0; }
  /* centered: меню — панель, а не строка; в сетке остаются три колонки */
  .h-centered .nav ul { grid-column: auto; margin: 0; padding: 6px 5% 14px; border-top: 0; }
  .h-centered .burger { margin-left: 0; }
  .h-minimal .nav ul { left: 5%; right: 5%; width: auto; padding: 6px 20px; }
  .h-bar-in { justify-content: flex-start; }
}
@media (max-width: 700px) {
  .h-centered .h-right .btn, .h-minimal .h-right .btn { display: none; }
  .h-bar a ~ .h-bar-addr { display: none; }
}
@media (max-width: 420px) {
  .site-header .logo { font-size: 17px; letter-spacing: .12em; }
  .site-header .nav { gap: 10px; padding-left: 4%; padding-right: 4%; }
  .city-switch button { padding: 6px 10px; }
}
