@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --text: #1a202c;
  --muted: #718096;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.10);
  --shadow-lg: 0 20px 50px rgba(0,0,0,0.16);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1220px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 0;
}

/* ─── HEADER ─────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 0.75rem 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.page-home .site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom: none;
  backdrop-filter: none;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.45rem;
  background: var(--primary);
  color: white;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.page-home .brand-mark {
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(8px);
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-login {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  padding: 0.45rem 0.65rem;
  border-radius: 0.4rem;
  transition: background 140ms;
}

.nav-login:hover {
  background: rgba(0,0,0,0.05);
}

.page-home .nav-login {
  color: white;
}

.page-home .nav-login:hover {
  background: rgba(255,255,255,0.12);
}

.btn-signup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: white !important;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.48rem 1.1rem;
  border-radius: 999px;
  transition: background 140ms;
}

.btn-signup:hover {
  background: var(--primary-dark);
  color: white;
}

/* ─── HERO BANNER ────────────────────────────── */

.hero-banner {
  position: relative;
  min-height: 510px;
  background-image: url('https://images.unsplash.com/photo-1564013799919-ab600027ffc6?auto=format&fit=crop&w=1920&q=72');
  background-size: cover;
  background-position: center 55%;
  display: flex;
  align-items: center;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.42) 0%,
    rgba(0,0,0,0.22) 44%,
    rgba(235,235,235,0.55) 80%,
    var(--bg) 100%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  padding: 100px 1rem 2rem;
}

.hero-headline {
  font-size: clamp(2.1rem, 4.5vw, 3.1rem);
  font-weight: 800;
  color: white;
  letter-spacing: -0.03em;
  line-height: 1.07;
  text-shadow: 0 2px 18px rgba(0,0,0,0.38);
  margin: 0;
}

.hero-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.87);
  text-shadow: 0 1px 8px rgba(0,0,0,0.32);
  margin: 0 0 0.4rem;
}

/* ─── SEARCH CARD ────────────────────────────── */

.search-card {
  width: min(700px, 94vw);
  background: white;
  border-radius: 0.9rem;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.search-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.stab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.8rem 0.5rem;
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.91rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  transition: color 140ms, border-color 140ms;
}

.stab svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.stab.stab-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.stab:hover:not(.stab-active) {
  color: var(--text);
}

.search-input-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border);
}

.search-icon {
  width: 18px;
  height: 18px;
  color: #a0aab8;
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 0.94rem;
  color: var(--text);
  background: transparent;
  min-width: 0;
}

.search-input::placeholder {
  color: #a8b2c0;
}

.btn-search {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0.5rem;
  padding: 0.62rem 1.45rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 140ms;
  flex-shrink: 0;
}

.btn-search:hover {
  background: var(--primary-dark);
}

.location-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.7rem 1rem 0.8rem;
}

.lpill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-family: inherit;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 140ms, color 140ms;
}

.lpill svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

.lpill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ─── RESULTS PAGE ──────────────────────────── */

.results-page {
  padding: 2.8rem 0 4rem;
}

.results-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
  padding: 2rem;
}

.results-title {
  margin: 0 0 0.35rem;
  font-size: 1.6rem;
  font-weight: 700;
}

.results-summary {
  margin: 0 0 1.3rem;
  color: var(--muted);
}

/* ─── RESULTS FILTER BAR ─────────────────────── */

.filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.9rem;
  padding: 1.1rem 0 1.4rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 130px;
}

.filter-group-query {
  min-width: 200px;
  flex: 1 1 200px;
}

.filter-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.filter-group input,
.filter-group select {
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.55rem 0.7rem;
  outline: none;
  transition: border-color 140ms;
}

.filter-group input:focus,
.filter-group select:focus {
  border-color: var(--primary);
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.filter-reset-link {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  padding: 0.55rem 0.2rem;
  transition: color 140ms;
}

.filter-reset-link:hover {
  color: var(--text);
  text-decoration: underline;
}

/* ─── RESULTS "MORE FILTERS" (AMENITIES) ─────── */

.filter-more-toggle-wrap {
  display: flex;
  align-items: center;
}

.filter-more-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.55rem 0.9rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 140ms, color 140ms;
}

.filter-more-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-more-chevron {
  transition: transform 140ms;
}

.filter-more-toggle[aria-expanded="true"] .filter-more-chevron {
  transform: rotate(180deg);
}

.filter-more-toggle[aria-expanded="true"] {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-amenities-panel {
  flex-basis: 100%;
  padding: 0.9rem 0 0.2rem;
}

.filter-amenities-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.amenity-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.amenity-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-size: 0.82rem;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 140ms, color 140ms, background 140ms;
}

.amenity-chip input {
  accent-color: var(--primary);
  margin: 0;
  cursor: pointer;
}

.amenity-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.amenity-chip:has(input:checked) {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ─── PAGINATION ─────────────────────────────── */

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.3rem;
  height: 2.3rem;
  padding: 0 0.6rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: border-color 140ms, background 140ms, color 140ms;
}

.page-btn:hover:not(:disabled):not(.page-btn-active) {
  border-color: var(--primary);
  color: var(--primary);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-btn-active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  font-weight: 700;
}

.page-nav {
  font-weight: 600;
  padding: 0 0.85rem;
}

.page-ellipsis {
  color: var(--muted);
  padding: 0 0.15rem;
}

.results-section {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}

.results-empty {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

/* ─── LISTINGS SECTION ───────────────────────── */

.listings-section {
  padding: 2.5rem 0 4rem;
  background: var(--bg);
}

.listings-heading {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 1.15rem;
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
}

/* ─── PROPERTY CARD ──────────────────────────── */

.lcard {
  display: block;
  background: white;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 180ms, transform 180ms;
  cursor: pointer;
}

.lcard:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.lcard-photo {
  position: relative;
  height: 198px;
  background-size: cover;
  background-position: center;
  background-color: #d1dbe8;
}

.lbadge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.73rem;
  font-weight: 700;
  padding: 0.27rem 0.62rem;
  border-radius: 999px;
}

.lbadge-sale {
  background: var(--primary);
  color: white;
}

.lbadge-sponsored {
  background: #f59e0b;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.67rem;
}

.lcard-ext {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 1.95rem;
  height: 1.95rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  transition: background 140ms;
}

.lcard-ext:hover {
  background: white;
}

.lcard-ext svg {
  width: 13px;
  height: 13px;
  color: var(--muted);
}

.lcard-body {
  padding: 0.8rem 0.9rem 0.95rem;
}

.lcard-price {
  font-size: 1.28rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.2rem;
  line-height: 1.2;
}

.lcard-meta {
  font-size: 0.79rem;
  color: var(--muted);
  margin-bottom: 0.28rem;
}

.lcard-addr {
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
}

.lcard-city {
  font-size: 0.79rem;
  color: var(--muted);
}

.lcard-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.38rem;
  line-height: 1.3;
}

.lcard-zillow {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--primary);
}

.lcard-zillow:hover {
  text-decoration: underline;
}

/* ─── FOOTER ─────────────────────────────────── */

.site-footer {
  padding: 1.25rem 0 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.87rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

/* ─── RESPONSIVE ─────────────────────────────── */

@media (max-width: 960px) {
  .listings-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .hero-banner {
    min-height: auto;
  }

  .hero-content {
    padding-top: 80px;
    padding-bottom: 2rem;
  }

  .hero-headline {
    font-size: 1.85rem;
  }

  .stab svg {
    display: none;
  }

  .stab {
    font-size: 0.82rem;
  }

  .listings-grid {
    grid-template-columns: 1fr;
  }

  .site-nav,
  .footer-inner {
    flex-wrap: wrap;
    gap: 0.6rem;
  }
}

.brand img{
    max-height:90px;
}

/* ─── LISTING CARDS (Results Page) ─────────────────────────────────── */

.results-loading,
.results-error {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.results-error {
  color: #dc2626;
}

.results-count {
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.listing-card {
  display: block;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.listing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.listing-photo {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: var(--border);
}

.listing-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-status {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.listing-status-active {
  color: #16a34a;
}

.listing-status-pending {
  color: #ea580c;
}

.listing-status-comingsoon {
  color: var(--primary);
}

.listing-info {
  padding: 1rem 1.25rem 1.25rem;
}

.listing-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.listing-specs {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.listing-specs span {
  white-space: nowrap;
}

.listing-address {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.listing-type {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: capitalize;
}

@media (max-width: 768px) {
  .listing-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── PROPERTY DETAILS PAGE ─────────────────────────────────── */

.details-page {
  padding: 1.75rem 0 4rem;
}

.details-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 1.1rem;
  cursor: pointer;
}

.details-back:hover {
  color: var(--text);
}

.details-back svg {
  width: 1rem;
  height: 1rem;
}

.details-gallery {
  position: relative;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 6px;
  border-radius: 0.75rem;
  overflow: hidden;
}

.details-gallery-empty {
  display: block;
}

.details-gallery-hero {
  cursor: pointer;
  min-height: 460px;
  background-size: cover;
  background-position: center;
  background-color: #d1dbe8;
}

.details-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 6px;
}

.details-gallery-cell {
  position: relative;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  background-color: #d1dbe8;
}

.details-gallery-more-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: rgba(15, 23, 42, 0.6);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}

.details-gallery-more-overlay svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.details-gallery-count-pill {
  display: none;
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  align-items: center;
  gap: 0.4rem;
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.details-gallery-count-pill svg {
  width: 0.9rem;
  height: 0.9rem;
}

.details-photo-placeholder {
  height: 460px;
}

.details-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2rem;
  margin-top: 2rem;
}

.details-header {
  position: relative;
  background: white;
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
}

.details-status-badge {
  position: static;
  display: inline-block;
  margin-bottom: 0.75rem;
  background: var(--bg);
}

.details-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.details-key-facts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
  font-size: 1rem;
  color: var(--text);
}

.details-key-fact strong {
  font-weight: 800;
}

.details-key-facts-divider {
  color: var(--border);
}

.details-address {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 0.35rem;
}

.details-citystate {
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.details-type {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 0.6rem;
  text-transform: capitalize;
}

.details-specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
}

.details-spec {
  text-align: center;
}

.details-spec-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.details-spec-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.details-section {
  background: white;
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
}

.details-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.85rem;
}

.details-description {
  font-size: 0.96rem;
  color: var(--text);
  line-height: 1.65;
  white-space: pre-line;
  margin: 0;
}

.details-features-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.details-features-list li {
  font-size: 0.9rem;
  color: var(--text);
  padding-left: 1.2rem;
  position: relative;
}

.details-features-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--primary);
}

.details-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem 1.5rem;
}

.details-info-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.details-info-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 0.15rem;
}

.details-cta-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  position: sticky;
  top: 5.5rem;
}

.details-cta-btn {
  display: block;
  text-align: center;
  padding: 0.85rem 1rem;
  border-radius: 0.6rem;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background-color 140ms, border-color 140ms, opacity 140ms;
}

.details-cta-primary {
  background: var(--primary);
  color: #fff;
}

.details-cta-primary:hover {
  background: var(--primary-dark);
}

.details-cta-secondary {
  background: white;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.details-cta-secondary:hover {
  background: #eff6ff;
}

.details-cta-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.details-agent-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
}

.details-agent-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.details-agent-contact {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.6rem;
}

.details-agent-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
}

.details-agent-link:hover {
  text-decoration: underline;
}

.details-mls {
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0 0.25rem;
}

.details-map-frame {
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--border);
}

.details-map-frame iframe {
  display: block;
  width: 100%;
  height: 320px;
  border: 0;
}

/* ─── PHOTO LIGHTBOX ─────────────────────────────────── */

.details-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 12, 16, 0.97);
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.details-lightbox-open {
  display: flex;
}

.details-lightbox-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  color: #fff;
}

.details-lightbox-count {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.details-lightbox-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.5rem;
}

.details-lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 1;
  padding: 3.5rem 4.5rem;
  min-height: 0;
}

.details-lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0.5rem;
}

.details-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 140ms;
}

.details-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.25);
}

.details-lightbox-nav svg {
  width: 1.4rem;
  height: 1.4rem;
}

.details-lightbox-prev {
  left: 1rem;
}

.details-lightbox-next {
  right: 1rem;
}

.details-lightbox-thumbs {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem 1.25rem;
  overflow-x: auto;
  max-width: 100%;
}

.details-lightbox-thumb {
  flex: 0 0 auto;
  width: 84px;
  height: 60px;
  border-radius: 0.4rem;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  opacity: 0.55;
  border: 2px solid transparent;
  transition: opacity 140ms, border-color 140ms;
}

.details-lightbox-thumb:hover {
  opacity: 0.85;
}

.details-lightbox-thumb-active {
  opacity: 1;
  border-color: #fff;
}

@media (max-width: 900px) {
  .details-body {
    grid-template-columns: 1fr;
  }

  .details-cta-card {
    position: static;
  }

  .details-gallery {
    grid-template-columns: 1fr;
  }

  .details-gallery-hero {
    min-height: 280px;
  }

  .details-gallery-grid {
    display: none;
  }

  .details-gallery-count-pill {
    display: flex;
  }

  .details-photo-placeholder {
    height: 280px;
  }

  .details-lightbox-stage {
    padding: 3.5rem 1rem;
  }

  .details-lightbox-nav {
    width: 2.25rem;
    height: 2.25rem;
  }
}
