/* Category-specific product filters */
.catalog-params {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e7edf3;
}

.catalog-params__title {
  margin: 0 0 14px;
  color: #1b2733;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}

.catalog-params fieldset {
  min-width: 0;
  margin: 0;
  padding: 16px 0;
  border: 0;
  border-top: 1px solid #e7edf3;
}

.catalog-params fieldset:first-child {
  padding-top: 0;
  border-top: 0;
}

.catalog-params .filter_title {
  margin: 0 0 11px;
  color: #1b2733;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.catalog-filter-options {
  display: grid;
  gap: 8px;
  max-height: 244px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #aac9e7 transparent;
}

.catalog-filter-option {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: start;
  gap: 9px;
  min-height: 32px;
  margin: 0;
  padding: 4px 2px;
  color: #334155;
  font-size: 13px;
  line-height: 1.35;
  cursor: pointer;
}

.catalog-filter-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.catalog-filter-option span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.catalog-filter-option sup {
  color: #7b8794;
  font-size: 11px;
  line-height: 18px;
}

.catalog-filter-option.disabled {
  opacity: .48;
  cursor: default;
}

.catalog-price-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.catalog-price-inputs label {
  display: grid;
  gap: 5px;
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.2;
}

.catalog-price-inputs input {
  width: 100%;
  height: 40px;
  padding: 8px 10px;
  color: #1b2733;
  background: #fff;
  border: 1px solid #ced9e4;
  border-radius: 8px;
  font: inherit;
}

.catalog-price-inputs input:focus-visible,
.catalog-filter-option input:focus-visible {
  outline: 3px solid rgba(0, 132, 255, .2);
  outline-offset: 2px;
}

.catalog-params .mse2_number_slider {
  margin: 14px 7px 6px;
}

.catalog-filter__actions {
  display: flex;
  margin-top: 14px;
}

.catalog-filter__reset {
  min-height: 40px;
  padding: 9px 14px;
  color: var(--color-primary);
  background: #eef7ff;
  border: 1px solid #cfe7fb;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.catalog-filter__reset:hover {
  background: #e2f1ff;
}

.catalog-results-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
}

.catalog-results-count {
  color: #5f6f7f;
  font-size: 14px;
}

.catalog-results-count strong {
  color: #1b2733;
}

#mse2_selected_wrapper {
  min-height: 0;
  margin: 0 0 14px;
}

#mse2_selected {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 0;
  background: transparent;
}

#mse2_selected[style*="display: block"],
#mse2_selected[style*="display: flex"] {
  display: flex !important;
}

#mse2_selected .mse2_selected_link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  margin: 0;
  padding: 6px 10px;
  color: #155f9c;
  background: #eef7ff;
  border: 1px solid #cfe7fb;
  border-radius: 999px;
  font-size: 12px;
  text-decoration: none;
}

#mse2_selected .mse2_selected_link em {
  color: inherit;
  font-style: normal;
}

#mse2_selected .mse2_selected_link sup {
  position: relative;
  display: inline-flex;
  flex: 0 0 18px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  overflow: hidden;
  color: transparent;
  background: #d8ebfc;
  border-radius: 50%;
  font-size: 0;
  line-height: 1;
  transition: background-color .15s ease, transform .15s ease;
}

#mse2_selected .mse2_selected_link sup::before,
#mse2_selected .mse2_selected_link sup::after {
  position: absolute;
  width: 8px;
  height: 1.5px;
  content: "";
  background: #155f9c;
  border-radius: 999px;
}

#mse2_selected .mse2_selected_link sup::before {
  transform: rotate(45deg);
}

#mse2_selected .mse2_selected_link sup::after {
  transform: rotate(-45deg);
}

#mse2_selected .mse2_selected_link:hover {
  color: #0057aa;
  background: #e2f1ff;
  border-color: #a9d4fa;
}

#mse2_selected .mse2_selected_link:hover sup {
  background: #c4e2fb;
  transform: scale(1.06);
}

#mse2_selected .mse2_selected_link:focus-visible {
  outline: 3px solid rgba(0, 132, 255, .24);
  outline-offset: 2px;
}

#mse2_mfilter.loading #mse2_results {
  opacity: .48;
  pointer-events: none;
}

#mse2_filters .disabled_fieldsets {
  display: none;
}

@media (max-width: 768px) {
  .catalog-params {
    padding: 16px;
    background: #fff;
    border-top: 1px solid #e7edf3;
  }

  .catalog-filter__panel {
    background: #fff;
    border-radius: 10px;
  }

  .catalog-filter-options {
    max-height: 210px;
  }

  .catalog-results-meta {
    margin-top: 4px;
  }
}


/* Compact filter card */
.catalog-params {
  margin-top: 14px;
  padding-top: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e3ebf3;
  border-radius: 10px;
  box-shadow: 2px 10px 32px rgba(17, 44, 70, .06);
}
.catalog-params__title {
  margin: 0;
  padding: 17px 18px;
  background: #f7faff;
  border-bottom: 1px solid #e3ebf3;
}
.catalog-params fieldset,
.catalog-params fieldset:first-child {
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #e7edf3;
}
.catalog-params fieldset:last-of-type { border-bottom: 0; }
.catalog-params .filter_title { margin: 0; }
.catalog-filter-section__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 13px 18px;
  color: #1b2733;
  background: #fff;
  border: 0;
  border-radius: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.catalog-filter-section__toggle:hover {
  color: #006bcf;
  background: #f7faff;
}
.catalog-filter-section__toggle:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid rgba(0, 132, 255, .22);
  outline-offset: -3px;
}
.catalog-filter-section__arrow {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin: -4px 3px 0 0;
  border-right: 2px solid #7a8b9c;
  border-bottom: 2px solid #7a8b9c;
  transform: rotate(45deg);
  transition: transform .2s ease, border-color .2s ease;
}
.catalog-params fieldset.is-open .catalog-filter-section__arrow {
  margin-top: 4px;
  border-color: #0084ff;
  transform: rotate(225deg);
}
.catalog-filter-section__content { display: none; padding: 2px 18px 17px; }
.catalog-params fieldset.is-open > .catalog-filter-section__content { display: block; }
.catalog-filter-options {
  gap: 6px;
  max-height: 220px;
  overflow-x: hidden;
  overflow-y: auto;
}
.catalog-params fieldset.is-open > .catalog-filter-options { display: grid; }
.catalog-filter-option {
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  min-height: 40px;
  padding: 9px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: background-color .15s ease, border-color .15s ease;
}
.catalog-filter-option:hover {
  background: #f2f7fc;
  border-color: #e3ebf3;
}
.catalog-filter-option input {
  display: grid;
  place-content: center;
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin: 0;
  padding: 0;
  appearance: none;
  background: #fff;
  border: 1px solid #9fb2c6;
  border-radius: 5px;
}
.catalog-filter-option > span {
  padding-top: 1px;
  color: #2c3e50;
  line-height: 1.35;
}
.catalog-filter-option > sup {
  align-self: start;
  margin-top: 0;
}
.catalog-filter-option input::before {
  width: 9px;
  height: 5px;
  content: "";
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  opacity: 0;
  transform: translateY(-1px) rotate(-45deg);
}
.catalog-filter-option input:checked {
  background: #0084ff;
  border-color: #0084ff;
}
.catalog-filter-option input:checked::before { opacity: 1; }
.catalog-filter-option sup {
  min-width: 22px;
  padding: 2px 6px;
  background: #eef3f8;
  border-radius: 999px;
  line-height: 16px;
  text-align: center;
}
.catalog-filter-option sup:empty {
  display: none;
}
.catalog-price-inputs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 9px; }
.catalog-price-inputs input { box-sizing: border-box; min-width: 0; }
.catalog-params .mse2_number_slider {
  height: 4px;
  margin: 9px 9px 20px;
  background: #dce7f1;
  border: 0;
  border-radius: 999px;
}
.catalog-params .mse2_number_slider .ui-slider-range {
  background: #0084ff;
  border: 0;
}
.catalog-params .mse2_number_slider .ui-slider-handle {
  top: 50%;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  background: #fff;
  border: 2px solid #0084ff;
  border-radius: 50%;
  box-shadow: 0 2px 7px rgba(0, 91, 255, .22);
  transform: translateY(-50%);
}
.catalog-filter__actions {
  padding: 14px 18px 18px;
  border-top: 1px solid #e7edf3;
}
.catalog-filter__actions:has(.catalog-filter__reset.hidden) { display: none; }
.catalog-filter__reset { width: 100%; }
.catalog-category-menu__toggle {
  display: none;
}

@media (min-width: 769px) {
  .catalog-filter__panel .navigation_box.is-collapsed
  > .navigation_box_submenu:nth-child(n + 9):not(.active) {
    display: none;
  }

  .catalog-category-menu__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    box-sizing: border-box;
    width: 100%;
    min-height: 42px;
    margin: 10px 0 0;
    padding: 10px 14px;
    color: #006bcf;
    background: #f2f8ff;
    border: 1px solid #cfe6fb;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    cursor: pointer;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease;
  }

  .catalog-category-menu__toggle::after {
    content: "";
    width: 8px;
    height: 8px;
    margin-top: -4px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .2s ease;
  }

  .catalog-category-menu__toggle[aria-expanded="true"]::after {
    margin-top: 4px;
    transform: rotate(225deg);
  }

  .catalog-category-menu__toggle:hover {
    color: #0057aa;
    background: #e7f3ff;
    border-color: #a9d4fa;
  }

  .catalog-category-menu__toggle:focus-visible {
    outline: 3px solid rgba(0, 132, 255, .24);
    outline-offset: 2px;
  }
}

@media (min-width: 769px) {
  .block-catalog { align-items: flex-start; gap: 24px; }
  .catalog-filter.filter { flex: 0 0 300px; width: 300px; padding-bottom: 30px; }
  .catalog-left { min-width: 0; }
}
@media (min-width: 769px) and (max-width: 1100px) {
  .block-catalog { gap: 18px; }
  .catalog-filter.filter { flex-basis: 270px; width: 270px; }
}
@media (max-width: 768px) {
  .block-catalog { flex-direction: column; gap: 14px; }
  .catalog-filter.filter { width: 100%; padding-bottom: 0; }
  .catalog-params { margin-top: 10px; padding: 0; box-shadow: none; }
  .catalog-params__title { padding: 15px 16px; font-size: 16px; }
  .catalog-filter-section__toggle { min-height: 46px; padding: 12px 16px; }
  .catalog-filter-section__content { padding-right: 16px; padding-left: 16px; }
  .catalog-filter-options { max-height: 190px; }
}
@media (prefers-reduced-motion: reduce) {
  .catalog-filter-section__toggle,
  .catalog-filter-section__arrow,
  .catalog-filter-option { transition: none; }
}
