/* FILTER-BAR-1 — Shopify-style index filters (js/filter-bar.js). Desktop/tablet. Loaded after aeux-theme.css. */
body #content .view .toolbar.fb-on {
  position: static; display: block; height: auto; margin: 0 0 12px; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none;
}
.fb { position: relative; }
.fb-hold { display: none !important; }

/* saved-view tabs */
.fb-tabs { display: flex; align-items: center; gap: 2px; margin: 0 0 8px; padding: 0; overflow-x: auto; scrollbar-width: none; min-height: 28px; }
.fb-tabs::-webkit-scrollbar { display: none; }
.fb-tab {
  flex: none; height: 28px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 550; line-height: 20px; color: #616161; white-space: nowrap; transition: background-color .1s ease, color .1s ease;
}
.fb-tab:hover { background: #F1F1F1; color: #303030; }
.fb-tab[aria-selected="true"] { background: #E3E3E3; color: #303030; }
.fb-tab:focus-visible, .fb-btn:focus-visible, .fb-opt:focus-visible, .fb-x:focus-visible, .fb-clear:focus-visible { outline: 2px solid #168A4E; outline-offset: 1px; }

/* one rounded search + filter bar */
.fb-bar {
  position: relative; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 6px 0 12px;
  background: #fff; border: 1px solid #E3E3E3; border-radius: 10px; box-shadow: 0 1px 0 rgba(0, 0, 0, .03);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.fb-bar:focus-within { border-color: #168A4E; box-shadow: 0 0 0 3px rgba(22, 138, 78, .18); }
body #content .fb-bar .search-box.fb-search {
  flex: 1 1 auto; min-width: 0; height: 100%; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; border-radius: 0; gap: 8px; order: 0;
}
.fb-search > i.ai { color: #8A8A8A; }
body #content .fb-bar .fb-search input,
body #content .fb-bar .fb-search input:focus {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; outline: 0;
  font-size: 13.5px; color: #303030;
}
.fb-search input::placeholder { color: #8A8A8A; }

.fb-tools { display: flex; align-items: center; gap: 2px; flex: none; margin-left: auto; }
.fb-btn, body #content .fb-tools .fb-tool.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; min-height: 28px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; box-shadow: none;
  font: inherit; font-size: 13px; font-weight: 550; color: #303030; cursor: pointer; white-space: nowrap;
}
.fb-btn:hover, body #content .fb-tools .fb-tool.btn:hover:not(:disabled) { background: #F1F1F1; }
.fb-btn.is-on { background: #E3F4EB; color: #0F6E3E; }
.fb-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #168A4E; color: #fff; font-size: 11px; font-weight: 650; }
.fb-count[hidden] { display: none; }
.fb-tools .view-toggle { margin-left: 4px; border: 0; background: transparent; box-shadow: none; padding: 0; gap: 2px; }
.fb-tools .view-toggle-btn { height: 28px; width: 28px; padding: 0; border-radius: 8px; }

/* filter popover */
.fb-pop {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 60; width: 320px; max-height: min(440px, 60vh); overflow: auto; padding: 4px 14px 12px;
  background: #fff; border: 1px solid #E3E3E3; border-radius: 12px; box-shadow: 0 12px 32px rgba(17, 24, 39, .16);
}
.fb-pop[hidden] { display: none; }
.fb-sec { padding: 10px 0 2px; }
.fb-sec + .fb-sec { border-top: 1px solid #F1F1F1; margin-top: 8px; }
.fb-sec-h { margin: 0 0 8px; font-size: 12px; font-weight: 650; color: #616161; }
.fb-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-opt { height: 28px; padding: 0 10px; border: 1px solid #E3E3E3; border-radius: 8px; background: #fff; font: inherit; font-size: 12.5px; font-weight: 500; color: #303030; cursor: pointer; }
.fb-opt:hover { background: #F7F7F7; }
.fb-opt.is-on { background: #E3F4EB; border-color: #BFE3CE; color: #0F6E3E; font-weight: 600; }

/* applied-filter chips */
.fb-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 8px; }
.fb-chips[hidden] { display: none; }
.fb-chip { display: inline-flex; align-items: center; gap: 2px; height: 26px; padding: 0 4px 0 10px; border-radius: 8px; background: #F1F1F1; font-size: 12.5px; color: #303030; }
.fb-chip b { font-weight: 650; }
.fb-x { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border: 0; border-radius: 6px; background: transparent; font-size: 16px; line-height: 1; color: #616161; cursor: pointer; }
.fb-x:hover { background: #E3E3E3; color: #303030; }
.fb-clear { height: 26px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: 12.5px; font-weight: 550; color: #0F6E3E; cursor: pointer; }
.fb-clear:hover { background: #E3F4EB; }

/* the page's primary "Add …" button sits in the page header (same spot as Add product), not inside the bar */
body #content .view .toolbar.fb-on > .btn-primary,
body #content .view .toolbar.fb-on > .toolbar-right > .btn-primary:not(#addProductBtn) { position: absolute; top: 14px; right: 20px; z-index: 5; width: auto; }
body #content .view .toolbar.fb-on > .toolbar-right { display: contents; }

@media screen and (max-width: 860px) { .fb-pop { right: auto; left: 0; width: min(320px, 92vw); } .fb-tools .fb-btn span { display: none; } }
