/* E-commerce style catalog filters — slate/blue palette (distinct from site orange) */
/* Category listing with product filters — clean white canvas */
html.specteh-has-products #middle::before,
html.specteh-has-products body.bg_middle #middle::before,
html.specteh-has-products body.categoryview #middle::before,
html.specteh-has-products body.productsearch #middle::before,
body.productsearch:has(.specteh-shop-filter) #middle::before,
body.categoryview:has(.specteh-shop-filter) #middle::before,
body:has(.specteh-shop-filter) #middle::before {
  display: none !important;
  content: none !important;
}

html.specteh-has-products #middle,
html.specteh-has-products #center,
html.specteh-has-products #top,
html.specteh-has-products main,
html.specteh-has-products body.categoryview #middle,
html.specteh-has-products body.categoryview #center,
html.specteh-has-products body.categoryview #top,
html.specteh-has-products body.categoryview main,
body.productsearch:has(.specteh-shop-filter) #middle,
body.productsearch:has(.specteh-shop-filter) #center,
body.productsearch:has(.specteh-shop-filter) #top,
body.productsearch:has(.specteh-shop-filter) main,
body.categoryview:has(.specteh-shop-filter) #middle,
body.categoryview:has(.specteh-shop-filter) #center,
body.categoryview:has(.specteh-shop-filter) #top,
body.categoryview:has(.specteh-shop-filter) main,
body:has(.specteh-shop-filter) #middle,
body:has(.specteh-shop-filter) #center,
body:has(.specteh-shop-filter) #top,
body:has(.specteh-shop-filter) main {
  background: #fff !important;
}

html.specteh-has-products #middle > main > article,
html.specteh-has-products body.bg_middle #middle article,
html.specteh-has-products body.categoryview #middle > main > article,
html.specteh-has-products body.bg_middle.categoryview #middle article {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html.specteh-has-products .bg-color.category-view,
body:has(.specteh-shop-filter) .bg-color.category-view {
  background: transparent;
}

html.specteh-has-products .bg-color.category-view::before,
body:has(.specteh-shop-filter) .bg-color.category-view::before {
  display: none !important;
  content: none !important;
}

body.categoryview {
  --sf-accent: #2563eb;
  --sf-accent-hover: #1d4ed8;
  --sf-accent-soft: #eff6ff;
  --sf-accent-muted: #dbeafe;
  --sf-orange: #ff8311;
  --sf-orange-soft: #fff4e8;
  --sf-text: #111827;
  --sf-muted: #6b7280;
  --sf-border: #e5e7eb;
  --sf-bg: #fff;
  --sf-radius: 12px;
  --sf-chip-radius: 8px;
}

.bg-color.category-view {
  font-family: Manrope, "Segoe UI", sans-serif;
}

.bg-color.category-view .orderby_blk,
.bg-color.category-view .orderby-displaynumber.filter-category:not(.specteh-cat-filters) {
  display: none !important;
}

/* Unified filter panel in sidebar */
#center #left .specteh-shop-filter {
  display: block !important;
  margin: 0 0 20px;
  border: 1px solid #e8ecf1;
  border-radius: 16px;
  background: var(--sf-bg);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.05);
  overflow: visible;
}

#center #left .specteh-shop-filter.virtuemart_search {
  overflow: visible !important;
  max-height: none !important;
}

.specteh-shop-filter__body {
  padding: 0;
  overflow: visible;
  max-height: none;
}

.specteh-shop-filter__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f6;
  background: #fff;
}

.specteh-shop-filter__title {
  margin: 0;
  flex: 1 1 auto;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--sf-text);
}

.specteh-shop-filter__reset-all {
  margin-left: auto;
  border: 0;
  background: none;
  color: var(--sf-accent);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.specteh-shop-filter__reset-all:hover {
  color: var(--sf-accent-hover);
  text-decoration: underline;
}


.specteh-shop-filter__block {
  border-bottom: 1px solid var(--sf-border);
}

.specteh-shop-filter__block:last-child {
  border-bottom: 0;
}

.specteh-shop-filter__block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  background: var(--sf-bg);
  color: var(--sf-text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.specteh-shop-filter__block-head:hover {
  background: #f8fafc;
}

.specteh-shop-filter__block-title {
  flex: 1 1 auto;
  min-width: 0;
}

.specteh-shop-filter__chevron {
  flex: 0 0 16px;
  color: var(--sf-muted);
  transition: transform 0.2s ease;
}

.specteh-shop-filter__block.is-open .specteh-shop-filter__chevron {
  transform: rotate(180deg);
}

.specteh-shop-filter__block-body {
  display: none;
  padding: 0 14px 12px;
}

.specteh-shop-filter__block.is-open .specteh-shop-filter__block-body {
  display: block;
}

.specteh-shop-filter__search {
  display: block;
  margin-bottom: 10px;
}

.specteh-shop-filter__search-input {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #e8ecf1;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--sf-text);
  font: inherit;
  font-size: 0.78rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.specteh-shop-filter__search-input:focus {
  border-color: #93c5fd;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.specteh-shop-filter__chips {
  display: flex !important;
  flex-flow: row wrap !important;
  gap: 5px;
  align-items: flex-start;
  align-content: flex-start;
}

.specteh-shop-filter__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.specteh-shop-filter__chip:hover {
  border-color: #93c5fd;
  background: var(--sf-accent-soft);
  color: var(--sf-accent-hover);
}

.specteh-shop-filter__chip.is-active {
  border-color: var(--sf-accent);
  background: var(--sf-accent-soft);
  color: var(--sf-accent-hover) !important;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.15);
}

.specteh-shop-filter__chip:not(.is-active) {
  border-color: #e2e8f0;
  background: #fff;
  color: #475569;
  opacity: 0.72;
}

.specteh-shop-filter__chip.is-active {
  opacity: 1;
}

.specteh-shop-filter__chip.is-wrap {
  white-space: normal;
  text-align: left;
  line-height: 1.25;
  padding: 5px 9px;
}

.specteh-shop-filter__chip--link {
  text-decoration: none !important;
}

.specteh-shop-filter__chip.is-hidden {
  display: none;
}

.specteh-shop-filter__block.is-collapsed-list.is-expanded-list .specteh-shop-filter__chip.is-hidden {
  display: inline-flex;
}

.specteh-shop-filter__chip.is-search-hidden {
  display: none !important;
}

.specteh-shop-filter__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Legacy nav links fallback */
.specteh-shop-filter__link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--sf-border);
  border-radius: 999px;
  color: var(--sf-text) !important;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none !important;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.specteh-shop-filter__link:hover {
  border-color: #93c5fd;
  background: var(--sf-accent-soft);
  color: var(--sf-accent-hover) !important;
}

.specteh-shop-filter__link.is-active {
  border-color: var(--sf-accent);
  background: var(--sf-accent);
  color: #fff !important;
}

.specteh-shop-filter__block.is-collapsed-list .specteh-shop-filter__link.is-hidden {
  display: none;
}

.specteh-shop-filter__block.is-collapsed-list.is-expanded-list .specteh-shop-filter__link.is-hidden {
  display: inline-flex;
}

.specteh-shop-filter__link.is-search-hidden {
  display: none !important;
}

.specteh-shop-filter__more {
  display: inline-flex;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--sf-accent);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.specteh-shop-filter__more:hover {
  text-decoration: underline;
}

.specteh-shop-filter__block.is-expanded-list .specteh-shop-filter__more {
  display: none;
}

/* Price sliders inside filter */
.specteh-shop-filter__price-label {
  margin: 0 0 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--sf-muted);
}

.specteh-shop-filter__price.value,
.specteh-shop-filter__price .value {
  padding: 0 !important;
  width: 100%;
}

.specteh-shop-filter__price .irs {
  height: 28px;
  margin: 0;
}

.specteh-shop-filter__price-values {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px;
  width: 100%;
  height: auto;
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  color: #334155;
}

.specteh-shop-filter.virtuemart_search .specteh-shop-filter__price-value,
.specteh-shop-filter.virtuemart_search .specteh-shop-filter__price-value-sep {
  max-width: none !important;
  width: auto !important;
  margin: 0 !important;
}

.specteh-shop-filter__price-value {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  white-space: nowrap;
}

.specteh-shop-filter__price-value-sep {
  flex: 0 0 auto;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 600;
}

.specteh-shop-filter__price .irs-line {
  top: 12px !important;
  height: 4px !important;
  border: none !important;
  border-radius: 999px !important;
  background: #e2e8f0 !important;
  box-shadow: none !important;
}

.specteh-shop-filter__price .irs-bar,
.specteh-shop-filter__price .irs-bar-edge {
  top: 12px !important;
  height: 4px !important;
  border: none !important;
  border-radius: 999px !important;
  background: #ff8311 !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

.specteh-shop-filter__price .irs-bar-edge {
  width: 4px !important;
}

.specteh-shop-filter__price .irs-shadow {
  display: none !important;
}

/* Бегунки: компактные, плоские, по центру трека */
.specteh-shop-filter__price .irs-slider,
.specteh-shop-filter__price .irs-handle {
  top: 5px !important;
  width: 18px !important;
  height: 18px !important;
  margin-left: -9px !important;
  border: 2px solid #ff8311 !important;
  border-radius: 50% !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.14) !important;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.specteh-shop-filter__price .irs-slider:hover,
.specteh-shop-filter__price .irs-slider.state_hover,
.specteh-shop-filter__price .irs-handle:hover {
  border-color: #f97316 !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: 0 2px 8px rgba(255, 131, 17, 0.28) !important;
  transform: scale(1.06);
  cursor: pointer;
}

.specteh-shop-filter__price .irs-slider:active,
.specteh-shop-filter__price .irs-handle:active {
  cursor: ew-resize;
  transform: scale(1.02);
  box-shadow: 0 1px 4px rgba(255, 131, 17, 0.35) !important;
}

.specteh-shop-filter__price .irs-slider::before,
.specteh-shop-filter__price .irs-slider::after,
.specteh-shop-filter__price .irs-handle::before,
.specteh-shop-filter__price .irs-handle::after {
  display: none !important;
  content: none !important;
}

.specteh-shop-filter__price .irs,
.specteh-shop-filter__price .irs-line {
  width: 100% !important;
}

.specteh-shop-filter__price .irs-line-left,
.specteh-shop-filter__price .irs-line-mid,
.specteh-shop-filter__price .irs-line-right {
  width: 100%;
  background: transparent !important;
}

.specteh-shop-filter.virtuemart_search .value .irs-from,
.specteh-shop-filter.virtuemart_search .value .irs-to,
.specteh-shop-filter.virtuemart_search .value .irs-single,
.specteh-shop-filter .irs-from,
.specteh-shop-filter .irs-to,
.specteh-shop-filter .irs-single {
  display: none !important;
}

.specteh-shop-filter .irs-bar {
  background: linear-gradient(#ff8311, #ffbc11);
  border: none;
}

.specteh-shop-filter .irs-bar-edge {
  background: linear-gradient(#ff8311, #ffbc11);
  border: none;
}

.specteh-shop-filter .irs-min,
.specteh-shop-filter .irs-max {
  display: none;
}

.specteh-shop-filter.virtuemart_search .value > span {
  max-width: none !important;
}

/* Attribute filters panel merged into shop filter */
#center #left .specteh-cat-filters {
  display: none !important;
}

#center #left .specteh-shop-filter .specteh-cat-filters__host {
  display: block;
}

.specteh-cat-filters__host:empty:not(.is-loading) {
  display: none !important;
}

/* Quick category navigation above sort toolbar */
.specteh-cat-quicknav {
  margin: 0 0 10px;
  padding: 12px 14px 14px;
  border: 1px solid var(--sf-border);
  border-radius: var(--sf-radius);
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.specteh-cat-quicknav__head {
  display: flex;
  align-items: center;
  margin: 0 0 10px;
}

.specteh-cat-quicknav__title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sf-muted);
}

.specteh-cat-quicknav__track {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.specteh-cat-quicknav__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #334155 !important;
  font-size: 0.82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  text-decoration: none !important;
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.specteh-cat-quicknav__pill:hover {
  border-color: #93c5fd;
  background: var(--sf-accent-soft);
  color: var(--sf-accent-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.specteh-cat-quicknav__pill.is-active {
  border-color: var(--sf-accent);
  background: var(--sf-accent);
  color: #fff !important;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.22);
}

.specteh-cat-quicknav__pill.is-active:hover {
  border-color: var(--sf-accent-hover);
  background: var(--sf-accent-hover);
  color: #fff !important;
  transform: none;
}

/* Toolbar */
.specteh-cat-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 12px;
  padding: 6px 8px;
  border: 1px solid #e8ecf1;
  border-radius: 10px;
  background: #f8fafc;
  box-shadow: none;
}

.specteh-cat-toolbar__left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.specteh-cat-toolbar__count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.specteh-cat-toolbar__count-num {
  color: var(--sf-orange);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.specteh-cat-toolbar__filter-btn {
  display: none;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: var(--sf-text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.specteh-cat-toolbar__filter-btn svg {
  flex: 0 0 14px;
}

.specteh-cat-toolbar__sort {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.specteh-cat-toolbar__sort-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #94a3b8;
  white-space: nowrap;
}

.specteh-cat-toolbar__sort-options {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  max-width: 100%;
  padding: 3px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #eef2f6;
}

.specteh-cat-toolbar__sort-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #475569 !important;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.specteh-cat-toolbar__sort-btn:hover {
  background: rgba(255, 255, 255, 0.72);
  color: #1e293b !important;
}

.specteh-cat-toolbar__sort-btn.is-active {
  background: #fff;
  color: #c45f00 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

/* Скрыть CTA «Бесплатная подача техники» между сеткой и SEO-текстом */
body.specteh-category-listing #bottom > .moduletable.mod_special_conditions,
body.specteh-category-listing #bottom .moduletable.mod_special_conditions.fullbg,
html.specteh-has-products #bottom > .moduletable.mod_special_conditions,
html.specteh-has-products #bottom .moduletable.mod_special_conditions.fullbg {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Mobile filter drawer */
.specteh-shop-filter__backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1040;
  background: rgba(15, 23, 42, 0.45);
}

.specteh-shop-filter__drawer-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--sf-muted);
  cursor: pointer;
}

@media (min-width: 992px) {
  html.specteh-has-products #middle {
    justify-content: flex-start;
    gap: 36px;
  }

  html.specteh-has-products #left {
    flex: 0 0 268px;
    width: 268px;
    max-width: 268px;
    margin-right: 0;
  }

  html.specteh-has-products #center main {
    flex: 1 1 0;
    min-width: 0;
    padding-left: 4px;
  }

  #center #left .specteh-shop-filter {
    position: static;
    top: auto;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 991px) {
  .specteh-cat-toolbar__filter-btn {
    display: inline-flex;
  }

  #center #left .specteh-shop-filter {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1050;
    width: min(360px, 92vw);
    max-height: none;
    margin: 0;
    border-radius: 0;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    overflow: hidden;
  }

  #center #left .specteh-shop-filter.is-drawer-open {
    overflow: auto;
  }

  #center #left .specteh-shop-filter.is-drawer-open {
    transform: translateX(0);
  }

  .specteh-shop-filter__backdrop.is-visible {
    display: block;
  }

  .specteh-shop-filter__drawer-close {
    display: inline-flex;
  }

  .specteh-cat-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 6px;
  }

  .specteh-cat-toolbar__sort {
    width: 100%;
  }

  .specteh-cat-toolbar__sort-options {
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    padding-bottom: 1px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .specteh-cat-toolbar__sort-options::-webkit-scrollbar {
    display: none;
  }

  .specteh-cat-quicknav__track {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .specteh-cat-quicknav__track::-webkit-scrollbar {
    display: none;
  }
}
