/* Presentation only: keep the existing filter DOM, events and catalog columns. */
body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar {
  display: block;
  min-width: 0;
  padding: 8px 16px 12px;
  color: #14253c;
  color-scheme: light;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 3px 14px rgb(20 37 60 / 4%);
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar:empty { display: none; }

body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar::before {
  content: "Filters";
  display: block;
  padding: 14px 0 16px;
  border-bottom: 1px solid #e8edf3;
  color: #14253c;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.3;
}

body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar .product-filter-group {
  display: flow-root;
  min-width: 0;
  margin: 0;
  padding: 4px 0 12px;
  border: 0;
  border-bottom: 1px solid #e8edf3;
  border-radius: 0;
  background: transparent;
}

body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar .product-filter-group:last-child { border-bottom: 0; }
body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar .product-filter-group.collapsed { padding: 4px 0; }

body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar .product-filter-group legend {
  float: left;
  width: 100%;
  margin: 0;
  padding: 0;
  color: #14253c;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.4;
}

body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar .product-filter-toggle {
  min-height: 44px;
  gap: 12px;
  color: inherit;
  border-radius: 5px;
}

body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar .product-filter-toggle:hover { color: #006bd1; }

body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar .product-filter-chevron {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  margin-right: 3px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  font-size: 0;
  transform: translateY(2px) rotate(-45deg);
  transition: none;
}

body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar .collapsed .product-filter-chevron {
  transform: translateY(-2px) rotate(135deg);
}

body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar .product-filter-options,
body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar .price-range-filter { clear: both; }

body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar .product-filter-options label {
  min-height: 36px;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 9px;
  padding: 3px 4px;
  color: #425169;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar .product-filter-options label:hover { background: #f5f8fc; }
body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar .product-filter-options label:has(input:checked) {
  color: #0063c5;
  background: #edf5ff;
}

body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: #007bff;
  cursor: pointer;
}

body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar .product-filter-options small {
  min-width: 25px;
  padding: 2px 6px;
  color: #69778c;
  background: #f0f3f7;
  border-radius: 5px;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar .price-range-filter { gap: 10px; padding: 2px 0 4px; }
body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar .price-range-track {
  order: -1;
  height: 44px;
  margin: 0;
  box-shadow: none;
}
body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar .price-range-track::before { height: 5px; background: #e2e8f0; }
body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar .price-range-rail { height: 5px; }
body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar .price-range-fill { background: #007bff; }
body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar .price-range-handle {
  width: 22px;
  height: 22px;
  border-color: #007bff;
  box-shadow: 0 2px 5px rgb(20 37 60 / 12%);
}
body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar .price-range-input { top: 11px; }
body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar .price-range-values { gap: 8px; }
body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar .price-range-values label {
  height: 44px;
  min-height: 44px;
  padding: 0 10px;
  gap: 5px;
  border: 1px solid #dce4ee;
  border-radius: 7px;
  background: #fafbfd;
  color: #14253c;
  font-size: 0.875rem;
}
body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar .price-range-currency,
body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar .price-range-separator { color: #69778c; font-size: 0.8125rem; font-weight: 400; }
body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar .price-number-input { font-weight: 600; }
body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar .price-range-values label:focus-within { border-color: #007bff; }
body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar :is(button, input):focus-visible { outline: 2px solid #006bd1; outline-offset: 3px; }

@media (max-width: 820px) {
  body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar .product-filter-options label { min-height: 44px; }
}

/* Prijsvakjes: het invoerveld vult het omlijnde vak (was een los wit vak dat afgekapt werd). */
body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar .price-range-values label { display: flex; align-items: center; min-width: 0; }
body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar .price-range-values .price-number-input { flex: 1 1 auto; width: 100%; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; box-shadow: none; color: inherit; }

/* Mobiel filterpaneel: alleen op smalle schermen. */
.mobile-filter-toggle, .mobile-filter-backdrop, #productFilterSidebar .mobile-filter-head, #productFilterSidebar .mobile-filter-foot { display: none; }

@media (max-width: 820px) {
  /* Filters-knop en sorteren naast elkaar, aantal producten eronder. */
  body.category-design #productCatalogPage .product-listing-toolbar { display: grid !important; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 10px; margin: 0 0 14px; padding: 0; border: 0; background: none; text-align: left; }
  body.category-design #productCatalogPage .product-listing-toolbar > span { grid-column: 1 / -1; order: 3; margin: 0; color: #5a6b80; font-size: 13px; text-align: left; }
  body.category-design #productCatalogPage .product-listing-toolbar label { display: block; min-width: 0; margin: 0; }
  body.category-design #productCatalogPage .product-listing-toolbar label > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  body.category-design #productCatalogPage .product-listing-toolbar select { width: 100%; min-height: 44px; padding: 0 36px 0 14px; border: 1px solid #cfd9e5; border-radius: 999px; background-color: #fff; color: #14253c; font-size: 15px; font-weight: 600; }
  .mobile-filter-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid #cfd9e5; border-radius: 999px; background: #fff; color: #14253c; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
  .mobile-filter-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .mobile-filter-badge { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #006bd1; color: #fff; font-size: 12px; }
  .mobile-filter-badge[hidden] { display: none; }

  /* Zijbalk verdwijnt uit de pagina en wordt een paneel van onderen. */
  body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar { position: fixed !important; z-index: 1001; top: auto !important; left: 0; right: 0; bottom: 0; width: auto !important; display: flex; flex-direction: column; max-height: 86vh !important; max-height: 86dvh !important; margin: 0; padding: 0; border: 0; border-radius: 16px 16px 0 0; box-shadow: 0 -12px 40px rgb(10 20 35 / 25%); overflow: hidden; transform: translateY(105%); visibility: hidden; transition: transform .25s ease, visibility .25s; }
  body.category-design.mobile-filters-open #productCatalogPage:not([hidden]) #productFilterSidebar { transform: none; visibility: visible; }
  body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar::before { display: none; }
  body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar .product-filter-group { flex: 0 0 auto; margin: 0 18px; }
  body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar > fieldset:first-of-type { margin-top: 4px; }
  #productFilterSidebar .mobile-filter-head { position: sticky; top: 0; z-index: 2; display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; padding: 14px 12px 12px 18px; border-bottom: 1px solid #e8edf3; background: #fff; }
  #productFilterSidebar .mobile-filter-head strong { color: #14253c; font-size: 18px; }
  #productFilterSidebar .mobile-filter-close { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #f1f5f9; color: #14253c; font-size: 26px; line-height: 1; cursor: pointer; }
  #productFilterSidebar .mobile-filter-foot { position: sticky; bottom: 0; z-index: 2; display: block; flex: 0 0 auto; margin-top: auto; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid #e8edf3; background: #fff; }
  #productFilterSidebar .mobile-filter-apply { width: 100%; min-height: 50px; border: 0; border-radius: 999px; background: #006bd1; color: #fff; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
  /* Alleen het midden scrollt. */
  body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar { overflow-y: auto; overscroll-behavior: contain; }
  .mobile-filter-backdrop { position: fixed; inset: 0; z-index: 1000; display: block; background: rgb(10 20 35 / 45%); }
  .mobile-filter-backdrop[hidden] { display: none; }
  body.mobile-filters-open { overflow: hidden; }
  body.mobile-filters-open .storefront-bottom-nav { visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  body.category-design #productCatalogPage:not([hidden]) #productFilterSidebar { transition: none; }
}
