.ph-filter-rail, .ph-filter-close { display: none; }
.ph-mobile-facets .ph-filter-rail {
  display: flex; gap: 6px; flex: 0 0 100%; grid-column: 1 / -1;
  width: 100%; min-width: 0; max-width: 100%; overflow-x: auto;
  margin: 8px 0 12px; padding: 2px 1px 5px; scrollbar-width: thin;
}
.ph-filter-chip {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  min-height: 44px; padding: 0 14px; border: 1px solid #aaa59e; border-radius: 99px;
  background: #fff; color: #242320; line-height: 1.2;
  font-family: inherit; font-size: 14px; font-weight: 600; white-space: nowrap;
}
.ph-filter-all { background: #242320; border-color: #242320; color: white; }
.ph-filter-all::before { content: ''; width: 14px; height: 12px;
  background: linear-gradient(currentColor,currentColor) center 2px / 100% 1px,
    linear-gradient(currentColor,currentColor) center 9px / 100% 1px,
    linear-gradient(currentColor,currentColor) 3px 0 / 2px 5px,
    linear-gradient(currentColor,currentColor) 9px 7px / 2px 5px; background-repeat: no-repeat; }
.ph-filter-category::before { content: '≡'; }
.ph-filter-selected { color: #903e2c; border-color: currentColor; background: #fcf3ef; }
.ph-mobile-facets #amazzing_filter .compact-toggle { display: none; }
/* Keep the results action inside the visible screen even with a long category tree. */
body.ph-mobile-facets.show-filter #amazzing_filter {
  position: fixed; inset: 0; transform: none; margin: 0; padding: 0;
  box-sizing: border-box; width: 100%; height: 100vh; height: 100dvh;
  min-height: 0; max-height: none; overflow: hidden;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-columns: minmax(0, 1fr);
}
body.ph-mobile-facets.show-filter #amazzing_filter .title_block {
  display: block; grid-row: 1; margin: 0; padding: 16px 60px 16px 16px;
  box-sizing: border-box; min-height: 56px;
  background: #233c30 !important; color: #f2edda !important;
  border-bottom: 1px solid #698374; font-weight: 700;
}
body.ph-mobile-facets.show-filter #amazzing_filter .title_block :where(span, strong, b) {
  color: inherit !important;
}
.ph-mobile-facets.show-filter #amazzing_filter .ph-filter-close {
  display: grid; place-items: center; position: absolute; z-index: 2; top: 6px; right: 8px;
  box-sizing: border-box; width: 44px; height: 44px; padding: 0; background: #324e3f; color: #f2edda;
  border: 1px solid #a6bba7; border-radius: 50%; font-size: 26px; line-height: 1;
}
.ph-mobile-facets.show-filter #amazzing_filter .ph-filter-close:focus-visible {
  outline: 2px solid #f2edda; outline-offset: 2px;
}
body.ph-mobile-facets.show-filter #amazzing_filter > .block_content {
  grid-row: 2; min-height: 0; max-height: none; height: auto;
  overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: contain;
  padding: 12px 16px; -webkit-overflow-scrolling: touch;
}
body.ph-mobile-facets.show-filter #amazzing_filter .af_filter ul {
  max-height: none; overflow: visible;
}
.ph-mobile-facets.show-filter #amazzing_filter .af-form { padding-bottom: 8px; }
.ph-mobile-facets.show-filter #amazzing_filter .btn-holder {
  position: static; grid-row: 3; margin: 0; padding: 10px 16px max(10px, env(safe-area-inset-bottom)); background: white;
}
.ph-mobile-facets #amazzing_filter .viewFilteredProducts { border-radius: 24px; background: #242320; color: white; }
.ph-filter-chip:focus-visible, .ph-filter-close:focus-visible { outline: 2px solid #903e2c; outline-offset: -3px; }

/* Place expansion controls below the last option in the mobile drawer. */
body.ph-mobile-facets.show-filter #amazzing_filter .toggle-cut-off {
  position: static; margin: 6px 0 0; text-align: start;
  background: transparent !important;
}
body.ph-mobile-facets.show-filter #amazzing_filter .toggle-cut-off > span,
body.ph-mobile-facets.show-filter #amazzing_filter .toggleMoreFilters {
  box-sizing: border-box; min-height: 44px; padding: 10px 16px;
  border: 1px solid #819c88; border-radius: 24px;
  background: #233c30 !important; color: #f2edda !important;
  font: inherit; font-weight: 600; line-height: 22px; letter-spacing: normal;
}
body.ph-mobile-facets.show-filter #amazzing_filter .toggleMoreFilters > span {
  background: transparent !important; color: inherit !important;
}
body.ph-mobile-facets.show-filter #amazzing_filter .toggle-cut-off > span::after {
  content: ''; display: inline-block; width: 7px; height: 7px; margin-inline-start: 10px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
body.ph-mobile-facets.show-filter #amazzing_filter .toggle-cut-off > .less::after {
  transform: translateY(2px) rotate(225deg);
}
body.ph-mobile-facets.show-filter #amazzing_filter .toggle-cut-off:focus-visible > span,
body.ph-mobile-facets.show-filter #amazzing_filter .toggleMoreFilters:focus-visible {
  outline: 2px solid #f2edda; outline-offset: 2px;
}
