/* 59B 手機篩選抽屜樣式（行為配合 mobile-filter.js） */
.fl-filter-fab { display: none; }

@media (max-width: 600px) {
  .fl-filter-fab {
    display: block;
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 9000;
    height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 23px;
    background: #E8735A;
    color: #fff;
    font-size: 15px;
    box-shadow: 0 4px 14px rgba(80,60,40,.18);
  }

  .fl-filter-drawer {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #FFF;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform .24s ease;
    visibility: hidden;
  }
  .fl-filter-drawer.fl-open { transform: translateY(0); visibility: visible; }

  .fl-fd-head {
    flex: 0 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    height: 56px; padding: 0 16px;
    border-bottom: 1px solid #EFE7DC;
    font-size: 16px; font-weight: 600;
  }
  .fl-fd-close {
    width: 36px; height: 36px; border: 0; border-radius: 18px;
    background: #F6F1EA; font-size: 15px;
  }
  .fl-fd-body { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 8px 16px 96px; }
  .fl-fd-foot {
    position: absolute; left: 0; right: 0; bottom: 0;
    display: flex; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: #FFF; border-top: 1px solid #EFE7DC;
  }
  .fl-fd-foot button { flex: 1; height: 48px; border-radius: 10px; font-size: 15px; }
  .fl-fd-clear { background: #FFF; border: 1px solid #DCD2C6; color: #4A4038; }
  .fl-fd-apply { background: #E8735A; border: 0; color: #fff; }

  /* 抽屜內的分組 */
  /* ── 中和主題附加 CSS 舊版 59B 手機規則 ───────────────────────
     主題仍留有 body.post-type-archive-product .berocket-aapf-gutenberg-block
     { position:fixed; inset:60px 0 0; transform:translateX(-102%) }
     JS open() 已把區塊搬進 .fl-filter-drawer，但舊規則仍生效會把整個區塊
     推到畫面左側 102% 外（抽屜只剩標題列與底部按鈕）。以下 scoped 中和。 */
  .fl-filter-drawer .berocket-aapf-gutenberg-block,
  .fl-filter-drawer .berocket-aapf-gutenberg-block.is-open,
  .fl-filter-drawer .berocket-aapf-gutenberg-block[aria-hidden="false"] {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    transition: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    width: auto !important;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    z-index: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .fl-fd-body .bapf_sfilter { border-bottom: 1px solid #F2EBE1; padding: 4px 0; }
  .fl-fd-body .bapf_head { padding: 12px 0; font-size: 15px; font-weight: 600; cursor: pointer; position: relative; }
  .fl-fd-body .bapf_head::after { content: "▾"; position: absolute; right: 2px; top: 12px; color: #9A8F84; }
  .fl-fd-body .fl-collapsed .bapf_head::after { content: "▸"; }
  .fl-fd-body .fl-collapsed .bapf_body { display: none; }
  .fl-fd-body .bapf_body label { display: flex; align-items: center; min-height: 40px; font-size: 14px; }
  .fl-fd-body .bapf_body input[type=checkbox],
  .fl-fd-body .bapf_body input[type=radio] { width: 20px; height: 20px; margin-right: 10px; }
}
