/* ==========================================================================
   Forefind — franchise archive (/franchises/)
   Depends on forefind-ui.css for the tokens, the .page-hero shell and the
   listing card itself. Only the page's own furniture lives here: the results
   toolbar, the grid, pagination and the empty state.
   ========================================================================== */

.forefind-listings {
  background: var(--ff-bg, #F7F8FA);
  min-height: 60vh;
}

.forefind-listings .ff-wrap {
  max-width: var(--ff-container, 1200px);
  margin: 0 auto;
  padding: 0 24px 72px;
}

/* ── Results toolbar ───────────────────────────────────────────────────── */

.forefind-listings .lst-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 26px 0 20px;
}

.forefind-listings .lst-count {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--ff-muted, #6B7280);
}
.forefind-listings .lst-count strong {
  color: var(--ff-ink, #111827);
  font-weight: 700;
}

.forefind-listings .lst-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* A chip is the filter AND its remove control — the whole thing is the link
   that drops it, so there is no separate × to aim at. */
.forefind-listings .lst-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--ff-brand-soft, #E9F8ED);
  border: 1px solid var(--ff-brand-mid, #CFEFD6);
  color: var(--ff-brand-dark, #26993D);
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.forefind-listings .lst-chip:hover {
  background: #fff;
  border-color: var(--ff-brand, #30B94A);
}
.forefind-listings .lst-chip svg { flex: 0 0 auto; opacity: .7; }
.forefind-listings .lst-chip:hover svg { opacity: 1; }

.forefind-listings .lst-chip-clear {
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  color: var(--ff-muted, #6B7280);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.forefind-listings .lst-chip-clear:hover { color: var(--ff-ink, #111827); }

/* ── The grid ──────────────────────────────────────────────────────────── */

.forefind-listings .lst-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ── Pagination ────────────────────────────────────────────────────────── */

.forefind-listings .lst-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 44px;
}

.forefind-listings .lst-pager .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--ff-border, rgba(17,24,39,.10));
  background: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ff-ink, #111827);
  text-decoration: none;
  transition: border-color .15s, background .15s, color .15s;
}
.forefind-listings .lst-pager a.page-numbers:hover {
  border-color: var(--ff-brand, #30B94A);
  color: var(--ff-brand-dark, #26993D);
}
.forefind-listings .lst-pager .page-numbers.current {
  background: var(--ff-brand, #30B94A);
  border-color: var(--ff-brand, #30B94A);
  color: #fff;
}
.forefind-listings .lst-pager .page-numbers.dots {
  border-color: transparent;
  background: transparent;
  color: var(--ff-muted, #6B7280);
}

/* ── Empty state ───────────────────────────────────────────────────────── */

.forefind-listings .lst-empty {
  text-align: center;
  padding: 72px 24px 88px;
  background: #fff;
  border: 1px solid var(--ff-border, rgba(17,24,39,.10));
  border-radius: 18px;
}
.forefind-listings .lst-empty-mark {
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ff-brand-soft, #E9F8ED);
  color: var(--ff-brand-dark, #26993D);
}
.forefind-listings .lst-empty-mark svg { width: 24px; height: 24px; }
.forefind-listings .lst-empty h2 {
  font-family: var(--ff-font-display, 'DM Sans', sans-serif);
  font-size: 21px;
  font-weight: 700;
  color: var(--ff-ink, #111827);
  margin: 0 0 8px;
}
.forefind-listings .lst-empty p {
  font-family: 'Inter', sans-serif;
  font-size: 14.5px;
  color: var(--ff-muted, #6B7280);
  margin: 0 0 22px;
}
.forefind-listings .lst-empty-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.forefind-listings .lst-btn {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 20px;
  border-radius: 10px;
  background: var(--ff-brand, #30B94A);
  border: 1px solid var(--ff-brand, #30B94A);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s;
}
.forefind-listings .lst-btn:hover { background: var(--ff-brand-dark, #26993D); color: #fff; }
.forefind-listings .lst-btn-ghost {
  background: #fff;
  border-color: var(--ff-border, rgba(17,24,39,.10));
  color: var(--ff-ink, #111827);
}
.forefind-listings .lst-btn-ghost:hover { background: var(--ff-bg, #F7F8FA); color: var(--ff-ink, #111827); }

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .forefind-listings .lst-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  .forefind-listings .lst-grid { grid-template-columns: 1fr; }
  .forefind-listings .ff-wrap { padding: 0 16px 52px; }
  .forefind-listings .lst-toolbar { align-items: flex-start; flex-direction: column; }
}

/* ── The existing search/filter bar ────────────────────────────────────────
   Kept rather than rebuilt: it carries the working investment, city and
   franchise-count controls. Its internals are styled by the parent theme,
   which this file cannot see, so the bar is given a home in the new design
   rather than restyled from the outside — a white panel matching the cards,
   and a reset of the stock container widths that would otherwise fight the
   page's own wrapper. */
.forefind-listings .lst-filterbar {
  background: #fff;
  border: 1px solid var(--ff-border, rgba(17,24,39,.10));
  border-radius: 14px;
  padding: 16px 18px 4px;
  margin-top: 26px;
}
.forefind-listings .lst-filterbar > *:last-child { margin-bottom: 0; }
.forefind-listings .lst-filterbar .container,
.forefind-listings .lst-filterbar .row {
  width: auto; max-width: none;
  margin-left: 0; margin-right: 0;
  padding-left: 0; padding-right: 0;
}

/* With the bar present the toolbar sits tighter beneath it. */
.forefind-listings .lst-filterbar + .lst-toolbar { padding-top: 18px; }

/* ── Sponsored row ─────────────────────────────────────────────────────────
   Visually separated from the results, not blended into them: the directory's
   whole pitch is that rankings are not for sale, so a paid placement has to be
   unmistakable rather than tastefully subtle. */
.forefind-listings .lst-sponsored {
  margin-top: 26px;
  padding: 18px 18px 20px;
  background: #FFFDF5;
  border: 1px solid #F2E3BE;
  border-radius: 14px;
}
.forefind-listings .lst-sponsored-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.forefind-listings .lst-sponsored-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  background: #B4820E;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.forefind-listings .lst-sponsored-note {
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  color: #6B5A2E;
}
.forefind-listings .lst-sponsored + .lst-toolbar { padding-top: 22px; }
