/* Compact catalog controls: each choice sits beside the information needed to make it. */
.storefront .catalog-toolbar.is-filter-open .catalog-filter-status { display: none !important; }
.storefront .smart-filter-dialog[open] {
  border: 1px solid #dce5ee;
  border-top: 3px solid #c61136;
  border-radius: 16px;
  background: #f7f9fc;
  box-shadow: 0 15px 32px #19355010;
}
.storefront .smart-dialog-head {
  padding: 17px 23px 15px;
  border-top: 0;
  background: #fff;
}
.storefront .smart-dialog-head h2 { margin-top: 3px; font-size: 21px; }
.storefront .smart-dialog-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 14px;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 18px 23px 20px;
  background: #f7f9fc;
}
.storefront .smart-filter-section,
.storefront #smartSourceSection {
  display: block;
  min-width: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 18px;
  border: 1px solid #dfe7f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px #19355006;
}
.storefront .smart-filter-section[hidden] { display: none !important; }
.storefront #smartCategorySection { display: none !important; }
.storefront .smart-filter-section-title,
.storefront #smartSourceSection .smart-filter-section-title { margin: 0 0 14px; }
.storefront .smart-filter-section-title h3 { gap: 10px; font-size: 15px; }
.storefront .smart-filter-section-title > span:not(.smart-section-icon) {
  margin: 2px 0 0 49px;
  color: #7b8fa4;
  font-size: 11px;
}
.storefront .smart-filter-section-title h3 .smart-section-icon,
.storefront .smart-switch-row strong .smart-section-icon {
  width: 38px;
  height: 38px;
  border: 1px solid #f3dce3;
  border-radius: 10px;
  background: #fff2f5;
}
.storefront .smart-filter-section-title h3 .smart-section-icon svg,
.storefront .smart-switch-row strong .smart-section-icon svg { width: 20px; height: 20px; }
.storefront #smartSourceSection {
  position: relative;
  z-index: 4;
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(200px, 27%) minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}
.storefront #smartSourceSection .smart-filter-section-title { margin: 0; }
.storefront #smartSourceSection .smart-source-picker { position: relative; width: 100%; max-width: none; }
.storefront .smart-source-trigger {
  min-height: 66px;
  padding: 9px 13px;
  border-radius: 11px;
  background: #fafbfd;
}
.storefront .smart-source-trigger:hover,
.storefront .smart-source-trigger[aria-expanded="true"] { background: #fff7f9; }
.storefront .smart-source-trigger img { width: 36px; height: 36px; padding: 4px; }
.storefront .smart-source-trigger .smart-source-copy {
  display: grid;
  flex: 1;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
  white-space: normal;
}
.storefront .smart-source-copy strong,
.storefront .smart-source-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.storefront .smart-source-copy strong { color: #172d49; font-size: 14px; }
.storefront .smart-source-copy small { color: #7b8fa4; font-size: 10px; font-weight: 650; }
.storefront .smart-source-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  margin: 0;
  border-radius: 12px;
  box-shadow: 0 18px 38px #162e4a29;
}
.storefront .smart-source-options { max-height: 256px; }
.storefront #smartPriceSection {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 0 24px;
}
.storefront #smartPriceSection .smart-filter-section-title { grid-column: 1 / -1; grid-row: 1; }
.storefront #smartPriceSection .smart-price-slider {
  grid-column: 1;
  grid-row: 2;
}
.storefront #smartPriceSection .smart-price-fields {
  grid-column: 2;
  grid-row: 2;
}
.storefront #smartPriceSection .smart-price-slider,
.storefront .smart-price-fields,
.storefront .smart-filter-section > select,
.storefront #smartCountrySearch,
.storefront #smartCountryOptions,
.storefront .smart-attribute-options { width: 100%; max-width: none; }
.storefront #smartPriceSection .smart-filter-section-title { margin-bottom: 12px; }
.storefront .smart-price-slider-caption { font-size: 11px; }
.storefront .smart-price-track { margin-top: 10px; }
.storefront .smart-price-scale { margin-bottom: 11px; }
.storefront .smart-price-scale span:nth-child(2),
.storefront .smart-price-scale span:nth-child(3) { display: none; }
.storefront .smart-price-fields { gap: 12px; }
.storefront .smart-price-fields input { height: 44px; }
.storefront #smartStockSection { padding: 18px; }
.storefront #smartStockSection .smart-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 100%;
}
.storefront #smartStockSection .smart-switch-row > span { padding: 0; }
.storefront #smartStockSection .smart-switch-row strong { gap: 10px; font-size: 14px; }
.storefront #smartStockSection .smart-switch-row small { margin: 3px 0 0 49px; font-size: 11px; }
.storefront #smartStockSection .smart-switch-row input { flex: none; margin: 0; }
.storefront .smart-filter-section > select { height: 48px; background: #fafbfd; font-size: 13px; }
.storefront .smart-filter-dialog.is-supplier #smartCountrySection {
  grid-column: 1;
  grid-row: 2 / span 2;
}
.storefront .smart-filter-dialog.is-supplier.has-attributes #smartAttributeSection {
  grid-column: 2;
  grid-row: 2;
}
.storefront .smart-filter-dialog.is-supplier.has-attributes .smart-filter-section:last-child {
  grid-column: 2;
  grid-row: 3;
}
.storefront .smart-filter-dialog.is-supplier:not(.has-attributes) .smart-filter-section:last-child {
  grid-column: 2;
  grid-row: 2;
}
.storefront .smart-dialog-foot {
  gap: 14px;
  padding: 14px 23px;
  border-top: 1px solid #e1e8f0;
  background: #fff;
}
.storefront #smartFilterPreview { margin-left: auto; color: #526b85; font-size: 12px; font-weight: 750; }
.storefront #smartFilterApply { min-width: 156px; min-height: 45px; font-size: 12px; }
@media (max-width: 760px) {
  .storefront .smart-dialog-body { gap: 10px; padding: 14px; }
  .storefront .smart-filter-section,
  .storefront #smartSourceSection { padding: 14px; }
  .storefront .smart-dialog-head,
  .storefront .smart-dialog-foot { padding-right: 14px; padding-left: 14px; }
}
@media (max-width: 620px) {
  .storefront .smart-filter-dialog[open] { border-radius: 14px; }
  .storefront .smart-dialog-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    max-height: none;
    overflow: visible;
    padding: 11px;
  }
  .storefront .smart-filter-section,
  .storefront #smartSourceSection { padding: 13px; }
  .storefront #smartSourceSection,
  .storefront #smartPriceSection { display: block; }
  .storefront .smart-filter-dialog.is-supplier #smartCountrySection,
  .storefront .smart-filter-dialog.is-supplier #smartAttributeSection,
  .storefront .smart-filter-dialog.is-supplier .smart-filter-section:last-child {
    grid-column: auto;
    grid-row: auto;
  }
  .storefront .smart-filter-section-title,
  .storefront #smartSourceSection .smart-filter-section-title { margin-bottom: 10px; }
  .storefront .smart-filter-section-title h3 { font-size: 13px; }
  .storefront .smart-filter-section-title > span:not(.smart-section-icon) { margin-left: 47px; font-size: 10px; }
  .storefront .smart-source-copy small {
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.3;
  }
  .storefront #smartStockSection .smart-switch-row small { font-size: 10px; }
  .storefront .smart-source-menu { position: static; margin-top: 7px; }
  .storefront .smart-dialog-foot { gap: 8px; }
  .storefront #smartFilterPreview { margin: 0; }
}

/* One aligned filter surface instead of separate cards with empty space. */
.storefront .smart-filter-dialog[open] { background: #fff; }
.storefront .smart-dialog-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: calc(100% - 48px);
  max-width: 1080px;
  margin: 18px auto;
  padding: 0 28px;
  border: 1px solid #e0e8f1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 25px #17345609;
}
.storefront .smart-filter-section,
.storefront #smartSourceSection,
.storefront #smartPriceSection {
  display: grid;
  grid-template-columns: minmax(210px, 29%) minmax(0, 1fr);
  align-items: center;
  column-gap: 28px;
  row-gap: 14px;
  width: 100%;
  margin: 0;
  padding: 21px 0;
  border: 0;
  border-bottom: 1px solid #e8eef4;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.storefront .smart-dialog-body > .smart-filter-section:last-child { border-bottom: 0; }
.storefront .smart-filter-section-title,
.storefront #smartSourceSection .smart-filter-section-title,
.storefront #smartPriceSection .smart-filter-section-title {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
}
.storefront .smart-filter-section-title h3,
.storefront #smartStockSection .smart-switch-row strong { font-size: 14px; }
.storefront .smart-filter-section-title > span:not(.smart-section-icon),
.storefront #smartStockSection .smart-switch-row small {
  margin-top: 4px;
  color: #788da4;
  font-size: 11px;
}
.storefront #smartSourceSection { z-index: 5; }
.storefront #smartSourceSection .smart-source-picker,
.storefront .smart-filter-section > select { grid-column: 2; width: 100%; max-width: none; }
.storefront .smart-source-trigger { min-height: 54px; padding: 8px 12px; background: #f9fbfd; }
.storefront .smart-filter-section > select { height: 50px; }
.storefront #smartPriceSection { align-items: start; }
.storefront #smartPriceSection .smart-filter-section-title { grid-row: 1 / span 2; }
.storefront #smartPriceSection .smart-price-slider {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  max-width: none;
}
.storefront #smartPriceSection .smart-price-fields {
  grid-column: 2;
  grid-row: 2;
  width: 100%;
  max-width: none;
  margin-top: 2px;
}
.storefront .smart-price-scale { margin-bottom: 0; }
.storefront #smartStockSection { display: block; padding: 19px 0; }
.storefront #smartStockSection .smart-switch-row {
  display: grid;
  grid-template-columns: minmax(210px, 29%) minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  min-height: 0;
}
.storefront #smartStockSection .smart-switch-row input {
  justify-self: start;
  margin: 0;
}
.storefront .smart-dialog-foot { padding: 14px 25px; }
@media (max-width: 760px) {
  .storefront .smart-dialog-body { width: calc(100% - 28px); padding: 0 20px; }
  .storefront .smart-filter-section,
  .storefront #smartSourceSection,
  .storefront #smartPriceSection,
  .storefront #smartStockSection .smart-switch-row {
    grid-template-columns: minmax(165px, 31%) minmax(0, 1fr);
    column-gap: 18px;
  }
}
@media (max-width: 620px) {
  .storefront .smart-dialog-body {
    width: calc(100% - 20px);
    margin: 10px auto;
    padding: 0 16px;
    border-radius: 13px;
    overflow: visible;
  }
  .storefront .smart-filter-section,
  .storefront #smartSourceSection,
  .storefront #smartPriceSection {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 18px 0;
  }
  .storefront .smart-filter-section-title,
  .storefront #smartSourceSection .smart-filter-section-title,
  .storefront #smartPriceSection .smart-filter-section-title { width: 100%; margin: 0; }
  .storefront #smartPriceSection .smart-price-slider,
  .storefront #smartPriceSection .smart-price-fields { width: 100%; margin: 0; }
  .storefront #smartStockSection { padding: 17px 0; }
  .storefront #smartStockSection .smart-switch-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
  }
  .storefront #smartStockSection .smart-switch-row input { flex: none; }
  .storefront .smart-dialog-foot { flex-wrap: wrap; }
}

/* Price uses the full left column; availability and sort fill the right column. */
@media (min-width: 761px) {
  .storefront .smart-dialog-body {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
    column-gap: 30px;
    width: calc(100% - 48px);
    max-width: none;
    padding: 0 28px;
  }
  .storefront #smartSourceSection {
    grid-column: 1 / -1;
    grid-row: 1;
    grid-template-columns: 250px minmax(0, 1fr);
  }
  .storefront #smartPriceSection {
    grid-column: 1;
    grid-row: 2 / span 2;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 13px;
    padding-right: 28px;
    border-right: 1px solid #e8eef4;
    border-bottom: 0;
  }
  .storefront #smartPriceSection .smart-filter-section-title { margin-bottom: 4px; }
  .storefront #smartPriceSection .smart-price-fields { margin-top: 2px; }
  .storefront #smartStockSection {
    grid-column: 2;
    grid-row: 2;
    padding: 21px 0;
  }
  .storefront #smartStockSection .smart-switch-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
  }
  .storefront #smartStockSection .smart-switch-row input { flex: none; }
  .storefront .smart-dialog-body > .smart-filter-section:last-child {
    grid-column: 2;
    grid-row: 3;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 13px;
  }
  .storefront .smart-filter-dialog.is-supplier .smart-dialog-body { display: flex; }
  .storefront .smart-filter-dialog.is-supplier .smart-dialog-body > .smart-filter-section:last-child {
    display: grid;
    grid-template-columns: minmax(210px, 29%) minmax(0, 1fr);
    align-items: center;
  }
}
.storefront .smart-filter-section-title h3 .smart-section-icon,
.storefront .smart-switch-row strong .smart-section-icon {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #bf173a;
}
.storefront .smart-filter-section-title h3 .smart-section-icon svg,
.storefront .smart-switch-row strong .smart-section-icon svg { width: 21px; height: 21px; }
.storefront .smart-filter-section-title > span:not(.smart-section-icon),
.storefront #smartStockSection .smart-switch-row small { margin-left: 34px; }
.storefront .smart-source-trigger img { width: 32px; height: 32px; padding: 0; background: transparent; }
@media (max-width: 760px) {
  .storefront .smart-dialog-body { max-width: none; }
}

/* A narrow, searchable picker that leaves the other controls visible. */
.storefront #smartSourceSection .smart-source-picker { min-width: 0; }
.storefront .smart-source-trigger {
  min-height: 54px;
  border: 1px solid #d5e0eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 10px #18334f0a;
}
.storefront .smart-source-trigger:hover,
.storefront .smart-source-trigger[aria-expanded="true"] {
  border-color: #d095a6;
  background: #fff;
  box-shadow: 0 0 0 3px #c6113610;
}
.storefront .smart-source-menu {
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  width: min(100%, 480px);
  margin: 0;
  padding: 11px;
  border: 1px solid #dce5ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 45px #142b4650;
}
.storefront .smart-source-search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 13px;
  border: 1px solid #d8e3ed;
  border-radius: 10px;
  background: #f7f9fc;
  color: #b7183d;
}
.storefront .smart-source-search:focus-within {
  border-color: #c51b42;
  background: #fff;
  box-shadow: 0 0 0 3px #c51b4213;
}
.storefront .smart-source-search svg { flex: none; width: 19px; height: 19px; }
.storefront .smart-source-search input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #172d49;
  font: 650 13px Montserrat, Arial, sans-serif;
}
.storefront .smart-source-search input::placeholder { color: #8a9aad; font-weight: 550; }
.storefront .smart-source-options {
  max-height: min(320px, 48dvh);
  margin-top: 7px;
  padding-right: 3px;
}
.storefront .smart-source-option {
  min-height: 48px;
  margin: 2px 0;
  padding: 6px 9px;
  border-radius: 9px;
}
.storefront .smart-source-option:hover,
.storefront .smart-source-option:focus-visible {
  border-color: #dce5ef;
  background: #f6f8fb;
  outline: none;
}
.storefront .smart-source-option[aria-pressed="true"] {
  border-color: #efc3d0;
  background: #fff2f5;
}
.storefront .smart-source-empty { margin: 0; padding: 22px 11px; color: #6f8298; font-size: 12px; line-height: 1.5; }

/* The catalog search uses the magnifier as its single, clear action. */
.storefront .catalog-toolbar .catalog-product-search {
  height: 58px;
  min-height: 58px;
  padding: 0 16px 0 63px;
  border: 1px solid #d2deea;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 3px 12px #172f4810;
}
.storefront .catalog-toolbar .catalog-product-search:hover { border-color: #b9c9d8; box-shadow: 0 5px 15px #172f4815; }
.storefront .catalog-toolbar .catalog-product-search:focus-within {
  border-color: #c31a40;
  box-shadow: 0 0 0 3px #c31a4016, 0 5px 16px #172f4813;
}
.storefront .catalog-toolbar .catalog-product-search input { width: 100%; height: 50px; font-size: 15px; font-weight: 600; }
.storefront .catalog-toolbar .catalog-product-search input::placeholder { color: #8799ad; }
.storefront .catalog-search-submit {
  top: 8px;
  right: auto;
  left: 8px;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #f5f7fa;
  color: #ba183e;
}
.storefront .catalog-search-submit:hover { background: #fff0f4; color: #a60f34; }
.storefront .smart-suggestions { border-radius: 13px; box-shadow: 0 18px 38px #172f482b; }
@media (max-width: 620px) {
  .storefront .smart-source-menu { position: static; width: 100%; margin-top: 8px; }
  .storefront .smart-source-options { max-height: min(280px, 45dvh); }
  .storefront .catalog-toolbar .catalog-product-search { height: 54px; min-height: 54px; padding: 0 12px 0 57px; }
  .storefront .catalog-search-submit { top: 7px; left: 7px; width: 40px; height: 40px; }
}

/* Expand the section picker in place so it cannot cover price or Apply. */
.storefront #smartSourceSection { align-items: start; }
.storefront #smartSourceSection .smart-filter-section-title { padding-top: 8px; }
.storefront .smart-source-menu {
  position: static;
  width: 100%;
  margin-top: 9px;
  box-shadow: 0 7px 20px #142b4612;
}
.storefront .smart-source-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 3px 8px;
  max-height: 260px;
}
.storefront .smart-source-heading,
.storefront .smart-source-empty { grid-column: 1 / -1; }
.storefront .smart-source-heading { margin: 8px 6px 2px; }
.storefront .smart-source-option { min-width: 0; }
.storefront .smart-source-option-label strong { font-size: 11px; }
.storefront .smart-source-search input:focus,
.storefront .smart-source-search input:focus-visible { outline: 0; box-shadow: none; }
.storefront #smartSourceSection { row-gap: 9px; }
.storefront #smartSourceSection > .smart-source-menu {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  margin: 0;
}
.storefront .smart-source-option[aria-pressed="true"] { grid-column: 1 / -1; }
.storefront .smart-source-rank { display: none; }
.storefront #smartSourceSearch:focus,
.storefront #smartSourceSearch:focus-visible { border: 0 !important; outline: 0 !important; box-shadow: none !important; }
@media (max-width: 620px) {
  .storefront #smartSourceSection .smart-filter-section-title { padding-top: 0; }
  .storefront .smart-source-options { grid-template-columns: minmax(0, 1fr); max-height: 250px; }
  .storefront .smart-source-option-label strong { font-size: 12px; }
}
