/* ==========================================================
   Dynabrade – Where to Buy (US)
   ========================================================== */
:root {
  --wtb-orange: #f26a21;
  --wtb-orange-dark: #d9561a;
  --wtb-orange-soft: #fff1e8;
  --wtb-dark: #1f2129;
  --wtb-ink: #16181d;
  --wtb-muted: #5d636e;
  --wtb-border: #e3e6ea;
  --wtb-bg: #f4f5f7;
  --wtb-green: #1f9d4c;
  --wtb-green-soft: #e6f6ec;
  --wtb-radius: 18px;
}

* { -webkit-font-smoothing: antialiased; }

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--wtb-bg);
  color: var(--wtb-ink);
  font-size: 15px;
}

.wtb-container { max-width: 1184px; }

/* ---------- Hero ---------- */
.wtb-hero {
  background:
    radial-gradient(800px 260px at 100% 0%, rgba(242, 106, 33, .35), transparent 70%),
    var(--wtb-dark);
  color: #fff;
  padding: 28px 0 160px;
}
.wtb-title {
  font-weight: 800;
  letter-spacing: -.03em;
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.1;
  margin-bottom: 18px;
}
.wtb-lead { max-width: 640px; color: #dfe2e7; font-size: 16px; line-height: 1.5; margin: 0; }
.wtb-link { color: var(--wtb-orange); text-decoration: underline; text-underline-offset: 2px; }
.wtb-link:hover { color: #ff8a4c; }

/* ---------- Search card ---------- */
.wtb-search-wrap { margin-top: -120px; position: relative; z-index: 2; }
.wtb-search-card {
  background: #fff;
  border-radius: var(--wtb-radius);
  overflow: hidden;
  box-shadow: 0 24px 50px -20px rgba(16, 24, 40, .25), 0 2px 6px rgba(16, 24, 40, .04);
}
.wtb-form { padding: 34px 32px 30px; }
.wtb-form-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.wtb-form-note { color: var(--wtb-muted); font-size: 14px; margin-bottom: 20px; }
.wtb-label { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.req { color: var(--wtb-orange); }

.wtb-input {
  height: 46px;
  border-radius: 8px;
  border-color: var(--wtb-border);
  font-size: 15px;
  padding-left: 14px;
}
.wtb-input:focus {
  border-color: var(--wtb-orange);
  box-shadow: 0 0 0 .2rem rgba(242, 106, 33, .15);
}

.wtb-segment {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: #f1f3f5;
  border-radius: 10px;
  padding: 4px;
}
.wtb-seg-btn {
  text-align: center;
  padding: 9px 4px;
  border-radius: 7px;
  font-size: 14px;
  color: var(--wtb-muted);
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
  margin: 0;
}
.wtb-seg-btn:hover { color: var(--wtb-ink); }
.btn-check:checked + .wtb-seg-btn {
  background: #fff;
  color: var(--wtb-ink);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .12);
}
.btn-check:focus-visible + .wtb-seg-btn { outline: 2px solid var(--wtb-orange); outline-offset: 1px; }

.wtb-btn-primary {
  background: var(--wtb-orange);
  border: 0;
  color: #fff;
  font-weight: 600;
  height: 46px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}
.wtb-btn-primary:hover, .wtb-btn-primary:focus { background: var(--wtb-orange-dark); color: #fff; }
.wtb-btn-primary.is-loading { opacity: .8; pointer-events: none; }

.wtb-geo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 18px;
  background: none;
  border: 0;
  color: var(--wtb-orange);
  font-size: 14px;
  font-weight: 500;
}
.wtb-geo:hover { text-decoration: underline; }

/* ---------- Map ---------- */
.wtb-map {
  position: relative;
  height: 100%;
  min-height: 492px;
  background: #e8edf1;
  overflow: hidden;
}
.wtb-map-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; font-family: inherit; }
.wtb-map-canvas .leaflet-control-attribution { font-size: 10px; }

/* Leaflet markers (L.divIcon) */
.wtb-pin { background: none; border: 0; }
.wtb-pin svg { display: block; overflow: visible; filter: drop-shadow(0 2px 3px rgba(0,0,0,.28)); }
.wtb-pin path { fill: var(--wtb-orange); stroke: #fff; stroke-width: 2.5; transition: fill .15s; }
.wtb-pin text { fill: #fff; font: 700 13px "Inter", system-ui, sans-serif; text-anchor: middle; }
.wtb-pin:hover path, .wtb-pin:focus path, .wtb-pin.active path { fill: #c2410c; }
.wtb-pin.active { z-index: 1000 !important; }
.wtb-pin.is-hidden { opacity: .3; }
.wtb-pin-me path { fill: var(--wtb-ink); }
.wtb-pin:focus { outline: none; }
.wtb-pin:focus-visible svg { outline: 2px solid var(--wtb-orange); outline-offset: 2px; border-radius: 50%; }

.wtb-zoom {
  position: absolute;
  z-index: 1000;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(16, 24, 40, .12);
  overflow: hidden;
}
.wtb-zoom button {
  width: 38px;
  height: 38px;
  border: 0;
  background: #fff;
  font-size: 18px;
  line-height: 1;
  color: var(--wtb-ink);
}
.wtb-zoom button + button { border-top: 1px solid var(--wtb-border); }
.wtb-zoom button:hover { background: #f6f7f9; }

.wtb-map-chip {
  position: absolute;
  z-index: 1000;
  left: 16px;
  bottom: 24px;
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(16, 24, 40, .12);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.wtb-map-chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--wtb-ink); margin-right: 4px; }

/* ---------- Results ---------- */
.wtb-results { padding-top: 60px; padding-bottom: 80px; }
.wtb-results-title { font-size: 25px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 6px; }
.wtb-results-sub { color: var(--wtb-muted); }
.wtb-results-sub strong { color: var(--wtb-ink); }

.wtb-legend {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--wtb-border);
  border-radius: 999px;
  padding: 7px 14px 7px 12px;
  font-size: 14px;
  color: #3b4049;
}

.wtb-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--wtb-green-soft);
  color: var(--wtb-green);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.wtb-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.wtb-pill {
  border: 1px solid var(--wtb-border);
  background: #fff;
  color: var(--wtb-ink);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 14px;
  transition: all .15s;
}
.wtb-pill:hover { border-color: #c4c9d0; }
.wtb-pill.active { background: var(--wtb-ink); border-color: var(--wtb-ink); color: #fff; font-weight: 600; }

.wtb-list { display: flex; flex-direction: column; gap: 14px; }

.wtb-item {
  background: #fff;
  border: 1px solid var(--wtb-border);
  border-radius: 12px;
  transition: border-color .2s, box-shadow .2s;
}
.wtb-item.open { border-color: #f6b58f; box-shadow: 0 6px 18px -10px rgba(242, 106, 33, .35); }
.wtb-item.flash { box-shadow: 0 0 0 3px rgba(242, 106, 33, .35); }

.wtb-item-head {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 20px 20px;
  background: none;
  border: 0;
  text-align: left;
  color: inherit;
}
.wtb-num {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--wtb-orange-soft);
  color: var(--wtb-orange);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wtb-item-info { flex: 1 1 auto; min-width: 0; }
.wtb-item-name { font-weight: 600; font-size: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.wtb-item-city { color: var(--wtb-muted); font-size: 14px; margin-top: 4px; }
.wtb-dist { font-weight: 600; white-space: nowrap; }
.wtb-chev { color: var(--wtb-muted); transition: transform .2s; flex: 0 0 auto; }
.wtb-item.open .wtb-chev { transform: rotate(180deg); color: var(--wtb-orange); }

.wtb-item-body { display: none; padding: 0 20px 20px 72px; }
.wtb-details {
  background: #f5f6f8;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}
.wtb-details h6 {
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--wtb-muted);
  font-weight: 500;
  margin-bottom: 6px;
}
.wtb-details p { margin: 0; font-size: 14px; line-height: 1.5; }

.wtb-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.wtb-actions .btn { font-size: 14px; font-weight: 600; border-radius: 8px; padding: 9px 15px; }
.wtb-btn-outline { border: 1px solid var(--wtb-border); background: #fff; color: var(--wtb-ink); }
.wtb-btn-outline:hover { border-color: #c4c9d0; background: #fafbfc; }
.wtb-actions .wtb-btn-primary { height: auto; margin-top: 0; }

.wtb-empty {
  background: #fff;
  border: 1px dashed var(--wtb-border);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  color: var(--wtb-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .wtb-hero { padding: 22px 0 120px; }
  .wtb-search-wrap { margin-top: -90px; }
  .wtb-map { min-height: 360px; }
}

@media (max-width: 575.98px) {
  body { font-size: 14px; }
  .wtb-hero { padding: 18px 0 100px; }
  .wtb-lead { font-size: 15px; }
  .wtb-search-wrap { margin-top: -76px; }
  .wtb-form { padding: 24px 20px; }
  .wtb-seg-btn { font-size: 13px; }
  .wtb-map { min-height: 300px; }
  .wtb-map-chip { left: 12px; bottom: 12px; font-size: 12px; }
  .wtb-zoom { top: 12px; right: 12px; }
  .wtb-results { padding-top: 40px; }
  .wtb-results-title { font-size: 22px; }
  .wtb-legend { border-radius: 12px; font-size: 13px; }
  .wtb-item-head { padding: 16px; gap: 12px; flex-wrap: wrap; }
  .wtb-item-info { flex-basis: calc(100% - 48px); }
  .wtb-item-meta { margin-left: 48px; display: flex; align-items: center; gap: 10px; width: calc(100% - 48px); justify-content: space-between; }
  .wtb-item-body { padding: 0 16px 16px; }
  .wtb-actions .btn { flex: 1 1 auto; }
}

@media (min-width: 576px) {
  .wtb-item-meta { display: flex; align-items: center; gap: 22px; }
}
