#mobileMenu {
  overflow: visible;
  height: auto;
  max-height: 100vh;
  overflow-y: auto;
  overflow-x: visible;
  width: 100%;
}
/* ==========================================================================
   OFFCANVAS - Выезжающие панели (мобильное меню, корзина, фильтры)
   ========================================================================== */

.offcanvas {
  position: fixed;
  bottom: 0;
  z-index: 4000; /* Выше чем backdrop */
  display: flex;
  flex-direction: column;
  max-width: 100%;
  visibility: hidden; /* По умолчанию скрыто */
  background-color: #fff;
  background-clip: padding-box;
  outline: 0;
  transition: transform 0.3s ease-in-out, visibility 0s linear 0.3s;
}

.offcanvas:not(.show) {
  visibility: hidden;
}

.offcanvas-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 3000;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  transition: opacity 0.3s ease-in-out;
  opacity: 0;
  visibility: hidden;
}

.offcanvas-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.offcanvas-start {
  top: 0;
  left: 0;
  width: 320px;
  border-right: 1px solid rgba(0, 0, 0, 0.1);
  transform: translateX(-100%);
}

.offcanvas-start:not(.show) {
  transform: translateX(-100%) !important;
}

.offcanvas-end {
  top: 0;
  right: 0;
  width: 420px; /* Увеличена ширина для корзины */
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
}

.offcanvas-end:not(.show) {
  transform: translateX(100%) !important;
}

.offcanvas.show {
  transform: none;
  visibility: visible;
  opacity: 1;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out, visibility 0s linear;
}

body.offcanvas-open {
  overflow: hidden;
}

/* Canvas Mobile Menu */
#mobileMenu {
  width: 100%;
  max-width: min(90%, 400px);
}

/* Menu Header */
.mb-canvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  position: relative;
}

.mb-logo {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #000;
  text-decoration: none;
  transition: color 0.3s ease;
}

.mb-logo:hover {
  color: #666;
}

/* Canvas Content */
.canvas-mb .mb-canvas-content {
  min-width: 100%;
  max-width: min(90%, 400px);
  display: flex;
  flex-direction: column;
  height: calc(100% - 65px);
  overflow-y: auto;
}

.canvas-mb .mb-body {
  flex: 1;
  padding: 15px 20px 25px;
  overflow-y: auto;
}

.canvas-mb .mb-content-top {
  margin-bottom: 20px;
}

.canvas-mb .mb-bottom {
  padding: 20px;
  border-top: 1px solid #f0f0f0;
  background: linear-gradient(to bottom, #fafafa 0%, #f5f5f5 100%);
}

/* Close Button - простой крестик в правом верхнем углу */
.icon-close-popup {
  position: absolute;
  top: -8px;
  right: 0px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  z-index: 101;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
}

.icon-close-popup::after {
  transform: rotate(-45deg);
}

.icon-close-popup:hover::before,
.icon-close-popup:hover::after {
  background: #666;
}

/* Mobile Menu Specific Styles */
.nav-ul-mb {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-mb-item {
  margin-bottom: 4px;
}

.nav-mb-item:last-child {
  margin-bottom: 0;
}

/* Menu Links */
.mb-menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  color: #2c2c2c;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  border-radius: 10px;
  background: transparent;
}

.mb-menu-link:hover {
  background: #f8f8f8;
  color: #000;
  transform: translateX(2px);
}

.mb-menu-link.active {
  background: linear-gradient(135deg, #000 0%, #333 100%);
  color: #fff;
  font-weight: 600;
}

.mb-menu-link.active:hover {
  background: linear-gradient(135deg, #1a1a1a 0%, #444 100%);
  transform: translateX(0);
}

/* Category Title (not clickable) */
.mb-menu-title {
  pointer-events: none;
  font-weight: 700;
  color: #000;
  padding: 20px 16px 12px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.mb-menu-title:hover {
  padding-left: 16px;
  background: transparent;
}

/* Button to open submenu */
.btn-open-sub {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s ease;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.btn-open-sub:hover {
  background: rgba(0, 0, 0, 0.1);
}

.btn-open-sub::before,
.btn-open-sub::after {
  content: '';
  position: absolute;
  background: #2c2c2c;
  transition: all 0.3s ease;
  border-radius: 1px;
}

.btn-open-sub::before {
  width: 12px;
  height: 2px;
}

.btn-open-sub::after {
  width: 2px;
  height: 12px;
}

/* Когда подменю открыто - минус */
.mb-menu-link[aria-expanded='true'] .btn-open-sub::after,
.sub-nav-link[aria-expanded='true'] .btn-open-sub::after,
.btn-open-sub[aria-expanded='true']::after {
  transform: rotate(90deg);
  opacity: 0;
}

/* Когда подменю закрыто - плюс */
.mb-menu-link.collapsed .btn-open-sub::after,
.sub-nav-link.collapsed .btn-open-sub::after,
.btn-open-sub.collapsed::after {
  transform: rotate(0deg);
  opacity: 1;
}

.mb-menu-link[aria-expanded='true'] .btn-open-sub,
.sub-nav-link[aria-expanded='true'] .btn-open-sub,
.btn-open-sub[aria-expanded='true'] {
  transform: rotate(180deg);
  background: rgba(0, 0, 0, 0.08);
}

/* Submenu styles */
.collapse {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
}

.collapse.show {
  max-height: 3000px;
  transition: max-height 0.6s ease-in;
}

/* Категории всегда видны - конкретное правило */
#dropdown-menu-two.collapse.show {
  max-height: none !important;
  overflow: visible !important;
}

.sub-nav-menu {
  list-style: none;
  padding: 8px 0 8px 8px;
  margin: 0;
}

.sub-nav-menu li {
  margin-bottom: 2px;
}

/* Wrapper для категории с подкатегориями */
.sub-nav-link-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 8px;
  transition: background 0.3s ease;
}

.sub-nav-link-wrapper:hover {
  background: #f5f5f5;
}

.sub-nav-link-wrapper .sub-nav-link {
  flex: 1;
  padding: 0;
  min-width: 0;
  border-radius: 0;
}

.sub-nav-link-wrapper .sub-nav-link:hover {
  background: transparent;
  transform: none;
}

.sub-nav-link-wrapper .btn-open-sub {
  flex-shrink: 0;
  cursor: pointer;
}

/* Активная категория */
.sub-nav-link-wrapper.active {
  background: #f5f5f5;
}

.sub-nav-link-wrapper.active .sub-nav-link {
  color: #000;
  font-weight: 600;
}

.sub-nav-link-wrapper.active .sub-nav-link::before {
  height: 18px;
}

/* Обычная ссылка без wrapper */
.sub-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  color: #555;
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  transition: all 0.3s ease;
  border-radius: 8px;
  position: relative;
  background: transparent;
}

.sub-nav-link:hover {
  background: #f5f5f5;
  color: #000;
  transform: translateX(3px);
}

.sub-nav-link:hover::before {
  height: 18px;
}

/* Level 2 submenu */
.sub-menu-level-2 {
  padding: 8px 0 8px 12px;
  background: linear-gradient(to right, #fafafa 0%, #fff 100%);
  border-radius: 8px;
  margin: 4px 0 4px 8px;
  border-left: 2px solid #f0f0f0;
}

.sub-menu-level-2 .sub-nav-link {
  font-size: 13px;
  padding: 9px 12px;
  color: #666;
}

.sub-menu-level-2 .sub-nav-link:hover {
  background: rgba(0, 0, 0, 0.03);
}

.sub-menu-level-2 .sub-nav-link.active {
  color: #000;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.05);
}

.sub-menu-level-2 .sub-nav-link.active::before {
  height: 18px;
}

/* Other content section */
.mb-other-content {
  margin-top: 30px;
  padding-top: 25px;
  border-top: 2px solid #f5f5f5;
}

.group-icon {
  margin-bottom: 18px;
}

.site-nav-icon {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  color: #1a1a1a;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #fff 0%, #f8f8f8 100%);
  border: 1px solid #e8e8e8;
}

.site-nav-icon:hover {
  background: linear-gradient(135deg, #fff 0%, #fff 100%);
  border-color: #ddd;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.site-nav-icon svg {
  width: 22px;
  height: 22px;
  transition: transform 0.3s ease;
}

.site-nav-icon:hover svg {
  transform: scale(1.15);
}

/* Notice section */
.mb-notice {
  margin: 18px 0;
  padding: 16px;
  background: linear-gradient(135deg, #000 0%, #2c2c2c 100%);
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.text-need {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: opacity 0.3s ease;
  display: block;
}

.text-need:hover {
  opacity: 0.8;
}

/* Contact info */
.mb-info {
  list-style: none;
  padding: 0;
  margin: 0;
  background: #fff;
  border-radius: 12px;
  padding: 8px;
}

.mb-info li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: #555;
  font-size: 14px;
  border-radius: 8px;
  transition: background 0.3s ease;
}

.mb-info li:hover {
  background: #f8f8f8;
}

.mb-info li i {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #000;
}

.mb-info li a {
  color: #555;
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 500;
}

.mb-info li a:hover {
  color: #000;
}

.mb-info li p {
  margin: 0;
  font-weight: 500;
}

/* Prevent body scroll when offcanvas is open */
body.offcanvas-open {
  overflow: hidden;
}

/* Custom scrollbar for menu */
.canvas-mb .mb-body::-webkit-scrollbar {
  width: 6px;
}

.canvas-mb .mb-body::-webkit-scrollbar-track {
  background: #f5f5f5;
}

.canvas-mb .mb-body::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.canvas-mb .mb-body::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* Smooth animations */

/* Анимация закрытия применяется через JavaScript в функции closeOffcanvas */

/* Media Queries */
@media (min-width: 768px) {
  .canvas-mb {
    max-width: 400px;
  }

  .canvas-mb .mb-canvas-content {
    min-width: 400px;
  }
}

@media (max-width: 767px) {
  .offcanvas-start,
  .offcanvas-end {
    width: 100%;
    max-width: 85%;
  }

  .canvas-mb {
    max-width: 85%;
  }

  .canvas-mb .mb-canvas-content {
    padding-top: 65px;
  }

  .canvas-mb .mb-body {
    padding: 0 20px 20px;
  }

  .mb-menu-link {
    padding: 16px 0;
    font-size: 15px;
  }

  .sub-nav-link {
    padding: 10px 12px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .canvas-mb {
    max-width: 90%;
  }

  .canvas-mb .mb-body {
    padding: 0 18px 18px;
  }

  .mb-menu-link {
    font-size: 14px;
  }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
  .canvas-mb {
    background: #1a1a1a;
    color: #fff;
  }

  .mb-menu-link,
  .site-nav-icon {
    color: #fff;
  }

  .sub-nav-link {
    color: #ccc;
  }

  .sub-nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
  }

  .icon-close-popup {
    background: rgba(255, 255, 255, 0.1);
  }

  .icon-close-popup::before,
  .icon-close-popup::after {
    background: #fff;
  }
}

/* ==========================================================================
   FILTER OFFCANVAS - минималистичный стиль
   ========================================================================== */

.canvas-filter {
  width: 360px;
  background: #fff;
}

.canvas-filter .canvas-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.canvas-filter .canvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px;
  border-bottom: 1px solid #f0f0f0;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
}

.canvas-filter .canvas-header > span:first-child:not(.icon-close-popup) {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #000;
  flex: 1;
  margin: 0;
  padding: 0;
}

/* Скрываем иконку фильтра слева, если она есть */
.canvas-filter .canvas-header > span.icon-left,
.canvas-filter .canvas-header > span.icon-filter {
  display: none;
}

/* Кнопка закрытия в заголовке фильтра */
.canvas-filter .canvas-header .icon-close-popup {
  position: relative;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: pointer;
  z-index: 11;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-left: 12px;
}

.canvas-filter .canvas-header .icon-close-popup::before {
  content: '×';
  line-height: 1;
  font-weight: 300;
  color: #666;
}

.canvas-filter .canvas-header .icon-close-popup::after {
  content: none;
}

.canvas-filter .canvas-header .icon-close-popup:hover::before,
.canvas-filter .canvas-header .icon-close-popup:hover::after {
  background: #111827;
}

.canvas-filter .canvas-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 80px;
}

/* Widget Facet - блоки фильтров */
.widget-facet {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid #f0f0f0;
}

.widget-facet:last-child {
  border-bottom: none;
}

.widget-facet .facet-title {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #000;
  margin: 0 0 20px 0;
  display: block;
}

/* Стили для заголовков секций фильтра (ЦІНА, КАТЕГОРІЇ и т.д.) */
.widget-facet > .facet-title:not(.collapsed) {
  margin-bottom: 20px;
}

/* Categories - минималистичный стиль */
.facet-categories .facet-content {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.facet-category-item {
  border-radius: 20px;
  border: 1px solid #e8e8e8;
  border-radius: 16px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.facet-category-item.is-active {
  border-color: #cbd5f5;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.facet-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  color: #111;
}

.facet-category-item:not(.has-subcategories) .facet-category-header {
  cursor: default;
}

.category-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.category-badge {
  display: none;
}

.category-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.category-name {
  font-size: 16px;
  font-weight: 600;
  color: #111;
  text-decoration: none;
  transition: color 0.2s ease;
}

.category-name:hover,
.category-name:focus-visible {
  color: #000;
}

.category-meta {
  font-size: 13px;
  color: #9ca3af;
}

.btn-open-sub {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.btn-open-sub:hover {
  transform: scale(1.05);
}

.btn-open-icon {
  width: 12px;
  height: 12px;
  position: relative;
}

.btn-open-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  border-right: 2px solid #9ca3af;
  border-bottom: 2px solid #9ca3af;
  transform: rotate(45deg);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.facet-category-item.is-active .btn-open-sub {
  background: #2563eb;
  border-color: #2563eb;
}

.facet-category-item.is-active .btn-open-icon::before {
  border-color: #111;
}

.btn-open-sub:not(.collapsed) .btn-open-icon::before {
  transform: rotate(-135deg);
}

.facet-subcategories {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 18px;
  border-top: 1px solid #f1f1f1;
}

.facet-subcategories.show {
  max-height: 360px;
  padding: 0 18px 12px;
}

.facet-categories .subcategories-list {
  list-style: none;
  margin: 0;
  padding: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.subcategory-node {
  width: 100%;
}

.subcategory-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f1f1;
}

.subcategory-row .btn-open-sub {
  width: 26px;
  height: 26px;
}

.facet-categories .subcategories-list li:last-child .subcategory-row {
  border-bottom: none;
}

.subcategory-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.facet-categories .subcategory-item {
  font-size: 14px;
  line-height: 1.5;
  color: #1f2937;
  text-decoration: none;
}

.facet-categories .subcategory-item:hover {
  color: #000;
}

.facet-categories .subcategory-item.active {
  font-weight: 600;
  color: #111;
}

/* Mobile menu categories (offcanvas) */
.mb-categories-nav {
  margin: 0;
  padding: 0;
  width: 100%;
}

.mb-categories-nav .categories_menu,
.mb-categories-nav .subcategory {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mb-categories-nav .subcategory.level-2 {
  padding-left: 12px;
}

.mb-categories-nav .subcategory.level-3 {
  padding-left: 24px;
}

.mb-categories-nav .category_item {
  border: 1px solid #e7e7e7;
  border-radius: 14px;
  background: #fff;
  padding: 0;
  position: relative;
  overflow: hidden;
}

.mb-categories-nav .category_link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: #111;
  font-size: 15px;
  font-weight: 600;
}

.mb-categories-nav .category_link span {
  flex: 1;
}

.mb-categories-nav .category_link.selected {
  color: #000;
}

.mb-categories-nav .category_link .arrow_right {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.mb-categories-nav .category_link .arrow_right svg {
  width: 12px;
  height: 12px;
}

.mb-categories-nav .btn-mobile-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.mb-categories-nav .btn-mobile-toggle span,
.mb-categories-nav .btn-mobile-toggle span::before {
  display: block;
  width: 12px;
  height: 2px;
  background: #111;
  margin: 0 auto;
  transition: transform 0.2s ease;
  content: '';
}

.mb-categories-nav .btn-mobile-toggle span::before {
  transform: rotate(90deg);
}

.mb-categories-nav .btn-mobile-toggle.collapsed span::before {
  transform: rotate(0deg);
}

.mobile-subcategories {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 16px;
  border-top: 1px solid #f1f1f1;
}

.mobile-subcategories.show {
  max-height: 600px;
  padding: 8px 16px 16px;
}

.mobile-subcategories .categories_menu,
.mobile-subcategories .subcategory {
  gap: 4px;
}

.mobile-subcategories .category_link {
  font-size: 14px;
  font-weight: 500;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-subcategories .category_link:last-child {
  border-bottom: 0;
}

/* Mobile Categories Accordion (CodePen Style) */
#mobileMenu .categories_nav {
  padding: 0;
  border-top: none;
  background: transparent;
}

#mobileMenu .categories_nav .categories_menu,
#mobileMenu .categories_nav .subcategory {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

#mobileMenu .categories_nav .category_item {
  position: relative;
  border: none;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0;
  background: #fff;
  padding: 0;
  box-shadow: none;
  transition: none;
  overflow: hidden;
}

#mobileMenu .categories_nav .category_item:last-child {
  border-bottom: none;
}

#mobileMenu .categories_nav .category_item.has_child {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  position: relative;
}

#mobileMenu .categories_nav .category_link {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  padding: 16px 20px;
  transition: background-color 0.2s ease, color 0.2s ease;
  cursor: pointer;
  position: relative;
  box-sizing: border-box;
  text-transform: uppercase;
  font-weight: 400;
}

#mobileMenu .categories_nav .category_link:hover {
  background-color: #f9fafb;
  color: #111827;
}

#mobileMenu .categories_nav .category_link.selected {
  background-color: #f3f4f6;
  color: #111827;
  font-weight: 600;
}

#mobileMenu .categories_nav .category_item.has_child .category_link span {
  flex: 1;
}

#mobileMenu .categories_nav .arrow_right {
  display: none;
}

#mobileMenu .categories_nav .cat_switch {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
  flex-shrink: 0;
  margin: 15px;
  z-index: 2;
}

#mobileMenu .categories_nav .cat_switch:hover {
  background: #f3f4f6;
}

#mobileMenu .categories_nav .cat_switch::before,
#mobileMenu .categories_nav .cat_switch::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 2px;
  border-radius: 1px;
  background: #6b7280;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.2s ease;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#mobileMenu .categories_nav .cat_switch::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

#mobileMenu .categories_nav .cat_switch.active {
  background: transparent;
}

#mobileMenu .categories_nav .cat_switch.active::before {
  transform: translate(-50%, -50%) rotate(45deg);
  background: #374151;
}

#mobileMenu .categories_nav .cat_switch.active::after {
  transform: translate(-50%, -50%) rotate(-45deg);
  background: #374151;
  opacity: 1;
}

#mobileMenu .categories_nav .subcategory {
  border-left: none;
  margin-left: 0;
  margin-top: 0;
  padding-left: 0;
  padding-top: 0;
  padding-bottom: 0;
  box-sizing: border-box;
  display: block;
  width: 100%;
  flex-basis: 100%;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  position: relative;
  z-index: 1;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, padding 0.3s ease;
  background: #f9fafb;
}

#mobileMenu .categories_nav .subcategory.opened {
  max-height: 2000px;
  opacity: 1;
  margin-top: 0;
  z-index: 1;
  padding-top: 0;
  padding-bottom: 0;
  overflow: visible;
}

#mobileMenu .categories_nav .subcategory .category_item {
  box-shadow: none;
  border-radius: 0;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  margin-left: 0;
  margin-bottom: 0;
  position: relative;
}

#mobileMenu .categories_nav .subcategory .category_item.has_child {
  display: block;
  position: relative;
}

#mobileMenu .categories_nav .subcategory .category_item:last-child {
  border-bottom: none;
}

#mobileMenu .categories_nav .subcategory .category_link {
  font-size: 14px;
  font-weight: 400;
  padding-left: 40px;
  padding-right: 48px;
  color: #6b7280;
  flex: 1;
}

#mobileMenu .categories_nav .subcategory .category_link:hover {
  background-color: #f3f4f6;
  color: #374151;
}

#mobileMenu .categories_nav .subcategory .category_link.selected {
  background-color: #e5e7eb;
  color: #111827;
  font-weight: 500;
}

#mobileMenu .categories_nav .subcategory .category_item.has_child {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  position: relative;
}

#mobileMenu .categories_nav .subcategory .category_link {
  flex: 1;
  text-transform: capitalize;
}

#mobileMenu .categories_nav .subcategory .cat_switch {
  position: relative;
  background: transparent;
  border: none;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 12px;
}

#mobileMenu .categories_nav .subcategory .cat_switch::before,
#mobileMenu .categories_nav .subcategory .cat_switch::after {
  width: 8px;
  background: #9ca3af;
}

#mobileMenu .categories_nav .subcategory .cat_switch.active::before,
#mobileMenu .categories_nav .subcategory .cat_switch.active::after {
  background: #6b7280;
}

/* Categories tree inside filter - Mobile Menu Style */
.canvas-filter .facet-categories .facet-content {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.canvas-filter .facet-categories .category-parent {
  position: relative;
  border: none;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0;
  background: #fff;
  padding: 0;
  box-shadow: none;
  transition: none;
  overflow: visible;
  cursor: default;
  margin: 0;
}

.canvas-filter .facet-categories .category-parent:last-child {
  border-bottom: none;
}

.canvas-filter .facet-categories .category-parent.has-subcategories {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  position: relative;
  cursor: pointer;
}

/* Ссылка категории - как в мобильном меню */
.canvas-filter .facet-categories .categories-item {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  padding: 16px 48px 16px 20px;
  transition: background-color 0.2s ease, color 0.2s ease;
  cursor: pointer;
  position: relative;
  box-sizing: border-box;
  width: 100%;
  border: none;
  background: transparent;
}

/* Элемент <i> должен быть позиционирован относительно .categories-item */
.canvas-filter .facet-categories .category-parent.has-subcategories {
  position: relative;
}

/* Убеждаемся, что элемент <i> виден - теперь он вне ссылки */

.canvas-filter .facet-categories .categories-item:hover {
  background-color: #f9fafb;
  color: #111827;
}

/* Элемент <b> для категорий без ссылки */
.canvas-filter .facet-categories .category-parent b.categories-item {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
  color: #374151;
  padding: 16px 48px 16px 20px;
  transition: background-color 0.2s ease, color 0.2s ease;
  cursor: default;
  position: relative;
  box-sizing: border-box;
  width: 100%;
  border: none;
  background: transparent;
  font-weight: 500;
}

/* Кнопка раскрытия подкатегорий - HTML элемент <i> или псевдоэлемент */
.canvas-filter .facet-categories .category-parent.has-subcategories .cat-toggle-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  border-radius: 4px;
  border: none;
  background: transparent;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
  flex-shrink: 0;
  z-index: 10;
  pointer-events: auto;
  visibility: visible !important;
  opacity: 1 !important;
  margin: 0;
  padding: 0;
  font-style: normal;
}

/* Если элемент <i> отсутствует, создаем через псевдоэлемент на .has-subcategories */
.canvas-filter .facet-categories .category-parent.has-subcategories::after {
  content: '';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 2px;
  border-radius: 1px;
  background: #6b7280;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.2s ease;
  z-index: 11;
  pointer-events: auto;
}

/* Скрываем псевдоэлемент, если есть реальный элемент <i> */
.canvas-filter .facet-categories .category-parent.has-subcategories:has(.cat-toggle-icon)::after {
  display: none;
}

.canvas-filter .facet-categories .category-parent.has-subcategories:hover .cat-toggle-icon {
  background: #f3f4f6;
}

.canvas-filter .facet-categories .category-parent.has-subcategories .cat-toggle-icon::before,
.canvas-filter .facet-categories .category-parent.has-subcategories .cat-toggle-icon::after {
  content: '' !important;
  position: absolute;
  width: 10px;
  height: 2px;
  min-width: 10px;
  min-height: 2px;
  border-radius: 1px;
  background: #6b7280;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.2s ease;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block;
  visibility: visible;
  opacity: 1;
}

.canvas-filter .facet-categories .category-parent.has-subcategories .cat-toggle-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

/* Первая линия крестика через псевдоэлемент ::before */
.canvas-filter .facet-categories .category-parent.has-subcategories::before {
  content: '';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 2px;
  border-radius: 1px;
  background: #6b7280;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.2s ease;
  z-index: 11;
  pointer-events: auto;
}

/* Вторая линия крестика через псевдоэлемент ::after (вертикальная) */
.canvas-filter .facet-categories .category-parent.has-subcategories::after {
  transform: translateY(-50%) rotate(90deg);
}

/* Скрываем псевдоэлементы, если есть реальный элемент <i> */
.canvas-filter .facet-categories .category-parent.has-subcategories:has(.cat-toggle-icon)::before,
.canvas-filter .facet-categories .category-parent.has-subcategories:has(.cat-toggle-icon)::after {
  display: none;
}

.canvas-filter .facet-categories .category-parent.has-subcategories.active-parent .cat-toggle-icon {
  background: transparent;
}

.canvas-filter .facet-categories .category-parent.has-subcategories.active-parent .cat-toggle-icon::before {
  transform: translate(-50%, -50%) rotate(45deg);
  background: #374151;
}

.canvas-filter .facet-categories .category-parent.has-subcategories.active-parent .cat-toggle-icon::after {
  transform: translate(-50%, -50%) rotate(-45deg);
  background: #374151;
  opacity: 1;
}

.canvas-filter .facet-categories .category-parent.has-subcategories:hover .cat-toggle-icon::before,
.canvas-filter .facet-categories .category-parent.has-subcategories:hover .cat-toggle-icon::after {
  background: #374151;
}

/* Анимация для псевдоэлемента при открытии */
.canvas-filter .facet-categories .category-parent.has-subcategories.active-parent::before {
  transform: translateY(-50%) rotate(45deg);
  background: #374151;
}

.canvas-filter .facet-categories .category-parent.has-subcategories.active-parent::after {
  transform: translateY(-50%) rotate(-45deg);
  background: #374151;
  opacity: 1;
}

.canvas-filter .facet-categories .category-parent.has-subcategories:hover::before,
.canvas-filter .facet-categories .category-parent.has-subcategories:hover::after {
  background: #374151;
}

/* Список подкатегорий */
.canvas-filter .facet-categories .subcategories-list {
  border-left: none;
  margin-left: 0;
  margin-top: 0;
  padding-left: 0;
  padding-top: 0;
  padding-bottom: 0;
  box-sizing: border-box;
  display: block;
  width: 100%;
  flex-basis: 100%;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  position: relative;
  z-index: 1;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, padding 0.3s ease;
  background: #f9fafb;
  list-style: none;
  margin: 0;
}

.canvas-filter .facet-categories .category-parent.active-parent .subcategories-list,
.canvas-filter .facet-categories .subcategories-list.show {
  max-height: 2000px;
  opacity: 1;
  margin-top: 0;
  z-index: 1;
  padding-top: 0;
  padding-bottom: 0;
  overflow: visible;
}

.canvas-filter .facet-categories .subcategories-list li {
  margin: 0;
  padding: 0;
  position: relative;
  border: none;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0;
  background: #f9fafb;
  box-shadow: none;
  transition: none;
  overflow: hidden;
}

.canvas-filter .facet-categories .subcategories-list li:last-child {
  border-bottom: none;
}

/* Ссылка подкатегории */
.canvas-filter .facet-categories .subcategory-item {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 12px;
  font-size: 14px;
  font-weight: 400;
  padding-left: 40px;
  padding-right: 48px;
  padding-top: 16px;
  padding-bottom: 16px;
  color: #6b7280;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
  cursor: pointer;
  position: relative;
  box-sizing: border-box;
}

.canvas-filter .facet-categories .subcategory-item:hover {
  background-color: #f3f4f6;
  color: #374151;
}

/* Price Range */
.facet-price .box-price-product {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.facet-price .box-price-item {
  flex: 1;
}

.facet-price .title-price {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.facet-price .price-val {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  min-height: 44px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.facet-price .box-price-item:hover .price-val {
  border-color: #d1d5db;
  background: #fff;
}

#price-value-range {
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  position: relative;
  margin: 24px 0;
}

/* NoUiSlider стили - минималистичный стиль */
#price-value-range.noUi-target {
  background: #e5e7eb;
  border-radius: 4px;
  border: none;
  box-shadow: none;
}

#price-value-range .noUi-connect {
  background: #111827;
}

#price-value-range .noUi-handle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #111827;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  top: -8px;
  right: -10px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

#price-value-range .noUi-handle:before,
#price-value-range .noUi-handle:after {
  display: none;
}

#price-value-range .noUi-handle:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: scale(1.1);
}

#price-value-range .noUi-handle:active {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transform: scale(1.05);
}

#price-value-range .noUi-horizontal {
  height: 4px;
}

/* Color/Size Filters */
.facet-color-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.facet-color-box .color-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: #666;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.facet-color-box .color-item:hover {
  background: #f5f5f5;
  color: #000;
}

.facet-color-box .color-item.active {
  background: #f5f5f5;
  color: #000;
  font-weight: 500;
}

.facet-color-box .color-item .color {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.facet-color-box .color-item .bg-grey {
  background: #f0f0f0 !important;
}

.facet-color-box .color-item span:last-child {
  margin-left: auto;
  font-size: 12px;
  color: #999;
}

/* Canvas Footer - кнопка сброса */
.canvas-filter .canvas-footer {
  padding: 16px 24px;
  border-top: 1px solid #f0f0f0;
  background: #fff;
  position: sticky;
  bottom: 0;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

.btn-filter-reset {
  width: 100%;
  padding: 14px 24px;
  border: 1px solid #e0e0e0;
  border-radius: 25px;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.btn-filter-reset:hover {
  background: #f5f5f5;
  border-color: #000;
  color: #000;
}

@media (max-width: 767px) {
  .canvas-filter {
    width: 100%;
    max-width: 320px;
  }

  .canvas-filter .canvas-header {
    padding: 20px;
  }

  .canvas-filter .canvas-body {
    padding: 16px 20px 60px;
  }

  .canvas-filter .canvas-footer {
    padding: 12px 20px;
  }

  .widget-facet {
    margin-bottom: 24px;
    padding-bottom: 24px;
  }

  .btn-filter-reset {
    padding: 12px 20px;
    font-size: 12px;
  }
}

/* Loading indicator */
.fn_ajax_wait {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fn_ajax_wait::after {
  content: '';
  width: 40px;
  height: 40px;
  border: 3px solid #f0f0f0;
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
