/* ── BrandMap Module Styles ──────────────────────────────────────────────────
   Restored to BrandMap's own original visual identity. Source of truth: the
   ported React/Tailwind build this module was completed from (BrandMap_full_
   project/client/src — see client/src/index.css plus Home.tsx, Brands.tsx,
   SiteShell.tsx, StoreDetail.tsx, CompareProducts.tsx and LeadRequestForm.tsx),
   which defines a deep-teal "harbor map" look for this store/product locator:
   dark teal ink (#133b3e / #102f31) hero and footer-CTA bands with a faint
   dot-grid map pattern, a warm teal brand color (#0b5a62) for CTAs, links and
   active states, a sand-white paper background with soft mint/sage surfaces,
   a warm gold accent (#c9a46d / #e5c58f) reserved for buttons on dark panels,
   and DM Serif Display headings over DM Sans body text with generously
   rounded (16–32px) cards and full-pill controls.

   An earlier build pass ("2026-08-27 identity unification") deliberately
   stripped all of this out and made the module fall back to bimbly.eu's
   generic site-wide purple (--brand:#7657ff / --brand2:#9a7dff). That is
   reverted here — BrandMap gets its own palette back.

   How it's scoped: the palette lives in its own --bm2-* custom properties
   (below) so nothing here ever redefines bimbly's shared --brand/--text/
   --muted/etc. at :root — that would leak into the shared site-wide
   header/nav/footer. Instead, the shared token *names* are re-pointed to
   BrandMap's palette only inside <main> (which on every brand-map page
   contains just this module's own content — the shared header, nav and
   footer all render outside <main>). That single scoped block is what makes
   bimbly.css-defined shared classes reused here (.eyebrow, .section,
   .hero-section, breadcrumbs, etc.) — and this module's many inline
   `style="color:var(--muted)"` attributes across the PHP templates —
   automatically pick up BrandMap's colors instead of bimbly purple, without
   touching those files.

   Class names for this module's own components stay prefixed bm- (existing
   convention, unchanged); the new raw palette values live under a --bm2-
   prefix so they don't collide with the pre-existing --bm-radius/--bm-verified/
   --bm-warn/--bm-danger status tokens already defined below.
   ─────────────────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=DM+Serif+Display:wght@400;700&display=swap');

:root {
  --bm-radius: 20px;
  --bm-verified: #12a17e;
  --bm-warn: #d19b36;
  --bm-muted-status: #7d938f;
  --bm-danger: #d1524a;

  --bm2-ink: #162d30;
  --bm2-ink-strong: #0f2426;
  --bm2-muted: #66807c;
  --bm2-paper: #f8f8f5;
  --bm2-surface: #ffffff;
  --bm2-surface2: #eef5f1;
  --bm2-surface-soft: #f3f8f5;
  --bm2-line: #e1e9e5;
  --bm2-teal: #0b5a62;
  --bm2-teal-dark: #07474e;
  --bm2-deep: #133b3e;
  --bm2-deep2: #102f31;
  --bm2-gold: #c9a46d;
  --bm2-gold-light: #e5c58f;
  --bm2-gold-lighter: #f1d49f;
  --bm2-font-serif: "DM Serif Display", Georgia, serif;
  --bm2-font-sans: "DM Sans", Arial, sans-serif;
  --bm2-shadow: 0 18px 50px rgba(28, 61, 59, .1);
  --bm2-shadow-lg: 0 30px 70px rgba(0, 0, 0, .22);
  --bm2-easing: cubic-bezier(.23, 1, .32, 1);
}

/* Re-point the shared bimbly tokens to BrandMap's own palette, scoped to
   <main> only — the shared site-header/nav/footer live outside <main> on
   every brand-map page and are completely unaffected by this. */
main {
  --brand: var(--bm2-teal);
  --brand2: var(--bm2-teal-dark);
  --text: var(--bm2-ink);
  --muted: var(--bm2-muted);
  --surface: var(--bm2-surface);
  --surface2: var(--bm2-surface2);
  --surface-soft: var(--bm2-surface-soft);
  --line: var(--bm2-line);
  --bg: var(--bm2-paper);
  --dark: var(--bm2-deep);
  --radius: var(--bm-radius);
  --shadow: var(--bm2-shadow);
  background: var(--bm2-paper);
  font-family: var(--bm2-font-sans);
  color: var(--bm2-ink);
}
main h1, main h2, main h3 { font-family: var(--bm2-font-serif); font-weight: 400; letter-spacing: -.03em; }
main ::selection { background: #cfe5dc; color: #143c3e; }
main :focus-visible { outline: 3px solid var(--bm2-gold); outline-offset: 3px; border-radius: .55rem; }

/* ── Account bar ──────────────────────────────────────────────────────────── */

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.bm-hero-section {
  position: relative; overflow: hidden; margin-top: 24px;
  border-radius: 2rem; padding: clamp(36px, 6vw, 64px) clamp(22px, 5vw, 52px);
  background: var(--bm2-deep); color: #fff;
  box-shadow: var(--bm2-shadow-lg);
}
.bm-hero-section::before {
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image:
    radial-gradient(circle at 82% 8%, rgba(201, 164, 109, .28), transparent 26%),
    radial-gradient(circle at 10% 85%, rgba(174, 230, 195, .16), transparent 24%),
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: auto, auto, 34px 34px, 34px 34px;
}
.bm-hero-section .hero-content { position: relative; max-width: 640px; }
.bm-hero-section h1 { color: #fff; font-size: clamp(2.2rem, 4.4vw, 3.4rem); line-height: 1.03; }
.bm-hero-section .hero-copy { position: relative; margin-top: 16px; max-width: 540px; color: #b8ccca; line-height: 1.7; }
.bm-hero-section .eyebrow { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: #c9e6dc; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.bm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 999px; padding: 12px 22px; font-weight: 700; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; font-size: .95rem; font-family: inherit;
  transition: opacity .18s var(--bm2-easing), transform .18s var(--bm2-easing), background-color .18s var(--bm2-easing), border-color .18s var(--bm2-easing), color .18s var(--bm2-easing);
}
.bm-btn-primary { background: var(--brand, #0b5a62); color: #fff; box-shadow: 0 12px 26px rgba(11, 90, 98, .22); }
.bm-btn-primary:hover { background: var(--brand2, #07474e); opacity: 1; }
.bm-btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.bm-btn-ghost { background: transparent; border-color: var(--line, #e1e9e5); color: var(--text, #162d30); }
.bm-btn-ghost:hover { background: var(--surface-soft, #f3f8f5); border-color: var(--brand, #0b5a62); color: var(--brand, #0b5a62); }
.bm-btn-danger { background: var(--bm-danger); color: #fff; }
.bm-btn-sm { padding: 8px 16px; font-size: .82rem; }
.bm-btn-full { width: 100%; }

/* ── Cards ────────────────────────────────────────────────────────────────── */
.bm-card { background: var(--surface, #fff); border: 1px solid var(--line, #e1e9e5); border-radius: var(--bm-radius); padding: 22px 24px; margin-bottom: 18px; box-shadow: 0 2px 12px rgba(19, 59, 62, .04); }
.bm-card-title { font-family: var(--bm2-font-serif); font-weight: 400; font-size: 1.2rem; margin-bottom: 12px; color: var(--bm2-ink-strong); }

/* ── Category filter pills — smooth toggle transitions ───────────────────── */
.bm-cat-filters { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.bm-cat-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 17px; border-radius: 999px;
  border: 1px solid var(--line, #e1e9e5); background: var(--surface, #fff); color: var(--text, #162d30);
  text-decoration: none; font-size: .85rem; font-weight: 700; cursor: pointer;
  transition: background-color .2s var(--bm2-easing), color .2s var(--bm2-easing), border-color .2s var(--bm2-easing), transform .15s var(--bm2-easing), box-shadow .2s var(--bm2-easing);
}
.bm-cat-pill:hover { transform: translateY(-1px); border-color: var(--brand, #0b5a62); color: var(--brand, #0b5a62); }
.bm-cat-pill.is-active { background: var(--brand, #0b5a62); border-color: var(--brand, #0b5a62); color: #fff; box-shadow: 0 8px 16px rgba(11, 90, 98, .18); }

/* ── Brand grid / cards ───────────────────────────────────────────────────── */
.bm-brand-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin: 20px 0; }
.bm-brand-card {
  display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: calc(var(--bm-radius) + 4px);
  border: 1px solid var(--line, #e1e9e5); background: var(--surface, #fff); text-decoration: none; color: inherit;
  box-shadow: 0 5px 14px rgba(19, 59, 62, .04);
  transition: transform .18s var(--bm2-easing), box-shadow .18s var(--bm2-easing), border-color .18s var(--bm2-easing);
}
.bm-brand-card:hover { transform: translateY(-3px); border-color: #9fc7ba; box-shadow: var(--shadow, 0 18px 34px rgba(19, 59, 62, .12)); }
.bm-brand-logo {
  width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1.1rem; color: #fff; background: var(--logo-color, var(--brand, #0b5a62));
  box-shadow: 0 8px 16px rgba(20, 60, 58, .18);
}
.bm-brand-card-name { font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; color: var(--bm2-ink-strong); }
.bm-brand-card-cat { font-size: .78rem; color: var(--muted, #66807c); }

/* ── Status badges ────────────────────────────────────────────────────────── */
.bm-badge {
  display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: .7rem; font-weight: 700;
  color: #fff; background: var(--badge-color, var(--bm-muted-status)); white-space: nowrap;
}

/* ── Search / hero ────────────────────────────────────────────────────────── */
.bm-search-form { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0; position: relative; background: #fff; border-radius: 20px; padding: 8px; box-shadow: var(--bm2-shadow-lg); max-width: 560px; }
.bm-search-input, .bm-select, .bm-input, textarea.bm-input {
  border: 1px solid var(--line, #e1e9e5); border-radius: 12px; padding: 12px 16px;
  font-size: 1rem; font-family: inherit; background: var(--surface, #fff); color: var(--text, #162d30);
  transition: border-color .18s var(--bm2-easing), box-shadow .18s var(--bm2-easing);
}
.bm-search-form .bm-search-input { border: 0; background: var(--surface-soft, #f3f8f5); }
.bm-search-input:focus, .bm-select:focus, .bm-input:focus { outline: none; border-color: var(--brand, #0b5a62); box-shadow: 0 0 0 3px rgba(11, 90, 98, .16); }
.bm-search-input { flex: 1 1 280px; }
.bm-autocomplete {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 20; margin-top: 8px;
  background: var(--surface, #fff); border: 1px solid var(--line, #e1e9e5); border-radius: 14px;
  box-shadow: var(--shadow, 0 18px 34px rgba(19, 59, 62, .12)); max-height: 320px; overflow-y: auto;
  opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .16s var(--bm2-easing), transform .16s var(--bm2-easing);
}
.bm-autocomplete.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.bm-autocomplete-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; text-decoration: none; color: inherit; font-size: .88rem; }
.bm-autocomplete-item:hover { background: var(--surface-soft, #f3f8f5); }
.bm-autocomplete-group-label { padding: 8px 14px 2px; font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--muted, #66807c); }

/* ── Store list / cards ───────────────────────────────────────────────────── */
.bm-store-row { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--line, #e1e9e5); }
.bm-store-row:last-child { border-bottom: none; }
.bm-store-row-title { font-weight: 700; text-decoration: none; color: var(--text, #162d30); }
.bm-store-row-title:hover { color: var(--brand, #0b5a62); }
.bm-store-row-meta { font-size: .8rem; color: var(--muted, #66807c); margin-top: 4px; line-height: 1.6; }

/* ── Product / price table ────────────────────────────────────────────────── */
.bm-offer-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.bm-offer-table th, .bm-offer-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line, #e1e9e5); }
.bm-offer-table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--muted, #66807c); }
.bm-price { font-weight: 800; font-size: 1.05rem; color: var(--brand, #0b5a62); }
.bm-currency-filter { display: flex; gap: 8px; margin: 14px 0; flex-wrap: wrap; }

/* ── Compare table ────────────────────────────────────────────────────────── */
.bm-compare-table { width: 100%; border-collapse: collapse; }
.bm-compare-table th, .bm-compare-table td { padding: 12px 14px; border: 1px solid var(--line, #e1e9e5); font-size: .88rem; vertical-align: top; }
.bm-compare-table th { background: var(--surface2, #eef5f1); font-weight: 700; color: var(--bm2-ink-strong); }

/* ── Alerts / forms ───────────────────────────────────────────────────────── */
.bm-alert { border-radius: 14px; padding: 12px 16px; font-size: .88rem; margin: 14px 0; }
.bm-alert-danger  { background: #fdf1f0; color: #8a332d; border: 1px solid #f2d3d0; }
.bm-alert-success { background: #f1faf5; color: #0f5e46; border: 1px solid #c7e9d7; }
.bm-alert-info    { background: var(--surface-soft, #f3f8f5); color: var(--muted, #66807c); border: 1px solid var(--line, #e1e9e5); }
.bm-form-field { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.bm-form-field label { font-weight: 700; font-size: .88rem; color: var(--bm2-ink-strong); }
.bm-auth-card { max-width: 420px; margin: 0 auto; }
.bm-form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.bm-form-row > .bm-form-field { flex: 1 1 200px; }
.bm-consent-row { display: flex; gap: 10px; align-items: flex-start; font-size: .82rem; color: var(--muted, #66807c); margin: 10px 0; }
/* Honeypot field — off-screen, never shown to real visitors, always empty for them */
.bm-hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── Preloader (async lead-form submit / autocomplete) ───────────────────── */
.bm-spinner {
  display: inline-block; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: bm-spin .7s linear infinite;
  vertical-align: -3px; margin-inline-end: 6px;
}
.bm-spinner.bm-spinner-dark { border-color: var(--line, #e1e9e5); border-top-color: var(--brand, #0b5a62); }
@keyframes bm-spin { to { transform: rotate(360deg); } }
[hidden] { display: none !important; }

/* ── Pre-footer CTA / trust band ──────────────────────────────────────────── */
.bm-prefooter {
  position: relative; overflow: hidden;
  background: var(--bm2-deep); color: #fff;
  border-top: 1px solid var(--bm2-deep2); border-radius: 2rem;
  padding: 44px 40px; margin-top: 44px;
}
.bm-prefooter::before {
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image:
    radial-gradient(circle at 84% 10%, rgba(201, 164, 109, .3), transparent 24%),
    radial-gradient(circle at 12% 90%, rgba(174, 230, 195, .16), transparent 22%),
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: auto, auto, 32px 32px, 32px 32px;
}
.bm-prefooter-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.bm-prefooter-copy { max-width: 560px; }
.bm-prefooter-eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--bm2-gold-light); margin: 0 0 8px; }
.bm-prefooter-copy h2 { color: #fff; margin: 0 0 8px; font-size: 1.5rem; }
.bm-prefooter-lead { color: #b8ccca; margin: 0; font-size: .92rem; line-height: 1.6; }
.bm-prefooter-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.bm-prefooter .bm-btn-primary { background: var(--bm2-gold-light); color: var(--bm2-deep); box-shadow: 0 14px 32px rgba(0, 0, 0, .16); }
.bm-prefooter .bm-btn-primary:hover { background: var(--bm2-gold-lighter); }
.bm-prefooter .bm-btn-ghost { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); color: #fff; }
.bm-prefooter .bm-btn-ghost:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .4); color: #fff; }

/* ── Pagination ───────────────────────────────────────────────────────────── */
.bm-pagination { display: flex; justify-content: space-between; align-items: center; margin: 24px 0; gap: 12px; }

/* ── Inbox (manager lead list) ────────────────────────────────────────────── */
.bm-inbox-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.bm-inbox-table th, .bm-inbox-table td { padding: 10px; border-bottom: 1px solid var(--line, #e1e9e5); text-align: left; }
.bm-inbox-table th { color: var(--muted, #66807c); font-weight: 700; text-transform: uppercase; font-size: .7rem; letter-spacing: .05em; }
.bm-inbox-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.bm-tag-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .68rem; font-weight: 700; color: #fff; margin-right: 4px; }

/* ── Responsive: verified at 375 / 414px ─────────────────────────────────── */
@media (max-width: 860px) {
  .bm-brand-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .bm-prefooter-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .bm-hero-section { border-radius: 1.25rem; padding: 28px 18px; }
  .bm-brand-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .bm-brand-card { padding: 14px; }
  .bm-search-form { flex-direction: column; }
  .bm-search-input { flex: 1 1 auto; width: 100%; }
  .bm-offer-table, .bm-compare-table { display: block; overflow-x: auto; white-space: nowrap; }
  .bm-form-row { flex-direction: column; }
  .bm-prefooter { padding: 28px 20px; border-radius: 1.25rem; }
  .bm-prefooter-copy h2 { font-size: 1.2rem; }
  .bm-inbox-table { display: block; overflow-x: auto; }
}
@media (max-width: 400px) {
  .bm-cat-filters { gap: 6px; }
  .bm-cat-pill { padding: 7px 12px; font-size: .8rem; }
}

/* RTL */
[dir="rtl"] .bm-store-row-meta { text-align: right; }
[dir="rtl"] .bm-spinner { margin-inline-end: 0; margin-inline-start: 6px; }
