/**
 * AE Smart Filters — Horizontal Filter Bar
 *
 * Clean, minimal, professional aesthetic for a premium firearms retailer.
 * Horizontal dropdown filter bar above the product grid.
 */

/* ==========================================================================
   1. GENERAL / RESET
   ========================================================================== */

.ae-sf-sidebar *,
.ae-sf-sort-bar *,
.ae-sf-mobile-bar *,
.ae-sf-drawer *,
.ae-sf-active-filters * {
  box-sizing: border-box;
}

/* Hide WooCommerce default sorting & result count — our plugin provides its own */
.ae-smart-filters-enabled .woocommerce-result-count,
.ae-smart-filters-enabled .woocommerce-ordering {
  display: none !important;
}

/* Hide "New" toggle if it shows from stale cache — all inventory is new */
.ae-sf-toggle-btn[data-filter="is_new"] {
  display: none !important;
}

/* Override Astra's `display: flex !important` on product elements when filtering */
ul.products > .ae-sf-hidden,
.woocommerce ul.products li.product.ae-sf-hidden {
  display: none !important;
}

/* Push product grid below filter dropdowns in stacking order */
.ae-smart-filters-enabled ul.products {
  position: relative;
  z-index: 0;
}

/* ==========================================================================
   2. HORIZONTAL FILTER BAR
   ========================================================================== */

.ae-sf-sidebar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0;
  margin-bottom: 8px;
  border-bottom: 1px solid #e0e0e0;
  font-family: inherit;
  font-size: 14px;
  color: #333;
}

.ae-sf-filter-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

/* ==========================================================================
   3. TOGGLE BUTTONS (On Sale, New)
   ========================================================================== */

.ae-sf-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  color: #444;
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all 200ms ease;
  white-space: nowrap;
  line-height: 1.3;
}

.ae-sf-toggle-btn:hover {
  border-color: #333;
  color: #333;
}

.ae-sf-toggle-btn.active {
  background-color: #333;
  border-color: #333;
  color: #fff;
}

.ae-sf-toggle-btn.active:hover {
  background-color: #222;
}

.ae-sf-toggle-btn:focus-visible {
  outline: 2px solid #333;
  outline-offset: 2px;
}

.ae-sf-toggle-count {
  font-size: 11px;
  opacity: 0.7;
}

/* ==========================================================================
   4. DROPDOWN SECTIONS
   ========================================================================== */

.ae-sf-section {
  position: relative;
  display: inline-flex;
}

/* Expanded section needs high z-index so dropdown overlays the product grid */
.ae-sf-section.expanded {
  z-index: 999;
}

/* Dropdown trigger button */
.ae-sf-section-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  user-select: none;
  transition: all 200ms ease;
  white-space: nowrap;
}

.ae-sf-section-header:hover {
  border-color: #333;
}

.ae-sf-section.expanded .ae-sf-section-header {
  border-color: #333;
  background: #fafafa;
}

/* Highlight header when filters are selected */
.ae-sf-section.has-selections .ae-sf-section-header {
  border-color: #333;
  background: #333;
  color: #fff;
}

.ae-sf-section.has-selections .ae-sf-section-header .ae-sf-chevron {
  border-color: #fff;
}

.ae-sf-section-header:focus-visible {
  outline: 2px solid #333;
  outline-offset: 2px;
}

.ae-sf-section-title {
  font-size: 13px;
  font-weight: 500;
  color: inherit;
  line-height: 1.3;
}

/* Chevron */
.ae-sf-chevron {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #666;
  border-bottom: 1.5px solid #666;
  transform: rotate(45deg);
  transition: transform 200ms ease;
  flex-shrink: 0;
  margin-top: -2px;
}

.ae-sf-section.expanded .ae-sf-chevron {
  transform: rotate(225deg);
  margin-top: 2px;
}

/* Dropdown panel (hidden by default) */
.ae-sf-section-body {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 999;
  margin-top: 4px;
  min-width: 240px;
}

.ae-sf-section.expanded .ae-sf-section-body {
  display: block;
}

.ae-sf-dropdown-panel {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  padding: 8px 8px 0 8px;
  max-height: 480px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
  position: relative;
}

/* Scroll-down indicator at bottom of dropdown */
.ae-sf-scroll-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
  color: #bbb;
  font-size: 12px;
  pointer-events: none;
}

.ae-sf-scroll-indicator::before {
  content: '▼';
  font-size: 10px;
}

.ae-sf-dropdown-panel::-webkit-scrollbar {
  width: 4px;
}

.ae-sf-dropdown-panel::-webkit-scrollbar-track {
  background: transparent;
}

.ae-sf-dropdown-panel::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 2px;
}

/* Clear button inside dropdown */
.ae-sf-dropdown-clear {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 6px 0;
  font-size: 12px;
  color: #999;
  text-align: center;
  cursor: pointer;
  background: none;
  border: none;
  border-top: 1px solid #eee;
  font-family: inherit;
  transition: color 200ms ease;
}

.ae-sf-dropdown-clear:hover {
  color: #333;
}

/* ==========================================================================
   5. SEARCHABLE DROPDOWN (inside panels)
   ========================================================================== */

.ae-sf-search-wrap {
  margin-bottom: 4px;
}

.ae-sf-search-input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  color: #333;
  background-color: #fafafa;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px center;
  transition: border-color 200ms ease;
}

.ae-sf-search-input::placeholder {
  color: #999;
}

.ae-sf-search-input:focus {
  outline: none;
  border-color: #333;
  background-color: #fff;
}

.ae-sf-search-list {
  max-height: 240px;
  overflow-y: auto;
  margin-top: 6px;
  padding: 0;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}

.ae-sf-search-list::-webkit-scrollbar {
  width: 4px;
}

.ae-sf-search-list::-webkit-scrollbar-track {
  background: transparent;
}

.ae-sf-search-list::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 2px;
}

.ae-sf-search-item {
  display: flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 4px 5px 0;
  border-radius: 0;
  cursor: pointer;
  transition: background-color 150ms ease;
  list-style: none;
  border-bottom: 1px solid #eee;
}

.ae-sf-search-item:last-child {
  border-bottom: none;
}

/* Hide the checkbox — selection is click-based */
.ae-sf-search-item input[type="checkbox"] {
  display: none;
}

.ae-sf-search-item .ae-sf-option-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  padding-left: 0;
  margin-left: 0;
}

.ae-sf-search-item .ae-sf-option-name {
  flex: 1;
  text-align: left;
  padding-left: 0;
  margin-left: 0;
}

.ae-sf-search-item .ae-sf-count-badge {
  flex-shrink: 0;
}

.ae-sf-search-item:hover {
  background-color: #f5f5f5;
}

.ae-sf-search-item.selected {
  background-color: #f0f0f0;
  font-weight: 500;
}

.ae-sf-search-item.selected .ae-sf-option-name::before {
  content: '\2713';
  display: inline-block;
  width: 16px;
  color: #333;
  font-weight: 700;
  margin-right: 2px;
}

.ae-sf-search-item.hidden {
  display: none;
}

.ae-sf-search-no-results {
  padding: 16px 8px;
  text-align: center;
  color: #999;
  font-size: 13px;
  font-style: italic;
}

/* Search Chips (within dropdown) */
.ae-sf-search-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.ae-sf-search-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #333;
  color: #fff;
  font-size: 12px;
  border-radius: 100px;
  line-height: 1.3;
  white-space: nowrap;
}

.ae-sf-search-chip button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  margin-left: 2px;
  opacity: 0.7;
  transition: opacity 200ms ease;
  line-height: 1;
}

.ae-sf-search-chip button:hover {
  opacity: 1;
}

/* ==========================================================================
   6. CHECKBOXES (inside dropdown panels)
   ========================================================================== */

.ae-sf-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  list-style: none;
}

.ae-sf-checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 5px 6px;
  border-radius: 0;
  transition: background-color 150ms ease;
  border-bottom: 1px solid #eee;
}

.ae-sf-checkbox-item:last-child {
  border-bottom: none;
}

.ae-sf-checkbox-item:hover {
  background-color: #f5f5f5;
}

.ae-sf-checkbox-item label {
  flex: 1;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.ae-sf-checkbox-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 16px;
  height: 16px;
  min-width: 16px;
  border: 1.5px solid #ccc;
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: background-color 200ms ease, border-color 200ms ease;
}

.ae-sf-checkbox-item input[type="checkbox"]:checked {
  background-color: #333;
  border-color: #333;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px;
}

.ae-sf-checkbox-item input[type="checkbox"]:focus-visible {
  outline: 2px solid #333;
  outline-offset: 2px;
}

.ae-sf-count-badge {
  font-size: 11px;
  color: #999;
  margin-left: auto;
  margin-right: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ae-sf-show-more {
  display: inline-block;
  margin-top: 6px;
  padding: 4px;
  font-size: 12px;
  color: #666;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  transition: color 200ms ease;
}

.ae-sf-show-more:hover {
  color: #333;
  text-decoration: underline;
}

.ae-sf-show-more:focus-visible {
  outline: 2px solid #333;
  outline-offset: 2px;
}

/* Overflow items */
.ae-sf-overflow {
  display: none !important;
}

.ae-sf-section.show-all .ae-sf-overflow {
  display: flex !important;
}

/* ==========================================================================
   7. PRICE RANGE SLIDER
   ========================================================================== */

.ae-sf-price-range {
  padding: 4px 0;
  min-width: 240px;
}

.ae-sf-range-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.ae-sf-range-inputs span {
  font-size: 13px;
  color: #999;
}

.ae-sf-range-input {
  width: 70px;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  color: #333;
  text-align: center;
  transition: border-color 200ms ease;
}

.ae-sf-range-input:focus {
  outline: none;
  border-color: #333;
}

.ae-sf-range-input::-webkit-outer-spin-button,
.ae-sf-range-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ae-sf-range-input[type="number"] {
  -moz-appearance: textfield;
}

.ae-sf-range-slider {
  position: relative;
  height: 24px;
  display: flex;
  align-items: center;
}

.ae-sf-range-track {
  position: absolute;
  height: 3px;
  background: #333;
  border-radius: 2px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 1;
}

.ae-sf-range-slider input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  width: 100%;
  height: 3px;
  background: transparent;
  pointer-events: none;
  margin: 0;
  top: 50%;
  transform: translateY(-50%);
}

.ae-sf-range-slider input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  background: #ddd;
  border-radius: 2px;
}

.ae-sf-range-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: #333;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  cursor: pointer;
  pointer-events: auto;
  margin-top: -6.5px;
  position: relative;
  z-index: 2;
}

.ae-sf-range-slider input[type="range"]::-moz-range-track {
  height: 3px;
  background: #ddd;
  border-radius: 2px;
  border: none;
}

.ae-sf-range-slider input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #333;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  cursor: pointer;
  pointer-events: auto;
}

.ae-sf-range-slider input[type="range"]:nth-child(2)::-webkit-slider-runnable-track {
  background: transparent;
}

.ae-sf-range-slider input[type="range"]:nth-child(2)::-moz-range-track {
  background: transparent;
}

/* ==========================================================================
   8. SORT BAR (inline in filter bar)
   ========================================================================== */

.ae-sf-right-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.ae-sf-sort-bar {
}

.ae-sf-sort-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 8px 32px 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #444;
  cursor: pointer;
  transition: border-color 200ms ease;
  font-family: inherit;
}

.ae-sf-sort-select:hover {
  border-color: #333;
}

.ae-sf-sort-select:focus-visible {
  outline: 2px solid #333;
  outline-offset: 2px;
}

/* ==========================================================================
   9. RESULT COUNT
   ========================================================================== */

.ae-sf-result-count {
  font-size: 13px;
  color: #666;
  line-height: 1.4;
}

/* ==========================================================================
   10. ACTIVE FILTER CHIPS (below filter bar)
   ========================================================================== */

.ae-sf-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 0;
  min-height: 0;
}

.ae-sf-active-filters:empty {
  display: none;
}

.ae-sf-active-filters.has-filters {
  padding: 10px 0;
}

.ae-sf-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #f0f0f0;
  color: #333;
  font-size: 13px;
  border-radius: 100px;
  line-height: 1.3;
  white-space: nowrap;
  transition: background-color 200ms ease;
}

.ae-sf-chip:hover {
  background: #e4e4e4;
}

.ae-sf-chip-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: none;
  border: none;
  color: #666;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  transition: color 200ms ease, background-color 200ms ease;
}

.ae-sf-chip-dismiss:hover {
  color: #333;
  background: rgba(0,0,0,0.08);
}

.ae-sf-chip-dismiss:focus-visible {
  outline: 2px solid #333;
  outline-offset: 2px;
}

.ae-sf-clear-all {
  font-size: 13px;
  color: #666;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px 8px;
  font-family: inherit;
  transition: color 200ms ease;
}

.ae-sf-clear-all:hover {
  color: #333;
  text-decoration: underline;
}

/* ==========================================================================
   11. MOBILE BAR & DRAWER (< 768px)
   ========================================================================== */

.ae-sf-mobile-bar {
  display: none;
}

.ae-sf-drawer {
  display: none;
}

.ae-sf-drawer-overlay {
  display: none;
}

@media (max-width: 767px) {
  .ae-sf-sidebar {
    display: none;
  }

  .ae-sf-mobile-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #222;
    z-index: 1000;
    align-items: center;
    justify-content: stretch;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.15);
    padding: 0;
    /* iOS safe area — keep buttons above the home indicator */
    padding-bottom: env(safe-area-inset-bottom, 0px);
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    -webkit-touch-callout: none;
  }

  .ae-sf-mobile-filter-btn,
  .ae-sf-mobile-sort-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: none;
    border: none;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    height: 100%;
    transition: background-color 200ms ease;
    min-height: 48px;
  }

  .ae-sf-mobile-filter-btn:hover,
  .ae-sf-mobile-sort-btn:hover {
    background: rgba(255,255,255,0.08);
  }

  .ae-sf-mobile-filter-btn {
    border-right: 1px solid rgba(255,255,255,0.12);
  }

  .ae-sf-mobile-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #c0392b;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 50%;
    line-height: 1;
  }

  .ae-sf-drawer-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 300ms ease;
  }

  .ae-sf-drawer-overlay.active {
    display: block;
    opacity: 1;
  }

  .ae-sf-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    max-height: 85vh;
    background: #fff;
    border-radius: 16px 16px 0 0;
    z-index: 1001;
    transform: translateY(100%);
    transition: transform 300ms ease;
    overflow: hidden;
  }

  .ae-sf-drawer.active {
    transform: translateY(0);
  }

  .ae-sf-drawer-handle {
    width: 40px;
    height: 4px;
    background: #ccc;
    border-radius: 2px;
    margin: 10px auto 0;
    flex-shrink: 0;
  }

  .ae-sf-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid #ddd;
    flex-shrink: 0;
  }

  .ae-sf-drawer-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
  }

  .ae-sf-drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 200ms ease;
    min-height: 48px;
    min-width: 48px;
  }

  .ae-sf-drawer-close:hover {
    background: #f0f0f0;
  }

  .ae-sf-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  /* In drawer, sections stack vertically as accordions */
  .ae-sf-drawer-body .ae-sf-sidebar {
    display: block;
    border-bottom: none;
    padding: 0;
  }

  .ae-sf-drawer-body .ae-sf-filter-form {
    display: block;
  }

  .ae-sf-drawer-body .ae-sf-section {
    display: block;
    border-bottom: 1px solid #eee;
  }

  .ae-sf-drawer-body .ae-sf-section-header {
    display: flex;
    border: none;
    border-radius: 0;
    padding: 14px 0;
    background: none;
  }

  .ae-sf-drawer-body .ae-sf-section-body {
    position: static;
    margin-top: 0;
    min-width: auto;
  }

  .ae-sf-drawer-body .ae-sf-dropdown-panel {
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0 0 12px 0;
  }

  .ae-sf-drawer-body .ae-sf-checkbox-item {
    min-height: 44px;
  }

  .ae-sf-drawer-body .ae-sf-search-item {
    min-height: 44px;
  }

  .ae-sf-drawer-body .ae-sf-toggle-btn {
    min-height: 44px;
    padding: 10px 16px;
    margin-bottom: 8px;
  }

  .ae-sf-drawer-body .ae-sf-sort-bar {
    margin-left: 0;
    margin-top: 12px;
  }

  .ae-sf-drawer-footer {
    flex-shrink: 0;
    padding: 12px 20px;
    border-top: 1px solid #ddd;
    background: #fff;
  }

  .ae-sf-drawer-apply-btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: #333;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: background-color 200ms ease;
    min-height: 48px;
  }

  .ae-sf-drawer-apply-btn:hover {
    background: #222;
  }

  body.ae-sf-filters-active {
    padding-bottom: 56px;
  }
}

/* ==========================================================================
   12. TABLET (768px - 1023px) — 2-row bar wraps naturally
   ========================================================================== */

@media (min-width: 768px) and (max-width: 1023px) {
  .ae-sf-sidebar {
    gap: 6px;
  }

  .ae-sf-section-header {
    padding: 7px 12px;
    font-size: 12px;
  }

  .ae-sf-drawer {
    max-width: 480px;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
  }

  .ae-sf-drawer.active {
    transform: translateX(-50%) translateY(0);
  }
}

/* ==========================================================================
   13. ACCESSIBILITY
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .ae-sf-toggle-btn,
  .ae-sf-chevron,
  .ae-sf-section-header,
  .ae-sf-search-input,
  .ae-sf-search-item,
  .ae-sf-checkbox-item,
  .ae-sf-chip,
  .ae-sf-chip-dismiss,
  .ae-sf-sort-select,
  .ae-sf-range-input,
  .ae-sf-show-more,
  .ae-sf-clear-all,
  .ae-sf-drawer,
  .ae-sf-drawer-overlay,
  .ae-sf-mobile-filter-btn,
  .ae-sf-mobile-sort-btn,
  .ae-sf-drawer-close,
  .ae-sf-drawer-apply-btn,
  .ae-sf-search-chip button,
  .ae-sf-dropdown-clear {
    transition: none;
  }
}
