.filters-horizontal .boh-collection-filter {
  position: relative;
  max-width: 320px;
  min-width: 260px;
  z-index: 20;
}

.filters-horizontal .boh-collection-filter .filter-el_title-horizontal {
  margin-bottom: 8px;
}

.filters-horizontal .boh-collection-dropdown {
  display: block;
  position: relative;
  overflow: visible;
}

.filters-horizontal .boh-collection-toggle {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid #e4e0da;
  border-radius: 10px;
  background: #f8f7f5;
  color: #001a34;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.filters-horizontal .boh-collection-filter.has-selection .boh-collection-toggle {
  border-color: #b99055;
  background: #fffaf2;
}

.filters-horizontal .boh-collection-toggle__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filters-horizontal .boh-collection-toggle__chev {
  transition: transform .18s ease;
}

.filters-horizontal .boh-collection-filter.is-boh-open .boh-collection-toggle__chev {
  transform: rotate(180deg);
}

.filters-horizontal .boh-collection-panel {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: min(360px, calc(100vw - 36px));
  max-height: 340px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 26, 52, .28) rgba(0, 26, 52, .08);
  padding: 10px;
  border: 1px solid #e4e0da;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(25, 21, 17, .16);
  z-index: 200;
}

.filters-horizontal .boh-collection-panel::-webkit-scrollbar {
  width: 8px;
}

.filters-horizontal .boh-collection-panel::-webkit-scrollbar-track {
  background: rgba(0, 26, 52, .06);
  border-radius: 999px;
}

.filters-horizontal .boh-collection-panel::-webkit-scrollbar-thumb {
  background: rgba(0, 26, 52, .26);
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, .72);
}

.filters-horizontal .boh-collection-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 26, 52, .38);
}

.filters-horizontal .boh-collection-filter.is-boh-open .boh-collection-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
}

.filters-horizontal .boh-collection-panel .filter-opt_el {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
}

.filters-horizontal .boh-collection-panel .filter-opt_el:hover {
  background: #f5f1eb;
}

.filters-horizontal [data-code="color"] .filter-colors-horizontal {
  gap: 5px;
  max-width: 360px;
  align-content: flex-start;
}

.filters-horizontal [data-code="color"] .option-color_outer {
  position: relative;
  width: 26px;
  height: 26px;
  margin: 0 !important;
  box-sizing: border-box;
}

.filters-horizontal [data-code="color"] .filter-option-color.boh-color-swatch {
  display: inline-block !important;
  position: relative;
  width: 26px;
  height: 26px;
  box-sizing: border-box;
  border: 1px solid rgba(0, 26, 52, .16) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.38);
}

.filters-horizontal [data-code="color"] .option-color_outer.checked .filter-option-color.boh-color-swatch,
.filters-horizontal [data-code="color"] .filter-option-color.boh-color-swatch.checked {
  border-color: #001a34 !important;
  box-shadow: 0 0 0 1px #fff, 0 0 0 2px #001a34;
}

.filters-horizontal [data-code="color"] .filter-option-color.boh-color-swatch .style-check {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  opacity: 0;
}

/* Desktop: keep all six category filters in one balanced row. */
@media (min-width: 1026px) {
  .filters-horizontal-grid {
    display: grid;
    grid-template-columns:
      minmax(0, 1.35fr)
      minmax(0, 1.05fr)
      minmax(0, 1.15fr)
      minmax(0, 1.2fr)
      minmax(0, 1.3fr)
      minmax(0, 1.15fr);
    align-items: start;
    justify-content: stretch;
    column-gap: clamp(10px, .9vw, 18px);
    row-gap: 0;
    width: 100%;
    overflow: visible;
  }

  .filters-horizontal-grid > .filter-el-horizontal,
  .filters-horizontal-grid > .filter-el-horizontal.boh-collection-filter {
    width: 100%;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
  }

  .filters-horizontal-grid .filter-el_title-horizontal {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 4px;
  }

  .filters-horizontal-grid .filter-el_title-horizontal .filter-el_title__text,
  .filters-horizontal-grid .filter-el_title-horizontal .filter-el__unit {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .filters-horizontal-grid .filter-el_title-horizontal > i {
    flex: 0 0 auto;
    margin-left: auto;
  }

  .filters-horizontal-grid .filter-el_opts-horizontal,
  .filters-horizontal-grid .filter-range-horizontal,
  .filters-horizontal-grid .filter-range__min,
  .filters-horizontal-grid .filter-range__max {
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
  }

  .filters-horizontal-grid .filter-range-horizontal {
    width: 100%;
    gap: 8px;
  }

  .filters-horizontal-grid .filter-range .filter-range__min,
  .filters-horizontal-grid .filter-range .filter-range__max {
    flex: 1 1 0;
    width: auto;
    margin-left: 0;
    margin-right: 0;
  }

  .filters-horizontal-grid .filter-range_el {
    width: 100%;
    min-width: 0;
    padding-left: 2.4rem;
    padding-right: .5rem;
    box-sizing: border-box;
  }

  .filters-horizontal-grid .filter-range__min__text,
  .filters-horizontal-grid .filter-range__max__text {
    left: 12px;
  }

  .filters-horizontal-grid .boh-collection-toggle {
    min-width: 0;
    padding-left: 12px;
    padding-right: 12px;
  }

  .filters-horizontal-grid [data-code="color"] .filter-colors-horizontal {
    width: 100%;
    max-width: none;
  }
}

.boh-subcategories-toggle {
  display: none;
}

.boh-category-filter-trigger {
  display: none;
}

.boh-category-toolbar-sentinel {
  display: none;
}

@media (max-width: 1025px) {
  .boh-category-toolbar-sentinel {
    display: block;
    width: 100%;
    height: 1px;
    margin-bottom: -1px;
    pointer-events: none;
  }

  .boh-category-mobile-toolbar {
    position: sticky;
    top: 0;
    z-index: 109;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 54px;
    margin: 0;
    padding: 6px 0 8px;
    background: rgba(255, 255, 255, .96);
    transition: margin .18s ease, padding .18s ease, box-shadow .18s ease, background .18s ease;
  }

  .boh-category-mobile-toolbar.is-boh-stuck {
    margin-right: -10px;
    margin-left: -10px;
    padding: 7px 10px;
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid rgba(0, 26, 52, .08);
    box-shadow: 0 8px 24px rgba(0, 26, 52, .09);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .boh-category-mobile-toolbar .category-name {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: #001a34;
    font-size: clamp(19px, 5.2vw, 24px);
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .boh-category-filter-trigger {
    appearance: none;
    flex: 0 0 auto;
    min-width: 108px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(185, 144, 85, .38);
    border-radius: 12px;
    background: #fffdf9;
    color: #001a34;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-shadow: 0 4px 14px rgba(0, 26, 52, .07);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .boh-category-filter-trigger:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(0, 26, 52, .08);
  }

  .boh-category-filter-trigger__icon {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
  }

  .boh-category-filter-trigger__count {
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #c49445;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
  }

  .boh-category-filter-trigger__count[hidden] {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .filters-horizontal [data-code="color"] .filter-el_opts-el,
  .filters-horizontal [data-code="kod_tsveta"] .filter-el_opts-el {
    display: flex;
    flex-flow: row wrap;
    align-content: flex-start;
    gap: 5px;
    max-width: 100%;
  }

  .filters-horizontal [data-code="color"] .option-color_outer,
  .filters-horizontal [data-code="kod_tsveta"] .option-color_outer {
    display: block;
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    min-height: 26px;
    margin: 0 !important;
    padding: 0;
  }

  .filters-horizontal [data-code="color"] .filter-option-color.boh-color-swatch,
  .filters-horizontal [data-code="kod_tsveta"] .filter-option-color.boh-color-swatch {
    display: inline-block !important;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-position: center;
    background-size: cover;
  }

  .filters-horizontal [data-code="color"] .option-color_text,
  .filters-horizontal [data-code="kod_tsveta"] .option-color_text {
    display: none !important;
  }

  #filter-body [data-code="color"] .filter-el_opts-el,
  #filter-body [data-code="kod_tsveta"] .filter-el_opts-el {
    display: flex;
    flex-flow: row wrap;
    align-content: flex-start;
    gap: 7px;
  }

  #filter-body [data-code="color"] .option-color_outer,
  #filter-body [data-code="kod_tsveta"] .option-color_outer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    min-height: 32px;
    margin: 0 !important;
    padding: 0;
    border: 0;
    border-radius: 50%;
    box-sizing: border-box;
  }

  #filter-body [data-code="color"] .filter-option-color.boh-color-swatch,
  #filter-body [data-code="kod_tsveta"] .filter-option-color.boh-color-swatch {
    width: 28px;
    height: 28px;
    display: inline-block !important;
    flex: 0 0 28px;
    border: 1px solid rgba(0, 26, 52, .16) !important;
    border-radius: 50%;
    background-position: center;
    background-size: cover;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .38);
  }

  #filter-body [data-code="color"] .option-color_text,
  #filter-body [data-code="kod_tsveta"] .option-color_text {
    display: none !important;
  }

  #filter-body [data-code="color"] .option-color_outer.checked .filter-option-color.boh-color-swatch,
  #filter-body [data-code="kod_tsveta"] .option-color_outer.checked .filter-option-color.boh-color-swatch,
  #filter-body [data-code="color"] .filter-option-color.boh-color-swatch.checked,
  #filter-body [data-code="kod_tsveta"] .filter-option-color.boh-color-swatch.checked {
    border-color: #001a34 !important;
    box-shadow: 0 0 0 1px #fff, 0 0 0 2px #001a34;
  }

  .filters-horizontal .boh-collection-filter {
    max-width: none;
    min-width: 100%;
    width: 100%;
  }

  .filters-horizontal .boh-collection-panel {
    width: 100%;
    max-height: 280px;
  }

  html.boh-from-finder .boh-subcategories-toggle {
    width: 100%;
    min-height: 46px;
    margin: 6px 0 12px;
    padding: 0 14px;
    border: 1px solid rgba(0, 26, 52, .12);
    border-radius: 12px;
    background: #f5f4f2;
    color: #001a34;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
  }

  html.boh-from-finder .boh-subcategories-toggle small {
    margin-left: 4px;
    color: rgba(0, 26, 52, .58);
    font-size: 12px;
    font-weight: 500;
  }

  html.boh-from-finder .boh-subcategories-toggle__chev {
    transition: transform .18s ease;
  }

  html.boh-from-finder .boh-subcategories-toggle.is-open .boh-subcategories-toggle__chev {
    transform: rotate(180deg);
  }

  html.boh-from-finder .subcategory-box.boh-subcategories-collapsed {
    display: none !important;
  }
}
