.catalog-wrap {
  display: grid;
  grid-template-columns: 320px minmax(0,1fr);
  gap: var(--ui-space-3);
}
@media (max-width:1024px) {
  .catalog-wrap {
    grid-template-columns: 1fr;
  }
}
.filters {
  border: 1px solid #eef0f3;
  border-radius: 16px;
  padding: var(--ui-space-4);
  position: sticky;
  top: calc(var(--store-header-height, 64px) + 16px);
  height: fit-content;
  background: var(--white);
}
.filters__header {
  display: flex;
  align-items: center;
  justify-content: center;
}
.filters__header span {
  font: 700 20px/1.2 "Comfortaa",system-ui,sans-serif;
  color: black;
  margin: 0;
}
.filters__close {
  background: transparent;
  border: 0;
  font-size: var(--ui-font-lg);
  line-height: 1;
  cursor: pointer;
}
.group {
  border-top: 1px solid #f2f3f5;
  padding: 10px 0;
}
.group:first-of-type {
  border-top: 0;
}
.group > summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--ui-space-2);
}
.group > summary::-webkit-details-marker {
  display: none;
}
.group[open] > summary {
  color: var(--a);
}
.group:not([open]) > summary {
  color: var(--muted);
}
.filter-range {
  display: flex;
  gap: var(--ui-space-2);
  align-items: center;
  margin-top: var(--ui-space-2);
}
.dash {
  opacity: .5;
}
.filters__actions {
  display: flex;
  gap: var(--ui-space-2);
  margin: var(--ui-space-2) 0;
}
.filters__actions.bottom {
  margin-top: var(--ui-space-3);
}
.check,.radio {
  display: flex;
  align-items: center;
  gap: var(--ui-space-2);
  margin: 6px 0;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ui-space-2);
  margin-top: var(--ui-space-2);
}
.tag {
  --bd: #e9ecef;
  --bg: #f8f9fa;
  --fg: #374151;
  display: inline-flex;
  align-items: center;
}
.tag__control {
  display: none;
}
.tag__label {
  border: 1px solid var(--bd);
  background: var(--bg);
  color: var(--fg);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: var(--ui-font-caption);
  cursor: pointer;
  user-select: none;
}
.tag:hover .tag__label {
  border-color: #d5dae0;
}
.tag__control:checked + .tag__label {
  --bd: #2563eb;
  --bg: #e8f0ff;
  --fg: #1f2937;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ui-space-2);
  margin-bottom: 1rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eef2f7;
  border: 1px solid #dde3ea;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: var(--ui-font-caption);
  cursor: pointer;
}
.chip span {
  opacity: .6;
}
.chip--ghost {
  background: transparent;
  border: 1px dashed #cbd5e1;
  text-decoration: none;
  color: #334155;
  padding: 6px 10px;
  border-radius: 999px;
}
.w-full {
  width: 100%;
}
.show-filters {
  display: none;
}
.product-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2,minmax(0,1fr));
}
@media (min-width:601px) {
  .product-grid {
    gap: 10px;
    grid-template-columns: repeat(auto-fill,minmax(170px,1fr));
  }
}
@media (min-width:1200px) {
  .product-grid {
    gap: 12px;
  }
}
@media (max-width:1024px) {
  .show-filters { display: inline-flex; }
}
@media (min-width:1025px) {
  .filters__close {
    display: none;
  }
  .chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--ui-space-2);
    margin: 0 0 var(--ui-space-3);
  }

}
.check input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.check span {
  position: relative;
  padding-left: 28px;
  line-height: 20px;
}
.check span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 18px;
  height: 18px;
  border: 2px solid #000;
  border-radius: 6px;
  background: var(--white);
  box-sizing: border-box;
}
.check input[type="checkbox"]:checked + span::before {
  background: #000;
}
.check input[type="checkbox"]:checked + span::after {
  content: "✓";
  position: absolute;
  left: 3px;
  top: -1px;
  font-size: var(--ui-font-lg);
  color: var(--white);
  line-height: 20px;
}
.catalog-wrap>*,.product-grid>* {
  min-width: 0;
}



.toolbar-top { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin: 0 0 14px; }
.catalog-sort { display: flex; align-items: center; gap: 10px; min-width: 0; max-width: 310px; margin-left: auto; color: #64748b; font-size: 13px; }
.catalog-sort select {
  width: 210px; max-width: 100%;
  appearance: none; min-width: 0; min-height: 42px; box-sizing: border-box;
  padding: 9px 34px 9px 12px; border: 1px solid #d8dee8; border-radius: 10px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23475569' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: #233044; font: 600 13px/1.4 var(--ui-font); cursor: pointer;
}
.catalog-sort select:focus-visible { outline: 3px solid #bfdbfe; outline-offset: 2px; border-color: #2563eb; }
.toolbar-top .show-filters { min-height: 42px; width: auto; padding: 9px 12px; border-radius: 10px; font-size: 13px; }
.show-filters svg { width: 16px; height: 16px; }
.filters__actions .ui-button { min-height: 40px; padding: 8px 12px; border-radius: 10px; font-size: 13px; }
.filters-backdrop { position: fixed; inset: var(--store-header-height, 64px) 0 var(--store-footer-height, 0px); z-index: 80; background: #0f172a66; }
.filters-backdrop[hidden] { display: none; }
@media(max-width: 1024px) {
  .catalog-sort { flex: 0 1 210px; max-width: min(210px, 100%); }
  .catalog-sort > span { display: none; }
  .catalog-sort select { width: 100%; }
  .toolbar-top .show-filters { flex: 0 0 auto; margin-right: auto; }
  .filters {
    position: fixed; left: 0; right: 0; overflow: auto; transform: translateY(110%); box-shadow: 0 -10px 30px #0f172a14;
    top: auto; bottom: var(--store-footer-height, 0px); max-height: calc(100dvh - var(--store-header-height, 64px) - var(--store-footer-height, 0px) - 8px);
    box-sizing: border-box; padding: 0 16px 16px; border-radius: 16px 16px 0 0; border-bottom: 0;
    z-index: 90; visibility: hidden; pointer-events: none; overscroll-behavior-y: contain;
    transition: transform .22s ease, visibility .22s;
  }
  .filters:focus { outline: none; }
  .filters.open { visibility: visible; pointer-events: auto; transform: translateY(var(--filters-drag, 0px)); }
  .filters__header { position: sticky; top: 0; z-index: 2; justify-content: space-between; min-height: 52px; padding: 8px 0; background: #fff; touch-action: none; }
  .filters__header::before { content: ''; position: absolute; width: 36px; height: 4px; top: 5px; left: calc(50% - 18px); border-radius: 4px; background: #cbd5e1; }
  .filters__close { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: #f1f5f9; }
}
@media(prefers-reduced-motion: reduce) { .filters { transition: none; } }
