/* Keep the finder in place while its filter workspace opens and closes. */
.storefront .catalog-toolbar,
.storefront .smart-filter-dialog { overflow-anchor: none; }
.storefront .smart-filter-dialog[open] {
  overflow: hidden;
  background: #fff;
  box-shadow: 0 20px 46px #182f4818;
}
.storefront .smart-filter-dialog[open]:not(.is-closing) {
  animation: filter-stable-enter .36s cubic-bezier(.2,.8,.2,1) both;
}
.storefront .smart-filter-dialog[open].is-closing {
  animation: filter-stable-exit .22s ease-in both;
}
@keyframes filter-stable-enter {
  from { opacity: 0; transform: translateY(-12px) scale(.99); clip-path: inset(0 0 92% 0 round 16px); }
  to { opacity: 1; transform: none; clip-path: inset(0 0 0 0 round 16px); }
}
@keyframes filter-stable-exit {
  from { opacity: 1; transform: none; clip-path: inset(0 0 0 0 round 16px); }
  to { opacity: 0; transform: translateY(-8px) scale(.995); clip-path: inset(0 0 85% 0 round 16px); }
}
.storefront .smart-dialog-head { padding: 19px 25px; }
.storefront .smart-dialog-head button {
  border-radius: 11px;
  font-size: 25px;
}
.storefront .smart-dialog-body {
  max-height: min(690px, 67dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
  padding: 18px 22px 21px;
  background: #f8fafc;
}
.storefront .smart-filter-section,
.storefront #smartSourceSection {
  border-color: #dce6f0;
  box-shadow: 0 4px 15px #172f4809;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.storefront .smart-filter-section:focus-within,
.storefront #smartSourceSection:focus-within {
  border-color: #dfb1be;
  box-shadow: 0 0 0 3px #c6113610, 0 7px 19px #172f480d;
}
.storefront #smartSourceSection > .smart-source-menu {
  margin-top: 5px;
  animation: filter-choice-enter .2s ease-out both;
}
@keyframes filter-choice-enter {
  from { opacity: 0; transform: translateY(-7px); }
  to { opacity: 1; transform: none; }
}
.storefront .smart-source-options { max-height: 235px; overscroll-behavior: contain; }
.storefront .smart-source-option {
  min-height: 55px;
  padding: 8px 11px;
  border: 1px solid transparent;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.storefront .smart-source-option:hover { transform: translateY(-1px); }
.storefront .smart-source-option img { flex: none; width: 33px; height: 33px; object-fit: contain; }
.storefront .smart-source-option[aria-pressed="true"] { border-color: #e6aebb; }
.storefront .smart-source-option[aria-pressed="true"] .smart-source-check { display: inline-grid; place-items: center; }
.storefront .smart-price-slider-caption { align-items: flex-start; }
.storefront #smartPriceRangeLabel { max-width: 65%; line-height: 1.4; }
.storefront .smart-price-clear {
  min-height: 28px;
  margin-top: 7px;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: #bc1740;
  font: 750 11px Montserrat, Arial, sans-serif;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.storefront .smart-price-clear:disabled { color: #9aabba; cursor: default; text-decoration: none; }
.storefront .smart-price-fields input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
.storefront .smart-price-fields input[type="number"]::-webkit-inner-spin-button,
.storefront .smart-price-fields input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.storefront #smartStockSection .smart-switch-row { min-height: 112px; }
.storefront #smartStockSection .smart-switch-row input { width: 49px; height: 28px; }
.storefront #smartStockSection .smart-switch-row input::before { width: 21px; height: 21px; }
.storefront #smartStockSection .smart-switch-row input:checked::before { transform: translateX(20px); }
.storefront .smart-filter-section > #smartSortSelect {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}
.storefront .smart-sort-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}
.storefront .smart-sort-choice {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #dbe5ef;
  border-radius: 10px;
  background: #fff;
  color: #263e59;
  font: 750 11px Montserrat, Arial, sans-serif;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.storefront .smart-sort-choice:hover { border-color: #ce8298; transform: translateY(-1px); }
.storefront .smart-sort-choice[aria-pressed="true"] {
  border-color: #c61136;
  background: #fff1f5;
  color: #a70f33;
}
.storefront .smart-sort-choice[aria-pressed="true"]::before {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: #c61136;
}
.storefront .smart-sort-choice:focus-visible,
.storefront .smart-price-clear:focus-visible { outline: 3px solid #c6113655; outline-offset: 2px; }
.storefront .smart-dialog-foot { background: #fff; }
.storefront .smart-dialog-foot button { transition: transform .18s ease, box-shadow .18s ease; }
.storefront .smart-dialog-foot button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 20px #172f481c; }
@media (max-width: 760px) {
  .storefront .smart-dialog-body { max-height: min(650px, 62dvh); padding: 12px; }
  .storefront #smartStockSection .smart-switch-row { min-height: 0; }
}
@media (max-width: 620px) {
  .storefront .smart-dialog-body { max-height: min(620px, 58dvh); overflow-y: auto; padding: 11px; }
  .storefront .smart-source-options { grid-template-columns: 1fr; max-height: 220px; }
  .storefront .smart-sort-choice { min-height: 45px; }
  .storefront .smart-dialog-foot { gap: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .storefront .smart-filter-dialog[open]:not(.is-closing),
  .storefront .smart-filter-dialog[open].is-closing,
  .storefront #smartSourceSection > .smart-source-menu { animation: none; }
  .storefront .smart-source-option,
  .storefront .smart-sort-choice,
  .storefront .smart-dialog-foot button { transition: none; }
  .storefront .smart-dialog-body { scroll-behavior: auto; }
}
