/* ==========================================================================
   HEADER & NAVIGATION STYLES - РОССАВТОХИМ PRO
   ========================================================================== */

/* 1. TOP BAR */
.top-bar {
  background: var(--dark-bg);
  color: var(--dark-muted);
  font-size: 0.82rem;
  border-bottom: 1px solid var(--dark-border);
  padding: 6px 0;
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.top-bar-left,
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.top-bar-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  line-height: 1;
}

.top-bar-item .dashicons,
.top-bar-icon {
  font-size: 14px;
  width: 14px;
  height: 14px;
  color: var(--primary);
  stroke: var(--primary);
  flex-shrink: 0;
}

.badge-wholesale {
  color: var(--primary);
  font-weight: 600;
}

.top-phone {
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition);
}
.top-phone:hover {
  color: var(--primary);
}

.top-callback-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(251, 216, 10, 0.12);
  color: var(--primary);
  border: 1px solid rgba(251, 216, 10, 0.3);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}
.top-callback-btn:hover {
  background: var(--primary);
  color: #111216;
  border-color: var(--primary);
}

.top-email {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: color var(--transition);
  white-space: nowrap;
}
.top-email:hover {
  color: var(--primary);
}
.top-email .top-bar-icon {
  width: 14px;
  height: 14px;
  color: var(--primary);
  stroke: var(--primary);
  flex-shrink: 0;
}
.top-social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.top-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  text-decoration: none;
  transition: all 0.2s ease;
}
.top-social a:hover {
  background: var(--primary);
  color: #111216;
  transform: translateY(-1px);
}
.top-social svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

/* 2. MAIN HEADER */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
  position: relative;
  z-index: 100;
}

.header-main-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Брендинг и логотип */
.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.site-brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  color: var(--text-main);
  line-height: 1.1;
}

.brand-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* Кнопка каталога */
.header-catalog-wrap {
  position: relative;
  flex-shrink: 0;
}

.btn-catalog-toggle {
  padding: 11px 20px;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: var(--radius);
}

.catalog-icon-bars {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 14px;
}
.catalog-icon-bars span {
  display: block;
  height: 2px;
  background: #111216;
  border-radius: 2px;
}

/* Выпадающее двухуровневое мегаменю каталога */
.catalog-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 820px;
  max-width: calc(100vw - 32px);
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22), 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color);
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition);
  z-index: 1600;
  overflow: hidden;
}

.catalog-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.catalog-megamenu-wrap {
  display: flex;
  min-height: 520px;
  max-height: 560px;
}

/* Левая колонка (Уровень 1 - Категории) */
.catalog-megamenu-left {
  width: 320px;
  flex: 0 0 320px;
  border-right: 1px solid #f1f5f9;
  background: #ffffff;
  overflow-y: auto;
  padding: 8px 0;
  scrollbar-width: thin;
  scrollbar-color: #e2e8f0 transparent;
}
.catalog-megamenu-left::-webkit-scrollbar {
  width: 5px;
}
.catalog-megamenu-left::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 4px;
}

.catalog-root-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.catalog-root-item {
  position: relative;
  margin: 1px 6px;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.catalog-root-btn,
.catalog-root-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  text-decoration: none;
  color: #1e293b;
  user-select: none;
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
  border: none;
  background: transparent;
  text-align: left;
  font-family: inherit;
  outline: none;
  transition: all 0.15s ease;
}

.catalog-root-item:hover .catalog-root-btn,
.catalog-root-item:hover .catalog-root-link {
  background: #fffdf0;
}

.catalog-root-item.is-active .catalog-root-btn {
  background: #fefce8;
  box-shadow: inset 3px 0 0 #fbd80a;
}
.catalog-root-item.is-active .cat-title {
  color: #b45309;
  font-weight: 700;
}
.catalog-root-item.is-active .cat-icon {
  background: #fef3c7;
  color: #d97706;
}
.catalog-root-item.is-active .cat-arrow {
  color: #d97706;
  transform: translateX(3px);
}

.cat-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.catalog-root-item:hover .cat-icon {
  background: #fef3c7;
  color: #d97706;
}
.cat-icon svg {
  width: 16px;
  height: 16px;
}

.cat-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: #1e293b;
  flex: 1 1 auto;
  line-height: 1.25;
}

.cat-count {
  font-size: 0.70rem;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: auto;
  flex-shrink: 0;
}
.catalog-root-item.is-active .cat-count {
  background: #fde68a;
  color: #854d0e;
}

.cat-arrow {
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.cat-arrow--link {
  opacity: 0.5;
}
.catalog-root-item:hover .cat-arrow--link {
  opacity: 1;
  color: #d97706;
  transform: translateX(2px);
}

/* Промо АКЦИИ */
.catalog-root-item.is-promo-cat .cat-icon {
  background: #fef2f2;
  color: #ef4444;
}
.catalog-root-item.is-promo-cat .cat-title {
  color: #dc2626;
  font-weight: 700;
}
.catalog-root-item.is-promo-cat .cat-count {
  background: #fee2e2;
  color: #dc2626;
  font-weight: 700;
}

.catalog-root-bottom {
  margin-top: 6px;
  padding: 6px 12px 2px;
  border-top: 1px solid #f1f5f9;
}
.catalog-root-bottom a {
  display: block;
  text-align: center;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #d97706;
  text-decoration: none;
  border-radius: 6px;
  background: #fffdf0;
  border: 1px dashed #fde68a;
  transition: all 0.15s ease;
}
.catalog-root-bottom a:hover {
  background: #fef3c7;
  color: #b45309;
}

/* Правая панель (Уровень 2 - Вложенные категории) */
.catalog-megamenu-right {
  flex: 1 1 auto;
  background: #f8fafc;
  padding: 20px 24px;
  overflow-y: auto;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: #e2e8f0 transparent;
}
.catalog-megamenu-right::-webkit-scrollbar {
  width: 5px;
}
.catalog-megamenu-right::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 4px;
}

.catalog-subpane {
  display: none;
  animation: catalogPaneFade 0.18s ease forwards;
}
.catalog-subpane.is-active {
  display: block;
}
@keyframes catalogPaneFade {
  from { opacity: 0; transform: translateX(6px); }
  to { opacity: 1; transform: translateX(0); }
}

.catalog-subpane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}
.subpane-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.subpane-cat-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.subpane-cat-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  background: #e2e8f0;
  padding: 3px 8px;
  border-radius: 12px;
}
.subpane-all-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #d97706;
  text-decoration: none;
  padding: 5px 12px;
  border-radius: 6px;
  background: #fffdf0;
  border: 1px solid #fde68a;
  transition: all 0.15s ease;
}
.subpane-all-link:hover {
  background: #fef3c7;
  color: #b45309;
  border-color: #f59e0b;
}

/* Сетка подкатегорий (2 колонки) */
.catalog-subcats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 12px;
}
.catalog-subcat-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
.catalog-subcat-card:hover {
  background: #fffdf0;
  border-color: #fbd80a;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}
.subcat-card-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  line-height: 1.3;
  flex: 1 1 auto;
}
.catalog-subcat-card:hover .subcat-card-name {
  color: #0f172a;
}
.subcat-card-count {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  background: #f8fafc;
  padding: 2px 7px;
  border-radius: 10px;
  flex-shrink: 0;
}
.catalog-subcat-card:hover .subcat-card-count {
  background: #fef3c7;
  color: #b45309;
}

/* Живой AJAX-поиск */
.header-search {
  flex: 1 1 420px;
  position: relative;
}

.search-form-ajax {
  position: relative;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  position: relative;
  background: var(--light-bg);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-input-wrap:focus-within {
  border-color: var(--primary-dark);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(251, 216, 10, 0.2);
}

.search-field {
  width: 100%;
  padding: 10px 16px;
  background: transparent;
  font-size: 0.88rem;
}

.search-submit {
  padding: 10px 16px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-submit:hover {
  color: var(--accent);
}

.search-ajax-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  max-height: 380px;
  overflow-y: auto;
  display: none;
  z-index: 1000;
}

.search-ajax-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
}
.search-ajax-item:hover {
  background: var(--light-bg);
}

.search-ajax-thumb {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: var(--radius-xs);
  flex-shrink: 0;
}

.search-ajax-info {
  flex: 1;
}

.search-ajax-title {
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.3;
}

.search-ajax-price {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 700;
}

/* Контакты в хедере */
.header-contact {
  flex-shrink: 0;
}

.header-main-phone {
  display: flex;
  flex-direction: column;
}

.phone-number {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-main);
  line-height: 1.2;
}

.phone-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Корзина WooCommerce */
.header-cart-wrap {
  flex-shrink: 0;
}

.header-cart-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--light-bg);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.header-cart-btn:hover {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.cart-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.cart-icon-wrap .dashicons {
  font-size: 22px;
  width: 22px;
  height: 22px;
  color: #111216;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-info {
  display: flex;
  flex-direction: column;
}

.cart-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.cart-total {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

/* 3. НАВИГАЦИОННЫЙ БАР & ЭФФЕКТ ЧЕРНОГО СТЕКЛА */
.site-nav-wrapper {
  position: relative;
  width: 100%;
  z-index: 1400;
}
.site-nav {
  background: rgba(17, 18, 22, 0.94);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 2px solid var(--primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  position: relative;
  width: 100%;
  z-index: 1400;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease, box-shadow 0.25s ease, opacity 0.2s ease;
}

/* Прилипающая панель (Smart Sticky) */
.site-nav.is-sticky {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1700 !important;
  background: rgba(14, 16, 20, 0.84) !important;
  backdrop-filter: blur(20px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(190%) !important;
  border-bottom: 2px solid var(--primary) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  transform: translateY(-100%);
  pointer-events: none;
  opacity: 0;
}
.site-nav.is-sticky.is-visible {
  transform: translateY(0) !important;
  pointer-events: auto !important;
  opacity: 1 !important;
}
@media (max-width: 991px) {
  .site-nav-wrapper {
    display: none !important;
  }
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-menu {
  display: flex;
  align-items: center;
}

.nav-menu > li > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 13px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #e2e8f0;
  transition: all var(--transition);
  position: relative;
}

.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.04);
}

.btn-wholesale-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(251, 216, 10, 0.14);
  color: var(--primary);
  border: 1px solid rgba(251, 216, 10, 0.45);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-wholesale-pill:hover {
  background: var(--primary);
  color: #111216;
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(251, 216, 10, 0.35);
}

.btn-wholesale-pill svg,
.btn-wholesale-pill .dashicons {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
}

/* 4. МОБИЛЬНЫЕ ЭЛЕМЕНТЫ */
.mobile-toggle-btn {
  display: none;
  width: 42px;
  height: 42px;
  min-width: 42px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-sizing: border-box;
  transition: all 0.2s ease;
}
.mobile-toggle-btn:hover,
.mobile-toggle-btn:active {
  border-color: var(--primary);
  background: #fffdf0;
}
.mobile-toggle-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: #111216;
  border-radius: 2px;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 82%;
  max-width: 340px;
  background: #ffffff;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 25px rgba(0,0,0,0.25);
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform var(--transition-slow), visibility var(--transition-slow);
}

.mobile-drawer:not(.active) {
  display: none;
}

.mobile-drawer.active {
  display: flex;
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition);
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  background: var(--dark-bg);
  color: #ffffff;
}

.mobile-drawer-title {
  font-weight: 700;
  font-size: 1rem;
}

.mobile-drawer-close {
  color: #ffffff;
  font-size: 1.4rem;
  padding: 0 6px;
}

.mobile-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background: var(--light-bg);
}

.mobile-tab-btn {
  flex: 1;
  padding: 12px;
  font-weight: 700;
  font-size: 0.88rem;
  text-align: center;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
}

.mobile-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: #ffffff;
}

.mobile-drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
}

.mobile-tab-pane {
  display: none;
}
.mobile-tab-pane.active {
  display: block;
}

.mobile-catalog-list li a,
.mobile-menu-list li a {
  display: block;
  padding: 12px 20px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-light);
}

.mobile-catalog-list li a:hover,
.mobile-menu-list li a:hover {
  background: var(--light-bg);
  color: var(--accent);
}

.mobile-drawer-footer {
  padding: 18px 20px;
  border-top: 1px solid var(--border-color);
  background: var(--light-bg);
}

.mobile-phone-link {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent);
  margin-bottom: 12px;
  text-align: center;
}

/* Адаптивные медиа-запросы */
@media (max-width: 991px) {
  .d-none-mobile {
    display: none !important;
  }
  .mobile-toggle-btn {
    display: flex;
  }
  .site-header {
    padding: 8px 0;
  }
  .brand-desc {
    display: none;
  }
  .header-catalog-wrap {
    display: none;
  }
  .header-search {
    flex: 1;
  }
}


/* --- HEADER ACTIONS (WISHLIST, COMPARE, CART) --- */
.header-actions-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-icon-action {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--light-bg);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-main);
  transition: all var(--transition);
  text-decoration: none;
}

.header-icon-action:hover {
  border-color: var(--primary);
  background: #ffffff;
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.header-icon-action .dashicons {
  font-size: 20px;
  width: 20px;
  height: 20px;
}

.action-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.badge-cat-count {
  margin-left: auto;
  font-size: 0.72rem;
  background: #f1f5f9;
  color: #64748b;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

/* FIBOSEARCH INTEGRATION */
.dgwt-wcas-search-wrapp {
  max-width: 100% !important;
  margin: 0 !important;
}

.dgwt-wcas-sf-wrapp {
  border-radius: var(--radius) !important;
  border: 1.5px solid var(--border-color) !important;
  transition: border-color var(--transition), box-shadow var(--transition) !important;
}

.dgwt-wcas-sf-wrapp:focus-within {
  border-color: var(--primary-dark) !important;
  box-shadow: 0 0 0 3px rgba(251, 216, 10, 0.25) !important;
}

.dgwt-wcas-search-submit {
  background: var(--primary) !important;
  color: #111 !important;
  font-weight: 700 !important;
  transition: background var(--transition) !important;
}

.dgwt-wcas-search-submit:hover {
  background: var(--primary-dark) !important;
}

/* ════════════════════════════════════════════════════════════════
   DROPDOWN SUBMENUS, MOBILE 2-ROW HEADER & BOTTOM NAV
   ════════════════════════════════════════════════════════════════ */

/* Выпадающие подменю в десктопном меню */
.nav-menu > li {
  position: relative;
}

.nav-menu .arrow-down {
  font-size: 0.7rem;
  margin-left: 4px;
  opacity: 0.7;
  transition: transform var(--transition);
}

.nav-menu > li:hover .arrow-down {
  transform: rotate(180deg);
}

.nav-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #181920;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 2px solid var(--primary);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  list-style: none;
  padding: 8px 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.nav-menu > li:hover > .sub-menu,
.nav-menu > li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-menu .sub-menu li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu .sub-menu li a {
  display: block;
  padding: 9px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #cbd5e1;
  text-decoration: none;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.nav-menu .sub-menu li a:hover {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.05);
  padding-left: 22px;
}

/* Подменю в мобильном drawer */
.mobile-menu-list .sub-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  background: #f8fafc;
  border-left: 3px solid var(--primary);
}

.mobile-menu-list .sub-menu li a {
  padding-left: 36px;
  font-size: 0.88rem;
  color: #475569;
}

/* Мобильная нижняя панель навигации (Sticky Bar) */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  z-index: 1030;
  justify-content: space-around;
  align-items: center;
  padding: 0 4px;
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
  }
  body {
    padding-bottom: 60px !important;
  }
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #64748b;
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 6px 8px;
  position: relative;
  flex: 1;
  cursor: pointer;
  transition: color 0.18s ease;
}

.bottom-nav-item .dashicons {
  font-size: 20px;
  width: 20px;
  height: 20px;
  margin-bottom: 2px;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
  color: var(--accent);
}

.bottom-nav-call {
  color: #16a34a !important;
}

.bottom-nav-badge {
  position: absolute;
  top: 3px;
  right: calc(50% - 16px);
  background: var(--accent);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 700;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Мобильная шапка: 2-рядный аккуратный лейаут */
@media (max-width: 768px) {
  .header-main-inner {
    flex-wrap: wrap !important;
    gap: 12px 16px !important;
  }
  .site-branding {
    order: 1;
  }
  .header-actions-group {
    order: 2;
    margin-left: auto;
  }
  .mobile-toggle-btn {
    order: 3;
  }
  .header-search {
    order: 4;
    width: 100% !important;
    margin-top: 4px;
  }
}

/* ════════════════════════════════════════════════════════════════
   PERFECT SIGHT: PRESENTABLE, SYMMETRICAL, CLEAN HEADER (44PX GRID)
   ════════════════════════════════════════════════════════════════ */

.site-header {
  background: #ffffff !important;
  border-bottom: 1px solid #f1f5f9 !important;
  padding: 10px 0 !important;
  position: relative !important;
  z-index: 100 !important;
}

.header-main-inner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
}

/* 1. ЛОГОТИП И БРЕНДИНГ */
.site-branding {
  display: flex !important;
  align-items: center !important;
  gap: 0 !important;
  flex-shrink: 0 !important;
  text-decoration: none !important;
}

.rossavtohim-logo {
  position: relative !important;
  width: 104px !important;
  height: 72px !important;
  flex: 0 0 104px !important;
  display: block !important;
  cursor: pointer !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  isolation: isolate !important;
}

.rossavtohim-logo img {
  position: absolute !important;
  left: 50% !important;
  top: 70.8% !important;
  height: 145.5% !important;
  width: auto !important;
  aspect-ratio: 1 / 1 !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  pointer-events: none !important;
  user-select: none !important;
  -webkit-user-drag: none !important;
}

.rossavtohim-logo__main {
  z-index: 2 !important;
  transform: translate(-50%, -50%) !important;
}

.rossavtohim-logo__gear {
  z-index: 1 !important;
  transform: translate(-50%, -50%) rotate(0deg);
  transform-origin: 50% 50% !important;
  transition: none !important;
  will-change: transform;
}

.site-brand-text,
.brand-title,
.brand-desc {
  display: none !important;
}

/* 2. КНОПКА «КАТАЛОГ ТОВАРОВ» (СТРОГО 44PX) */
.header-catalog-wrap {
  position: relative !important;
  flex-shrink: 0 !important;
}

.btn-catalog-toggle {
  height: 40px !important;
  padding: 0 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  background: var(--primary) !important;
  color: #111216 !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(251, 216, 10, 0.3) !important;
  transition: all var(--transition) !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
}

.btn-catalog-toggle:hover {
  background: var(--primary-hover) !important;
  box-shadow: 0 4px 14px rgba(251, 216, 10, 0.45) !important;
  transform: translateY(-1px) !important;
}

.catalog-icon-bars {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  width: 14px !important;
}

.catalog-icon-bars span {
  display: block !important;
  height: 2px !important;
  background: #111216 !important;
  border-radius: 2px !important;
}

/* 3. FIBOSEARCH: ИДЕАЛЬНО ВСТРОЕННАЯ ЛУПА И СТРОГО 44PX РАМКА */
.header-search {
  flex: 1 1 auto !important;
  min-width: 240px !important;
  max-width: 800px !important;
  position: relative !important;
  margin: 0 !important;
}

.header-search .dgwt-wcas-search-wrapp,
.header-search .dgwt-wcas-search-wrapp.dgwt-wcas-style-pirx,
.header-search .dgwt-wcas-search-wrapp.dgwt-wcas-style-pirx-compact {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.header-search .dgwt-wcas-search-form {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
}

/* Единая рамка поиска строго 44px */
.header-search .dgwt-wcas-sf-wrapp,
.header-search .search-input-wrap {
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  display: block !important;
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  position: relative !important;
  box-sizing: border-box !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

.header-search .dgwt-wcas-sf-wrapp:hover,
.header-search .search-input-wrap:hover {
  border-color: #cbd5e1 !important;
}

.header-search .dgwt-wcas-sf-wrapp:focus-within,
.header-search .search-input-wrap:focus-within {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(251, 216, 10, 0.22) !important;
}

/* Поле ввода: 100% высоты контейнера с отступом справа под кнопку */
.header-search input[type="search"].dgwt-wcas-search-input,
.header-search input.search-field {
  height: 100% !important;
  width: 100% !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 0 54px 0 16px !important;
  font-size: 0.92rem !important;
  color: #0f172a !important;
  outline: none !important;
  box-shadow: none !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  line-height: 41px !important;
}

.header-search input[type="search"].dgwt-wcas-search-input::placeholder,
.header-search input.search-field::placeholder {
  color: #94a3b8 !important;
  opacity: 1 !important;
}

/* Кнопка с лупой: ВСЕГДА 100% ВЫСОТЫ, СТРОГО СПРАВА (top:0 bottom:0 right:0) */
.header-search .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit,
.header-search .dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit,
.header-search .dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit,
.header-search .dgwt-wcas-style-pirx.dgwt-wcas-style-pirx-compact .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit,
.header-search button.dgwt-wcas-search-submit,
.header-search button.search-submit {
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  right: 0 !important;
  left: auto !important;
  height: 100% !important;
  min-height: 100% !important;
  max-height: 100% !important;
  width: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: var(--primary) !important;
  background-color: #fbd80a !important;
  border: none !important;
  border-radius: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  opacity: 1 !important;
  box-sizing: border-box !important;
  box-shadow: none !important;
  transition: background 0.2s ease !important;
  z-index: 3 !important;
}

.header-search button.dgwt-wcas-search-submit:hover,
.header-search button.search-submit:hover {
  background: var(--primary-hover) !important;
  background-color: #eab308 !important;
}

.header-search .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit:before,
.header-search .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit:after {
  display: none !important;
  content: none !important;
}

/* Иконка лупы: строго по центру кнопки */
.header-search .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit .dgwt-wcas-ico-magnifier,
.header-search .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit svg,
.header-search button.search-submit .dashicons {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  margin: auto !important;
  padding: 0 !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  display: block !important;
  pointer-events: none !important;
  fill: #111216 !important;
  color: #111216 !important;
}

.header-search .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit .dgwt-wcas-ico-magnifier path,
.header-search .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit svg path {
  fill: #111216 !important;
}

.header-search .dgwt-wcas-preloader {
  right: 56px !important;
  left: auto !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

.header-search .dgwt-wcas-voice-search {
  display: none !important;
}

/* 4. БЛОК ТЕЛЕФОНА (ВЫСОТА 44PX) */
.header-contact {
  flex-shrink: 0 !important;
  margin: 0 2px !important;
}

.header-phone-box {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  height: 44px !important;
  padding: 0 10px !important;
  border-radius: 10px !important;
  border: 1.5px solid transparent !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
}

.header-phone-box:hover {
  background: #f8fafc !important;
}

.phone-icon-circle {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: #fefce8 !important;
  border: 1.5px solid rgba(251, 216, 10, 0.6) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.phone-icon-circle svg,
.phone-icon-circle .dashicons {
  font-size: 16px !important;
  width: 16px !important;
  height: 16px !important;
  color: #111216 !important;
  stroke: #111216 !important;
}

.phone-meta {
  display: flex !important;
  flex-direction: column !important;
  line-height: 1.2 !important;
}

.phone-num {
  font-weight: 700 !important;
  font-size: 0.98rem !important;
  color: #0f172a !important;
  white-space: nowrap !important;
  letter-spacing: -0.01em !important;
}

.phone-status,
.phone-hours {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 0.72rem !important;
  color: #64748b !important;
  white-space: nowrap !important;
  font-weight: 500 !important;
}

.status-dot {
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: #22c55e !important;
  display: inline-block !important;
}

/* 5. ГРУППА ДЕЙСТВИЙ: ИЗБРАННОЕ, СРАВНЕНИЕ, КОРЗИНА */
.header-actions-group {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-shrink: 0 !important;
}

/* Кнопки Избранное и Сравнение (44px x 44px) */
.header-icon-action {
  width: 44px !important;
  height: 44px !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  color: #334155 !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
}

.header-icon-action:hover {
  border-color: var(--primary) !important;
  background: #ffffff !important;
  color: #0f172a !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
  transform: translateY(-1px) !important;
}

.header-icon-action svg,
.header-icon-action .dashicons {
  font-size: 20px !important;
  width: 20px !important;
  height: 20px !important;
}

/* Кнопка Корзины (Строго 44px) */
.header-cart-wrap {
  flex-shrink: 0 !important;
}

.header-cart-btn {
  height: 44px !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  padding: 0 16px 0 12px !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  position: relative !important;
  box-sizing: border-box !important;
}

.header-cart-btn:hover {
  border-color: var(--primary) !important;
  background: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
  transform: translateY(-1px) !important;
}

.cart-icon-wrap {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.cart-icon-wrap svg,
.cart-icon-wrap .dashicons {
  font-size: 22px !important;
  width: 22px !important;
  height: 22px !important;
  color: #0f172a !important;
}

.cart-info {
  display: flex !important;
  flex-direction: column !important;
  line-height: 1.15 !important;
}

.cart-label {
  font-size: 0.68rem !important;
  color: #64748b !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

.cart-total {
  font-size: 0.90rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  white-space: nowrap !important;
}

/* Бейджи счетчиков: СТРОГО в правом верхнем углу для ВСЕХ 3 карточек */
.header-icon-action .action-count,
.header-cart-btn .action-count,
.action-count {
  position: absolute !important;
  top: -6px !important;
  right: -6px !important;
  background: #ef4444 !important;
  color: #ffffff !important;
  font-size: 0.65rem !important;
  font-weight: 700 !important;
  min-width: 18px !important;
  height: 18px !important;
  padding: 0 4px !important;
  border-radius: 10px !important;
  border: 2px solid #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
  box-shadow: 0 2px 5px rgba(239, 68, 68, 0.3) !important;
  z-index: 10 !important;
}

.action-count.count-zero,
.action-count:empty {
  display: none !important;
}

/* 6. АДАПТИВНОСТЬ ДЛЯ ПЛАНШЕТОВ И НОУТБУКОВ */
@media (max-width: 1200px) {
  .site-brand-text .brand-desc {
    display: none !important;
  }
  .phone-hours {
    display: none !important;
  }
  .header-main-inner {
    gap: 12px !important;
  }
}

/* 7. МОБИЛЬНЫЙ ВИД ШАПКИ (< 991px) */
@media (max-width: 991px) {
  .site-header {
    padding: 8px 0 !important;
  }
  .header-main-inner {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    row-gap: 10px !important;
    column-gap: 8px !important;
  }
  .site-branding {
    order: 1 !important;
    max-width: calc(100% - 105px) !important;
    gap: 10px !important;
  }
  .rossavtohim-logo {
    width: 96px !important;
    height: 66px !important;
    flex: 0 0 96px !important;
  }
  .site-brand-text,
  .brand-title,
  .brand-desc {
    display: none !important;
  }
  .header-actions-group {
    order: 2 !important;
    margin-left: auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }
  .header-actions-group .header-icon-action {
    display: none !important;
  }
  .header-cart-btn {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    padding: 0 !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0 !important;
  }
  .header-cart-btn .cart-info {
    display: none !important;
  }
  .mobile-toggle-btn {
    order: 3 !important;
    display: flex !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
  }
  .header-search {
    order: 4 !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
    margin: 0 !important;
  }
  .header-catalog-wrap,
  .header-contact {
    display: none !important;
  }
}

/* 8. МОБИЛЬНЫЕ СМАРТФОНЫ (< 576px) */
@media (max-width: 576px) {
  .container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .top-bar {
    padding: 4px 0 !important;
    font-size: 0.72rem !important;
  }
  .top-bar-left {
    display: none !important;
  }
  .top-bar-inner {
    padding: 0 12px !important;
    justify-content: space-between !important;
  }
  .top-bar-right {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    font-size: 0.74rem !important;
  }
  .badge-wholesale {
    display: none !important;
  }
  .top-phone {
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    color: #fbd80a !important;
    text-decoration: none !important;
    white-space: nowrap !important;
  }
  .top-email {
    font-size: 0.74rem !important;
    gap: 4px !important;
  }
  .top-social {
    gap: 5px !important;
  }
  .top-social a {
    width: 24px !important;
    height: 24px !important;
  }
  .top-social svg {
    width: 12px !important;
    height: 12px !important;
  }
  @media (max-width: 520px) {
    .top-email span {
      display: none !important;
    }
  }
  .site-header {
    padding: 8px 0 !important;
  }
  .rossavtohim-logo {
    width: 86px !important;
    height: 60px !important;
    flex: 0 0 86px !important;
  }
  .site-brand-text,
  .brand-title,
  .brand-desc {
    display: none !important;
  }
  .header-search,
  .header-search .dgwt-wcas-search-wrapp,
  .header-search .dgwt-wcas-search-form,
  .header-search .dgwt-wcas-sf-wrapp,
  .header-search .search-input-wrap {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
  }
  .header-search input[type="search"].dgwt-wcas-search-input,
  .header-search input.search-field {
    font-size: 0.86rem !important;
    padding-left: 12px !important;
    padding-right: 44px !important;
    line-height: 38px !important;
  }
  .header-search button.dgwt-wcas-search-submit,
  .header-search button.search-submit {
    width: 42px !important;
    min-width: 42px !important;
    height: 100% !important;
  }
}
