/* listing.css — site header, faceted listing chrome, and place cards.
   Uses the design tokens from theme.css (--bm-*), which is loaded first. */

/* ---- Site header ---- */
.bm-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--bm-line);
}
.bm-header-top {
  max-width: var(--bm-container); margin: 0 auto;
  padding: 10px var(--bm-pad);
  display: flex; align-items: center; gap: var(--bm-5);
}
.bm-logo { flex: none; display: block; }
.bm-logo img { display: block; height: 42px; width: auto; }

/* Search: one continuous pill. The icon sits inside the field rather than in a
   separate button, so the input reads as the whole control. */
.bm-search {
  flex: 1 1 auto; max-width: 460px;
  display: flex; align-items: center; gap: 8px;
  background: var(--bm-surface-3);
  border: 1px solid transparent; border-radius: var(--bm-r-pill);
  padding-left: 14px; overflow: hidden;
  transition: background var(--bm-fast), border-color var(--bm-fast), box-shadow var(--bm-fast);
}
.bm-search:focus-within {
  background: var(--bm-surface); border-color: var(--bm-teal-500);
  box-shadow: 0 0 0 3px rgba(18,125,145,.13);
}
.bm-search-icon { flex: none; color: var(--bm-faint); }
.bm-search input {
  flex: 1; border: 0; outline: 0; background: transparent;
  padding: 10px 0; font: inherit; font-size: var(--bm-text-base); color: var(--bm-ink);
}
.bm-search input::placeholder { color: var(--bm-faint); }
.bm-search button {
  flex: none; border: 0; cursor: pointer; align-self: stretch;
  background: var(--bm-navy-700); color: #fff;
  padding: 0 var(--bm-5); font: inherit; font-weight: 600; font-size: var(--bm-text-sm);
  transition: background var(--bm-fast);
}
.bm-search button:hover { background: var(--bm-navy-800); }

.bm-header-actions { flex: none; display: flex; align-items: center; gap: var(--bm-3); margin-left: auto; }
.bm-saved { position: relative; display: inline-flex; align-items: center; color: var(--bm-ink-soft); text-decoration: none; padding: 6px; border-radius: var(--bm-r-sm); }
.bm-saved svg { fill: none; stroke: currentColor; stroke-width: 1.9; }
.bm-saved:hover { color: #D6336C; }
.bm-saved .fav-count {
  position: absolute; top: -1px; right: -3px; background: #D6336C; color: #fff;
  font-size: .66rem; font-weight: 700; min-width: 16px; height: 16px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px; border: 2px solid #fff;
}
.bm-signin { white-space: nowrap; color: var(--bm-ink-soft); text-decoration: none; font-weight: 600; font-size: var(--bm-text-base); padding: 9px 4px; }
.bm-signin:hover { color: var(--bm-teal-700); }
.bm-cta {
  white-space: nowrap; background: var(--bm-navy-700); color: #fff; border: 1px solid var(--bm-navy-700);
  padding: 9px 18px; border-radius: var(--bm-r-pill); text-decoration: none;
  font-weight: 600; font-size: var(--bm-text-base); box-shadow: var(--bm-shadow-xs);
  transition: background var(--bm-fast), box-shadow var(--bm-fast);
}
.bm-cta:hover { background: var(--bm-navy-800); color: #fff; box-shadow: var(--bm-shadow-sm); }

.bm-navtoggle { display: none; flex: none; width: 40px; height: 40px; border: 1px solid var(--bm-line); background: var(--bm-surface); border-radius: var(--bm-r-sm); cursor: pointer; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.bm-navtoggle span { display: block; width: 17px; height: 2px; background: var(--bm-navy-700); border-radius: 2px; transition: transform var(--bm-fast), opacity var(--bm-fast); }
.bm-navtoggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.bm-navtoggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.bm-navtoggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Category rail: a quiet underline for the active item, not a heavy tab bar. */
.bm-catnav {
  max-width: var(--bm-container); margin: 0 auto;
  padding: 0 var(--bm-pad); display: flex; gap: var(--bm-1);
  overflow-x: auto; scrollbar-width: none;
}
.bm-catnav::-webkit-scrollbar { display: none; }
.bm-catnav a {
  white-space: nowrap; padding: 9px 13px 11px; color: var(--bm-ink-soft);
  text-decoration: none; font-size: var(--bm-text-base); font-weight: 500;
  border-bottom: 2px solid transparent; transition: color var(--bm-fast), border-color var(--bm-fast);
}
.bm-catnav a:hover { color: var(--bm-navy-700); }
.bm-catnav a.active { color: var(--bm-navy-700); font-weight: 700; border-bottom-color: var(--bm-gold-500); }

@media (max-width: 900px) {
  .bm-header-actions .bm-signin { display: none; }
}
@media (max-width: 760px) {
  .bm-header-top { gap: var(--bm-3); flex-wrap: wrap; }
  .bm-logo img { height: 36px; }
  .bm-search { order: 3; flex-basis: 100%; max-width: none; }
  .bm-cta { font-size: var(--bm-text-sm); padding: 8px 13px; }
  .bm-navtoggle { display: flex; }
  .bm-catnav { display: none; flex-direction: column; gap: 0; padding-bottom: var(--bm-2); border-top: 1px solid var(--bm-line-soft); }
  .bm-catnav.open { display: flex; }
  .bm-catnav a { border-bottom: 1px solid var(--bm-line-soft); border-left: 2px solid transparent; padding: 12px 4px; }
  .bm-catnav a.active { border-bottom-color: var(--bm-line-soft); border-left-color: var(--bm-gold-500); padding-left: 12px; }
}

/* Cookie consent bar */
.bm-consent {
  position: fixed; left: 14px; right: 14px; bottom: 14px; z-index: 9999;
  background: var(--bm-navy-900); color: #fff; border-radius: var(--bm-r);
  padding: 14px 18px; box-shadow: var(--bm-shadow-xl);
  display: flex; align-items: center; gap: var(--bm-4); flex-wrap: wrap;
  font-size: var(--bm-text-base); line-height: 1.5; max-width: 720px; margin: 0 auto;
}
.bm-consent span { flex: 1; min-width: 200px; }
.bm-consent a { color: var(--bm-teal-400); }
.bm-consent button {
  background: var(--bm-gold-500); color: var(--bm-navy-900); border: 0;
  padding: 9px 22px; border-radius: var(--bm-r-sm); font: inherit; font-weight: 700; cursor: pointer;
}
.bm-consent button:hover { background: var(--bm-gold-400); }

.breadcrumbs {
  max-width: var(--bm-container); margin: var(--bm-4) auto 0; padding: 0 var(--bm-pad);
  color: var(--bm-muted); font-size: var(--bm-text-sm);
  display: flex; align-items: center; flex-wrap: wrap; gap: 2px;
}
.breadcrumbs a { color: var(--bm-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--bm-teal-700); text-decoration: underline; }
.breadcrumbs > span { margin: 0 7px; opacity: .45; }
.breadcrumbs > span:last-child { margin: 0; opacity: 1; color: var(--bm-ink-soft); }

/* Two-column listing: filter sidebar + results */
.listing { max-width: var(--bm-container); margin: 0 auto; padding: var(--bm-5) var(--bm-pad) var(--bm-16); display: grid; grid-template-columns: 258px 1fr; gap: var(--bm-8); align-items: start; }
@media (max-width: 860px) {
  .listing { grid-template-columns: 1fr; }
  .filters { position: static !important; }
}

.filters {
  position: sticky; top: calc(var(--site-header-h) + 12px);
  border: 1px solid var(--bm-line); border-radius: var(--bm-r-lg);
  background: var(--bm-surface); padding: var(--bm-4) var(--bm-5) var(--bm-5);
  box-shadow: var(--bm-shadow-xs);
}
.filters h2 { font-family: var(--bm-font-body); font-size: var(--bm-text-md); font-weight: 700; color: var(--bm-navy-900); margin: 0 0 var(--bm-2); display: flex; justify-content: space-between; align-items: center; letter-spacing: 0; }
.filters .reset { font-size: var(--bm-text-sm); font-weight: 600; color: var(--bm-teal-600); cursor: pointer; background: none; border: none; padding: 0; }
.filters .reset:hover { color: var(--bm-teal-700); text-decoration: underline; }
.facet { border-top: 1px solid var(--bm-line-soft); padding: var(--bm-3) 0; }
.facet > summary { cursor: pointer; font-weight: 600; font-size: var(--bm-text-base); color: var(--bm-ink); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.facet > summary::-webkit-details-marker { display: none; }
.facet > summary::after { content: "›"; color: var(--bm-faint); font-size: 1.15rem; transform: rotate(90deg); transition: transform var(--bm-fast); line-height: 1; }
.facet[open] > summary::after { transform: rotate(-90deg); }
.facet-options { margin-top: var(--bm-3); max-height: 224px; overflow: auto; display: flex; flex-direction: column; gap: 7px; }
.facet-options label { display: flex; align-items: center; gap: 9px; font-size: var(--bm-text-base); color: var(--bm-ink-soft); cursor: pointer; }
.facet-options label:hover { color: var(--bm-navy-700); }
.facet-options input[type="checkbox"] { accent-color: var(--bm-teal-600); width: 15px; height: 15px; }
.facet-options .c { margin-left: auto; color: var(--bm-faint); font-size: var(--bm-text-xs); font-variant-numeric: tabular-nums; }
.rating-radios { display: flex; flex-wrap: wrap; gap: 6px; }
.rating-radios label { border: 1px solid var(--bm-line); border-radius: var(--bm-r-pill); padding: 5px 12px; cursor: pointer; font-size: var(--bm-text-sm); font-weight: 500; transition: background var(--bm-fast), border-color var(--bm-fast); }
.rating-radios input { display: none; }
.rating-radios label:has(input:checked) { background: var(--bm-teal-050); border-color: var(--bm-teal-500); color: var(--bm-teal-700); font-weight: 700; }

/* Results toolbar */
.results-head { display: flex; align-items: center; justify-content: space-between; gap: var(--bm-3); flex-wrap: wrap; margin-bottom: var(--bm-4); }
.results-head .count { margin: 0; color: var(--bm-muted); font-size: var(--bm-text-base); }
.results-head .count b { color: var(--bm-ink); font-variant-numeric: tabular-nums; }
.results-head select, .view-toggle, .filter-toggle {
  padding: 9px 13px; border: 1px solid var(--bm-line); border-radius: var(--bm-r-sm);
  background: var(--bm-surface); font: inherit; font-size: var(--bm-text-base); color: var(--bm-ink); cursor: pointer;
}
.results-head select:hover, .view-toggle:hover, .filter-toggle:hover { border-color: var(--bm-navy-600); }
.filter-toggle { display: none; font-weight: 600; }
@media (max-width: 860px) { .filter-toggle { display: inline-block; } }
.view-toggle[aria-pressed="true"] { background: var(--bm-teal-050); border-color: var(--bm-teal-500); color: var(--bm-teal-700); font-weight: 600; }

/* Proximity */
.geo-btn { width: 100%; padding: 10px 12px; border: 1px solid var(--bm-teal-600); color: var(--bm-teal-700); background: var(--bm-surface); border-radius: var(--bm-r-sm); cursor: pointer; font: inherit; font-weight: 600; font-size: var(--bm-text-base); transition: background var(--bm-fast); }
.geo-btn:hover { background: var(--bm-teal-050); }
.geo-status { display: block; font-size: var(--bm-text-xs); color: var(--bm-muted); margin-top: 6px; }
.pc-distance { color: var(--bm-teal-700); font-weight: 700; }

/* Map view */
.listing-map { height: 70vh; min-height: 420px; border-radius: var(--bm-r-lg); overflow: hidden; border: 1px solid var(--bm-line); box-shadow: var(--bm-shadow-sm); }

/* ---- Place cards ----
   The single most repeated element on the site, so it carries most of the
   perceived quality. Changes from the old card: a 4:3 image that scales with
   the column instead of a fixed 172px band, a gradient scrim so overlaid
   badges stay legible on any photo, the rating as a gold merit chip rather
   than a solid blue box, and a serif name to match the editorial voice. */
.places-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: var(--bm-5); }
.listing .places-grid { grid-template-columns: 1fr; }
@media (min-width: 560px) { .listing .places-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .listing .places-grid { grid-template-columns: repeat(3, 1fr); } }

.place-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--bm-surface);
  border: 1px solid var(--bm-line);
  border-radius: var(--bm-r-lg);
  overflow: hidden;
  box-shadow: var(--bm-shadow-xs);
  transition: box-shadow var(--bm-med), transform var(--bm-med), border-color var(--bm-med);
}
.place-card:hover {
  box-shadow: var(--bm-shadow-lg);
  transform: translateY(-3px);
  border-color: #D8D2C7;
}

.place-card .pc-img {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 4 / 3; background: var(--bm-surface-3);
}
.place-card .pc-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s var(--bm-ease);
}
.place-card:hover .pc-img img { transform: scale(1.045); }
/* Scrim: keeps the rating chip and badges readable over bright photography. */
.place-card .pc-img::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(11,39,57,.34) 0%, rgba(11,39,57,0) 32%, rgba(11,39,57,0) 62%, rgba(11,39,57,.26) 100%);
}

.pc-rating {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: var(--bm-gold-500); color: var(--bm-navy-900);
  font-family: var(--bm-font-body); font-weight: 800; font-size: var(--bm-text-sm);
  font-variant-numeric: tabular-nums;
  padding: 4px 9px; border-radius: var(--bm-r-sm);
  display: flex; align-items: baseline; gap: 2px;
  box-shadow: 0 2px 8px rgba(11,39,57,.28);
}
.pc-rating small { font-weight: 600; font-size: .68rem; opacity: .72; }
.pc-awards { position: absolute; bottom: 10px; left: 10px; z-index: 2; display: flex; gap: 4px; flex-wrap: wrap; }
.pc-award { background: rgba(11,39,57,.78); color: #fff; font-size: var(--bm-text-xs); font-weight: 600; padding: 3px 9px; border-radius: var(--bm-r-pill); backdrop-filter: blur(4px); }

.fav-btn {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.9); color: var(--bm-ink-soft); cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
  box-shadow: 0 2px 8px rgba(11,39,57,.2);
  backdrop-filter: blur(4px);
  transition: background var(--bm-fast), color var(--bm-fast), transform var(--bm-fast);
}
.fav-btn:hover { color: #D6336C; background: #fff; transform: scale(1.08); }
.fav-btn svg { fill: none; stroke: currentColor; stroke-width: 2; }
.fav-btn.on { color: #D6336C; }
.fav-btn.on svg { fill: #D6336C; stroke: #D6336C; }

.pc-body { padding: var(--bm-4) var(--bm-4) var(--bm-4); display: flex; flex-direction: column; gap: 7px; flex: 1; }
.pc-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-badges:empty { display: none; }
.pc-featured {
  background: var(--bm-gold-050); color: var(--bm-gold-700); border: 1px solid #EBD9A6;
  font-size: var(--bm-text-xs); font-weight: 700; padding: 2px 9px; border-radius: var(--bm-r-pill);
}
.pc-verified {
  background: var(--bm-teal-050); color: var(--bm-teal-700); border: 1px solid #B9E0E8;
  font-size: var(--bm-text-xs); font-weight: 700; padding: 2px 9px; border-radius: var(--bm-r-pill);
}
/* A paid placement is marked with a gold rule at the top edge — present but
   not shouting, and it never distorts the card's geometry. */
.place-card:has(.pc-featured) { border-color: #E8D9AC; }
.place-card:has(.pc-featured)::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; z-index: 4;
  background: linear-gradient(90deg, var(--bm-gold-400), var(--bm-gold-500));
}

.pc-name {
  font-family: var(--bm-font-display); font-size: 1.06rem; font-weight: 600;
  margin: 0; line-height: 1.28; letter-spacing: -.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pc-name a { color: var(--bm-navy-900); text-decoration: none; }
.place-card:hover .pc-name a { color: var(--bm-teal-700); }

.pc-meta {
  display: flex; align-items: center; gap: 7px; flex-wrap: nowrap; overflow: hidden;
  white-space: nowrap; text-overflow: ellipsis;
  color: var(--bm-muted); font-size: var(--bm-text-sm);
}
.pc-price { font-weight: 700; color: var(--bm-ink-soft); }
.pc-area { overflow: hidden; text-overflow: ellipsis; }
.pc-area a { color: var(--bm-muted); text-decoration: none; }
.pc-area a:hover { color: var(--bm-teal-700); text-decoration: underline; }
.pc-reviews { font-variant-numeric: tabular-nums; }

.pc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 2px; max-height: 26px; overflow: hidden; }
.pc-tags a, .pc-tags span {
  font-size: var(--bm-text-xs); font-weight: 500; background: var(--bm-surface-3);
  border-radius: var(--bm-r-pill); padding: 3px 10px; color: var(--bm-ink-soft); text-decoration: none;
  transition: background var(--bm-fast), color var(--bm-fast);
}
.pc-tags a:hover { background: var(--bm-teal-050); color: var(--bm-teal-700); }

.no-results { padding: var(--bm-16) var(--bm-6); text-align: center; color: var(--bm-muted); border: 1px dashed var(--bm-line); border-radius: var(--bm-r-lg); background: var(--bm-surface); }
.place-card[hidden] { display: none !important; }

/* ---- Category / facet page header ----
   Replaces a bare <h1> + <p> on a white page. The tinted band gives the
   listing pages a top edge and separates chrome from results. */
.page-head {
  background: var(--bm-surface-3);
  border-bottom: 1px solid var(--bm-line);
  padding: var(--bm-8) var(--bm-pad) var(--bm-8);
  margin-top: var(--bm-4);
}
.page-head-inner { max-width: var(--bm-container); margin: 0 auto; }
.page-head h1 { margin: 0 0 var(--bm-3); font-size: var(--bm-text-3xl); }
.page-head .lead {
  margin: 0; color: var(--bm-ink-soft); font-size: var(--bm-text-md);
  line-height: 1.65; max-width: 68ch;
}
.page-head-count {
  margin: var(--bm-4) 0 0; font-size: var(--bm-text-sm); color: var(--bm-muted);
  font-weight: 500;
}
.page-head-count b {
  color: var(--bm-navy-800); font-weight: 700; font-variant-numeric: tabular-nums;
}
/* The breadcrumb sits directly above the band, so it loses its own margin. */
.page-head + .listing, .page-head ~ .listing { padding-top: var(--bm-6); }
