.filters__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 0;
}

.filters__buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem !important;
  margin-top: 0;
}

.filters__buttons .filters__apply {
  margin-bottom: 0;
}

.filters__buttons .filters__reset {
  margin-top: 0;
}

.filters__tag--group {
  width: 100%;
  padding: 0.6rem;
  border-radius: 0.6rem;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.filters__tag-title {
  width: 100%;
  text-align: center;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.filters__tag-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 0.8rem;
  width: 100%;
  justify-items: center;
}

.filters__tag-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.35rem 0.6rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #fff;
  border-radius: 0.45rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.filters__tag-item-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-left: 0.4rem;
  width: 16px;
  height: 16px;
  line-height: 1;
  font-size: 14px;
  vertical-align: middle;
  background: transparent;
  border: none;
  box-shadow: none;
}

.page__layout {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.page__layout.is-ready {
  opacity: 1;
}

.filters {
  margin: var(--padding-x);
  background: none;
  border: none;
}

.filters__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 1rem;
  border: 1px solid red;
  color: red;
  background: #fff;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 500;
}
.filters__toggle svg {
  width: 18px;
  height: 18px;
}

.filters__panel {
  display: none;
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 10000;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  padding-bottom: 2rem;
  touch-action: pan-y;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
}
.filters__panel.is-open {
  display: block;
}

/* Предотвращение перетаскивания на мобильных устройствах */
@media (max-width: 1199px) {
  .filters__panel.is-open {
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    overscroll-behavior-x: none;
  }

  .filters__panel.is-open * {
    touch-action: auto;
    user-select: text;
    -webkit-user-select: text;
  }

  .filters__panel.is-open input,
  .filters__panel.is-open select,
  .filters__panel.is-open textarea,
  .filters__panel.is-open button {
    touch-action: manipulation;
  }
}

.filters__group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filters__header {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
  margin-left: calc(-1 * var(--padding-x));
  margin-right: calc(-1 * var(--padding-x));
  width: calc(100% + var(--padding-x) * 2);
}

@media (max-width: 480px) {
  .filters__header {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
  }
}

.filters__back {
  display: flex;
  background: none;
  border: none;
  margin-right: 0.5rem;
  cursor: pointer;
  align-items: center;
  color: rgb(0 0 0 / 0.8);
}

.filters__title {
  flex: 1;
  text-align: center;
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
}

/* ===== ТАБЫ ===== */
.filters__tabs {
  display: flex;
  border-bottom: 1px solid #e6e6e6;
  background: #fff;
  margin-left: calc(-1 * var(--padding-x));
  margin-right: calc(-1 * var(--padding-x));
  width: calc(100% + var(--padding-x) * 2);
}

@media (max-width: 480px) {
  .filters__tabs {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
  }
}

.filters__tab {
  flex: 1;
  padding: 0.75rem 0.5rem;
  text-align: center;
  font-weight: 500;
  font-size: 0.95rem;
  background: none;
  border: none;
  cursor: pointer;
  color: rgb(0 0 0 / 0.7);
  position: relative;
  transition: color var(--transition-duration);
}

.filters__tab:hover {
  color: rgb(0 0 0 / 0.9);
}
.filters__tab.active {
  color: #e31919;
  font-weight: 600;
}
.filters__tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background: #e31919;
  pointer-events: none;
}

/* ===== ФОРМА ===== */
.filters__form,
form.filters__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  padding-top: 0;
  margin-bottom: 1rem;
}

.filters__form > .filters__group:first-of-type,
.filters__form > .filters__group:first-child {
  margin-top: 1rem;
}

.filters__label {
  font-size: 0.9375rem;
  color: rgb(0 0 0 / 0.85);
}

.filters__input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid rgb(0 0 0 / 0.3);
  border-radius: var(--border-radius);
  font-size: 0.9375rem;
  background: #fff;
  box-sizing: border-box;
}

.filters__input--location-custom::placeholder {
  font-size: 14px;
}

.filters__row {
  display: flex;
  gap: 0.5rem;
}

.filters__input-group {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.filters__input-group .filters__input {
  flex: 1;
}

.filters__options {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.filters__options label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.95rem;
  cursor: pointer;
}

/* ===== ПОЛЯ С ЕДИНИЦЕЙ/ВАЛЮТОЙ ===== */
.filters__field--currency,
.filters__field--unit {
  position: relative;
  flex: 1;
}
.filters__field--currency::after,
.filters__field--unit::after {
  content: attr(data-symbol);
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgb(0 0 0 / 0.6);
  font-size: 0.9rem;
  pointer-events: none;
}

.filters__field--currency input,
.filters__field--unit input {
  width: 100%;
  padding-right: 2rem;
  box-sizing: border-box;
}

.filters__accordion-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgb(0 0 0 / 0.85);
  background: #fff;
  border: 1px solid rgb(0 0 0 / 0.15);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.filters__accordion-toggle:hover {
  background: rgb(0 0 0 / 0.04);
  border-color: rgb(0 0 0 / 0.3);
}

.filters__accordion-icon {
  transition: transform 0.2s;
}

.filters__accordion-toggle[aria-expanded="true"] .filters__accordion-icon {
  transform: rotate(180deg);
}

.filters__accordion-content[hidden] {
  display: none;
}

.filters__accordion-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem;
  border: 1px solid rgb(0 0 0 / 0.1);
  border-top: none;
  background: #fafafa;
}

/* ===== ГРУППОВЫЕ ЧЕКБОКСЫ ===== */
.filters__group-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  font-weight: 600;
}

.filters__group-options {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-left: 1.5rem;
}

/* ===== КНОПКИ ===== */
.filters__apply,
.filters__reset {
  width: 100%;
  display: block;
  text-align: center;
  padding: 0.6rem;
  font-size: 0.9375rem;
  border-radius: var(--border-radius);
  font-weight: 500;
  cursor: pointer;
  margin: 0;
}

.filters__apply {
  background: var(--red-80);
  color: #fff;
  border: none;
  transition: background 0.3s ease;
}

.filters__reset {
  margin-top: 0;
}

.filters__apply:hover {
  background: rgb(201, 33, 33);
}

.filters__reset {
  background: #fff;
  color: red;
  border: 1px solid red;
}

.filters__reset:hover {
  background: rgba(146, 146, 146, 0.158);
}
.page__layout.catalog {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "filters"
    "toolbar"
    "list"
    "pagination";
  margin-bottom: 1rem;
}

.page__layout.catalog .catalog__filters {
  grid-area: filters;
}

.page__layout.catalog .catalog__toolbar,
.page__layout.catalog .listings__toolbar {
  grid-area: toolbar;
}

.page__layout.catalog .catalog__list {
  grid-area: list;
}

.page__layout.catalog [data-ajax-pagination] {
  grid-area: pagination;
  margin-bottom: 1rem;
}

.page__layout.catalog > * {
  min-width: 0;
}
