/* ==========================================================================
   Luxury Real Estate Portal — Design System
   Primary bg #F6F4EF | Card #FFFFFF | Accent #1E3A5F | Gold #C9A227
   ========================================================================== */

:root {
  --inv-bg: #F6F4EF;
  --inv-bg-hero-end: #ECE8DF;
  --inv-card: #FFFFFF;
  --inv-text: #0F172A;
  --inv-text-secondary: #6B7280;
  --inv-accent: #1E3A5F;
  --inv-featured: #C9A227;
  --inv-border: #E5E7EB;
  --inv-hover: #F9FAFB;
  --inv-radius: 16px;
  --inv-radius-card: 24px;
  --inv-radius-search: 28px;
  --inv-shadow: 0 4px 6px -1px rgba(0,0,0,.06), 0 10px 20px -10px rgba(0,0,0,.08);
  --inv-shadow-lg: 0 20px 40px -12px rgba(0,0,0,.12), 0 8px 16px -8px rgba(0,0,0,.06);
  --inv-ease: 0.35s ease;
  --inv-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--inv-font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--inv-text);
  background: linear-gradient(165deg, #F5F4F2 0%, #E8E7E4 22%, #D4D3CF 45%, #A8ADB5 70%, #4a5f6f 88%, #1E3A5F 100%);
  background-attachment: fixed;
  min-height: 100vh;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 100% 55% at 50% -5%, rgba(255, 252, 248, 0.4) 0%, rgba(245, 244, 242, 0.12) 38%, transparent 62%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.inv-hidden { display: none !important; }

.inv-app { min-height: 100vh; display: flex; flex-direction: column; position: relative; z-index: 1; }

/* ----- Header ----- */
.inv-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--inv-border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  position: sticky;
  top: 0;
  z-index: 50;
}

.inv-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.inv-header-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--inv-text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.inv-header-logo:hover { color: var(--inv-accent); }

.inv-header-logo-img {
  height: 36px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
  vertical-align: middle;
}

.inv-header-solid {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 1px 0 var(--inv-border), 0 2px 8px rgba(0, 0, 0, 0.04);
}

.inv-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--inv-text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.inv-logo:hover { color: var(--inv-accent); }

.inv-header-nav,
.inv-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.inv-header-nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--inv-text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.inv-header-nav a:hover,
.inv-nav a:hover { color: var(--inv-text); }

.inv-nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--inv-text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.inv-header-cta {
  font-weight: 600;
  color: var(--inv-accent) !important;
}

.inv-header-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.9375rem;
  font-weight: 500;
  font-family: var(--inv-font);
  color: var(--inv-text-secondary);
  background: var(--inv-hover);
  border: 1px solid var(--inv-border);
  border-radius: var(--inv-radius);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}

.inv-header-search-btn:hover {
  color: var(--inv-accent);
  border-color: var(--inv-accent);
  transform: translateY(-1px);
}

.inv-kbd {
  padding: 4px 8px;
  font-size: 0.6875rem;
  font-weight: 600;
  background: rgba(30, 58, 95, 0.1);
  color: var(--inv-accent);
  border-radius: 6px;
}

/* ----- Command palette ----- */
.inv-palette {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 15vh 32px 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(8px);
}

.inv-palette-backdrop { position: absolute; inset: 0; cursor: pointer; }

.inv-palette-box {
  position: relative;
  width: 100%;
  max-width: 560px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  background: var(--inv-card);
  border: 1px solid var(--inv-border);
  border-radius: var(--inv-radius);
  box-shadow: var(--inv-shadow-lg);
}

.inv-palette-input {
  flex: 1;
  border: none;
  font-size: 1rem;
  font-family: inherit;
  color: var(--inv-text);
  outline: none;
}

.inv-palette-input::placeholder { color: var(--inv-text-secondary); }
.inv-palette-hint { font-size: 0.75rem; color: var(--inv-text-secondary); }

/* ----- Hero ----- */
.inv-hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(165deg, rgba(245, 244, 242, 0.97) 0%, rgba(232, 231, 228, 0.95) 50%, rgba(212, 211, 207, 0.9) 100%);
  padding: 48px 32px 64px;
}

.inv-hero-content {
  width: 100%;
  max-width: 1280px;
  text-align: center;
}

.inv-hero-headline {
  font-size: clamp(2.8rem, 4vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--inv-text);
  line-height: 1.12;
  margin-bottom: 12px;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.inv-hero-headline::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--inv-featured), rgba(201, 162, 39, 0.5));
  border-radius: 2px;
  margin: 20px auto 0;
}

.inv-hero-subtext {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--inv-text-secondary);
  max-width: 520px;
  margin: 0 auto 48px;
  line-height: 1.65;
  letter-spacing: 0.01em;
}

/* Search card */
.inv-search-card {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  border-radius: var(--inv-radius-search);
  padding: 36px;
  box-shadow: 0 24px 56px -20px rgba(30, 58, 95, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.6), 0 1px 0 0 rgba(201, 162, 39, 0.08);
  max-width: 900px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.85);
}

.inv-search-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  align-items: end;
  margin-bottom: 24px;
}

.inv-search-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--inv-text);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.inv-search-field input,
.inv-search-field select {
  width: 100%;
  padding: 16px;
  font-size: 0.9375rem;
  font-family: var(--inv-font);
  color: var(--inv-text);
  background: var(--inv-card);
  border: 1px solid var(--inv-border);
  border-radius: var(--inv-radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.inv-search-field input:hover,
.inv-search-field select:hover {
  border-color: #d1d5db;
}

.inv-search-field input:focus,
.inv-search-field select:focus {
  outline: none;
  border-color: var(--inv-accent);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.12);
}

.inv-search-field input::placeholder { color: var(--inv-text-secondary); }

.inv-search-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 12px; }
.inv-btn-search-main {
  background: linear-gradient(180deg, #2a4a6e 0%, var(--inv-accent) 100%);
  color: #fff;
  box-shadow: 0 2px 10px rgba(30, 58, 95, 0.25);
}
.inv-btn-search-main:hover {
  background: linear-gradient(180deg, #1E3A5F 0%, #152a45 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(30, 58, 95, 0.35);
}

.inv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--inv-font);
  border: none;
  border-radius: var(--inv-radius);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.inv-btn:active { transform: scale(0.98); }

.inv-btn-search {
  background: var(--inv-hover);
  color: var(--inv-text-secondary);
  border: 1px solid var(--inv-border);
}

.inv-btn-search:hover {
  background: var(--inv-border);
  color: var(--inv-text);
  transform: translateY(-1px);
}

.inv-hero-stats {
  font-size: 0.875rem;
  color: var(--inv-text-secondary);
  padding-top: 20px;
  border-top: 1px solid var(--inv-border);
}

.inv-hero-stats span { font-variant-numeric: tabular-nums; }

/* ----- Listings section ----- */
.inv-listings-section {
  position: relative;
  z-index: 2;
  padding-top: 96px;
  padding-bottom: 120px;
  flex: 1;
}

.inv-listings-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

.inv-listings-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 40px;
}

.inv-listings-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #0F172A;
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #E5E7EB;
  display: inline-block;
}

.inv-listings-toolbar {
  display: grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 20px;
  min-height: 44px;
}

.inv-sort-row {
  display: grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.inv-count {
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 44px;
  color: #6B7280;
  height: 44px;
  padding: 0;
  margin: 0;
  display: block;
}

.inv-sort-label {
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 44px;
  color: #6B7280;
  height: 44px;
  margin: 0;
  padding: 0;
  white-space: nowrap;
  display: block;
}

.inv-listings-toolbar select {
  height: 44px;
  padding: 0 14px;
  font-size: 0.9375rem;
  font-family: var(--inv-font);
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: var(--inv-radius);
  color: #0F172A;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  display: inline-flex;
  align-items: center;
  min-width: 140px;
  line-height: 1;
}

.inv-listings-toolbar select:focus {
  outline: none;
  border-color: var(--inv-accent);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.inv-listings-toolbar select option {
  background: #fff;
  color: #0F172A;
}

/* ----- Property grid ----- */
.inv-grid-wrap { min-height: 200px; }

.inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  justify-items: stretch;
  align-items: start;
  perspective: 1400px;
}

/* 3D scroll reveal: initial state before card enters viewport */
.inv-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--inv-card);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 28px -10px rgba(30, 58, 95, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.04);
  opacity: 0.88;
  transform: translateY(24px) rotateX(5deg) scale(0.97);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out, box-shadow 0.35s ease, border-color 0.35s ease;
}

.inv-card.inv-card-visible {
  opacity: 1;
  transform: translateY(0) rotateX(0) scale(1);
}

.inv-card.inv-card-visible:hover {
  transform: translateY(-8px) rotateX(0) scale(1);
  box-shadow: 0 24px 48px -14px rgba(30, 58, 95, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(201, 162, 39, 0.12);
  border-color: rgba(201, 162, 39, 0.25);
}

@media (prefers-reduced-motion: reduce) {
  .inv-card {
    opacity: 1;
    transform: none;
    transition-duration: 0.15s;
  }
  .inv-card.inv-card-visible:hover { transform: translateY(-8px); }
}

.inv-card-img-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--inv-hover);
  overflow: hidden;
  flex-shrink: 0;
}

.inv-card-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.12), transparent 50%);
  opacity: 0;
  transition: opacity var(--inv-ease);
}

.inv-card:hover .inv-card-img-wrap::after { opacity: 1; }

.inv-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--inv-ease);
}

.inv-card:hover .inv-card-img-wrap img { transform: scale(1.05); }

.inv-card-img-wrap .inv-card-badge,
.inv-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 12px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: #0F172A !important;
  color: #fff !important;
  border-radius: 6px;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  z-index: 1;
}

.inv-card-img-reflection { display: none; }

.inv-card-body {
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.inv-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--inv-text);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.inv-card-loc {
  font-size: 0.875rem;
  color: var(--inv-text-secondary);
  margin-bottom: 8px;
}

.inv-card-desc {
  font-size: 0.875rem;
  color: var(--inv-text-secondary);
  line-height: 1.45;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.inv-card-config {
  font-size: 0.75rem;
  color: var(--inv-text-secondary);
  margin-bottom: 14px;
}

.inv-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 14px;
  margin-top: auto;
  border-top: 1px solid var(--inv-border);
}

.inv-card-price {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--inv-text);
}

.inv-card-cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--inv-font);
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #2a4a6e 0%, var(--inv-accent) 100%);
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(30, 58, 95, 0.25);
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}

.inv-card:hover .inv-card-cta {
  background: linear-gradient(180deg, #1E3A5F 0%, #152a45 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 58, 95, 0.35);
}

.inv-card-footer .inv-gem { display: none; }

/* ----- Empty state ----- */
.inv-empty {
  text-align: center;
  padding: 80px 32px;
  background: var(--inv-card);
  border-radius: var(--inv-radius-card);
  border: 1px solid var(--inv-border);
  box-shadow: var(--inv-shadow);
}

.inv-empty-text {
  font-size: 1.1rem;
  color: var(--inv-text-secondary);
  margin-bottom: 24px;
}

.inv-empty-text a {
  color: var(--inv-accent);
  text-decoration: none;
}

.inv-empty-text a:hover {
  text-decoration: underline;
}

.inv-empty-hint {
  font-size: 0.9375rem;
  color: var(--inv-text-secondary);
  margin: 0 0 20px;
}

.inv-btn-primary {
  background: var(--inv-accent);
  color: #fff;
}

.inv-btn-primary:hover {
  background: #2d4a6f;
  transform: translateY(-2px);
}

/* ----- Table (hidden by default, keep for JS) ----- */
.inv-table-wrap {
  overflow-x: auto;
  border-radius: var(--inv-radius-card);
  border: 1px solid var(--inv-border);
  background: var(--inv-card);
  box-shadow: var(--inv-shadow);
}

.inv-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.inv-table thead { background: var(--inv-hover); border-bottom: 1px solid var(--inv-border); }
.inv-table th { text-align: left; padding: 16px 20px; font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--inv-text-secondary); }
.inv-table td { padding: 16px 20px; border-bottom: 1px solid var(--inv-border); color: var(--inv-text); }
.inv-table tbody tr:hover { background: var(--inv-hover); }
.inv-table-cell-property { display: inline-flex; align-items: center; gap: 12px; font-weight: 500; text-decoration: none; color: inherit; }
.inv-table-cell-property:hover { color: var(--inv-accent); }
.inv-table-thumb-wrap { width: 64px; height: 40px; border-radius: 8px; overflow: hidden; background: var(--inv-hover); flex-shrink: 0; }
.inv-table-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; }
.inv-gem, .inv-gem-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 600; }
.inv-gem-dot { width: 6px; height: 6px; border-radius: 50%; }
.inv-gem-emerald { color: #059669; } .inv-gem-emerald .inv-gem-dot { background: #059669; }
.inv-gem-topaz { color: #d97706; } .inv-gem-topaz .inv-gem-dot { background: #d97706; }
.inv-table-actions { display: flex; gap: 8px; }
.inv-table-actions button { width: 36px; height: 36px; border: none; border-radius: 50%; background: var(--inv-hover); color: var(--inv-text-secondary); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background 0.2s, color 0.2s; }
.inv-table-actions button:hover { background: var(--inv-accent); color: #fff; }

/* ----- Footer ----- */
.inv-footer {
  padding: 32px;
  border-top: 3px solid rgba(201, 162, 39, 0.4);
  background: linear-gradient(180deg, rgba(30, 58, 95, 0.5) 0%, rgba(30, 58, 95, 0.35) 100%);
}

.inv-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.85);
}

.inv-footer a { color: #fff; text-decoration: none; font-weight: 500; }
.inv-footer a:hover { text-decoration: underline; }

/* ----- Chat (AI Assistant – premium future-tech) ----- */
.inv-chat-fab {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(145deg, #1a3a5e 0%, #0f2744 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(6, 182, 212, 0.25), 0 0 24px rgba(6, 182, 212, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s;
}

.inv-chat-fab:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(6, 182, 212, 0.5), 0 0 32px rgba(6, 182, 212, 0.35);
}

.inv-chat-fab .inv-chat-fab-icon {
  transition: transform 0.3s;
}

.inv-chat-fab:hover .inv-chat-fab-icon {
  transform: scale(1.08);
}

.inv-chat.inv-chat-panel {
  position: fixed;
  bottom: 100px;
  right: 32px;
  width: 420px;
  max-width: calc(100vw - 48px);
  height: 560px;
  max-height: 85vh;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.97) 0%, rgba(15, 23, 42, 0.94) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 20px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  z-index: 99;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.92) translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.inv-chat-panel.inv-hidden {
  display: flex !important;
  visibility: hidden;
  opacity: 0;
  transform: scale(0.92) translateY(12px);
  pointer-events: none;
}

.inv-chat.inv-chat-panel:not(.inv-hidden) {
  visibility: visible;
  opacity: 1;
  transform: scale(1) translateY(0);
}

.inv-chat-header {
  padding: 20px 24px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.inv-chat-header-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inv-chat-ai-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #0f172a;
  background: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%);
  border-radius: 8px;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.4);
}

.inv-chat-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: -0.02em;
  margin: 0;
}

.inv-chat-header-desc {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 10px 0 0;
  line-height: 1.4;
}

.inv-chat-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  font-size: 0.9375rem;
  line-height: 1.55;
  min-height: 0;
}

.inv-chat-msg {
  margin-bottom: 16px;
  padding: 16px 18px;
  border-radius: 14px;
  max-width: 88%;
  animation: inv-msg-in 0.35s ease backwards;
}

.inv-chat-msg.user {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.4) 0%, rgba(6, 182, 212, 0.25) 100%);
  color: #fff;
  margin-left: auto;
  border: 1px solid rgba(6, 182, 212, 0.4);
}

.inv-chat-msg.bot {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: pre-wrap;
}

.inv-chat-msg.bot .inv-chat-link {
  color: #22d3ee;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.inv-chat-msg.bot .inv-chat-link:hover {
  border-bottom-color: #22d3ee;
  color: #67e8f9;
}

.inv-chat-msg-loading {
  color: rgba(255, 255, 255, 0.5);
  animation: inv-load-pulse 1.2s ease-in-out infinite;
}

@keyframes inv-msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes inv-load-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.inv-chat-prompts-wrap {
  flex-shrink: 0;
  padding: 12px 24px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
}

.inv-chat-prompts-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
}

.inv-chat-prompts-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 0;
  flex: 1;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.inv-chat-prompts-scroll::-webkit-scrollbar {
  height: 4px;
}

.inv-chat-prompt {
  flex-shrink: 0;
  padding: 8px 14px;
  font-size: 0.8125rem;
  font-family: var(--inv-font);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, transform 0.2s, box-shadow 0.2s;
}

.inv-chat-prompt:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.15);
}

.inv-chat-form {
  flex-shrink: 0;
  padding: 16px 24px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 12px;
  align-items: center;
}

.inv-chat-form input {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
  font-size: 0.9375rem;
  font-family: var(--inv-font);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: #fff;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.inv-chat-form input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.inv-chat-form input:focus {
  outline: none;
  border-color: rgba(6, 182, 212, 0.6);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.inv-chat-form .inv-chat-send,
.inv-chat-form button {
  padding: 14px 20px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--inv-font);
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  color: #0f172a;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.inv-chat-form .inv-chat-send:hover,
.inv-chat-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.35);
}

.inv-chat-messages::-webkit-scrollbar {
  width: 6px;
}

.inv-chat-messages::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
}

.inv-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(6, 182, 212, 0.3);
  border-radius: 3px;
}

.inv-chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(6, 182, 212, 0.5);
}

@media (prefers-reduced-motion: reduce) {
  .inv-chat-fab,
  .inv-chat-fab .inv-chat-fab-icon,
  .inv-chat.inv-chat-panel,
  .inv-chat-msg,
  .inv-chat-msg-loading,
  .inv-chat-prompt,
  .inv-chat-form input,
  .inv-chat-form button {
    animation: none !important;
    transition-duration: 0.12s !important;
  }
}

/* ----- Property detail page ----- */
.inv-detail-main {
  padding-top: 40px;
  padding-bottom: 80px;
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.inv-detail-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 440px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  margin-bottom: 36px;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.inv-detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.inv-detail-hero .inv-detail-price {
  position: absolute;
  bottom: 24px;
  left: 28px;
  padding: 12px 22px;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  background: rgba(15, 23, 42, 0.92);
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.inv-detail-body {
  padding: 32px 28px 40px;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  border-radius: var(--inv-radius-card);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--inv-shadow-lg);
}

.inv-detail-body h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--inv-text);
  margin: 0 0 12px;
}

.inv-detail-loc {
  font-size: 1.05rem;
  color: var(--inv-text-secondary);
  margin: 0 0 28px;
  line-height: 1.55;
}

.inv-detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 24px 36px;
  padding: 28px 0;
  margin-bottom: 32px;
  border-top: 1px solid var(--inv-border);
  border-bottom: 1px solid var(--inv-border);
}

.inv-detail-meta .label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--inv-text-secondary);
  margin-bottom: 6px;
}

.inv-detail-meta > div > div:last-child {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--inv-text);
}

.inv-detail-desc {
  margin-bottom: 36px;
  padding: 24px 0;
}

.inv-detail-desc h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--inv-text);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.inv-detail-desc p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--inv-text-secondary);
  margin: 0;
}

.inv-amenities {
  margin-bottom: 40px;
  padding: 24px 0;
}

.inv-amenities h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--inv-text);
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

.inv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inv-tag {
  display: inline-block;
  padding: 10px 18px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--inv-accent);
  background: rgba(30, 58, 95, 0.1);
  border: 1px solid rgba(30, 58, 95, 0.25);
  border-radius: 999px;
}

.inv-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  padding-top: 36px;
  margin-top: 8px;
  border-top: 2px solid var(--inv-border);
}

.inv-cta .inv-btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 26px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--inv-font);
  text-decoration: none;
  border-radius: 12px;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.inv-cta .inv-btn-primary {
  background: linear-gradient(180deg, #2a4a6e 0%, var(--inv-accent) 100%);
  color: #fff;
  border: none;
  box-shadow: 0 2px 8px rgba(30, 58, 95, 0.25);
}

.inv-cta .inv-btn-primary:hover {
  background: linear-gradient(180deg, var(--inv-accent) 0%, #152a45 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 58, 95, 0.35);
}

.inv-cta .inv-btn-ghost {
  background: transparent;
  color: var(--inv-text-secondary);
  border: 1px solid var(--inv-border);
}

.inv-cta .inv-btn-ghost:hover {
  background: var(--inv-hover);
  color: var(--inv-text);
}

.inv-back {
  display: inline-block;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--inv-accent);
  text-decoration: none;
  margin-top: 8px;
  transition: color 0.2s;
}

.inv-back:hover {
  color: #2d4a6f;
  text-decoration: underline;
}

/* Trust strip under CTA (detail page) */
.inv-cta-trust {
  flex-basis: 100%;
  width: 100%;
  margin-top: 4px;
}
.inv-cta-trust p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--inv-text-secondary);
  line-height: 1.5;
}
.inv-cta-trust-ref { margin-bottom: 4px; }
.inv-cta-trust-follow { color: var(--inv-text-secondary); }

/* Related / similar listings on detail page */
.inv-related {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--inv-border);
}
.inv-related-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--inv-text);
  margin: 0 0 20px;
}
.inv-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}
.inv-related-card {
  text-decoration: none;
  color: inherit;
}
.inv-related-card .inv-card-footer .inv-gem { display: none; }

@media (max-width: 640px) {
  .inv-detail-main { padding: 20px 16px 60px; }
  .inv-detail-hero { aspect-ratio: 4 / 3; margin-bottom: 20px; }
  .inv-detail-hero .inv-detail-price { font-size: 1.1rem; left: 16px; bottom: 16px; }
  .inv-detail-meta { grid-template-columns: 1fr; gap: 16px; }
  .inv-cta { flex-direction: column; align-items: stretch; }
  .inv-cta .inv-btn { justify-content: center; }
  .inv-related-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
}

/* ----- Responsive ----- */
@media (max-width: 900px) {
  .inv-hero-headline { font-size: clamp(2rem, 5vw, 2.8rem); }
  .inv-search-fields { grid-template-columns: 1fr 1fr; }
  .inv-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
}

@media (max-width: 640px) {
  .inv-header-inner { padding: 16px 24px; }
  .inv-header-nav { display: none; }
  .inv-hero { min-height: auto; padding: 40px 24px 48px; }
  .inv-search-card { padding: 24px; }
  .inv-search-fields { grid-template-columns: 1fr; }
  .inv-listings-section { padding-top: 60px; padding-bottom: 80px; }
  .inv-listings-inner { padding: 0 24px; }
  .inv-listings-header { margin-bottom: 40px; }
}
