/*
 * Hickory Chair · Showroom locator and detail pages
 *
 * Two surfaces share these tokens: showrooms.html (locator with map + list)
 * and showroom-detail.html (single-showroom detail with schedule form).
 * Token names mirror trade.css to keep brand consistency across the surface.
 */

:root {
  --sr-ink:#14110d;
  --sr-ink-soft:#2c2620;
  --sr-muted:#786d5f;
  --sr-muted-soft:#a89e8d;
  --sr-line:rgba(20,17,13,0.10);
  --sr-line-soft:rgba(20,17,13,0.06);
  --sr-canvas:#f1ece2;
  --sr-paper:#fbf8f1;
  --sr-soft:#ece6d9;
  --sr-gold:#97774a;
  --sr-gold-deep:#6f5634;
  --sr-serif:"Cormorant Garamond","Garamond","Times New Roman",serif;
  --sr-sans:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sr-sans);
  font-size: 15px;
  line-height: 1.55;
  background: var(--sr-paper);
  color: var(--sr-ink);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--sr-gold); color: white; }

/* Top bar */
.sr-topbar {
  position: sticky; top: 0; z-index: 20;
  height: calc(44px + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(251, 248, 241, 0.94);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--sr-line-soft);
  display: flex; align-items: center; justify-content: space-between;
  padding-left: 14px; padding-right: 14px;
}
.sr-topbar-back {
  font-family: var(--sr-sans);
  font-size: 13px;
  color: var(--sr-ink-soft);
  display: inline-flex; align-items: center; gap: 4px;
}
.sr-topbar-title {
  font-family: var(--sr-serif);
  font-size: 17px;
  font-weight: 500;
}
.sr-topbar-spacer { width: 60px; }

/* Hero */
.sr-hero {
  margin: 24px 18px 0;
  background: linear-gradient(135deg, #14110d 0%, #2c2620 100%);
  border-radius: 8px;
  padding: 32px 24px;
  color: white;
  position: relative;
  overflow: hidden;
}
.sr-hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(151,119,74,0.4) 0%, transparent 70%);
  pointer-events: none;
}
.sr-hero .eyebrow {
  font-size: 10px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  margin: 0 0 10px;
  font-weight: 600;
}
.sr-hero h1 {
  margin: 0 0 14px;
  font-family: var(--sr-serif);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.1;
}
.sr-hero p {
  margin: 0;
  color: rgba(255,255,255,0.78);
  font-size: 14px;
  line-height: 1.55;
  max-width: 560px;
}

/* Section frame */
.sr-section {
  padding: 28px 18px 0;
  max-width: 980px;
  margin: 0 auto;
}
.sr-section h2 {
  margin: 0 0 4px;
  font-family: var(--sr-serif);
  font-size: 22px;
  font-weight: 500;
}
.sr-section .lead {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--sr-muted);
}

/* Search */
.sr-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid var(--sr-line);
  border-radius: 4px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.sr-search svg {
  width: 18px; height: 18px;
  fill: none; stroke: var(--sr-muted); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
  flex: 0 0 auto;
}
.sr-search input {
  flex: 1;
  border: 0;
  outline: none;
  font: inherit;
  font-size: 16px;
  color: var(--sr-ink);
  background: transparent;
}
.sr-search input::placeholder { color: var(--sr-muted-soft); }

/* Map */
.sr-map-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #ece6d9, #d6cab7);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
}
.sr-map-wrap svg { width: 100%; height: 100%; display: block; }
.sr-map-marker {
  cursor: pointer;
  transition: transform 160ms ease;
  transform-origin: center;
  transform-box: fill-box;
}
.sr-map-marker:hover,
.sr-map-marker:focus { outline: none; }
.sr-map-marker:hover .sr-map-marker-ring,
.sr-map-marker:focus .sr-map-marker-ring {
  opacity: 1;
}
.sr-map-marker-ring {
  opacity: 0;
  transition: opacity 160ms ease;
}
.sr-map-marker.is-hq circle:nth-child(2) {
  fill: #14110d;
}
.sr-map-tooltip {
  position: absolute;
  background: rgba(20,17,13,0.94);
  color: white;
  font-size: 11px;
  font-weight: 500;
  padding: 5px 9px;
  border-radius: 3px;
  pointer-events: none;
  transform: translate(-50%, -100%);
  margin-top: -10px;
  white-space: nowrap;
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 140ms ease;
}
.sr-map-tooltip.is-visible { opacity: 1; }
.sr-map-caption {
  position: absolute;
  left: 14px;
  bottom: 12px;
  color: var(--sr-ink);
  font-size: 11px;
  letter-spacing: 0.06em;
  background: rgba(251, 248, 241, 0.94);
  padding: 6px 10px;
  border-radius: 3px;
}

/* Showroom list */
.sr-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding-bottom: 32px;
}
@media (min-width: 640px) {
  .sr-list { grid-template-columns: repeat(2, 1fr); }
}
.sr-card {
  background: white;
  border: 1px solid var(--sr-line-soft);
  border-radius: 6px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.sr-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(28,22,14,0.06);
}
.sr-card .city {
  font-family: var(--sr-serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--sr-ink);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sr-card .city .state {
  font-family: var(--sr-sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sr-muted);
  font-weight: 600;
}
.sr-card .name {
  font-size: 13px;
  color: var(--sr-ink-soft);
  margin: 0;
  font-weight: 500;
}
.sr-card .address,
.sr-card .phone {
  font-size: 12px;
  color: var(--sr-muted);
  margin: 0;
}
.sr-card .visit {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sr-gold-deep);
}
.sr-card .hq-badge {
  position: absolute;
  top: 14px; right: 14px;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: white;
  background: var(--sr-ink);
  padding: 4px 8px;
  border-radius: 999px;
}
.sr-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 16px;
  color: var(--sr-muted);
  font-size: 13px;
}

/* Footer */
.sr-footer {
  margin-top: 24px;
  padding: 24px 18px 28px;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sr-muted);
  border-top: 1px solid var(--sr-line-soft);
}
.sr-footer a { color: var(--sr-gold-deep); }

/* ---------- Detail page ---------- */

.sr-detail-header {
  margin: 24px 18px 0;
  background: white;
  border: 1px solid var(--sr-line-soft);
  border-radius: 8px;
  padding: 24px 22px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.sr-detail-header .eyebrow {
  font-size: 10px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--sr-gold-deep);
  font-weight: 600;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sr-detail-header .eyebrow .hq-pill {
  background: var(--sr-ink);
  color: white;
  letter-spacing: 0.18em;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
}
.sr-detail-header h1 {
  margin: 0 0 6px;
  font-family: var(--sr-serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.15;
}
.sr-detail-header .subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--sr-muted);
}

.sr-detail-section {
  max-width: 720px;
  margin: 18px auto 0;
  padding: 0 18px;
}
.sr-detail-card {
  background: white;
  border: 1px solid var(--sr-line-soft);
  border-radius: 8px;
  padding: 22px 20px;
}
.sr-detail-card h3 {
  margin: 0 0 12px;
  font-family: var(--sr-serif);
  font-size: 18px;
  font-weight: 500;
}
.sr-detail-card .row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 14px;
}
.sr-detail-card .row:last-child { margin-bottom: 0; }
.sr-detail-card .row .label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sr-muted);
  font-weight: 600;
  min-width: 80px;
}
.sr-detail-card .row .value {
  color: var(--sr-ink);
  flex: 1;
}
.sr-detail-card .row a {
  color: var(--sr-gold-deep);
  font-weight: 500;
}

.sr-copy-btn {
  background: var(--sr-canvas);
  border: 1px solid var(--sr-line);
  color: var(--sr-ink);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 3px;
  cursor: pointer;
  transition: background 140ms ease;
}
.sr-copy-btn:hover { background: var(--sr-soft); }
.sr-copy-btn.is-copied { background: var(--sr-gold); color: white; border-color: var(--sr-gold); }

/* Hours table */
.sr-hours {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.sr-hours th, .sr-hours td {
  text-align: left;
  padding: 7px 0;
  border-bottom: 1px solid var(--sr-line-soft);
}
.sr-hours th {
  font-weight: 600;
  color: var(--sr-muted);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  width: 110px;
}
.sr-hours td { color: var(--sr-ink); }
.sr-hours tr:last-child th,
.sr-hours tr:last-child td { border-bottom: 0; }

/* Sales rep */
.sr-rep {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sr-rep .rep-name {
  font-family: var(--sr-serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--sr-ink);
}
.sr-rep .rep-role {
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--sr-muted);
  font-weight: 600;
}
.sr-rep .rep-contact {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
}
.sr-rep .rep-contact a { color: var(--sr-gold-deep); }

/* Schedule visit form */
.sr-visit-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 12px;
}
@media (max-width: 560px) {
  .sr-visit-form { grid-template-columns: 1fr; }
}
.sr-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sr-field--full { grid-column: 1 / -1; }
.sr-field label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--sr-muted);
}
.sr-field input[type="date"],
.sr-field input[type="number"],
.sr-field input[type="text"],
.sr-field textarea {
  font-family: var(--sr-sans);
  font-size: 14px;
  color: var(--sr-ink);
  background: var(--sr-paper);
  border: 1px solid var(--sr-line);
  border-radius: 4px;
  padding: 11px 12px;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
  width: 100%;
}
@media (max-width: 720px) {
  .sr-field input,
  .sr-field textarea {
    font-size: 16px;
    padding: 12px 14px;
    min-height: 44px;
  }
}
.sr-field textarea {
  min-height: 90px;
  resize: vertical;
  line-height: 1.5;
}
.sr-field input:focus,
.sr-field textarea:focus {
  border-color: var(--sr-gold);
  box-shadow: 0 0 0 3px rgba(151, 119, 74, 0.12);
}
.sr-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.sr-submit {
  background: var(--sr-ink);
  color: white;
  border: 0;
  padding: 14px 26px;
  border-radius: 4px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 140ms ease;
}
.sr-submit:hover { background: var(--sr-gold-deep); }
.sr-fineprint {
  font-size: 11px;
  color: var(--sr-muted);
  flex: 1 1 200px;
  line-height: 1.5;
}

/* Toast */
.sr-toast {
  position: fixed;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%) translateY(20px);
  background: var(--sr-ink);
  color: white;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 12px 32px rgba(20, 17, 13, 0.25);
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
  z-index: 100;
  max-width: calc(100vw - 36px);
  text-align: center;
}
.sr-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Action row on detail page */
.sr-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.sr-detail-actions a,
.sr-detail-actions button {
  background: var(--sr-paper);
  border: 1px solid var(--sr-line);
  color: var(--sr-ink);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 16px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sr-detail-actions a.primary,
.sr-detail-actions button.primary {
  background: var(--sr-ink);
  color: white;
  border-color: var(--sr-ink);
}

/* Trade-page CTA bridge (used inside trade.html) */
.t-locator-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: white;
  border: 1px solid var(--sr-line-soft);
  border-left: 4px solid var(--sr-gold);
  border-radius: 6px;
  padding: 18px 20px;
  margin-bottom: 16px;
  text-decoration: none;
  color: inherit;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.t-locator-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(28,22,14,0.06);
}
.t-locator-cta-text h3 {
  margin: 0 0 4px;
  font-family: var(--sr-serif);
  font-size: 18px;
  font-weight: 500;
}
.t-locator-cta-text p {
  margin: 0;
  font-size: 12px;
  color: var(--sr-muted);
}
.t-locator-cta-arrow {
  font-size: 20px;
  color: var(--sr-gold-deep);
  flex: 0 0 auto;
}
