/* toolbar button (desktop) */
.zfof-toolbar{display:flex;align-items:center;margin:0 0 10px}
.zfof-toggle{display:inline-flex;align-items:center;gap:.5rem;padding:.5rem .75rem;border:1px solid #e5e7eb;border-radius:999px;background:#fff;cursor:pointer}
.zfof-toggle-icon::before{content:"☰";display:inline-block;font-size:14px;line-height:1}
.zfof-badge{display:none;min-width:18px;height:18px;padding:0 4px;border-radius:9px;background:#111;color:#fff;font-size:11px;line-height:18px;text-align:center}
[data-zfof-badge]:not(:empty){display:inline-block}

/* overlay + drawer */
.zfof-overlay{position:fixed;inset:0;background:rgba(0,0,0,.38);z-index:9998}
.zfof-drawer{position:fixed;top:0;left:0;height:100dvh;width:min(88vw,360px);background:#fff;z-index:9999;transform:translateX(-100%);transition:transform .25s ease;box-shadow:2px 0 16px rgba(0,0,0,.12);display:flex;flex-direction:column}
.zfof-drawer[aria-hidden="false"]{transform:translateX(0)}
.zfof-drawer__header{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid #eee}
.zfof-close{background:none;border:none;font-size:24px;line-height:1;cursor:pointer}
.zfof-form{overflow:auto;-webkit-overflow-scrolling:touch;padding:10px 14px 90px}
.zfof-w-title{margin:16px 0 8px;font-size:15px;font-weight:600}
.zfof-block{margin:10px 0 14px}
.zfof-price{display:flex;align-items:center;gap:8px}
.zfof-price input{width:100%;padding:8px 10px;border:1px solid #e5e7eb;border-radius:8px}
.zfof-sep{opacity:.6}
.zfof-extra{display:flex;gap:12px;flex-wrap:wrap}
.zfof-check{display:inline-flex;align-items:center;gap:8px;padding:6px 10px;border:1px solid #e5e7eb;border-radius:999px;cursor:pointer}
.zfof-check input{accent-color:#111}
.zfof-widgets .widget{padding:10px 0;border-bottom:1px solid #f2f2f2}
.zfof-widgets .widget:last-child{border-bottom:0}
.zfof-actions{position:fixed;left:0;bottom:0;width:min(88vw,360px);display:flex;gap:10px;padding:12px;background:#fff;border-top:1px solid #eee}
.zfof-reset{flex:1;display:inline-flex;justify-content:center;align-items:center;padding:10px 12px;border:1px solid #e5e7eb;border-radius:10px;text-decoration:none}
.zfof-apply{flex:2;padding:10px 12px;border:0;border-radius:10px;background:#111;color:#fff;font-weight:600}

/* mobile FAB (fallback) */
.zfof-fab{position:fixed;left:12px;bottom:14px;display:flex;align-items:center;gap:8px;padding:10px 14px;border-radius:999px;background:#111;color:#fff;border:0;z-index:10000;box-shadow:0 6px 24px rgba(0,0,0,.18)}
.zfof-fab .zfof-badge{background:#fff;color:#111}

/* desktop */
@media (min-width:1024px){.zfof-fab{display:none}}

/* hide native sidebars on mobile (theme) */
@media (max-width:1023px){
  .zfof-catalog .site-sidebar,
  .zfof-catalog .shop-sidebar{display:none!important}
}

/* header button basic */
.zfof-hbtn{position:static;display:inline-flex;align-items:center;gap:8px;padding:6px 10px;border:1px solid #e5e7eb;border-radius:999px;background:#fff;color:inherit;box-shadow:none;cursor:pointer;font-size:14px}
.zfof-hbtn .zfof-badge{display:inline-block;background:#111;color:#fff}
.zfof-toolbar{display:none!important} /* avoid duplicate top button */
body.zfof-hbtn-mounted .zfof-fab{display:none!important}
.zfof-drawer{z-index:999999}.zfof-overlay{z-index:999998}

/* place inside Block-Shop mobile header pocket */
.zfof-hbtn--bar{position:static}

/* place near the currency switcher (right) */
.zfof-hbtn--currency{position:static;margin-left:8px}

/* compact sorting to make room on mobile */
@media (max-width:768px){
  .mobile-menu-bar{display:flex;align-items:center}
  .mobile-menu-bar .filter.in-header{flex:0 0 auto;margin-right:8px}
  .mobile-menu-bar .sort-products.in-header{flex:0 0 auto}
  .mobile-menu-bar .woocommerce-ordering .select2-container{width:120px!important}
  .mobile-menu-bar .select2-selection--single{height:32px}
  .mobile-menu-bar .select2-selection__rendered{line-height:32px;font-size:12px;padding:0 24px 0 10px}
  .mobile-menu-bar .select2-selection__arrow{height:32px}
}
/* optional: fully hide sorting on very small screens */
@media (max-width:480px){
  /* .mobile-menu-bar .sort-products.in-header{display:none} */
}

/* Наш карман под заголовком валют, отдельный слой */
.woo-multi-currency.wmc-right .wmc-list-currencies .zfof-currency-pocket{
  position: relative;
  z-index: 100002;
}

/* Кнопка рядом с валютами: большой хитбокс, поверх всего, «впритык» к валютам */
.woo-multi-currency.wmc-right .zfof-hbtn--currency{
  position: relative;
  z-index: 100003;              /* выше .wmc-sidebar-open */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;           /* легче нажимать */
  min-height: 44px;             /* рекомендуемый touch target */
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
  margin-top: 6px;              /* «чуть ниже» заголовка */
  margin-left: 0;
  pointer-events: auto;         /* кликается сама кнопка */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.woo-multi-currency.wmc-right .zfof-hbtn--currency .zfof-badge{
  display: inline-block;
  background: #111;
  color: #fff;
}

/* Если у валют оверлей внутри списка — создаём для него отдельный слой ниже кнопки */
.woo-multi-currency.wmc-right .wmc-list-currencies{ position: relative; }

/* На очень узких экранах не даём кнопке «ломать» строку */
@media (max-width: 420px){
  .woo-multi-currency.wmc-right .zfof-hbtn--currency{ font-size: 14px; }
}

/* Плавающий док для кнопки фильтра рядом с валютами (вне их DOM) */
.zfof-currency-dock{
  position: fixed;
  top: 20px;          /* реальная позиция выставляется JS */
  right: 80px;        /* реальная позиция выставляется JS */
  z-index: 100004;    /* выше любых оверлеев валют */
  pointer-events: none; /* кликается только сама кнопка */
}
.zfof-currency-dock .zfof-hbtn{
  pointer-events: auto;
}

/* Кнопка — большой хитбокс, «впритык» к валютам */
.zfof-hbtn--currency{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;      /* легче нажимать */
  min-height: 44px;        /* touch target */
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.zfof-hbtn--currency .zfof-badge{
  display:inline-block;
  background:#111;
  color:#fff;
}

/* Плавающий "док" кнопки — у правого края, кликается только сама кнопка */
.zfof-currency-dock{
  position: fixed;
  top: 20px;         /* реальная позиция ставится JS */
  right: 12px;       /* запасной дефолт: прижать к правому краю */
  z-index: 100004;
  pointer-events: none;   /* док не перехватывает, только кнопка */
}
.zfof-currency-dock .zfof-hbtn{
  pointer-events: auto;
}

/* Большой хитбокс кнопки */
.zfof-hbtn--currency{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  min-height: 44px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

