/* =========================================================
   NAVI Header v2 — двухуровневая шапка
   ========================================================= */

/* --- Variables --- */
:root {
  --navi-accent: #30A495;
  --navi-accent-hover: #2A9585;
  --navi-dark: #1F2A2E;
  --navi-dark-2: #2A363A;
  --navi-gray: #EEF2F3;
  --navi-bg-input: #F5F6FA;
  --navi-border: #E3E8EB;
  --navi-text: #37474F;
  --navi-muted: #5F6F75;
  --navi-muted-2: #8A979C;
  --header-total: 120px;       /* 40 (top) + 80 (main) */
  --header-scrolled: 60px;     /* при скролле top bar скрывается */
  --navi-font: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

body {
  margin: 0;
  padding-top: var(--header-total);
  font-family: var(--navi-font);
  background: #f9fafb;
  transition: padding-top .25s ease;
}
body.scrolled { padding-top: var(--header-scrolled); }

* { box-sizing: border-box; }

/* --- Header container --- */
.navi-header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 99999;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .06);
}

.navi-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px;
}

/* =========================================================
   1. TOP BAR (тёмный, 40px)
   ========================================================= */
.navi-topbar {
  height: 40px;
  background: var(--navi-dark);
  color: #fff;
  display: flex;
  align-items: center;
  transition: height .3s cubic-bezier(0.4, 0, 0.2, 1), opacity .25s ease;
  overflow: hidden;
  position: relative;
  z-index: 20;
}

body.scrolled .navi-topbar {
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.navi-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 40px;
  font-size: 13px;
}

.navi-topbar-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.navi-location {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, .9);
  cursor: help;                   /* курсор-помощь (тултип) */
  transition: color .15s ease;
  position: relative;
  text-decoration: none;
}
.navi-location i { color: var(--navi-accent); font-size: 13px; }
.navi-location > span:last-child {
  /* Только текст города — пунктирное подчёркивание */
  text-decoration: underline dotted;
  text-decoration-color: rgba(255, 255, 255, .85);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color .15s ease;
}
.navi-location:hover { color: #fff; }
.navi-location:hover > span:last-child {
  text-decoration-color: #fff;
}

/* Тултип Калининграда — фиксированный, поверх всего (вне topbar overflow:hidden) */
#navi-location-tooltip {
  position: fixed;
  background: var(--navi-dark, #1F2A2E);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--navi-font, 'Inter', sans-serif);
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
  z-index: 100000;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease;
}
#navi-location-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}
#navi-location-tooltip::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 5px solid var(--navi-dark, #1F2A2E);
}

.navi-topbar-menu {
  display: flex;
  align-items: center;
  gap: 18px;
}
.navi-topbar-menu a {
  color: rgba(255, 255, 255, .85);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color .15s ease;
}
.navi-topbar-menu a:hover { color: var(--navi-accent); }

.navi-topbar-contacts {
  display: flex;
  align-items: center;
  gap: 20px;
}
.navi-topbar-contacts a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, .9);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color .15s ease;
}
.navi-topbar-contacts a i { color: var(--navi-accent); font-size: 13px; }
.navi-topbar-contacts a:hover { color: #fff; }

/* =========================================================
   2. MAIN HEADER (белый, 80px) — лого + поиск + иконки
   ========================================================= */
.navi-main-header {
  height: 80px;
  background: #fff;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 10;
}

.navi-main-inner {
  display: flex;
  align-items: center;
  gap: 0;                /* gap=0 — выравнивание через margin на элементах */
  width: 100%;
  height: 80px;
}

/* --- Логотип --- */
.navi-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin-right: 20px;    
}
.navi-logo img {
  height: 56px;
  width: auto;
  display: block;
  transition: height .2s ease;
}
@media (max-width: 1280px) {
  .navi-logo img { height: 52px; }
}
@media (max-width: 991px) {
  .navi-logo img { height: 48px; }
}
@media (max-width: 575px) {
  .navi-logo img { height: 44px; }
}

/* --- Поиск --- */
.navi-search {
  flex: 0 1 600px;
  margin-left: 20px;
  position: relative;
}
.navi-search form {
  display: flex;
  align-items: center;
  width: 100%;
  height: 50px;
  background: var(--navi-bg-input);
  border: 1px solid var(--navi-border);
  border-radius: 8px;     /* скругление ВСЕХ углов формы (и левого, и правого) */
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.navi-search form:focus-within {
  border-color: var(--navi-accent);
}
.navi-search input {
  flex: 1;
  height: 100%;
  border: none;
  background: transparent;
  padding: 0 16px;
  font-family: var(--navi-font);
  font-size: 14px;
  color: var(--navi-text);
  outline: none;
}
.navi-search input::placeholder { color: var(--navi-muted-2); }
.navi-search button {
  width: 50px;
  height: 50px;
  border: none;
  background: transparent;        /* без заливки — иконка фирменного цвета */
  color: var(--navi-accent);     /* фирменный бирюзовый */
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s ease, transform .1s ease;
}
.navi-search button:hover {
  color: var(--navi-accent-hover);
  transform: scale(1.05);
}
/* Кнопка очистки поиска (крестик) — появляется при вводе текста */
.navi-search-clear {
  width: 36px;
  height: 100%;
  border: none;
  background: transparent;
  color: var(--navi-muted-2);
  font-size: 14px;
  cursor: pointer;
  display: none !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color .15s ease;
}
.navi-search-clear:hover { color: var(--navi-text); }
.navi-search-clear.visible { display: flex !important; }

/* --- История поиска (как на Ozon — чипсы + Очистить) --- */
.navi-search-history {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--navi-bg-input);
  border: 1px solid var(--navi-border);
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.1);
  z-index: 100000;
  padding: 12px;
}
.navi-search-history.visible { display: block; }
.navi-search-history-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.navi-search-history-item {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background: var(--navi-bg-input);
  border-radius: 20px;
  cursor: pointer;
  color: var(--navi-text);
  font-size: 14px;
  transition: background .15s ease, color .15s ease;
  white-space: nowrap;
  user-select: none;
}
.navi-search-history-item:hover { background: var(--navi-accent); color: #fff; }
.navi-search-history-clear {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent !important;
  border: 1px solid var(--navi-border) !important;
  color: var(--navi-muted) !important;
  font-size: 14px !important;
  font-weight: 500;
  cursor: pointer;
  border-radius: 20px;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
  user-select: none;
  margin-left: auto;
  flex-shrink: 0;
  width: auto !important;
  height: auto !important;
}
.navi-search-history-clear:hover { background: #fef3f2; border-color: #ef4444; color: #ef4444; }
.navi-search-history-clear i { font-size: 13px; }
.navi-search-history-empty {
  padding: 12px 0;
  text-align: center;
  font-size: 14px;
  color: var(--navi-muted-2);
}

/* --- Overlay затемнение фона при фокусе на поиске --- */
.navi-search-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0);
  z-index: 9998;
  pointer-events: none;
  transition: background .2s ease;
}
.navi-search-overlay.active {
  background: rgba(0, 0, 0, 0.25);
  pointer-events: auto;
}
.navi-search.active-search {
  z-index: 9999;
}

/* --- Иконки справа (actions) --- */
.navi-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}
.navi-action {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0 10px;
  height: 50px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--navi-text);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
  min-width: 50px;
}
.navi-action-login {
  opacity: 1;
  cursor: not-allowed;
  pointer-events: none;          /* клики не срабатывают (пока не активирована) */
  background: #F6F7F7;
  color: var(--navi-dark, #1F2A2E);
  border: 1px solid var(--navi-border, #E3E8EB);
  border-radius: 8px;
  padding: 0 14px;
  height: 50px;
  min-width: auto;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  flex-shrink: 0;
}
.navi-action-login > i {
  color: var(--navi-dark, #1F2A2E);
  font-size: 16px;
}
.navi-action.navi-action-login > span:not(.navi-badge) {
  color: var(--navi-dark, #1F2A2E) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  display: inline !important;
}

/* Actions: иконки без подписей, Войти — с подписью */
.navi-action:not(.navi-action-login) > span:not(.navi-badge) {
  display: none;
}

/* Модалка сравнения перенесена на отдельную страницу /compare/ — см. compare.tpl */

.navi-action:hover {
  background: var(--navi-bg-input);
  color: var(--navi-accent);
}
.navi-action i {
  font-size: 20px;
  color: var(--navi-muted);
  transition: color .15s ease;
}
.navi-action:hover i { color: var(--navi-accent); }
.navi-action span:not(.navi-badge) {
  font-size: 13px;
  font-weight: 500;
  color: var(--navi-muted);
}
.navi-action:hover span:not(.navi-badge) { color: var(--navi-accent); }

.navi-badge:not(.stock-badge) {
  position: absolute;
  top: 0px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #ef4444;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(239,68,68,.3);
}
/* Бейджи наличия в каталоге (.stock-badge) не наследуют стиль меню */
.stock-badge.navi-badge {
  position: relative;
  top: auto;
  right: auto;
  min-width: 180px;
  height: auto;
  min-height: 34px;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  box-shadow: none;
  font-size: 13px;
  font-weight: 600;
}
.navi-badge:not(.stock-badge).navi-badge-cart { background: #ef4444; }               /* корзина — КРАСНАЯ */
.navi-badge:not(.stock-badge).navi-badge-wishlist { background: #ef4444; }            /* избранное — КРАСНАЯ */
.navi-badge:not(.stock-badge).navi-badge-compare { background: #ef4444; }             /* сравнение — КРАСНАЯ */

.navi-badge:not(.stock-badge).navi-badge-cart:not(.active),
.navi-badge:not(.stock-badge).navi-badge-wishlist:not(.active),
.navi-badge:not(.stock-badge).navi-badge-compare:not(.active) { display: none; }

/* --- Catalog button --- */
.navi-catalog-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 40px;
  background: var(--navi-accent);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: background .15s ease, transform .1s ease;
  flex-shrink: 0;
}
.navi-catalog-btn:hover { background: var(--navi-accent-hover); color: #fff; }
.navi-catalog-btn:active { transform: scale(.98); }
.navi-catalog-btn i { font-size: 16px; }

/* =========================================================
   3. MOBILE HEADER — двухуровневый (тёмная зона + белая зона)
   ========================================================= */
.navi-mobile {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 99999;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
}

/* --- Тёмная зона (скрывается при скролле) --- */
.navi-mobile-top {
  height: 36px;
  background: var(--navi-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  transition: height .3s cubic-bezier(0.4, 0, 0.2, 1), opacity .25s ease;
  overflow: hidden;
}
body.scrolled .navi-mobile-top {
  height: 0;
  opacity: 0;
  pointer-events: none;
}
.navi-mobile-top-left {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(255, 255, 255, .9);
  font-size: 12px;
}
.navi-mobile-top-left i { color: var(--navi-accent); font-size: 12px; }
.navi-mobile-top-right {
  display: flex;
  align-items: center;
  gap: 4px;
}
.navi-mobile-top-right a {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 44px;
  min-height: 36px;
  padding: 0 8px;
  color: rgba(255, 255, 255, .85);
  text-decoration: none;
  font-size: 12px;
  transition: color .15s ease, background .15s ease;
  border-radius: 6px;
}
.navi-mobile-top-right a:hover { color: #fff; background: rgba(255,255,255,.1); }
.navi-mobile-top-right a i { font-size: 15px; color: var(--navi-accent); }

/* --- Белая зона (тоже тёмная, не скрывается) --- */
.navi-mobile-main {
  height: 56px;
  background: var(--navi-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  gap: 8px;
}

.navi-mobile-search-inline {
  flex: 1;
  display: flex;
  align-items: center;
  height: 40px;
  background: var(--navi-bg-input);       /* тот же что на ПК */
  border: 1px solid var(--navi-border);   /* тот же что на ПК */
  border-radius: 8px;
  overflow: hidden;
  min-width: 0;
}
.navi-mobile-search-inline input {
  flex: 1;
  height: 100%;
  border: none;
  background: transparent;
  padding: 0 12px;
  font-family: var(--navi-font);
  font-size: 14px;
  color: var(--navi-text);                /* тёмный текст как на ПК */
  outline: none;
  min-width: 0;
}
.navi-mobile-search-inline input::placeholder { color: var(--navi-muted-2); }  /* серый placeholder как на ПК */
.navi-mobile-search-inline button {
  width: 40px;
  height: 100%;
  border: none;
  background: transparent;
  color: var(--navi-accent);              /* бирюзовая иконка как на ПК */
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* --- Лого --- */
.navi-mobile-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.navi-mobile-logo img {
  height: 36px;
  width: auto;
  display: block;
}

/* --- Кнопки (меню, поиск, корзина) — на тёмном фоне --- */
.navi-mobile-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background .15s ease, color .15s ease;
}
.navi-mobile-btn:active { transform: scale(.95); }
.navi-mobile-btn:hover { background: rgba(255, 255, 255, .2); color: var(--navi-accent); }
.navi-mobile-btn i { transition: color .15s ease; }

.navi-mobile-menu-panel {
  display: none;
  position: absolute;
  top: 100%;                        /* сразу под .navi-mobile (не перекрывает header) */
  left: 0; right: 0;
  width: 100%;
  max-height: calc(100vh - 92px);   /* 100vh - header (36+56) */
  overflow-y: auto;
  padding: 12px;
  background: var(--navi-dark);
  z-index: 99997;
  box-shadow: 0 8px 32px rgba(0,0,0, .3);
}
body.scrolled .navi-mobile-menu-panel {
  top: 100%;
  max-height: calc(100vh - 56px);   /* 100vh - main (56) при скролле */
}
.navi-mobile-menu-panel.active {
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: navi-slide-down .2s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes navi-slide-down {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.navi-mobile-catalog {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--navi-accent);
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 4px 12px rgba(48, 164, 149, .3);
}
.navi-mobile-catalog i { font-size: 18px; }

.navi-mobile-menu-panel > a:not(.navi-mobile-catalog) {
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
}
/* Ссылки с иконкой (Избранное, Сравнение, Контакты) */
.navi-mobile-menu-link {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  transition: background .15s ease;
  position: relative;
}
.navi-mobile-menu-link:hover { background: rgba(255, 255, 255, .25); }
.navi-mobile-menu-link i { font-size: 16px; color: var(--navi-accent); }
.navi-mobile-menu-link span { flex: 1; }
/* Сетка 2 колонки для пунктов меню (кроме Каталога) */
.navi-mobile-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
@media (max-width: 400px) {
  .navi-mobile-menu-grid { grid-template-columns: 1fr; }
}
/* Красный круглый бейдж внутри пунктов меню (Избранное, Сравнение) */
.navi-badge-menu-inner {
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(239,68,68,.3);
}
.navi-badge-menu {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(239,68,68,.3);
}

/* =========================================================
   4. RESPONSIVE
   ========================================================= */
@media (max-width: 1199px) {
  .navi-topbar-menu { gap: 12px; }
  .navi-topbar-menu a { font-size: 13px; }
  .navi-topbar-contacts { gap: 12px; }
  .navi-topbar-contacts a { font-size: 13px; }
}

@media (max-width: 991px) {
  body { padding-top: 92px; }             /* 36 (top) + 56 (main) */
  body.scrolled { padding-top: 56px; }     /* только main при скролле */
  .navi-header { display: none; }
  .navi-mobile { display: block; }
}

@media (max-width: 575px) {
  .navi-mobile-main { padding: 0 10px; }
  .navi-mobile-top { padding: 0 10px; }
  .navi-mobile-top-right { gap: 10px; }
  .navi-mobile-top-right a span { display: none; }  /* только иконки на узких */
  .navi-mobile-btn { width: 44px; height: 44px; font-size: 16px; }
  .navi-mobile-logo img { height: 32px; }
}

.navi-mobile-menu-panel::-webkit-scrollbar { width: 6px; }
.navi-mobile-menu-panel::-webkit-scrollbar-track { background: transparent; }
.navi-mobile-menu-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .15);
  border-radius: 3px;
}

.navi-catalog-all { display: none !important; }

/* =========================================================
   6. ANIMATIONS
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

/* Focus-visible для клавиатурной навигации */
.navi-search input:focus-visible,
.navi-mobile-search-inline input:focus-visible {
  outline: 2px solid var(--navi-accent);
  outline-offset: -2px;
}
.navi-action:focus-visible,
.navi-mobile-btn:focus-visible,
.navi-catalog-btn:focus-visible,
.navi-mobile-catalog:focus-visible,
.navi-mobile-menu-link:focus-visible {
  outline: 2px solid var(--navi-accent);
  outline-offset: 2px;
}

.navi-sidebar-dropdown {
  position: fixed;
  background: #fff;
  border: 1px solid var(--navi-border, #E3E8EB);
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .15);
  padding: 16px 20px;
  display: none;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity .2s ease, transform .2s ease;
  z-index: 100000;
  
  box-sizing: border-box;
  flex-direction: column;
  overflow: hidden;             /* заголовок и grid внутри, без выпадения */
}
.navi-sidebar-dropdown.show {
  display: flex;
  opacity: 1;
  transform: translateX(0);
}
.navi-sidebar-dropdown-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navi-dark, #1F2A2E);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #30A495;
  display: inline-block;
  flex-shrink: 0;               /* заголовок не сжимается */
}
.navi-sidebar-dropdown-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px 24px;
  overflow-y: auto;             /* скролл внутри grid если подкатегорий много */
  flex: 1;                       /* занимает оставшуюся высоту */
  min-height: 0;                 /* позволяет flex-child скроллиться */
  align-content: start;          /* пункты прижаты к верху */
  padding-right: 4px;            /* место под скроллбар */
}
.navi-sidebar-dropdown-grid::-webkit-scrollbar { width: 6px; }
.navi-sidebar-dropdown-grid::-webkit-scrollbar-track { background: transparent; }
.navi-sidebar-dropdown-grid::-webkit-scrollbar-thumb { background: #E3E8EB; border-radius: 3px; }
.navi-sidebar-dropdown-grid::-webkit-scrollbar-thumb:hover { background: #5F6F75; }
.navi-sidebar-dropdown-sub {
  display: block;
  padding: 6px 0;
  text-decoration: none;
  color: #37474F;
  font-size: 13px;
  line-height: 1.3;
  transition: color .15s ease;
}
.navi-sidebar-dropdown-sub:hover {
  color: #30A495;
  text-decoration: underline;
}
.navi-sidebar-dropdown-loading {
  padding: 20px;
  text-align: center;
  color: var(--navi-muted, #5F6F75);
  font-size: 13px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Адаптив: на планшетах и мобилке — скрываем выпадающее меню */
@media (max-width: 1199px) {
  .navi-sidebar-dropdown-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 991px) {
  .navi-sidebar-dropdown { display: none !important; }
}

.navi-page-title { font-size: 24px; font-weight: 700; color: var(--navi-dark, #1F2A2E); margin: 0 0 8px; padding: 0; text-align: left; }
.navi-page-subtitle { font-size: 14px; color: var(--navi-muted, #5F6F75); margin: 0 0 24px; line-height: 1.5; }
.page-breadcrumb li:last-child { display: none; }

.navi-clear-btn, .cart-header-clear, .cart-header-clear-mobile, .wishlist-clear-btn, .navi-compare-clear-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 10px 16px !important;
  background: #fff !important;
  color: #D04848 !important;
  border: 1px solid #fed7d7 !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  flex-shrink: 0;
  text-decoration: none;
}
.navi-clear-btn:hover, .cart-header-clear:hover, .cart-header-clear-mobile:hover,
.wishlist-clear-btn:hover, .navi-compare-clear-btn:hover {
  background: #fff5f5 !important;
  border-color: #D04848 !important;
}
.navi-clear-btn i, .cart-header-clear i, .cart-header-clear-mobile i,
.wishlist-clear-btn i, .navi-compare-clear-btn i { font-size: 13px; }

.navi-confirm-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100000;
  opacity: 0;
  visibility: hidden;
  display: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.navi-confirm-overlay.show,
.navi-confirm-overlay.active {
  opacity: 1 !important;
  visibility: visible !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.navi-confirm-dialog, .navi-confirm-modal {
  position: relative;
  background: #fff;
  border-radius: 14px;
  max-width: 440px;
  width: 100%;
  padding: 28px 28px 24px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
  transform: scale(0.92) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
  font-family: var(--navi-font, Arial, sans-serif);
}
.navi-confirm-overlay.show .navi-confirm-dialog,
.navi-confirm-overlay.show .navi-confirm-modal,
.navi-confirm-overlay.active .navi-confirm-dialog,
.navi-confirm-overlay.active .navi-confirm-modal {
  transform: scale(1) translateY(0);
}
.navi-confirm-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin-bottom: 18px;
  background: #fef3c7;
  color: #d97706;
}
.navi-confirm-icon.info { background: #e0f2fe; color: #0ea5e9; }
.navi-confirm-title {
  font-size: 20px;
  font-weight: 800;
  color: #111827;
  margin: 0 0 8px;
  line-height: 1.3;
}
.navi-confirm-text {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
  margin: 0 0 24px;
}
.navi-confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.navi-confirm-btn {
  flex: 1;
  height: 46px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  white-space: nowrap;
}
.navi-confirm-btn:active { transform: scale(0.97); }
.navi-confirm-btn-cancel {
  background: #f3f4f6;
  color: #374151;
  border-color: #f3f4f6;
}
.navi-confirm-btn-cancel:hover {
  background: #e5e7eb;
  border-color: #e5e7eb;
}
.navi-confirm-btn-danger {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.25);
}
.navi-confirm-btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.35);
}
.navi-confirm-btn-primary {
  background: var(--navi-accent, #30A495);
  color: #fff;
  border-color: var(--navi-accent, #30A495);
  box-shadow: 0 6px 16px rgba(24, 183, 157, 0.25);
}
.navi-confirm-btn-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(24, 183, 157, 0.35);
}
@media (max-width: 480px) {
  .navi-confirm-actions { flex-direction: column-reverse; }
  .navi-confirm-btn { width: 100%; }
}

