/* Get Clozer Shared Styles */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=DM+Sans:wght@400;500&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0a0c10;
  --surface: #12151c;
  --surface-hover: #181c26;
  --border: #1e2230;
  --accent: #3ee8b5;
  --accent-dim: rgba(62, 232, 181, 0.12);
  --accent-glow: rgba(62, 232, 181, 0.25);
  --text: #e8eaf0;
  --muted: #8890a4;
  --warm: #f5c542;
  --danger: #ef4444;
  --info: #60a5fa;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4 { font-family: 'Space Grotesk', sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Radar Background */
.radar-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.radar-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(62, 232, 181, 0.04);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.radar-ring:nth-child(1) { width: 400px; height: 400px; }
.radar-ring:nth-child(2) { width: 700px; height: 700px; }
.radar-ring:nth-child(3) { width: 1000px; height: 1000px; }
.radar-ring:nth-child(4) { width: 1400px; height: 1400px; }
.radar-sweep {
  position: absolute;
  top: 50%; left: 50%;
  width: 700px; height: 700px;
  transform-origin: center center;
  transform: translate(-50%, -50%);
  animation: sweep 8s linear infinite;
}
.radar-sweep::after {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  width: 50%; height: 50%;
  background: conic-gradient(from 0deg, transparent, rgba(62, 232, 181, 0.06));
  transform-origin: bottom left;
  border-radius: 0 100% 0 0;
}
@keyframes sweep {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Layout */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Nav */
.app-nav {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--accent);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(62, 232, 181, 0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(62, 232, 181, 0); }
}
.nav-tag {
  font-size: 0.75rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 20px;
}

/* Trial status banner */
.trial-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(62, 232, 181, 0.07);
  border: 1px solid rgba(62, 232, 181, 0.18);
  border-radius: 10px;
  margin-bottom: 24px;
  font-size: 0.875rem;
  color: var(--text);
}
.trial-banner.visible { display: flex; }
.trial-banner.expired {
  background: rgba(239, 68, 68, 0.07);
  border-color: rgba(239, 68, 68, 0.25);
}
.trial-banner-left { display: flex; align-items: center; gap: 10px; flex: 1; }
.trial-badge {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--accent-dim);
  color: var(--accent);
  white-space: nowrap;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.trial-banner.expired .trial-badge {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}
.trial-banner-text { color: var(--muted); line-height: 1.4; }
.trial-banner-text strong { color: var(--text); }
.trial-dismiss {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 2px 4px;
  flex-shrink: 0;
}
.trial-dismiss:hover { color: var(--text); }

/* Form Elements */
.form-group {
  margin-bottom: 24px;
}
.form-label {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}
.form-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
}
.form-input, .form-select {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.form-input::placeholder { color: var(--muted); }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Checkbox Grid */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}
.checkbox-item:hover { border-color: var(--accent); background: var(--surface-hover); }
.checkbox-item.checked {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.checkbox-item input { display: none; }
.check-indicator {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}
.checkbox-item.checked .check-indicator {
  background: var(--accent);
  border-color: var(--accent);
}
.checkbox-item.checked .check-indicator::after {
  content: '\2713';
  color: var(--bg);
  font-size: 12px;
  font-weight: bold;
}

/* Toggle */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.toggle-label { font-size: 0.95rem; }
.toggle {
  width: 48px; height: 26px;
  background: var(--border);
  border-radius: 13px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}
.toggle.active { background: var(--accent); }
.toggle-knob {
  width: 20px; height: 20px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 3px; left: 3px;
  transition: transform 0.2s;
}
.toggle.active .toggle-knob { transform: translateX(22px); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover {
  background: #2dd4a0;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
}
.btn-sm {
  padding: 8px 16px;
  font-size: 0.82rem;
}
.btn-full { width: 100%; }
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  transition: border-color 0.2s;
}
.card:hover { border-color: rgba(62, 232, 181, 0.2); }

/* Stats Bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}
.stat-box {
  background: var(--surface);
  padding: 20px;
  text-align: center;
}
.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}
.stat-label-sm {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Listing Card */
.listing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  transition: all 0.2s;
}
.listing-card:hover {
  border-color: rgba(62, 232, 181, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.listing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  gap: 12px;
}
.score-badge {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.score-excellent { background: rgba(62, 232, 181, 0.15); color: #3ee8b5; border: 2px solid rgba(62, 232, 181, 0.3); }
.score-good { background: rgba(96, 165, 250, 0.15); color: #60a5fa; border: 2px solid rgba(96, 165, 250, 0.3); }
.score-fair { background: rgba(245, 197, 66, 0.15); color: #f5c542; border: 2px solid rgba(245, 197, 66, 0.3); }
.score-low { background: rgba(136, 144, 164, 0.15); color: #8890a4; border: 2px solid rgba(136, 144, 164, 0.3); }

.listing-title {
  flex: 1;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.3;
}
.listing-body {
  padding: 0 20px 16px;
}
.listing-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.meta-item {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.meta-item strong { color: var(--text); }
.listing-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--warm);
}
.listing-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}
.tag {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 500;
}
.tag-pet { background: rgba(245, 197, 66, 0.12); color: var(--warm); }
.tag-source { background: rgba(136, 144, 164, 0.12); color: var(--muted); }
.listing-summary {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.listing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

/* Listing photo block */
.listing-image-block {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(62, 232, 181, 0.08), rgba(96, 165, 250, 0.06));
  border-bottom: 1px solid var(--border);
  cursor: zoom-in;
}
.listing-image-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.listing-image-empty {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  background: linear-gradient(135deg, rgba(62, 232, 181, 0.06), rgba(96, 165, 250, 0.04));
  color: var(--muted);
}
.listing-image-empty .empty-hood {
  position: absolute;
  bottom: 10px;
  left: 12px;
  font-size: 0.75rem;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--muted);
  background: rgba(0,0,0,0.4);
  padding: 3px 8px;
  border-radius: 8px;
}
.listing-image-count {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.72rem;
  font-family: 'Space Grotesk', sans-serif;
  padding: 3px 8px;
  border-radius: 10px;
  pointer-events: none;
}

/* Listing gallery modal */
.listing-gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.listing-gallery-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
}
.listing-gallery-card {
  position: relative;
  width: min(92vw, 980px);
  max-height: 92vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 1;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
}
.listing-gallery-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.6rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  line-height: 1;
  border-radius: 50%;
  z-index: 2;
}
.listing-gallery-close:hover { background: rgba(255,255,255,0.08); }
.listing-gallery-stage {
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60vh;
}
.listing-gallery-stage img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  display: block;
}
.listing-gallery-info {
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.listing-gallery-info a {
  color: var(--accent);
  text-decoration: none;
}
.listing-gallery-info a:hover { text-decoration: underline; }
.listing-gallery-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.listing-gallery-thumb {
  width: 70px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: #111;
}
.listing-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.listing-gallery-thumb.active {
  border-color: var(--accent);
}
.listing-gallery-nav {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  padding: 0 6px;
}
.listing-gallery-nav button {
  pointer-events: auto;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: none;
  font-size: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
}
.listing-gallery-nav button:hover { background: rgba(62, 232, 181, 0.6); color: #001b15; }

/* Listings Grid */
.listings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* Sort/Filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.filter-group {
  display: flex;
  gap: 8px;
  align-items: center;
}
.filter-chip {
  padding: 6px 14px;
  font-size: 0.82rem;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}
.filter-chip:hover, .filter-chip.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* Section */
.page-header {
  margin-bottom: 32px;
}
.page-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.page-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Loading */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  color: var(--muted);
  gap: 12px;
}
.spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty-state h3 {
  color: var(--text);
  margin-bottom: 8px;
}

/* Footer */
.app-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  margin-top: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
}
.app-footer a { color: var(--muted); }
.app-footer a:hover { color: var(--text); }

/* Alerts */
.alert {
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 20px;
}
.alert-info {
  background: rgba(96, 165, 250, 0.1);
  border: 1px solid rgba(96, 165, 250, 0.2);
  color: var(--info);
}
.alert-success {
  background: var(--accent-dim);
  border: 1px solid rgba(62, 232, 181, 0.2);
  color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .checkbox-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .app-footer { flex-direction: column; gap: 12px; text-align: center; }
  .listing-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .checkbox-grid { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: 1fr; }
}

/* Referral invite panel */
.referral-panel {
  background: rgba(62, 232, 181, 0.05);
  border: 1px solid rgba(62, 232, 181, 0.15);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 24px;
}
.referral-panel-body { display: flex; flex-direction: column; gap: 10px; }
.referral-panel-text { display: flex; flex-direction: column; gap: 2px; font-size: 0.9rem; }
.referral-sub { color: var(--muted); font-size: 0.82rem; }
.referral-link-row { display: flex; gap: 8px; align-items: center; }
.referral-link-input { font-size: 0.82rem; padding: 8px 12px; color: var(--muted); flex: 1; }
.referral-meta { font-size: 0.8rem; color: var(--muted); }
.referral-count { font-weight: 700; color: var(--accent); }

/* Share referral modal */
.share-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.share-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.share-modal-card {
  position: relative;
  background: var(--bg, #0f1117);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  max-width: 480px;
  width: 90vw;
}
.share-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.share-modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
}
.share-modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}
.share-modal-body { display: flex; flex-direction: column; gap: 6px; }
.share-modal-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  display: block;
}
.share-modal-textarea {
  font-family: 'DM Sans', sans-serif;
  resize: vertical;
}
.share-modal-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.share-platform-btn {
  flex: 1;
  min-width: 140px;
}
.share-modal-copied {
  color: var(--accent);
  font-size: 0.82rem;
  margin-top: 6px;
}

/* ============================================
   Listing Detail Page (/listing/:id)
   ============================================ */

.detail-shell {
  display: flex;
  gap: 32px;
  max-width: 1120px;
  margin: 0 auto;
  align-items: start;
}

.detail-gallery {
  flex: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.detail-hero-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #0e1118;
  cursor: zoom-in;
}

.detail-hero {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  transition: opacity 0.2s;
}

.detail-hero-empty {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(62, 232, 181, 0.08), rgba(96, 165, 250, 0.06));
  border-radius: 12px;
  color: var(--muted);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
}

.detail-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.detail-thumbs::-webkit-scrollbar { height: 6px; }
.detail-thumbs::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }

.detail-thumb {
  width: 80px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border);
  cursor: pointer;
  background: #111;
  transition: border-color 0.15s, transform 0.15s;
}

.detail-thumb:hover { border-color: rgba(62, 232, 181, 0.4); }

.detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-thumb.active {
  border-color: var(--accent);
}

.detail-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--text);
  margin: 0;
}

.detail-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  color: var(--accent);
  font-weight: 600;
}

.detail-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.detail-spec-chip {
  font-size: 0.82rem;
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

.detail-address {
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 2px;
}

.detail-neighbourhood {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  color: var(--muted);
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  width: fit-content;
}

.detail-available {
  font-size: 0.9rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
}

.detail-source-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
  flex-wrap: wrap;
}

.detail-source {
  display: inline-flex;
}

.detail-section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 18px 0 8px;
}

.detail-description {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.7;
  white-space: pre-wrap;
}

/* Single-photo state: hide thumbnails + prev/next in the lightbox */
.is-single .listing-gallery-thumbs { display: none; }
.is-single .listing-gallery-nav { display: none; }

/* Saved/favorite listings — per-browser heart button (sized to match a btn-sm so
   it sits cleanly in the listing-footer action row). The z-index + relative
   position keep its click target above the listenable listing-image-block. */
.save-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  line-height: 1;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
  z-index: 2;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.save-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--surface-hover);
}
.save-btn.is-saved {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: rgba(62, 232, 181, 0.3);
}
.save-btn.is-saved:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
}

/* Larger square heart for the listing detail header. */
.save-btn-large {
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 1.3rem;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Title row on the detail page wraps the title + large save button. */
.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

/* Responsive: stack columns under 768px */
@media (max-width: 768px) {
  .detail-shell {
    flex-direction: column;
    gap: 22px;
  }
  .detail-title { font-size: 1.45rem; }
  .detail-price { font-size: 1.35rem; }
}

/* Listing detail — viewing request CTA + modal */
.detail-cta-row {
  margin-top: 14px;
}

.viewing-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.viewing-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.viewing-modal-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 22px 20px;
  max-width: 440px;
  width: 92vw;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
}
.viewing-modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
.viewing-modal-close:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}
.viewing-modal-title {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}
.viewing-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.viewing-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
}
.viewing-input {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 0.92rem;
  width: 100%;
  box-sizing: border-box;
}
.viewing-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(62, 232, 181, 0.15);
}
.viewing-textarea {
  resize: vertical;
  min-height: 70px;
}
.viewing-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  background: var(--accent-dim);
  border: 1px solid rgba(62, 232, 181, 0.2);
  color: var(--accent);
  padding: 16px;
  border-radius: 10px;
}
.viewing-success strong {
  font-size: 1rem;
}
.viewing-success p {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 0.9rem;
}
