/* Homepage hero */
.home-hero {
  position: relative;
  min-height: 700px;
  max-height: 800px;
  display: flex;
  align-items: center;
  color: #fff;
  background-color: #0c1817;
  background-image:
    linear-gradient(90deg, rgba(12,24,23,0.78) 0%, rgba(12,24,23,0.45) 48%, rgba(12,24,23,0.15) 100%),
    var(--hero-image, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}
.home-hero-inner { max-width: 690px; padding-block: 80px; }
.home-hero-label {
  display: inline-block;
  font-size: 12px; font-weight: 700;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 16px;
}
.home-hero h1 {
  color: #fff; font-size: 56px; line-height: 1.05; font-weight: 800;
  letter-spacing: -0.035em; margin: 0 0 16px;
}
.home-hero h1 .ai { color: #7AD4CB; }
.home-hero-sub { font-size: 18px; line-height: 1.7; color: rgba(255,255,255,0.92); margin: 0 0 28px; }
.hero-search {
  display: flex; align-items: center; gap: 8px;
  width: min(760px, 100%); min-height: 72px;
  background: #fff; border-radius: 20px; padding: 8px;
  box-shadow: 0 18px 50px rgba(16,24,40,0.18);
}
.hero-search-icon { padding-inline-start: 10px; color: var(--text-secondary); }
.hero-search input {
  flex: 1; border: 0 !important; box-shadow: none !important; height: 56px; min-width: 0;
}
.hero-search-btn {
  width: 56px; height: 56px; min-height: 56px; padding: 0;
  border-radius: 16px; background: var(--primary); color: #fff; border: 0; cursor: pointer;
}
.hero-chips { display: flex; gap: 8px; overflow-x: auto; margin-top: 16px; scrollbar-width: none; }
.hero-chips::-webkit-scrollbar { display: none; }
.prompt-chip {
  height: 34px; padding-inline: 14px; border-radius: 999px;
  background: rgba(255,255,255,0.92); border: 1px solid rgba(255,255,255,0.6);
  font-size: 12px; font-weight: 600; white-space: nowrap; cursor: pointer; color: var(--text-heading);
}
.prompt-chip:hover { background: #fff; color: var(--primary-dark); transform: translateY(-1px); }
@media (max-width: 767px) {
  .home-hero { min-height: 620px; max-height: none; align-items: flex-start; padding-top: 96px; }
  .home-hero h1 { font-size: 34px; }
  .hero-search { flex-direction: column; align-items: stretch; min-height: 0; }
  .hero-search-icon { display: none; }
  .hero-search input { border: 1px solid var(--border-default) !important; border-radius: 14px !important; }
  .hero-search-btn { width: 100%; border-radius: 14px; }
}

/* Stats */
.stats-strip {
  position: relative; z-index: 2;
  margin-block-start: -42px;
  margin-inline: auto;
  width: min(100% - 64px, 1440px);
  max-width: 100%;
  box-sizing: border-box;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 14px 44px rgba(16,24,40,0.1);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  min-height: 112px;
  align-items: center;
}
.stats-item {
  text-align: center;
  border-inline-end: 1px solid var(--border-light);
  padding: 12px 8px;
  min-width: 0;
}
.stats-item:last-child { border-inline-end: 0; }
.stats-value {
  display: block; font-size: clamp(18px, 2.2vw, 28px); font-weight: 750;
  color: var(--primary-dark); overflow-wrap: anywhere;
}
.stats-label {
  display: block; font-size: 12px; color: var(--text-secondary); margin-top: 4px;
  overflow-wrap: anywhere; line-height: 1.3;
}
@media (max-width: 1023px) {
  .stats-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); height: auto; }
}
@media (max-width: 767px) {
  .stats-strip {
    margin-block-start: 16px; height: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
    background: transparent; box-shadow: none; width: calc(100% - 32px);
  }
  .stats-item {
    background: #fff; border: 1px solid var(--border-light);
    border-radius: 16px; box-shadow: var(--shadow-card);
    border-inline-end: 1px solid var(--border-light);
  }
}

/* Categories */
.categories-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; width: 100%; }
.category-card {
  position: relative; height: 230px; border-radius: var(--radius-card);
  overflow: hidden; color: #fff; display: block;
}
.category-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 220ms ease; }
.category-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.02) 20%, rgba(0,0,0,0.72) 100%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 18px;
}
.category-card:hover { transform: translateY(-4px); }
.category-card:hover img { transform: scale(1.04); }
@media (max-width: 767px) {
  .categories-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .category-card { height: 160px; }
}

/* Collections mosaic */
.collections-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: repeat(2, 210px);
  gap: 20px;
  width: 100%;
  max-width: 100%;
}
.collection-card { position: relative; border-radius: var(--radius-card); overflow: hidden; color: #fff; }
.collection-card--large { grid-row: span 2; }
.collection-card img { width: 100%; height: 100%; object-fit: cover; }
.collection-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,95,88,0.15), rgba(11,95,88,0.85));
  display: flex; flex-direction: column; justify-content: flex-end; padding: 20px;
}
@media (max-width: 767px) {
  .collections-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .collection-card--large { grid-column: 1 / -1; min-height: 200px; }
  .collection-card:not(.collection-card--large) { height: 160px; }
}

/* Locations */
.locations-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; width: 100%; }
.location-card { aspect-ratio: 16/11; position: relative; color: #fff; border-radius: var(--radius-card); overflow: hidden; }
.location-card img { width: 100%; height: 100%; object-fit: cover; }
.location-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.75));
  display: flex; flex-direction: column; justify-content: flex-end; padding: 14px;
}
@media (max-width: 767px) {
  .locations-grid {
    display: flex; overflow-x: auto; gap: 12px;
    scroll-snap-type: x mandatory;
  }
  .location-card { flex: 0 0 74vw; max-width: 280px; scroll-snap-align: start; }
}

/* Why / sell / final CTA */
.why-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.why-card {
  padding: 24px 18px; border: 1px solid var(--border-light);
  border-radius: var(--radius-card); background: #fff;
  min-width: 0;
}
.why-icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--primary-soft); color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
@media (max-width: 1023px) {
  .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .why-card:last-child { grid-column: 1 / -1; max-width: 320px; margin-inline: auto; width: 100%; }
}
@media (max-width: 767px) {
  .why-grid { grid-template-columns: 1fr; }
  .why-card:last-child { max-width: none; }
}

.sell-panel {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 480px; border-radius: 28px; overflow: hidden;
  background: var(--primary-dark); color: #fff;
  width: 100%;
  max-width: 100%;
}
.sell-panel-copy { padding: 48px; min-width: 0; }
.sell-panel-copy h2 { color: #fff; }
.sell-form-card {
  margin: 32px; background: #fff; color: var(--text-heading);
  border-radius: 20px; padding: 28px; min-width: 0;
}
@media (max-width: 767px) {
  .sell-panel { grid-template-columns: 1fr; border-radius: 20px; }
  .sell-panel-copy { padding: 28px 20px 12px; }
  .sell-form-card { margin: 12px 16px 20px; padding: 20px; }
}

.final-cta-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  background: linear-gradient(110deg, #0B5F58 0%, #14776F 58%, #229C90 100%);
  min-height: 230px; border-radius: 28px; padding: 48px 56px; color: #fff;
}
.final-cta-inner h2, .final-cta-inner p { color: #fff; }
@media (max-width: 767px) {
  .final-cta-inner { flex-direction: column; align-items: stretch; padding: 32px 20px; }
  .final-cta-inner .btn-gold { width: 100%; }
}

/* Listings layout */
.listings-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 32px;
  padding-block: 24px;
}
.filters-sidebar {
  position: sticky; top: 92px;
  max-height: calc(100vh - 110px);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-card);
  padding: 20px;
}
.filter-group { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border-light); }
.filter-group h4 { margin: 0 0 12px; font-size: 13px; }
.bed-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.bed-pill {
  min-width: 40px; height: 36px; border-radius: 999px;
  border: 1px solid var(--border-default); background: #fff;
  font-weight: 600; cursor: pointer;
}
.bed-pill.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }
.filters-backdrop { display: none; }
.listings-mobile-bar {
  display: none; height: 52px; gap: 8px; margin-bottom: 16px;
}
.listings-mobile-bar button {
  flex: 1; height: 44px; border-radius: 12px;
  border: 1px solid var(--border-default); background: #fff; font-weight: 700;
}
@media (max-width: 767px) {
  .listings-layout { grid-template-columns: 1fr; }
  .filters-sidebar {
    display: none;
    position: fixed;
    inset: 0 auto 0 0;
    width: min(92vw, 360px);
    max-height: none;
    height: 100%;
    z-index: 9500;
    border-radius: 0;
    top: 0;
    box-shadow: var(--shadow-modal);
  }
  html[dir="rtl"] .filters-sidebar { inset: 0 0 0 auto; }
  .filters-sidebar.is-open { display: block; }
  .filters-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(16,24,40,0.45);
    z-index: 9400;
  }
  .filters-backdrop.is-open { display: block; }
  .filters-close {
    position: absolute; top: 10px; inset-inline-end: 10px;
    width: 40px; height: 40px; border: 0; background: transparent;
    font-size: 24px; cursor: pointer; z-index: 2;
  }
  .listings-mobile-bar { display: flex; }
}

/* Property gallery */
.gallery { margin-bottom: 24px; }
.gallery-main {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--primary-soft);
  border-radius: 18px;
  overflow: hidden;
}
.gallery-main img,
.gallery-main video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 10px;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.gallery-thumb {
  position: relative;
  flex: 0 0 72px;
  width: 72px;
  height: 56px;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
  background: #fff;
  cursor: pointer;
}
.gallery-thumb.is-active { border-color: var(--primary); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.35); color: #fff; font-size: 14px;
}
.property-card-video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.property-card-video-badge {
  position: absolute;
  inset-inline-start: 10px;
  bottom: 10px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px;
  z-index: 2;
}
.property-actions-row {
  display: flex; gap: 8px; margin: 20px 0; flex-wrap: wrap;
}
.property-actions-row .btn-primary,
.property-actions-row .btn-secondary { flex: 1 1 auto; min-width: 120px; }
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  z-index: 9600; display: none; align-items: center; justify-content: center; padding: 16px;
}
.modal-overlay.is-open { display: flex; }
.modal-sheet {
  background: #fff; border-radius: 20px; padding: 24px;
  max-width: 440px; width: 100%; max-height: 90vh; overflow: auto;
}
.sticky-contact-price { font-weight: 800; color: var(--primary-dark); flex: 1; }
.property-page { padding-bottom: calc(var(--bottom-nav-h) + 88px); }

.gallery-mosaic {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: repeat(2, 250px);
  gap: 10px;
  border-radius: 22px;
  overflow: hidden;
}
.gallery-mosaic > *:first-child { grid-row: span 2; }
.gallery-mosaic img, .gallery-mosaic video {
  width: 100%; height: 100%; object-fit: cover;
}
.property-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 40px;
  margin-top: 32px;
}
.agent-card {
  position: sticky; top: 92px;
  padding: 24px; border: 1px solid var(--border-default);
  border-radius: 22px; background: #fff;
  box-shadow: 0 12px 34px rgba(16,24,40,0.08);
}
.key-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.key-fact {
  padding: 16px; background: var(--background-page); border-radius: 14px;
}
.payment-plan-card {
  background: var(--primary-surface);
  border: 1px solid #CDE9E5;
  border-radius: 22px;
  padding: 28px;
}
.sticky-contact-bar {
  display: none;
  position: fixed;
  left: 0; right: 0;
  bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
  height: 68px;
  background: #fff;
  border-top: 1px solid var(--border-light);
  z-index: 1100;
  padding: 8px 12px;
  gap: 8px;
  align-items: center;
}
.gallery-mobile { display: none; }

@media (min-width: 768px) {
  .property-page { padding-bottom: 48px; }
  .sticky-contact-bar { display: none !important; }
}

@media (max-width: 767px) {
  .gallery-mosaic { display: none; }
  .property-detail-layout { grid-template-columns: 1fr; }
  .agent-card { position: static; }
  .key-facts { grid-template-columns: repeat(2, 1fr); }
  .sticky-contact-bar { display: flex; }
  .gallery-mobile { display: block; }
  .gallery-main { aspect-ratio: 4 / 3; border-radius: 14px; }
}

/* Project hero */
.project-hero {
  position: relative; height: 560px; display: flex; align-items: flex-end; color: #fff;
  background-size: cover; background-position: center;
}
.project-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(8,63,59,0.88));
}
.project-hero-content { position: relative; z-index: 1; padding-block: 48px; width: 100%; }
.project-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-block: 32px; }
.project-metric {
  background: #fff; border: 1px solid var(--border-light);
  border-radius: 16px; padding: 18px;
}
@media (max-width: 767px) {
  .project-hero { height: 420px; }
  .project-metrics { grid-template-columns: 1fr 1fr; }
}

/* Compare */
.compare-table-wrap { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; min-width: 700px; }
.compare-table th, .compare-table td {
  padding: 12px 14px; border-bottom: 1px solid var(--border-light);
  text-align: start; vertical-align: top;
}
.compare-table thead th {
  position: sticky; top: 76px; background: #fff; z-index: 2;
  box-shadow: 0 1px 0 var(--border-light);
}
.compare-diff-best { background: var(--primary-soft); }
.compare-diff-alt { background: var(--background-warm); }
.compare-diff-na { background: #F2F4F7; color: var(--text-muted); }

/* Contact / about */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; }
@media (max-width: 767px) { .contact-grid { grid-template-columns: 1fr; } }

.page-hero-simple {
  padding: 72px 0 40px;
  background: linear-gradient(180deg, var(--primary-surface), var(--background-white));
}

.article-body { max-width: 760px; margin-inline: auto; line-height: 1.8; }
.auth-layout {
  max-width: 440px; margin: 48px auto; background: #fff;
  border: 1px solid var(--border-light); border-radius: var(--radius-panel); padding: 32px;
}

.amenities-list {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 20px;
}
.amenity-item { display: flex; align-items: center; gap: 8px; font-size: 14px; }
@media (max-width: 767px) { .amenities-list { grid-template-columns: repeat(2, 1fr); } }

.document-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px; border: 1px solid var(--border-light); border-radius: 14px; margin-bottom: 10px;
  gap: 12px; flex-wrap: wrap;
}

.compare-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.compare-slot {
  height: 140px; border: 1.5px dashed #B7C2CE; border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #fff; cursor: pointer;
}
@media (max-width: 767px) {
  .compare-slots { grid-template-columns: repeat(2, 1fr); }
}
