/* Mobile only. The original sidebar returns at Astra's desktop breakpoint. */
.abik-filter-toolbar { display: none; }
.abik-shop-search { display: none; }
#abik-filter-drawer:not([open]) { display: none !important; }
#abik-filter-drawer {
  box-sizing: border-box;
  position: fixed;
  inset: 0 auto 0 0;
  margin: 0;
  padding: 0;
  width: calc(100vw - 48px);
  max-width: 430px;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  border: 0;
  background: #fff;
  color: #292724;
  overflow: hidden;
  box-shadow: 8px 0 30px rgba(0,0,0,.14);
}
#abik-filter-drawer[open] { display: flex; flex-direction: column; }
#abik-filter-drawer::backdrop { background: rgba(0,0,0,.42); }
#abik-filter-drawer.abik-filter-enter { animation: abik-filter-slide .22s ease-out; }
#abik-filter-drawer.abik-filter-exit { animation: abik-filter-slide-out .22s ease-in forwards; }
#abik-filter-drawer.abik-filter-enter::backdrop { animation: abik-filter-backdrop-in .22s ease-out; }
#abik-filter-drawer.abik-filter-exit::backdrop { animation: abik-filter-backdrop-out .22s ease-in forwards; }
@keyframes abik-filter-slide { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes abik-filter-slide-out { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@keyframes abik-filter-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes abik-filter-backdrop-out { from { opacity: 1; } to { opacity: 0; } }
#abik-filter-drawer .abik-filter-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: max(16px, env(safe-area-inset-top)) 20px 16px;
  border-bottom: 1px solid #e3ded5;
  background: #f4efe5;
}
#abik-filter-title { margin: 0; font-size: 22px; line-height: 1.3; }
#abik-filter-drawer .abik-filter-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #c7bca8;
  border-radius: 4px;
  background: transparent;
  color: #292724;
  font: 30px/1 Arial, sans-serif;
  cursor: pointer;
}
#abik-filter-drawer .abik-filter-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 20px max(28px, env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
}
body.woocommerce.archive #abik-filter-drawer #secondary {
  display: block !important;
  position: static !important;
  box-sizing: border-box !important;
  float: none !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
#abik-filter-drawer .widget { margin-bottom: 24px; }
#abik-filter-drawer .wpc-filters-section {
  margin-bottom: 0;
  padding: 16px 0;
  border-bottom: 1px solid #e3ded5;
}
#abik-filter-drawer .wpc-filter-header { margin-bottom: 0; }
/* Selected options remain in the chips; omit duplicate summaries below headings. */
#abik-filter-drawer .wpc-filter-header .wpc-filter-selected-values {
  display: none !important;
}
/* Each drawer opening starts with headings only, regardless of saved desktop state. */
#abik-filter-drawer .wpc-filters-section[data-abik-fold="closed"] .wpc-filter-content {
  display: none !important;
}
#abik-filter-drawer .wpc-filters-section[data-abik-fold="open"] .wpc-filter-content {
  display: block !important;
  height: auto !important;
  max-height: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}
#abik-filter-drawer [data-abik-fold] .wpc-open-icon { display: none !important; }
#abik-filter-drawer [data-abik-fold] .wpc-filter-header button::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 12px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  vertical-align: .2em;
}
#abik-filter-drawer [data-abik-fold="open"] .wpc-filter-header button::after {
  transform: rotate(225deg);
  vertical-align: -.1em;
}
#abik-filter-drawer .wpc-filters-open-button-container { display: none !important; }
#abik-filter-drawer :focus-visible, .abik-filter-toolbar :focus-visible {
  outline: 3px solid #806329;
  outline-offset: 3px;
}
@media (max-width: 921px) {
  body.abik-mobile-filters .abik-empty-search-widget { display: none !important; }
  body.abik-mobile-filters .abik-shop-search { display: block; margin: 0 0 24px; width: 100%; }
  body.abik-mobile-filters .abik-shop-search .widget { margin: 0; }
  body.abik-mobile-filters .abik-shop-search form { margin: 0; }
  body.abik-mobile-filters .abik-shop-search .woocommerce-product-search { display: flex; gap: 8px; align-items: stretch; }
  body.abik-mobile-filters .abik-shop-search input[type="search"] { flex: 1 1 auto; min-width: 0; width: 100%; min-height: 46px; }
  body.abik-mobile-filters .abik-shop-search button[type="submit"] { flex: 0 0 auto; min-height: 46px; }
  body.abik-mobile-filters .abik-filter-toolbar { display: block; margin: 16px 0 20px; clear: both; }
  body.abik-mobile-filters .abik-filter-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 10px 22px;
    background: #f4efe5;
    color: #292724;
    border: 1px solid #998a70;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .04em;
    cursor: pointer;
  }
  body.abik-mobile-filters #primary { width: 100% !important; }
}
@media (prefers-reduced-motion: reduce) {
  #abik-filter-drawer.abik-filter-enter, #abik-filter-drawer.abik-filter-exit,
  #abik-filter-drawer.abik-filter-enter::backdrop, #abik-filter-drawer.abik-filter-exit::backdrop { animation: none; }
}

/* Small lists need no term search; keep a nonempty query accessible. */
#abik-filter-drawer [data-abik-short-list] .wpc-filter-search-wrapper { display: none !important; }
