:root {
  --navy: #070D18;
  --navy-soft: #0D182E;
  --gold: #C5A038;
  --gold-light: #E5C158;
  --off-white: #F4F6F9;
  --border: #E2E8F0;
  --text-body: #475569;
  --text-heading: #070D18;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text-heading);
  background: var(--off-white);
  line-height: 1.5;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

.listings-header {
  background: var(--navy);
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  color: var(--gold);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  margin: 0 0 8px;
}

.listings-header h1 {
  color: var(--off-white);
  font-size: 36px;
  font-weight: 800;
  margin: 0 0 10px;
  line-height: 1.2;
}

.lede {
  color: #C9D2E0;
  font-size: 16px;
  max-width: 560px;
  margin: 0;
}

/* ---------- Toolbar ---------- */

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 36px 0 24px;
}

#listing-search {
  flex: 1;
  min-width: 240px;
  max-width: 420px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  background: #fff;
}

#listing-search:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(197, 160, 56, 0.15);
}

.result-count {
  font-size: 13px;
  color: var(--text-body);
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Grid & Cards ---------- */

.listing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-bottom: 80px;
}

@media (max-width: 900px) {
  .listing-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .listing-grid { grid-template-columns: 1fr; }
}

.card {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: var(--gold);
  box-shadow: 0 8px 20px rgba(7, 13, 24, 0.08);
  transform: translateY(-2px);
}

.card-media {
  position: relative;
  aspect-ratio: 4 / 2.6;
  background: var(--navy);
}

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

.tag-featured {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--gold);
  color: var(--navy);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.92);
}

.badge-active  { color: #0D6B3B; }
.badge-soon    { color: #9A6A00; }
.badge-offer   { color: #1E40AF; }
.badge-draft   { color: #64748B; }
.badge-default { color: var(--text-body); }

.card-body { padding: 20px; }

.card-location {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--text-body);
}

.card-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.card-specs {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-body);
}

.card-price {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--navy);
}

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

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

.detail-wrap { padding-top: 40px; padding-bottom: 80px; }

.back-link {
  display: inline-block;
  color: var(--text-body);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 24px;
}
.back-link:hover { color: var(--navy); }

.detail-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
}

@media (max-width: 800px) {
  .detail-layout { grid-template-columns: 1fr; }
}

.detail-media {
  position: relative;
  border-radius: 8px;
  height:300px; width:auto;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--navy);
}
.detail-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (min-width: 801px) {
  .detail-media {
    width: 100%;
    height: 500px; /* bump this up/down to taste */
      
  }
}

.detail-info h1 {
  font-size: 30px;
  font-weight: 800;
  margin: 4px 0 12px;
  line-height: 1.25;
}

.detail-price {
  font-size: 24px;
  font-weight: 800;
  color: var(--gold);
  margin: 0 0 20px;
}

.detail-description {
  color: var(--text-body);
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 28px;
}

.spec-list {
  margin: 0 0 32px;
  border-top: 1px solid var(--border);
}

.spec-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.spec-row dt { color: var(--text-body); margin: 0; }
.spec-row dd { margin: 0; font-weight: 700; }

.cta-button {
  display: inline-block;
  background: linear-gradient(111deg, var(--gold-light) 62%, var(--gold));
  color: var(--navy);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 4px;
}
.cta-button:hover { box-shadow: 0 0 0 3px rgba(229, 193, 88, 0.3); }

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.detail-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  cursor: pointer;
}

@media (max-width: 500px) {
  .detail-gallery { grid-template-columns: repeat(3, 1fr); }
}



/* ================================================================== *
 * Detail page — full dynamic listing (added)
 * ================================================================== */

/* Two badges can appear together on the hero image (transaction + status);
   keep transaction on the right (matches the grid cards) and status on the left. */
.detail-media .badge-status {
  left: 12px;
  right: auto;
}

.badge-active  { color: #0D6B3B; }
.badge-soon    { color: #9A6A00; }
.badge-offer   { color: #1E40AF; }
.badge-draft   { color: #64748B; }

/* Hero prev/next controls */
.media-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(7, 13, 24, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}
.media-nav:hover { background: rgba(7, 13, 24, 0.8); }
.media-prev { left: 12px; }
.media-next { right: 12px; }

.detail-gallery img {
  transition: outline 0.15s ease, opacity 0.15s ease;
  outline: 2px solid transparent;
  outline-offset: -2px;
}
.detail-gallery img.is-active {
  outline-color: var(--gold);
}
.detail-gallery img:hover { opacity: 0.85; }

/* Reference tag + location line with inline icons */
.reference-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-body);
  letter-spacing: 0.3px;
}
.reference-tag svg { width: 14px; height: 14px; }

.card-location {
  display: flex;
  align-items: center;
  gap: 6px;
}
.card-location svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--gold); }

/* Language tabs */
.lang-tabs {
  display: flex;
  gap: 6px;
  margin: 0 0 18px;
  flex-wrap: wrap;
}
.lang-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-body);
  text-decoration: none;
  background: #fff;
}
.lang-tab svg { width: 14px; height: 14px; }
.lang-tab.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--off-white);
}
.lang-tab:hover:not(.is-active) { border-color: var(--gold); color: var(--text-heading); }

/* Quick stats strip */
.quickstats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 4px 0 18px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.quickstat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-body);
}
.quickstat svg { width: 20px; height: 20px; color: var(--gold); flex-shrink: 0; }
.quickstat strong { color: var(--text-heading); font-weight: 800; }

/* Energy label badge */
.energy-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-body);
  margin: 0 0 18px;
}
.energy-line svg { width: 18px; height: 18px; color: var(--gold); }
.energy-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.5px;
}

/* Detail sections (Overview / Address & Features / Property Details / etc.) */
.detail-section {
  margin: 0 0 32px;
}
.detail-section h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-heading);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.detail-section h2 svg,
.section-icon svg { width: 18px; height: 18px; color: var(--gold); }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 24px;
  margin: 0;
}
@media (max-width: 560px) {
  .detail-grid { grid-template-columns: 1fr; }
}

.detail-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.detail-row .row-icon { flex-shrink: 0; margin-top: 1px; }
.detail-row .row-icon svg { width: 17px; height: 17px; color: var(--gold); }
.detail-row dt {
  flex: 1;
  margin: 0;
  font-size: 13px;
  color: var(--text-body);
}
.detail-row dd {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-heading);
  text-align: right;
}

/* The detail-info column's own Overview / Address sections read a little
   more compact than the wide left-column sections. */
.detail-info .detail-section h2 { font-size: 13px; }
.detail-info .detail-grid { grid-template-columns: 1fr; }

/* Map link */
.map-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-body);
  text-decoration: none;
}
.map-link svg { width: 16px; height: 16px; color: var(--gold); }
.map-link:hover { color: var(--navy); }

.cta-button { display: inline-flex; align-items: center; gap: 8px; }
.cta-button svg { width: 16px; height: 16px; }