/* Filter bar for the Unlimited Elements "Woo Product Grid" (home-page grid style).
   Sits above the grid, drives the grid's own .uc_post_grid_style_one_item nodes. */

.chp-fb {
  --chp-ink: #14110f;
  --chp-muted: #6f6a63;
  --chp-line: #e6e1d8;
  --chp-accent: #8f2d1f;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 0 0 22px; padding: 0; text-align: left;
  font-size: 14px; line-height: 1.5; color: var(--chp-ink);
}
.chp-fb *, .chp-fb *::before, .chp-fb *::after { box-sizing: border-box; }

.chp-fb__search {
  flex: 1 1 220px; min-width: 180px; max-width: 340px;
  font: inherit; font-size: 14px; padding: 9px 12px; margin: 0;
  border: 1px solid var(--chp-line); border-radius: 999px;
  background: #fff; color: var(--chp-ink);
}
.chp-fb__search:focus { outline: 2px solid var(--chp-accent); outline-offset: 1px; }

/* page heading + intro that ride along with the filter bar */
.chp-el-h {
  margin: 0 0 6px; font-size: clamp(24px, 3vw, 34px); line-height: 1.15; font-weight: 600;
  letter-spacing: -.01em; text-align: left; color: #14110f;
}
.chp-el-p { margin: 0 0 20px; max-width: 62ch; font-size: 15px; line-height: 1.55; color: #6f6a63; text-align: left; }

.chp-fb__facet { position: relative; margin: 0; }
.chp-fb__facets { display: flex; flex-wrap: wrap; gap: 10px; }
.chp-fb__facet > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border: 1px solid var(--chp-line); border-radius: 999px;
  background: #fff; font-size: 13px; letter-spacing: .02em; white-space: nowrap;
}
.chp-fb__facet > summary::-webkit-details-marker { display: none; }
.chp-fb__facet > summary::after { content: ""; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid var(--chp-muted); }
.chp-fb__facet[open] > summary { border-color: var(--chp-ink); }
.chp-fb__facet.is-on > summary { background: var(--chp-ink); color: #fff; border-color: var(--chp-ink); }
.chp-fb__facet.is-on > summary::after { border-top-color: #fff; }
.chp-fb__facet em { font-style: normal; font-size: 11px; opacity: .7; }

.chp-fb__panel {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0;
  min-width: 230px; max-height: 320px; overflow: auto;
  padding: 10px 12px; background: #fff; border: 1px solid var(--chp-line);
  border-radius: 6px; box-shadow: 0 12px 30px rgba(20, 17, 15, .12);
}
.chp-fb__opt {
  display: flex; align-items: center; gap: 9px; padding: 6px 2px;
  font-size: 13.5px; color: #35302b; cursor: pointer; white-space: nowrap;
}
.chp-fb__opt:hover { color: var(--chp-accent); }
.chp-fb__opt input { accent-color: var(--chp-accent); width: 15px; height: 15px; margin: 0; flex: 0 0 auto; }
.chp-fb__opt span { flex: 1 1 auto; }
.chp-fb__opt em { font-style: normal; color: var(--chp-muted); font-size: 12px; }
.chp-fb__opt.is-empty { opacity: .4; cursor: default; }

.chp-fb__count { margin-left: auto; font-size: 13px; color: var(--chp-muted); white-space: nowrap; }

.chp-fb__chips { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.chp-fb__chips:empty { display: none; }
.chp-fb__chip {
  font: inherit; font-size: 12.5px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--chp-ink); background: #fff; color: var(--chp-ink); cursor: pointer;
}
.chp-fb__chip:hover { background: var(--chp-ink); color: #fff; }

.chp-fb__empty {
  flex: 1 1 100%; padding: 28px 16px; margin-top: 6px; text-align: center;
  border: 1px dashed var(--chp-line); border-radius: 6px; color: var(--chp-muted);
}
.chp-fb__empty strong { display: block; color: var(--chp-ink); margin-bottom: 4px; }
.chp-fb__empty:empty { display: none; }

/* hide the grid items our filters exclude (both card wrappers are covered) */
.chp-hide { display: none !important; }

@media (max-width: 640px) {
  .chp-fb__search { max-width: none; flex: 1 1 100%; }
  .chp-fb__count { margin-left: 0; flex: 1 1 100%; }
  .chp-fb__panel { min-width: 200px; }
}

