/* Bully Max Store Locator (owned). Theme asset assets/bm-store-locator.css. Uses the Classic theme tokens (--bm-orange, --bm-ink,
   --bm-font-*), with fallbacks so the standalone preview renders the same. Mobile first; no layout shift: the map box has a fixed
   aspect ratio before MapLibre loads, the results list reserves its space only after a search. */
.bm-sl { --sl-orange: var(--bm-orange, #fc4f02); --sl-orange-text: var(--bm-orange-text, #c43d00); --sl-ink: var(--bm-ink, #111); --sl-muted: var(--bm-muted, #5f5f5f);
  --sl-line: var(--bm-line, #e3e3e3); --sl-off: #f6f6f6; --sl-green: #1d7a3a; --sl-r: var(--bm-r-btn, 5px); --sl-rc: var(--bm-r-card, 8px);
  --sl-display: var(--bm-font-display, 'Fira Sans Extra Condensed', 'Arial Narrow', sans-serif); --sl-body: var(--bm-font-body, 'Fira Sans', system-ui, sans-serif);
  --sl-label: var(--bm-font-label, 'Fira Sans Condensed', 'Arial Narrow', sans-serif);
  color: var(--sl-ink); font-family: var(--sl-body); background: #fff; max-width: 1240px; margin: 0 auto; padding: 24px 16px 48px; box-sizing: border-box; }
.bm-sl *, .bm-sl *::before, .bm-sl *::after { box-sizing: border-box; }
.bm-sl__sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bm-sl__h1 { font-family: var(--sl-display); font-weight: 900; text-transform: uppercase; font-size: clamp(2.1rem, 6vw, 3.25rem); line-height: .92; margin: 0 0 8px; letter-spacing: 0; }
.bm-sl__lede { margin: 0 0 20px; color: var(--sl-muted); font-size: 1rem; line-height: 1.45; max-width: 60ch; }

/* Search bar */
.bm-sl__form { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 14px; background: var(--sl-off); border-radius: var(--sl-rc); }
.bm-sl__qrow { display: flex; gap: 8px; }
.bm-sl__q { flex: 1; min-width: 0; height: 52px; padding: 0 14px; font: 500 1.05rem/1 var(--sl-body); color: var(--sl-ink); background: #fff; border: 2px solid var(--sl-ink); border-radius: var(--sl-r); }
.bm-sl__q:focus-visible, .bm-sl select:focus-visible, .bm-sl button:focus-visible, .bm-sl a:focus-visible { outline: 3px solid var(--sl-orange); outline-offset: 2px; }
.bm-sl__go { height: 52px; padding: 0 22px; border: 0; border-radius: var(--sl-r); background: var(--sl-orange); color: #fff; font: 700 1.05rem/1 var(--sl-body); cursor: pointer; }
.bm-sl__go:hover { background: var(--sl-orange-text); }
.bm-sl__opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: end; }
.bm-sl__opt { display: grid; gap: 4px; font: 600 .78rem/1 var(--sl-label); text-transform: uppercase; letter-spacing: .05em; color: var(--sl-muted); }
.bm-sl__opt select { height: 44px; padding: 0 10px; font: 500 .95rem/1 var(--sl-body); color: var(--sl-ink); background: #fff; border: 1px solid #bdbdbd; border-radius: var(--sl-r); }
.bm-sl__geo { grid-column: 1 / -1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 14px; background: #fff; color: var(--sl-ink);
  border: 1px solid var(--sl-ink); border-radius: var(--sl-r); font: 600 .95rem/1 var(--sl-body); cursor: pointer; }
.bm-sl__geo svg { width: 18px; height: 18px; flex: none; }
.bm-sl__geo[disabled] { opacity: .6; cursor: progress; }

/* Carried-by strip: which chain carries what (always visible, answers the TSC question before any search) */
.bm-sl__chains { display: grid; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.bm-sl__chain { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--sl-line); border-radius: var(--sl-rc); }
.bm-sl__chain img { width: 64px; height: 40px; object-fit: contain; }
.bm-sl__chain-name { margin: 0; font: 700 1rem/1.2 var(--sl-body); }
.bm-sl__chain-carries { margin: 2px 0 0; font-size: .88rem; color: var(--sl-muted); line-height: 1.35; }
.bm-sl__chain-carries strong { color: var(--sl-ink); font-weight: 600; }
/* "Also at Tractor Supply: Power Tabs + Vitality Chews" (chains whose stores aren't on the map yet) */
.bm-sl__also { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 12px 14px; background: var(--sl-off); border-radius: var(--sl-rc); font-size: .95rem; line-height: 1.35; }
.bm-sl__also a { color: var(--sl-ink); font-weight: 600; font-size: .88rem; }
.bm-sl__chain a { color: var(--sl-ink); font-size: .85rem; font-weight: 600; }

/* Results + map */
.bm-sl__status { margin: 20px 0 10px; min-height: 1.4em; font-size: .98rem; }
.bm-sl__err { color: #b00020; font-weight: 600; }
.bm-sl__tabs { display: flex; gap: 0; margin: 0 0 12px; border: 1px solid var(--sl-ink); border-radius: var(--sl-r); overflow: hidden; width: max-content; }
.bm-sl__tabs button { height: 40px; padding: 0 20px; background: #fff; color: var(--sl-ink); border: 0; font: 600 .9rem/1 var(--sl-body); cursor: pointer; }
.bm-sl__tabs button[aria-selected="true"] { background: var(--sl-ink); color: #fff; }
.bm-sl__body { display: grid; grid-template-columns: 1fr; gap: 16px; }
.bm-sl__map { position: relative; width: 100%; aspect-ratio: 4 / 3; background: #eef0ee url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M0 20h40M20 0v40' stroke='%23dde1dd' stroke-width='1'/%3E%3C/svg%3E"); border-radius: var(--sl-rc); overflow: hidden; }
.bm-sl__map-load { position: absolute; inset: 0; margin: auto; width: max-content; height: 44px; padding: 0 18px; background: #fff; border: 1px solid var(--sl-ink); border-radius: var(--sl-r); font: 600 .95rem/1 var(--sl-body); cursor: pointer; }
.bm-sl__map.is-live .bm-sl__map-load, .bm-sl__map.is-failed .bm-sl__map-load { display: none; }
.bm-sl__results { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.bm-sl[data-view="map"] .bm-sl__list-col { display: none; }
.bm-sl:not([data-view="map"]) .bm-sl__map-col { display: none; }
.bm-sl__card { padding: 14px; border: 1px solid var(--sl-line); border-radius: var(--sl-rc); background: #fff; transition: border-color .15s; }
.bm-sl__card.is-active { border-color: var(--sl-ink); }
.bm-sl__card-top { display: grid; grid-template-columns: 28px 1fr; gap: 10px; }
.bm-sl__num { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--sl-ink); color: #fff; font: 700 .85rem/1 var(--sl-body); }
.bm-sl__name { margin: 0; font: 700 1.08rem/1.25 var(--sl-body); text-transform: none; letter-spacing: 0; }
.bm-sl__focus { all: unset; cursor: pointer; }
.bm-sl__focus:hover { text-decoration: underline; }
.bm-sl__branch { font-weight: 400; color: var(--sl-muted); }
.bm-sl__dist { margin: 2px 0 0; font: 700 .9rem/1 var(--sl-body); color: var(--sl-orange-text); }
.bm-sl__badge { display: inline-block; margin: 6px 0 0; padding: 3px 8px; background: #fff4e5; color: #7a4300; border-radius: 4px; font-size: .78rem; font-weight: 600; }
.bm-sl__addr, .bm-sl__hours, .bm-sl__phone { margin: 4px 0 0; font-size: .92rem; line-height: 1.35; }
.bm-sl__phone a { color: var(--sl-ink); }
.bm-sl__hours { color: var(--sl-muted); }
.bm-sl__carries-h { margin: 12px 0 6px; font: 600 .74rem/1 var(--sl-label); text-transform: uppercase; letter-spacing: .06em; color: var(--sl-muted); }
.bm-sl__carries--none { margin: 10px 0 0; font-size: .86rem; color: var(--sl-muted); }
.bm-sl__chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.bm-sl__chip { display: inline-flex; flex-direction: column; gap: 1px; padding: 6px 9px; border: 1px solid var(--sl-line); border-radius: 6px; font-size: .84rem; line-height: 1.2; }
.bm-sl__chip a { color: var(--sl-ink); font-weight: 600; text-decoration: none; }
.bm-sl__chip span { font-size: .74rem; color: var(--sl-muted); }
.bm-sl__chip--in_stock { border-color: #b9dcc4; background: #f2faf4; }
.bm-sl__chip--in_stock span { color: var(--sl-green); font-weight: 600; }
.bm-sl__chip--out_of_stock { opacity: .65; }
.bm-sl__chip--out_of_stock a { text-decoration: line-through; }
.bm-sl__checked { margin: 6px 0 0; font-size: .74rem; color: var(--sl-muted); }
.bm-sl__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.bm-sl__btn { display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border: 1px solid var(--sl-ink); border-radius: var(--sl-r); color: var(--sl-ink); background: #fff; font: 600 .9rem/1 var(--sl-body); text-decoration: none; }
.bm-sl__btn--primary { background: var(--sl-orange); border-color: var(--sl-orange); color: #fff; }
.bm-sl__btn--primary:hover { background: var(--sl-orange-text); border-color: var(--sl-orange-text); }
.bm-sl__card--online p { margin: 0 0 10px; font-size: .92rem; }
.bm-sl__card--online a:not(.bm-sl__btn) { color: var(--sl-ink); font-weight: 600; }
.bm-sl--loading .bm-sl__results { opacity: .5; }

/* Markers */
.bm-sl__pin { width: 28px; height: 28px; border-radius: 50%; background: var(--sl-ink); color: #fff; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35);
  font: 700 .78rem/1 var(--sl-body); display: grid; place-items: center; cursor: pointer; padding: 0; }
.bm-sl__pin.is-active { background: var(--sl-orange); z-index: 2; }
.bm-sl__pin--dot { width: 12px; height: 12px; border-radius: 50%; transform: none; background: var(--sl-orange); }

/* Directory (server-rendered, SEO + no-JS) */
.bm-sl__directory { margin-top: 28px; }
.bm-sl__directory h2 { font-family: var(--sl-display); font-weight: 900; text-transform: uppercase; font-size: 1.9rem; line-height: .95; margin: 0 0 12px; }
.bm-sl__dir-state { border-top: 1px solid var(--sl-line); }
.bm-sl__dir-state > summary { display: flex; justify-content: space-between; padding: 14px 2px; cursor: pointer; font: 700 1rem/1 var(--sl-body); list-style: none; }
.bm-sl__dir-state > summary::-webkit-details-marker { display: none; }
.bm-sl__dir-state > summary::after { content: '+'; font-weight: 400; }
.bm-sl__dir-state[open] > summary::after { content: '–'; }
.bm-sl__dir-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.bm-sl__dir-list li { font-size: .92rem; line-height: 1.35; }
.bm-sl__dir-list strong { display: block; }
.bm-sl__dir-list a { color: var(--sl-ink); }
.bm-sl__online { margin-top: 28px; padding: 18px; background: var(--sl-off); border-radius: var(--sl-rc); }
.bm-sl__online h2 { font-family: var(--sl-display); font-weight: 900; text-transform: uppercase; font-size: 1.6rem; line-height: .95; margin: 0 0 10px; }
.bm-sl__online ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.bm-sl__online a { display: inline-flex; align-items: center; height: 44px; padding: 0 16px; background: #fff; border: 1px solid #cfcfcf; border-radius: var(--sl-r); color: var(--sl-ink); font-weight: 600; text-decoration: none; }

@media (min-width: 600px) {
  .bm-sl__form { grid-template-columns: 1fr auto; align-items: end; }
  .bm-sl__opts { grid-template-columns: 160px 220px auto; }
  .bm-sl__geo { grid-column: auto; }
  .bm-sl__chains { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .bm-sl { padding: 40px 24px 64px; }
  .bm-sl__form { grid-template-columns: minmax(280px, 1fr) auto; padding: 18px; }
  .bm-sl__tabs { display: none; }
  .bm-sl__body { grid-template-columns: minmax(340px, 420px) 1fr; align-items: start; }
  .bm-sl[data-view] .bm-sl__list-col, .bm-sl[data-view] .bm-sl__map-col { display: block; }
  .bm-sl__list-col { max-height: 720px; overflow: auto; padding-right: 4px; overscroll-behavior: contain; }
  .bm-sl__map-col { position: sticky; top: 90px; }
  .bm-sl__map { aspect-ratio: auto; height: 640px; }
  .bm-sl__chains { grid-template-columns: repeat(3, 1fr); }
  .bm-sl__dir-states { columns: 2; column-gap: 32px; }
  .bm-sl__dir-state { break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) { .bm-sl * { transition: none !important; scroll-behavior: auto !important; } }
