/* Compact, task-first catalog filters. Keep all existing form IDs and state handling. */
.storefront .smart-dialog-head {
  padding: 16px 22px;
}
.storefront .smart-dialog-head small { display: none; }
.storefront .smart-dialog-head h2 { margin: 0; font-size: 20px; }

.storefront .smart-filter-dialog[open] .smart-dialog-body,
.storefront .smart-filter-dialog.is-supplier .smart-dialog-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
  width: calc(100% - 44px);
  max-width: none;
  max-height: min(70dvh, 680px);
  margin: 16px auto;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.storefront .smart-dialog-body > .smart-filter-section,
.storefront #smartSourceSection,
.storefront #smartPriceSection,
.storefront #smartStockSection,
.storefront .smart-filter-dialog.is-supplier .smart-dialog-body > .smart-filter-section:last-child {
  grid-column: auto;
  grid-row: auto;
  display: block;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 17px 18px;
  border: 1px solid #dce5ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 16px #1b355009;
}
.storefront #smartSourceSection,
.storefront #smartCountrySection,
.storefront #smartAttributeSection,
.storefront #smartCategorySection {
  grid-column: 1 / -1;
}
.storefront .smart-dialog-body > .smart-filter-section:last-child {
  grid-column: auto;
  grid-row: auto;
  display: block;
}
.storefront #smartSourceSection {
  display: grid;
  grid-template-columns: minmax(160px, 22%) minmax(0, 1fr);
  align-items: center;
  gap: 12px 20px;
}
.storefront #smartSourceSection .smart-filter-section-title { margin: 0; padding: 0; }
.storefront #smartSourceSection .smart-source-picker { grid-column: 2; width: 100%; }
.storefront #smartSourceSection > .smart-source-menu {
  grid-column: 1 / -1;
  grid-row: auto;
  width: 100%;
  margin: 0;
}
.storefront #smartSourceSection .smart-source-options { max-height: 200px; }
.storefront .smart-filter-section-title,
.storefront #smartPriceSection .smart-filter-section-title {
  display: block;
  width: auto;
  margin: 0 0 13px;
  padding: 0;
}
.storefront .smart-filter-section-title h3,
.storefront #smartStockSection .smart-switch-row strong {
  display: block;
  margin: 0;
  color: #182f4a;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 800;
}
.storefront .smart-filter-section-title h3 .smart-section-icon,
.storefront .smart-switch-row strong .smart-section-icon,
.storefront .smart-filter-section-title > span:not(.smart-section-icon),
.storefront #smartStockSection .smart-switch-row small {
  display: none;
}
.storefront .smart-source-trigger { min-height: 48px; }
.storefront .smart-source-copy small { display: none; }
.storefront .smart-source-trigger img { width: 32px; height: 32px; }

.storefront #smartPriceSection .smart-price-slider { display: none; }
.storefront #smartPriceSection .smart-price-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: none;
  margin: 0;
}
.storefront #smartPriceSection .smart-price-fields label {
  display: block;
  margin: 0;
  color: #657b94;
  font-size: 11px;
  font-weight: 750;
}
.storefront #smartPriceSection .smart-price-fields input {
  width: 100%;
  min-height: 44px;
  margin-top: 5px;
  padding: 0 12px;
  background: #f8fafc;
}
.storefront #smartStockSection .smart-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-height: 73px;
  margin: 0;
}
.storefront #smartStockSection .smart-switch-row > span { padding: 0; }
.storefront #smartStockSection .smart-switch-row input { flex: none; }

.storefront .smart-filter-section > #smartSortSelect {
  position: static;
  display: block;
  width: 100%;
  max-width: none;
  height: 48px;
  margin: 0;
  padding: 0 14px;
  opacity: 1;
  pointer-events: auto;
  border: 1px solid #d6e1ec;
  border-radius: 10px;
  background: #f8fafc;
  color: #1c3551;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}
.storefront .smart-filter-section > #smartSortSelect:focus-visible {
  outline: 3px solid #c6113650;
  outline-offset: 2px;
}
.storefront .smart-sort-choices { display: none; }
.storefront .smart-dialog-foot { min-height: 65px; padding: 10px 22px; }

@media (min-width: 901px) {
  .storefront .smart-filter-dialog.is-supplier #smartCountrySection {
    grid-column: 1 / 3;
    grid-row: 2 / span 2;
  }
  .storefront .smart-filter-dialog.is-supplier.has-attributes #smartAttributeSection {
    grid-column: 3;
    grid-row: 2;
  }
  .storefront .smart-filter-dialog.is-supplier .smart-dialog-body > .smart-filter-section:last-child {
    grid-column: 3;
    grid-row: 3;
  }
  .storefront .smart-filter-dialog.is-supplier:not(.has-attributes) .smart-dialog-body > .smart-filter-section:last-child {
    grid-row: 2;
  }
  .storefront .smart-filter-dialog.is-supplier #smartCountryOptions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 10px;
  }
}

@media (max-width: 900px) {
  .storefront .smart-filter-dialog[open] .smart-dialog-body,
  .storefront .smart-filter-dialog.is-supplier .smart-dialog-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .storefront #smartPriceSection { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .storefront .smart-filter-dialog[open] .smart-dialog-body,
  .storefront .smart-filter-dialog.is-supplier .smart-dialog-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    width: calc(100% - 22px);
    max-height: min(67dvh, 640px);
    margin: 10px auto;
  }
  .storefront .smart-dialog-body > .smart-filter-section,
  .storefront #smartSourceSection,
  .storefront #smartPriceSection,
  .storefront #smartStockSection {
    grid-column: 1;
    padding: 15px;
  }
  .storefront #smartSourceSection { display: block; }
  .storefront #smartSourceSection .smart-filter-section-title { margin-bottom: 10px; }
  .storefront #smartSourceSection .smart-source-picker { width: 100%; }
  .storefront #smartSourceSection > .smart-source-menu { width: 100%; margin-top: 9px; }
  .storefront #smartSourceSection .smart-source-options { max-height: 170px; }
  .storefront .smart-filter-dialog.is-supplier #smartSourceSection,
  .storefront .smart-filter-dialog.is-supplier #smartCountrySection,
  .storefront .smart-filter-dialog.is-supplier.has-attributes #smartAttributeSection,
  .storefront .smart-filter-dialog.is-supplier .smart-dialog-body > .smart-filter-section:last-child {
    grid-column: 1;
    grid-row: auto;
    width: auto;
  }
  .storefront #smartStockSection .smart-switch-row { min-height: 38px; }
  .storefront .smart-dialog-head { padding: 13px 16px; }
  .storefront .smart-dialog-foot { padding: 10px 13px; }
}
