/* ========================================================================
   MERCADO — brand locator map
   Drawn in the logomark's line system: uniform strokes, round caps, round
   joins, gold on forest. Geometry is real — road centrelines pulled from
   OpenStreetMap and projected to metres with the shop door at the origin,
   so the viewBox unit IS one metre. Nothing here is invented.
   Stylised, not a survey: the "Open in Maps" link is the wayfinding path.
   ======================================================================== */

.locator {
  position: relative;
  /* The plate reflows on its own measure, not the viewport's: it is ~728px
     wide in the two-column Visit grid, ~400px in the stacked one, and the
     bands below need to break on that, not on the window. */
  container-type: inline-size;
  container-name: locator;
  margin-top: var(--space-lg);
  background: var(--forest);
  border: 1px solid rgb(var(--gold-rgb) / 0.30);
  border-radius: var(--radius-soft);
  overflow: hidden;
}

.locator-svg {
  display: block;
  width: 100%;
  height: auto;
  /* Roads inherit this; each class tints from it. */
  color: var(--candle);
}

/* ---- road hierarchy: three weights, mirroring the mark's line system ---- */
.locator .rd { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.locator .rd-minor { stroke: rgb(var(--sage-rgb) / 0.85); stroke-width: 4; }
.locator .rd-major { stroke: rgb(var(--sand-rgb) / 0.55); stroke-width: 7; }
.locator .rd-spine { stroke: var(--candle); stroke-width: 9; opacity: 0.9; }

/* ---- labels ---- */
.locator .lbl {
  font-family: var(--font-body);
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  fill: rgb(var(--sand-rgb) / 0.75);
}
.locator .lbl-spine { fill: rgb(var(--gold-rgb) / 0.9); }

/* ---- the marker: the llama mark, with the pulse ring over it ---- */
.locator .pin-llama { filter: drop-shadow(0 0 6px rgb(var(--gold-rgb) / 0.35)); }
.locator .pin-ring {
  fill: none;
  stroke: var(--candle);
  stroke-width: 3;
  opacity: 0.55;
}
.locator .pin-label {
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  fill: var(--cream);
}

/* Reduced motion: no pulse. Otherwise the ring breathes once every 4s. */
@media (prefers-reduced-motion: no-preference) {
  .locator .pin-ring { animation: pinPulse 4s ease-in-out infinite; transform-origin: 0px 0px; }
  @keyframes pinPulse {
    0%, 70%, 100% { opacity: 0.55; r: 46px; }   /* rest radius matches the circle, outside the 72px llama */
    85%           { opacity: 0;    r: 70px; }
  }
}

/* ---- scale bar + compass ---- */
.locator .rule { stroke: rgb(var(--sand-rgb) / 0.5); stroke-width: 2; stroke-linecap: round; }
.locator .rule-txt { font-family: var(--font-body); font-size: 14px; fill: rgb(var(--sand-rgb) / 0.6); }

/* ---- lead variant: the map is the subject of the Find us column ----
   Not a thumbnail beside an address any more. The plate carries the map,
   then the address, then the second location — three bands, one edge. */
.locator--lead {
  margin-top: 0;
  border-color: rgb(var(--gold-rgb) / 0.38);
}

/* ---- address band: accent, not headline ----
   The address used to be set at up to 2.25rem in its own column and out-shouted
   the map. Here it is the caption to the map: same display face and tracking,
   a third of the size, sat on the plate. */
.locator-address {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  /* Rows declared, not implicit: with no explicit rows the Maps link's
     `grid-row: 1 / -1` resolves to row 1 alone and it hangs half way up the
     band instead of landing on its baseline. */
  grid-template-rows: auto auto;
  align-items: end;
  gap: var(--space-2xs) var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border-top: 1px solid rgb(var(--gold-rgb) / 0.22);
  background: rgb(var(--forest-rgb) / 0.55);
}
.locator-address address {
  grid-column: 1;
  font-style: normal;
  display: grid;
  gap: 4px;
}
.locator-address .locator-street {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.15rem, 0.7vw + 0.95rem, 1.5rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream);
  line-height: 1.1;
}
.locator-address .locator-place {
  font-family: var(--font-body);
  font-size: var(--type-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgb(var(--sand-rgb) / 0.72);
}
.locator-address .contacts {
  grid-column: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px var(--space-sm);
  margin: 2px 0 0;
  font-size: 0.9rem;
  color: var(--cream-soft);
}
.locator-address .contacts a { color: var(--cream); }
.locator-address .contacts a:hover { color: var(--candle); }
/* The Maps link is the wayfinding path — parked on the band's baseline,
   right, so it reads as the plate's one action. */
.locator-address .maps-link {
  grid-column: 2;
  grid-row: 1 / -1;
  align-self: end;
  white-space: nowrap;
  color: var(--candle);
}
.locator-address .maps-link:hover { color: var(--cream); }

/* ---- second location strip ---- */
.locator-second {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  border-top: 1px solid rgb(var(--sage-rgb) / 0.55);
  background: var(--forest-soft);
  font-family: var(--font-body);
  font-size: var(--type-micro);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sand-deep);
}
.locator-second b { color: var(--cream); font-weight: 500; }
.locator-second .bearing {
  margin-left: auto;
  white-space: nowrap;
  color: rgb(var(--sand-rgb) / 0.65);
  text-transform: none;
  letter-spacing: 0.04em;
  font-style: italic;
  font-family: var(--font-italic);
}
.locator-second a { color: var(--candle); text-decoration: none; border-bottom: 1px solid rgb(var(--gold-rgb) / 0.4); }
.locator-second a:hover { border-bottom-color: var(--candle); }

/* ---- narrow plate: one column, one thing per line ----
   Under ~544px of plate the address band cannot hold a second column without
   wrapping "192 BURTON ROAD" onto two lines, so the Maps link drops beneath
   the address and the second-location strip is allowed to wrap. The map's own
   labels scale up to stay legible at the smaller render size. */
@container locator (max-width: 34rem) {
  .locator .lbl { font-size: 19px; }
  .locator .pin-label { font-size: 26px; }

  .locator-address {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
  }
  .locator-address .maps-link {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    margin-top: var(--space-2xs);
  }

  .locator-second { flex-wrap: wrap; gap: var(--space-2xs) var(--space-sm); }
  .locator-second .bearing { margin-left: 0; flex-basis: 100%; white-space: normal; }
}
