:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --ink: #0f1f2e;
  --ink-soft: #586876;
  --navy: #0f2235;
  --navy-deep: #081826;
  --navy-soft: #e6ecf2;
  --accent: #2f7a3f;
  --accent-deep: #1f5a2c;
  --accent-soft: #e6f0e3;
  --border: #d6dbe0;
  --shadow: 0 2px 8px rgba(15, 34, 53, 0.07);
  --shadow-lg: 0 12px 40px rgba(15, 34, 53, 0.18);
  --radius: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #f4f2ec;
  line-height: 1.5;
}

/* Slim, dark, overlay-style scrollbar so the page's native scrollbar
   doesn't look like a fat white block over the right-edge UI. */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.35) transparent;
}
html::-webkit-scrollbar { width: 8px; background: transparent; }
html::-webkit-scrollbar-track { background: transparent; }
html::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 4px;
}
html::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.55); }
body {
  min-height: 100vh;
  padding-left: 280px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ Site header ============ */
.site-header {
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  position: sticky;
  top: 0;
  z-index: 60;
  box-shadow: 0 1px 0 rgba(15, 34, 53, 0.04);
}
.site-header-row {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 14px 24px;
  min-height: 78px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex: 0 0 auto;
}
.brand-mark {
  display: inline-flex;
  width: 56px;
  height: 42px;
  color: var(--navy);
}
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-word {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
}
.brand-name {
  font-weight: 900;
  font-size: 30px;
  letter-spacing: 0.5px;
  font-family: "Helvetica Neue", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
.brand-name-a { color: var(--navy); }
.brand-name-b { color: var(--accent); margin-left: 6px; }
.brand-tag {
  margin-top: 4px;
  font-size: 10px;
  letter-spacing: 3px;
  font-weight: 700;
  color: var(--navy);
  opacity: 0.78;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
  justify-content: center;
}
.nav-link {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 120ms ease, border-color 120ms ease;
}
.nav-link:hover { color: var(--accent); border-bottom-color: var(--accent); }
.site-nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 0 0 auto;
}
.nav-icon-btn {
  background: transparent;
  border: none;
  color: var(--navy);
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px;
  letter-spacing: 0.2px;
}
.nav-icon-btn:hover { color: var(--accent); }
.nav-icon-btn svg { display: block; }

@media (max-width: 900px) {
  .site-nav { display: none; }
  .site-header-row { gap: 16px; }
  .brand-name { font-size: 24px; }
  .brand-tag { letter-spacing: 2px; }
  .brand-mark { width: 46px; height: 34px; }
}
@media (max-width: 540px) {
  .site-nav-actions .nav-icon-btn span { display: none; }
}

.controls {
  background: #f4f2ec;
  border-bottom: 1px solid rgba(15, 34, 53, 0.10);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 60;
}
.controls .top-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding-bottom: 12px;
}
.reset-link {
  margin-left: 4px;
}
.controls input[type="search"],
.controls select {
  font: inherit;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 6px;
  padding: 9px 12px;
  min-height: 40px;
  box-shadow: 0 1px 2px rgba(15, 34, 53, 0.06);
}
.controls input[type="search"] {
  flex: 1 1 280px;
  min-width: 200px;
}
.controls select {
  flex: 0 0 auto;
}
.controls input[type="search"]:focus,
.controls select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.count {
  margin-left: auto;
  color: var(--ink-soft);
  font-size: 14px;
}

/* ============ Pill Bar ============ */
.pill-bar-wrap {
  background: transparent;
}
.pill-bar-container {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 48px 0 24px;
  max-width: none;
}
.brand.brand-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: 0 0 auto;
  margin-right: 4px;
}
.brand-inline .brand-mark {
  width: 44px;
  height: 44px;
  display: inline-block;
  object-fit: contain;
}
.brand-inline .brand-name {
  font-weight: 900;
  font-size: 19px;
  letter-spacing: 0.3px;
  line-height: 1;
  font-family: "Helvetica Neue", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
.brand-inline .brand-name-a,
.brand-inline .brand-name-b { color: #000; }
.brand-inline .brand-name-b { margin-left: 4px; }
@media (max-width: 720px) {
  .brand-inline .brand-name { display: none; }
}
.pill-bar {
  display: flex;
  gap: 6px;
  padding: 14px 0;
  overflow-x: auto;
  flex: 1 1 auto;
  min-width: 0;
  /* Hide the scrollbar but keep horizontal scrolling for narrow viewports */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.pill-bar::-webkit-scrollbar { display: none; }
.pill-bar-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}
.pill-bar-meta .count {
  margin: 0;
  color: #000;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.pill-bar-meta .reset-link {
  font-size: 13px;
  color: #000;
  font-weight: 600;
}

/* Sort popover options */
.sort-options {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sort-opt {
  text-align: left;
  background: transparent;
  border: none;
  padding: 9px 12px;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.12s;
}
.sort-opt:hover { background: var(--accent-soft); }
.sort-opt.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  background: rgba(13, 15, 18, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.pill:hover {
  background: rgba(13, 15, 18, 0.98);
  border-color: rgba(255, 255, 255, 0.28);
}
.pill.active {
  background: #ffffff;
  border-color: #ffffff;
  color: #000;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

/* Grey circle clear-pill — sits inline with the other pills, only renders
   when at least one filter is active. */
.pill.clear-pill {
  background: #b8b3a8;
  border: 1px solid #b8b3a8;
  color: #fff;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.pill.clear-pill:hover {
  background: #8d8a82;
  border-color: #8d8a82;
}
.pill.clear-pill svg { display: block; }
.pill svg.pill-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  stroke: currentColor;
}
.pill .pill-value {
  margin-left: 2px;
  padding-left: 8px;
  border-left: 1px solid currentColor;
  opacity: 0.9;
  font-weight: 600;
  font-size: 12px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============ Popover ============ */
.popover {
  position: absolute;
  z-index: 60;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 32px rgba(20, 30, 20, 0.15);
  min-width: 280px;
  max-width: 480px;
  max-height: 70vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: popoverIn 0.12s ease-out;
}
.popover[hidden] { display: none; }
@keyframes popoverIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.popover-body {
  padding: 16px 18px;
  overflow-y: auto;
  flex: 1;
}
.popover-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.popover-close-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.popover-close-btn:hover { background: #245530; }

.popover h4 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
}
.popover .popover-section {
  margin-bottom: 14px;
}
.popover .popover-section:last-child { margin-bottom: 0; }
.popover .popover-section > label,
.popover .popover-section > .sec-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--ink-soft);
  font-weight: 600;
  margin-bottom: 6px;
}
.popover .range-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.popover .range-row input {
  flex: 1; width: 0; min-width: 0;
  font: inherit; font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 10px;
  background: var(--surface);
}
.popover .range-row input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.popover .range-sep {
  color: var(--ink-soft);
}
.popover .number-input {
  width: 100%;
  font: inherit; font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 10px;
  background: var(--surface);
}
.popover .stepper-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.popover .stepper-btn {
  flex: 0 0 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.popover .stepper-btn:hover { border-color: var(--accent); color: var(--accent); }
.popover .stepper-value {
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.popover .chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.popover .chip-list.brands-list {
  max-height: 220px;
  overflow-y: auto;
}
.popover .check-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
}
.popover .check-list .check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}
.popover .check-list input { accent-color: var(--accent); }

.toggle-filters {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  min-height: 40px;
  cursor: pointer;
}
.toggle-filters:hover { border-color: var(--accent); }
.toggle-filters[aria-expanded="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.toggle-filters .chevron {
  font-size: 11px;
  transition: transform 0.15s ease;
}
.toggle-filters[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.active-badge {
  background: var(--accent);
  color: white;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  min-width: 18px;
  text-align: center;
}

.more-filters {
  border-top: 1px solid var(--border);
  background: #fbfbf8;
  padding: 18px 0 8px;
  animation: filterSlideDown 0.2s ease-out;
}
.more-filters[hidden] { display: none; }
@keyframes filterSlideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.filter-section {
  margin-bottom: 18px;
}
.filter-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 12px;
}
@media (max-width: 900px) {
  .filter-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .filter-row { grid-template-columns: 1fr; }
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.filter-group > label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
  color: var(--ink-soft);
}
.filter-group input[type="number"] {
  font: inherit;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 10px;
  background: var(--surface);
  font-size: 14px;
}
.filter-group input[type="number"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.range-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.range-row input { flex: 1; width: 0; min-width: 0; }
.range-sep { color: var(--ink-soft); font-size: 14px; }

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  font: inherit;
  font-size: 13px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.chip:hover { border-color: var(--accent); }
.chip.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.brand-group .chip-group {
  max-height: 110px;
  overflow-y: auto;
}

.checks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px 16px;
}
@media (max-width: 900px) {
  .checks { grid-template-columns: repeat(2, 1fr); }
}
.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
}
.check input { accent-color: var(--accent); }

.filter-actions {
  display: flex;
  justify-content: flex-end;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}
.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 0;
}
.link-btn:hover { text-decoration: underline; }

main {
  padding: 40px 0 80px;
}

/* ============ Split list + detail pane (chat is a fixed left rail) ============ */
.split-view {
  display: grid;
  grid-template-columns: 440px 1fr;
  gap: 28px;
  align-items: start;
}

.rv-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-filter-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(15, 31, 46, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  border-radius: 10px;
  padding: 10px 12px 10px 14px;
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.3;
  box-shadow: 0 4px 14px rgba(15, 34, 53, 0.18);
}
.chat-filter-banner .cfb-text {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.chat-filter-banner .cfb-text svg { flex: 0 0 auto; opacity: 0.9; }
.chat-filter-banner .cfb-text span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-filter-banner .cfb-text em {
  font-style: normal;
  opacity: 0.85;
  font-weight: 400;
}
.chat-filter-banner .cfb-clear {
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s;
}
.chat-filter-banner .cfb-clear:hover { background: rgba(255, 255, 255, 0.28); }

.rv-row {
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
}
.rv-row:hover { border-color: var(--ink-soft); }
.rv-row.selected {
  border-color: var(--ink, #0f1f2e);
  background: #ececea;
  box-shadow: inset 3px 0 0 var(--ink, #0f1f2e);
}
.rv-row-thumb {
  flex: 0 0 96px;
  width: 96px;
  height: 70px;
  border-radius: 7px;
  overflow: hidden;
  background: #1a2e1a;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rv-row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rv-row-thumb.is-fp { background: #fafaf6; }
.rv-row-thumb.is-fp img { object-fit: contain; padding: 3px; }
.rv-row-thumb.sil svg { width: 80%; height: 80%; opacity: 0.6; }
.rv-row-video {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(220, 30, 30, 0.92);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 1px;
}
.rv-row-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.rv-row-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rv-row-sub {
  font-size: 12px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rv-row-price {
  font-size: 14px;
  font-weight: 700;
  color: #000;
  margin-top: 2px;
}

/* Detail pane — sticky, scrolls independently, sits directly on the page bg (no card) */
.detail-pane {
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  background: transparent;
  border: none;
  border-radius: 0;
  /* hide the scrollbar visually but keep scrollability */
  scrollbar-width: none;       /* Firefox */
  -ms-overflow-style: none;    /* IE/Edge */
}
.detail-pane::-webkit-scrollbar { width: 0; height: 0; display: none; } /* Chrome/Safari */
.detail-inner {
  padding: 0 24px 28px 24px;
}
/* When an RV is selected, give the detail content a glass-card backdrop
   so it stays readable against the full-bleed background image. */
.detail-inner.has-detail {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 14px;
  padding: 22px 24px 28px;
  box-shadow: 0 12px 40px rgba(15, 34, 53, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.55);
}
.detail-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--ink-soft);
}
/* Landing state — let the body background image show through;
   only a small floating CTA card sits on top. */
.detail-hero-empty {
  min-height: calc(100vh - 240px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 8px;
}
.hero-cta-card {
  max-width: 460px;
  text-align: center;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 14px;
  padding: 28px 28px 26px;
  box-shadow: 0 12px 40px rgba(15, 34, 53, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.6);
}
.hero-cta-eyebrow {
  font-size: 11px;
  letter-spacing: 3px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}
.hero-cta-title {
  margin: 0 0 12px;
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.15;
  letter-spacing: -0.2px;
}
.hero-cta-body {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}
.hero-cta-body strong { color: var(--accent); font-weight: 700; }
.detail-back { display: none; }
.detail-exterior {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.detail-exterior img { width: 100%; height: auto; display: block; }

/* Photo / video carousel */
.detail-carousel {
  margin: 6px 0 4px;
}
.carousel-stage {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--border);
}
.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 320ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.carousel-slide {
  flex: 0 0 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.55);
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: background 120ms ease, opacity 120ms ease;
}
.carousel-arrow:hover { background: rgba(0, 0, 0, 0.78); }
.carousel-arrow.prev { left: 12px; }
.carousel-arrow.next { right: 12px; }
.carousel-arrow:disabled { opacity: 0.25; cursor: default; }
.carousel-counter {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.65);
  color: white;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  z-index: 3;
  pointer-events: none;
}
.carousel-dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border, #cdd6d3);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
}
.carousel-dot:hover { background: var(--ink-soft); }
.carousel-dot.is-active {
  background: var(--accent);
  transform: scale(1.35);
}

@media (max-width: 1100px) {
  body { padding-left: 0; }
  .split-view { grid-template-columns: 1fr; }
  .chat-panel--rail {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    width: auto;
    height: 420px;
    border-right: none;
    margin: 0 16px 16px;
    border-radius: 12px;
  }
  .detail-pane {
    position: fixed;
    inset: 0;
    top: 0;
    z-index: 80;
    max-height: none;
    height: 100vh;
    border: none;
    border-radius: 0;
    transform: translateX(100%);
    transition: transform 0.25s ease;
  }
  .split-view.show-detail .detail-pane { transform: translateX(0); }
  .detail-back {
    display: block;
    width: 100%;
    text-align: left;
    background: var(--surface);
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 14px 20px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
    position: sticky;
    top: 0;
    z-index: 2;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
}
.card:hover, .card:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  outline: none;
}

.card-thumb {
  height: 540px;
  background: var(--accent-soft);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.card-thumb svg {
  width: 70%;
  height: 70%;
  opacity: 0.6;
}
.card-thumb.has-image {
  background: #1a2e1a;
  padding: 0;
}
.card-thumb.has-image img.card-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}
.card-thumb.has-image img.card-slide.active {
  opacity: 1;
  pointer-events: auto;
}
.card-thumb.has-image.is-floorplan {
  background: #fafaf6;
}
.card-thumb.has-image.is-floorplan img.card-slide.active {
  object-fit: contain;
  padding: 6px;
}

/* Video slide: cover the frame, show play badge */
.card-thumb.showing-video {
  background: #000;
}
.card-thumb.showing-video img.card-slide.active {
  object-fit: cover;
  padding: 0;
}
.card-play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: white;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3;
  pointer-events: none;
  padding-left: 4px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}
.card-thumb.showing-video .card-play-badge {
  display: inline-flex;
}

/* Carousel arrows */
.card-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  padding: 0;
}
.card-thumb:hover .card-arrow {
  opacity: 1;
}
.card-arrow:hover {
  background: white;
  transform: translateY(-50%) scale(1.06);
}
.card-arrow-left { left: 10px; }
.card-arrow-right { right: 10px; }

/* Slide dots */
.card-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  gap: 6px;
  z-index: 2;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.card-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  transition: background 0.15s, transform 0.15s;
  cursor: pointer;
}
.card-dot.active {
  background: white;
  transform: scale(1.15);
}
.card-thumb.has-image.is-floorplan .card-dots {
  background: rgba(0, 0, 0, 0.08);
}
.card-thumb.has-image.is-floorplan .card-dot {
  background: rgba(20, 30, 20, 0.35);
}
.card-thumb.has-image.is-floorplan .card-dot.active {
  background: var(--accent);
}
.card-class-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  border-radius: 4px;
}

.card-body {
  padding: 28px 32px 30px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-title {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--ink);
  letter-spacing: -0.3px;
}
.card-sub {
  font-size: 16px;
  color: var(--ink-soft);
  margin: 0 0 22px;
}

.spec-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
.spec-strip .cell {
  background: var(--bg);
  border-radius: 10px;
  padding: 14px 12px;
  text-align: center;
}
.spec-strip .label {
  font-size: 12px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
}
.spec-strip .value {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.card-price {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  margin-top: auto;
}

.empty {
  text-align: center;
  color: var(--ink-soft);
  padding: 60px 0;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 30, 20, 0.55);
}
.modal-panel {
  position: relative;
  background: var(--surface);
  border-radius: 12px;
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 28px 32px 32px;
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: transparent;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-soft);
  padding: 4px 8px;
}
.modal-close:hover { color: var(--ink); }

.detail-hero {
  margin: -28px -32px 18px;
  height: 280px;
  overflow: hidden;
  background: #1a2e1a;
}
.detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-header { margin-bottom: 18px; }
.detail-header h2 {
  margin: 0 0 4px;
  font-size: 24px;
}
.detail-header .sub {
  color: var(--ink-soft);
  font-size: 14px;
}
.detail-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  margin: 8px 0 4px;
}
.detail-desc {
  margin: 16px 0 20px;
  color: var(--ink);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}
.spec-table th, .spec-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.spec-table th {
  color: var(--ink-soft);
  font-weight: 500;
  width: 45%;
}

.spec-section-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--ink-soft);
  margin: 18px 0 4px;
  font-weight: 600;
}

/* Video poster (inside a carousel slide, fills the stage) */
.video-poster {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: #000;
}
.video-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.video-poster:hover img { transform: scale(1.02); filter: brightness(0.92); }
.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(220, 30, 30, 0.92);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease, background 0.15s ease;
}
.video-poster:hover .video-play { transform: translate(-50%, -50%) scale(1.08); background: rgba(255, 0, 0, 0.95); }
.video-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.video-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 70px 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 30%, rgba(0, 0, 0, 0));
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
  z-index: 2;
  pointer-events: none;
}
.video-caption span { font-weight: 600; opacity: 0.85; }

.detail-floorplan {
  margin: 8px 0 4px;
}
.fp-stage {
  position: relative;
  background: #f6f5ef;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  line-height: 0;
}
.fp-stage img {
  width: 100%;
  height: auto;
  display: block;
}
.fp-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.fp-room {
  position: absolute;
  border: 1.5px dashed rgba(20, 30, 20, 0.55);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  transition: filter 0.12s;
}
.fp-room:hover { filter: brightness(1.05); }
.fp-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(20, 30, 20, 0.85);
  background: rgba(255, 255, 255, 0.75);
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: capitalize;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90%;
}
.fp-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--ink-soft);
}
.fp-legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-transform: capitalize;
}
.fp-swatch {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 18px 0;
  color: var(--ink-soft);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 540px) {
  .site-header { padding: 32px 0 28px; }
  .site-header h1 { font-size: 28px; }
  .controls input[type="search"] { flex: 1 1 100%; }
  .controls select { flex: 1 1 calc(50% - 6px); }
  .count { flex: 1 1 100%; margin-left: 0; }
  .modal-panel { padding: 22px 18px 24px; }
}

/* Card highlight when mentioned by the concierge */
.card.mentioned {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  animation: mentioned-pulse 1.2s ease-out;
}
@keyframes mentioned-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(47, 107, 63, 0.45); }
  100% { box-shadow: 0 0 0 14px rgba(47, 107, 63, 0); }
}

/* Chat panel — fixed left rail, top-to-bottom of the viewport, always open */
.chat-panel--rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  z-index: 65;
  background: #ffffff;
  border-right: 1px solid rgba(15, 34, 53, 0.10);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  display: none;
}

/* Brand logo stacked at top of the chat rail */
.brand.brand-stacked {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  padding: 18px 16px 16px;
  border-bottom: 1px solid rgba(15, 34, 53, 0.10);
  flex: 0 0 auto;
}
.brand-stacked .brand-mark {
  width: 76px;
  height: 76px;
  object-fit: contain;
}
.brand-stacked .brand-name {
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.4px;
  line-height: 1;
  margin-top: 2px;
  font-family: "Helvetica Neue", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
.brand-stacked .brand-name-a,
.brand-stacked .brand-name-b { color: #000; }
.brand-stacked .brand-name-b { margin-left: 5px; }
.brand-stacked .brand-tag {
  font-size: 9px;
  letter-spacing: 3px;
  font-weight: 700;
  color: #000;
  opacity: 0.65;
  margin-top: 2px;
}
.chat-title {
  font-weight: 700;
  font-size: 16px;
}
.chat-sub {
  font-size: 12px;
  opacity: 0.78;
  margin-top: 2px;
}
.chat-close-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 28px;
  line-height: 1;
  padding: 0 6px;
  cursor: pointer;
  opacity: 0.8;
}
.chat-close-btn:hover { opacity: 1; }

.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg {
  max-width: 88%;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.msg.user {
  align-self: flex-end;
  background: #ececea;
  color: var(--ink, #0f1f2e);
  border-bottom-right-radius: 4px;
}
.msg.assistant {
  align-self: flex-start;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.msg.assistant.error {
  background: #fdecea;
  border-color: #f5c2c0;
  color: #842029;
}
.msg.tool-note {
  align-self: center;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  font-style: italic;
  padding: 2px 6px;
  max-width: 100%;
}

/* Matchmaking quiz: chips inside an assistant bubble */
.msg.assistant.with-quiz { padding-bottom: 10px; }
.quiz-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.quiz-chip {
  font: inherit;
  font-size: 13px;
  line-height: 1.2;
  padding: 7px 12px;
  border: 1px solid rgba(15, 34, 53, 0.18);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: background 120ms, border-color 120ms, color 120ms, transform 80ms;
}
.quiz-chip:hover:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.quiz-chip.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.quiz-chip:disabled {
  cursor: default;
  opacity: 0.6;
}
.quiz-chip.selected:disabled { opacity: 1; }
.quiz-continue {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border: none;
  border-radius: 999px;
  background: #000;
  color: #fff;
  cursor: pointer;
  margin-left: auto;
}
.quiz-continue:hover:not(:disabled) { background: #2a2e34; }
.quiz-continue:disabled { background: #888; cursor: not-allowed; }

.chat-status {
  padding: 0 16px 4px;
  font-size: 12px;
  color: var(--ink-soft);
  min-height: 16px;
}

.chat-form {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border-top: 1px solid rgba(15, 34, 53, 0.10);
  background: rgba(255, 255, 255, 0.7);
}
.chat-input {
  flex: 1;
  min-width: 0;
  resize: none;
  border: 1px solid rgba(15, 34, 53, 0.18);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink);
  background: #fff;
  max-height: 110px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.chat-input::-webkit-scrollbar { display: none; }
.chat-input:focus {
  outline: 2px solid #0d0f12;
  outline-offset: 0;
  border-color: #000;
}
.chat-input:disabled { opacity: 0.6; }
.chat-send-btn {
  background: #000;
  border: none;
  color: white;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}
.chat-send-btn:hover { background: #2a2e34; }
.chat-send-btn:disabled { background: #888; cursor: not-allowed; }

@media (max-width: 540px) {
  .chat-panel { width: 100vw; }
  .chat-bubble span { display: none; }
  .chat-bubble { padding: 12px; }
}

/* ============ Buy Here buttons ============ */
.rv-row-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}
.buy-here-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease, transform 80ms ease, box-shadow 120ms ease;
  white-space: nowrap;
}
.buy-here-btn:hover { transform: translateY(-1px); }
.buy-here-btn:active { transform: translateY(0); }

/* Compact pill on each list row — quiet outline by default; manufacturer is
   the destination but Pirka Wakka is the discovery surface, so we don't want
   Buy competing with the RV's name/price for attention. Fills on hover. */
.buy-here-btn--row {
  background: transparent;
  color: var(--ink-soft, #586876);
  border: 1px solid var(--border, #d6dbe0);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.01em;
}
.buy-here-btn--row:hover {
  background: var(--ink, #0f1f2e);
  color: #fff;
  border-color: var(--ink, #0f1f2e);
}

/* Big button in the detail header */
.detail-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.buy-here-btn--detail {
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.buy-here-btn--detail:hover { background: #245530; box-shadow: 0 2px 6px rgba(0,0,0,0.12); }

/* ============ SHORTLIST: heart icon on list rows ============ */
.rv-row { position: relative; }
.rv-row-heart {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--ink-soft, #5a635a);
  border-radius: 50%;
  cursor: pointer;
  transition: color 120ms ease, transform 120ms ease, background 120ms ease;
  z-index: 2;
}
.rv-row-heart:hover { color: var(--accent, #245530); transform: scale(1.08); background: #fff; }
.rv-row-heart.is-fav { color: #b6531c; background: #fff; }
.rv-row-heart.is-fav:hover { color: #8c3f15; }
.rv-row-heart svg { display: block; }

/* ============ SHORTLIST: flash banner ============ */
.sl-flash {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #1c1f1c;
  color: #f7f4ee;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 60;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.sl-flash.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ SHORTLIST: sticky bottom bar ============ */
.sl-bar {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: #1c1f1c;
  color: #f7f4ee;
  border-radius: 999px;
  padding: 8px 8px 8px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
  z-index: 40;
  transition: transform 260ms cubic-bezier(.2,.7,.2,1);
  max-width: calc(100vw - 32px);
}
.sl-bar.show { transform: translateX(-50%) translateY(0); }
.sl-bar.shared { background: var(--accent, #245530); }
.sl-bar-label { font-size: 14px; font-weight: 500; white-space: nowrap; }
.sl-bar-count {
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.12); color: #fff; min-width: 22px; height: 22px;
  border-radius: 999px; font-weight: 700; font-size: 12px;
  padding: 0 7px; margin-right: 4px;
}
.sl-bar-actions { display: flex; gap: 6px; align-items: center; }
.sl-btn {
  border: 0; cursor: pointer; padding: 8px 14px;
  font: inherit; font-size: 13px; font-weight: 500;
  border-radius: 999px; transition: background 120ms ease, color 120ms ease;
  white-space: nowrap;
}
.sl-btn-primary { background: #fff; color: #1c1f1c; }
.sl-btn-primary:hover { background: #f0ece0; }
.sl-btn-secondary { background: rgba(255,255,255,0.18); color: #fff; }
.sl-btn-secondary:hover { background: rgba(255,255,255,0.28); }
.sl-btn-ghost { background: transparent; color: rgba(255,255,255,0.7); }
.sl-btn-ghost:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* ============ SHORTLIST: compare overlay ============ */
.sl-compare {
  position: fixed; inset: 0;
  background: rgba(28, 31, 28, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: stretch;
  justify-content: center;
  z-index: 100;
  padding: 24px 16px;
  overflow-y: auto;
}
.sl-compare.open { display: flex; }
body.sl-compare-open { overflow: hidden; }
.sl-compare-shell {
  background: var(--surface, #f7f4ee);
  border-radius: 18px;
  max-width: 1280px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 48px);
}
.sl-compare-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-bottom: 1px solid var(--line, #d8d4ca);
  flex-shrink: 0;
}
.sl-compare-head h2 { margin: 0; font-size: 20px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.sl-compare-count {
  background: var(--accent, #245530); color: #fff;
  font-size: 12px; padding: 3px 10px; border-radius: 999px; font-weight: 500;
}
.sl-compare-head-actions { display: flex; gap: 8px; align-items: center; }
.sl-compare-head .sl-btn-ghost { color: var(--ink-soft, #5a635a); }
.sl-compare-head .sl-btn-ghost:hover { background: rgba(0,0,0,0.05); color: var(--ink); }
.sl-compare-head .sl-btn-primary { background: var(--accent, #245530); color: #fff; }
.sl-compare-head .sl-btn-primary:hover { background: var(--accent-deep, #1a3f24); }
.sl-compare-close {
  border: 0; background: transparent; cursor: pointer;
  width: 36px; height: 36px; border-radius: 50%;
  font-size: 22px; color: var(--ink-soft); display: inline-flex;
  align-items: center; justify-content: center;
}
.sl-compare-close:hover { background: rgba(0,0,0,0.05); color: var(--ink); }
.sl-compare-body {
  padding: 24px; overflow-y: auto; flex: 1 1 auto;
}
.sl-compare-empty { color: var(--ink-soft); text-align: center; padding: 60px 24px; }
.sl-compare-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.sl-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line, #d8d4ca);
  border-radius: 14px;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.sl-card-remove {
  position: absolute; top: 6px; right: 6px;
  width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,0.95); color: #5a635a;
  font-size: 18px; cursor: pointer; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center;
}
.sl-card-remove:hover { background: #fff; color: #a83232; }
.sl-card-thumb { width: 100%; aspect-ratio: 16/10; background: #efece5; overflow: hidden; }
.sl-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sl-card-thumb-empty { width: 100%; height: 100%; background: linear-gradient(135deg, #efece5, #d8d4ca); }
.sl-card-title { font-size: 14px; font-weight: 600; color: var(--ink); padding: 10px 12px 2px; line-height: 1.3; }
.sl-card-sub { font-size: 12px; color: var(--ink-soft); padding: 0 12px 10px; }
.sl-card-notes {
  display: flex; flex-direction: column; gap: 8px; padding: 0 12px 12px;
  flex: 1 1 auto;
}
.sl-card-notes label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em; }
.sl-card-notes textarea {
  width: 100%; font: inherit; font-size: 13px; color: var(--ink);
  border: 1px solid var(--line, #d8d4ca); border-radius: 8px;
  padding: 6px 8px; resize: vertical; min-height: 44px; background: #fcfaf5;
}
.sl-card-notes textarea:focus { outline: 2px solid var(--accent, #245530); outline-offset: 0; border-color: var(--accent); background: #fff; }
.sl-card-buy {
  display: block; text-align: center; margin: 0 12px 12px;
  background: var(--accent, #245530); color: #fff;
  font-size: 13px; font-weight: 500; padding: 9px 12px;
  border-radius: 999px; text-decoration: none;
}
.sl-card-buy:hover { background: var(--accent-deep, #1a3f24); }

/* spec comparison table */
.sl-compare-specs { overflow-x: auto; }
.sl-spec-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
  background: #fff; border: 1px solid var(--line, #d8d4ca); border-radius: 10px; overflow: hidden;
}
.sl-spec-table th, .sl-spec-table td {
  padding: 8px 12px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--line, #d8d4ca);
}
.sl-spec-table tbody tr:last-child th, .sl-spec-table tbody tr:last-child td { border-bottom: 0; }
.sl-spec-table tbody th { color: var(--ink-soft); font-weight: 600; width: 160px; background: #fcfaf5; }
.sl-spec-table tbody td { color: var(--ink); }

@media (max-width: 720px) {
  .sl-bar { padding: 6px 6px 6px 14px; gap: 10px; }
  .sl-bar-label { font-size: 13px; }
  .sl-compare { padding: 0; }
  .sl-compare-shell { border-radius: 0; max-height: 100vh; }
  .sl-compare-body { padding: 16px; }
  .sl-spec-table th, .sl-spec-table td { padding: 6px 8px; font-size: 12px; }
}

/* ============ SHORTLIST: editor / publish overlay ============ */
.sl-editor-shell { max-width: 880px; }
.sl-editor-loading {
  padding: 60px 32px; text-align: center; color: var(--ink-soft, #5a635a);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.sl-editor-loading p { margin: 0; max-width: 520px; }
.sl-editor-loading-sub { font-size: 13px; }
.sl-spinner {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid var(--line, #d8d4ca);
  border-top-color: var(--accent, #245530);
  animation: sl-spin 0.8s linear infinite;
  margin-bottom: 4px;
}
@keyframes sl-spin { to { transform: rotate(360deg); } }
.sl-editor-body { padding: 16px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; overflow: hidden; }
.sl-editor-hint { font-size: 13px; color: var(--ink-soft); margin: 0; }
.sl-editor-textarea {
  flex: 1 1 auto; min-height: 380px;
  width: 100%; padding: 18px 22px;
  font: inherit; font-size: 15px; line-height: 1.65; color: var(--ink);
  border: 1px solid var(--line, #d8d4ca); border-radius: 10px;
  background: #fff; resize: vertical;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.sl-editor-textarea:focus { outline: 2px solid var(--accent, #245530); border-color: var(--accent); }

.sl-publish-shell { max-width: 640px; }
.sl-publish-body { padding: 32px; text-align: center; }
.sl-publish-tagline { font-size: 18px; color: var(--ink); margin: 0 0 24px; }
.sl-publish-url {
  display: flex; gap: 8px; align-items: stretch;
  background: #fff; border: 1px solid var(--line, #d8d4ca); border-radius: 12px;
  padding: 6px; margin-bottom: 20px;
}
.sl-publish-url input {
  flex: 1; min-width: 0; border: 0; background: transparent;
  font: inherit; font-size: 13px; color: var(--ink-soft);
  padding: 8px 10px;
}
.sl-publish-url input:focus { outline: 0; color: var(--ink); }
.sl-publish-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.sl-publish-actions .sl-btn-secondary { background: var(--surface, #f7f4ee); color: var(--ink); border: 1px solid var(--line, #d8d4ca); }
.sl-publish-actions .sl-btn-secondary:hover { background: #efece5; }

.sl-btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ============ DETAIL PANE: Save & Compare CTA above floor plan ============ */
.detail-save-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line, #d8d4ca);
  flex-wrap: wrap;
}
.detail-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid #d92626;
  background: #d92626;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 16px 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, transform 120ms ease;
}
.detail-save-btn:hover { background: #b71c1c; border-color: #b71c1c; }
.detail-save-btn.is-fav {
  background: #8d8a82;
  color: #fff;
  border-color: #8d8a82;
}
.detail-save-btn.is-fav:hover { background: #6f6c64; border-color: #6f6c64; }
.detail-save-btn svg path { stroke: #fff; }
.detail-save-btn svg { display: block; flex-shrink: 0; }
.detail-save-sub {
  font-size: 12px;
  color: var(--ink-soft, #5a635a);
  font-style: italic;
}

/* ============ CHAT: bubbles are page-color throughout. The only red in the
   chat panel now lives on the bottom Compile button. ============ */
.msg.assistant.intro-red { /* no-op — kept so JS addClass doesn't error */ }
#chat-log.compare-stage-active .msg.assistant:not(.error) { /* no-op */ }
.build-page-cta {
  align-self: stretch;
  margin: 8px 0 4px;
  padding: 14px 14px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #fcfaf5);
  border: 1.5px solid #d92626;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: build-cta-in 200ms ease;
}
@keyframes build-cta-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.build-page-cta-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink, #1c1f1c);
}
.build-page-cta-btn {
  border: 0;
  background: #d92626;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  align-self: flex-start;
}
.build-page-cta-btn:hover { background: #b71c1c; }

/* Red primary button — used for "go" actions on the sticky shortlist bar
   (Compare in default mode, Compile Buyer's Notebook in compare mode). */
.sl-btn.sl-btn-red {
  background: #d92626;
  color: #fff;
}
.sl-btn.sl-btn-red:hover { background: #b71c1c; }

/* Compare-mode bar variant (dark bg, compact label) */
.sl-bar.compare-mode {
  background: var(--ink, #0f1f2e);
  padding-left: 8px;
}
.sl-bar.compare-mode .sl-bar-label--compact {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
}

/* ============ COMPILE FOCUS: blur everything except chat while user is
   answering narrative questions for their buyer's notebook ============ */
body.compile-focus-active > *:not(#chat-panel):not(#sl-compare):not(#sl-editor):not(.sl-flash) {
  filter: blur(3px) brightness(0.88);
  pointer-events: none;
  user-select: none;
  transition: filter 240ms ease;
}
body > * { transition: filter 240ms ease; }

/* Minimal default sticky bar — just X / count / Compare. Bar bg is dark
   (#1c1f1c) so X and count sit on the same pill with the red Compare
   button on the right. */
.sl-bar:not(.compare-mode):not(.shared) {
  padding: 6px 6px 6px 14px;
  gap: 10px;
}
button.sl-bar-x {
  /* Reset browser defaults explicitly so this can't be styled as a squared
     white default-button — that bug ate three iterations. */
  appearance: none;
  -webkit-appearance: none;
  padding: 0;
  margin: 0;
  font: inherit;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  color: rgba(255,255,255,0.6);
  border: 0; border-radius: 50%; cursor: pointer;
  flex: 0 0 auto;
  transition: background 120ms ease, color 120ms ease;
}
button.sl-bar-x:hover { background: rgba(255,255,255,0.12); color: #fff; }
button.sl-bar-x svg { display: block; }
.sl-bar .sl-bar-count {
  margin: 0;
  min-width: 24px; height: 24px;
  font-size: 12px;
  background: rgba(255,255,255,0.12);
  color: #fff;
}

/* Big red Compile CTA pinned at bottom of chat panel during compare-stage */
.chat-compile-cta {
  display: none;
  margin: 8px 12px 4px;
  background: #d92626;
  color: #fff;
  border: 0;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 120ms ease, transform 80ms ease;
  box-shadow: 0 4px 12px rgba(217, 38, 38, 0.25);
  text-align: center;
  letter-spacing: 0.01em;
}
.chat-compile-cta.show { display: block; animation: ccta-in 220ms ease; }
.chat-compile-cta:hover { background: #b71c1c; }
.chat-compile-cta:active { transform: translateY(1px); }
@keyframes ccta-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Pulse the bottom Compile button to draw attention every few Matchmaker turns. */
@keyframes ccta-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 12px rgba(217, 38, 38, 0.25); }
  35%, 65% { transform: scale(1.045); box-shadow: 0 8px 26px rgba(217, 38, 38, 0.6); }
}
.chat-compile-cta.pulse {
  animation: ccta-pulse 1.2s ease-in-out 2;
}

/* Big red Share button for the editor + publish-success surfaces */
.sl-btn.sl-btn-share { font-size: 15px; font-weight: 600; padding: 11px 22px; }
.sl-btn.sl-btn-share-big { font-size: 16px; font-weight: 700; padding: 14px 28px; }

/* Voting explainer block on the publish-success modal */
.sl-vote-explainer {
  margin-top: 28px; padding: 18px 22px;
  background: rgba(0,0,0,0.03); border-radius: 12px;
  text-align: left;
}
.sl-vote-explainer h3 {
  margin: 0 0 10px; font-size: 14px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft);
}
.sl-vote-explainer ol {
  margin: 0 0 12px; padding-left: 22px; color: var(--ink);
  font-size: 14px; line-height: 1.55;
}
.sl-vote-explainer ol li { margin-bottom: 8px; }
.sl-vote-explainer em { font-style: italic; color: var(--ink-soft); }
.sl-vote-note { margin: 0; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.sl-vote-note strong { color: var(--ink); font-weight: 600; }

/* Initial loading skeleton — shows immediately on page load, removed by app.js
   when data.json is parsed and the first render is ready. Stops the user
   from seeing a blank middle column for the ~1-2s the 11MB catalog takes
   to download + parse. */
.initial-skeleton {
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px 0;
}
.skeleton-row {
  height: 88px; border-radius: 12px;
  background: linear-gradient(90deg, #ececea 0%, #f5f3ee 50%, #ececea 100%);
  background-size: 200% 100%;
  animation: skel-shimmer 1.4s ease-in-out infinite;
}
@keyframes skel-shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
