/* ================================================================
   REAL ESTATE PAGE — real-estate.css
   Scoped to #view-realestate and .re-* classes
================================================================ */

/* ── CSS Tokens ─────────────────────────────────────────────── */
:root {
  --re-primary:       #0d9488;   /* teal-600  */
  --re-primary-dark:  #0f766e;   /* teal-700  */
  --re-primary-soft:  #ccfbf1;   /* teal-100  */
  --re-accent:        #059669;   /* emerald-600 */
  --re-sale:          #16a34a;   /* green – for sale badge */
  --re-rent:          #2563eb;   /* blue  – for rent badge */
  --re-land:          #d97706;   /* amber – land badge */
  --re-commercial:    #7c3aed;   /* violet – commercial badge */
}

/* ── Hero ───────────────────────────────────────────────────── */
.re-hero {
  background: linear-gradient(135deg, #0d9488 0%, #059669 55%, #065f46 100%);
  padding: 56px 24px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.re-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.re-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 99px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  letter-spacing: .3px;
  margin-bottom: 18px;
}
.re-hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px;
  line-height: 1.25;
}
.re-hero h1 span { color: #a7f3d0; }
.re-hero p {
  font-size: 15px;
  color: rgba(255,255,255,.85);
  margin: 0 0 32px;
}
.re-search-box {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  max-width: 640px;
  margin: 0 auto;
  overflow: hidden;
}
.re-search-box input {
  flex: 1;
  border: none;
  outline: none;
  padding: 14px 18px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  color: #1e293b;
  background: transparent;
}
.re-search-box select {
  border: none;
  border-left: 1px solid #e2e8f0;
  outline: none;
  padding: 14px 14px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: #475569;
  background: transparent;
  cursor: pointer;
  min-width: 130px;
}
.re-search-btn {
  background: var(--re-primary);
  color: #fff;
  border: none;
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background .2s;
  white-space: nowrap;
}
.re-search-btn:hover { background: var(--re-primary-dark); }
.re-hero-stats {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 28px;
  flex-wrap: wrap;
}
.re-stat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 99px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

/* ── Category Tabs ──────────────────────────────────────────── */
.re-tabs-wrap {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 68px;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.re-tabs {
  display: flex;
  gap: 4px;
  padding: 0 20px;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 1100px;
  margin: 0 auto;
}
.re-tabs::-webkit-scrollbar { display: none; }
.re-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 18px;
  border: none;
  background: transparent;
  font-size: 13.5px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color .2s, border-color .2s;
  font-family: 'Inter', sans-serif;
  position: relative;
  bottom: -1px;
}
.re-tab:hover { color: var(--re-primary); }
.re-tab.active {
  color: var(--re-primary);
  border-bottom-color: var(--re-primary);
}
.re-tab svg, .re-tab i { width: 15px; height: 15px; }

/* ── Main Layout ────────────────────────────────────────────── */
.re-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  max-width: 1100px;
  margin: 28px auto;
  padding: 0 20px 48px;
  align-items: start;
}

/* ── Filter Sidebar ─────────────────────────────────────────── */
.re-filter-panel {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  padding: 20px;
  position: sticky;
  top: 118px;
}
.re-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.re-filter-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
}
.re-filter-header h3 i { width: 16px; height: 16px; color: var(--re-primary); }
.re-clear-filters {
  font-size: 12px;
  font-weight: 600;
  color: var(--re-primary);
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  padding: 0;
}
.re-filter-group { margin-bottom: 20px; }
.re-filter-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 10px;
  display: block;
}
.re-filter-options { display: flex; flex-direction: column; gap: 7px; }
.re-filter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: #475569;
  cursor: pointer;
  font-weight: 500;
}
.re-filter-check input { accent-color: var(--re-primary); width: 15px; height: 15px; cursor: pointer; }
.re-filter-check:hover { color: var(--re-primary); }
.re-filter-divider { border: none; border-top: 1px solid #f1f5f9; margin: 16px 0; }

/* ── Property Grid ──────────────────────────────────────────── */
.re-grid-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}
.re-grid-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}
.re-count-badge {
  background: var(--re-primary-soft);
  color: var(--re-primary-dark);
  border-radius: 99px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 700;
}
.re-sort-select {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  color: #475569;
  outline: none;
  cursor: pointer;
  background: #fff;
}
.re-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* ── Property Card ──────────────────────────────────────────── */
.re-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  cursor: pointer;
  transition: transform .22s, box-shadow .22s;
  display: flex;
  flex-direction: column;
}
.re-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,0,0,.1);
}
.re-card-img {
  height: 175px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.re-card-img-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}
.re-type-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  border-radius: 99px;
  padding: 4px 11px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  color: #fff;
}
.re-type-badge.sale       { background: var(--re-sale); }
.re-type-badge.rent       { background: var(--re-rent); }
.re-type-badge.land       { background: var(--re-land); }
.re-type-badge.commercial { background: var(--re-commercial); }
.re-save-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(4px);
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s, transform .2s;
  color: #64748b;
}
.re-save-btn:hover { background: #fff; transform: scale(1.1); color: #ef4444; }
.re-save-btn.saved { color: #ef4444; }
.re-save-btn i { width: 16px; height: 16px; }
.re-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.re-price {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  font-family: 'Poppins', sans-serif;
}
.re-price span {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  font-family: 'Inter', sans-serif;
}
.re-title {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.4;
}
.re-location {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: #64748b;
}
.re-location i { width: 13px; height: 13px; flex-shrink: 0; }
.re-specs {
  display: flex;
  gap: 12px;
  padding-top: 6px;
  border-top: 1px solid #f1f5f9;
  margin-top: 4px;
  flex-wrap: wrap;
}
.re-spec {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}
.re-spec i { width: 13px; height: 13px; }
.re-card-footer {
  padding: 0 16px 14px;
}
.re-view-btn {
  width: 100%;
  padding: 9px 0;
  background: var(--re-primary-soft);
  color: var(--re-primary-dark);
  border: 1.5px solid var(--re-primary);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background .18s, color .18s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.re-view-btn:hover {
  background: var(--re-primary);
  color: #fff;
}

/* ── Empty State ────────────────────────────────────────────── */
.re-empty {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
  grid-column: 1 / -1;
}
.re-empty i { width: 48px; height: 48px; margin-bottom: 14px; display: block; margin-inline: auto; }
.re-empty h3 { font-size: 17px; color: #64748b; margin: 0 0 6px; }
.re-empty p  { font-size: 14px; }

/* ── Post Property CTA ──────────────────────────────────────── */
.re-cta-banner {
  background: linear-gradient(135deg, #0d9488, #059669);
  border-radius: 20px;
  padding: 36px 40px;
  text-align: center;
  color: #fff;
  margin-top: 20px;
}
.re-cta-banner h2 { font-size: 24px; font-weight: 800; margin: 0 0 8px; font-family: 'Poppins', sans-serif; }
.re-cta-banner p  { font-size: 14px; opacity: .9; margin: 0 0 24px; }
.re-cta-btn {
  background: #fff;
  color: var(--re-primary-dark);
  border: none;
  border-radius: 12px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .18s, box-shadow .18s;
}
.re-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.2); }

/* ── Detail Modal ───────────────────────────────────────────── */
.re-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.re-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.re-modal {
  background: #fff;
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.32,2,.55,.89);
  padding: 24px;
  box-sizing: border-box;
}
.re-modal-overlay.open .re-modal {
  transform: translateY(0);
}
.re-modal-handle {
  width: 40px;
  height: 4px;
  background: #e2e8f0;
  border-radius: 99px;
  margin: 0 auto 20px;
}
.re-modal-img {
  width: 100%;
  height: 200px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  margin-bottom: 20px;
}
.re-modal-title {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px;
  font-family: 'Poppins', sans-serif;
}
.re-modal-price {
  font-size: 26px;
  font-weight: 800;
  color: var(--re-primary);
  margin: 0 0 4px;
  font-family: 'Poppins', sans-serif;
}
.re-modal-price span { font-size: 14px; font-weight: 500; color: #64748b; font-family: 'Inter', sans-serif; }
.re-modal-loc {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  color: #64748b;
  margin-bottom: 18px;
}
.re-modal-loc i { width: 15px; height: 15px; }
.re-modal-specs-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.re-modal-spec-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 99px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}
.re-modal-spec-pill i { width: 14px; height: 14px; color: var(--re-primary); }
.re-modal-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 8px;
}
.re-modal-desc {
  font-size: 14px;
  color: #475569;
  line-height: 1.6;
  margin: 0 0 24px;
}
.re-modal-contact {
  background: #f8fafc;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 20px;
}
.re-modal-agent {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.re-modal-agent-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--re-primary);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: 'Poppins', sans-serif;
}
.re-modal-agent-name { font-size: 15px; font-weight: 700; color: #1e293b; }
.re-modal-agent-role { font-size: 12px; color: #64748b; }
.re-modal-cta-row { display: flex; gap: 10px; }
.re-btn-call, .re-btn-wa {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  border: none;
  transition: transform .18s, box-shadow .18s;
  text-decoration: none;
}
.re-btn-call { background: #dbeafe; color: #1d4ed8; }
.re-btn-wa   { background: #dcfce7; color: #15803d; }
.re-btn-call:hover, .re-btn-wa:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.re-btn-call i, .re-btn-wa i { width: 17px; height: 17px; }
.re-modal-close-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 6px;
}
.re-modal-close-btn {
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
  transition: background .18s;
}
.re-modal-close-btn:hover { background: #e2e8f0; }
.re-modal-close-btn i { width: 18px; height: 18px; }

/* ── Post Property Modal ────────────────────────────────────── */
.re-post-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.re-post-overlay.open { opacity: 1; pointer-events: all; }
.re-post-modal {
  background: #fff;
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 640px;
  max-height: 92vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.32,2,.55,.89);
  padding: 24px;
  box-sizing: border-box;
}
.re-post-overlay.open .re-post-modal { transform: translateY(0); }
.re-post-modal h2 {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  font-family: 'Poppins', sans-serif;
  margin: 0 0 4px;
}
.re-post-modal p.sub { font-size: 13px; color: #64748b; margin: 0 0 22px; }
.re-form-group { margin-bottom: 16px; }
.re-form-group label { display: block; font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 6px; }
.re-form-group label span.req { color: #ef4444; margin-left: 2px; }
.re-form-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: #1e293b;
  outline: none;
  transition: border-color .18s;
  background: #fff;
}
.re-form-input:focus { border-color: var(--re-primary); }
.re-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.re-form-input.textarea { resize: vertical; min-height: 90px; }
.re-submit-btn {
  width: 100%;
  background: var(--re-primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .18s;
}
.re-submit-btn:hover { background: var(--re-primary-dark); }

/* ── Mobile Filter Toggle ───────────────────────────────────── */
.re-filter-toggle-btn {
  display: none;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1.5px solid var(--re-primary);
  color: var(--re-primary);
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
}
.re-mobile-filter-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,.4);
}
.re-mobile-filter-overlay.open { display: flex; }
.re-mobile-filter-panel {
  background: #fff;
  width: 280px;
  max-width: 85vw;
  height: 100%;
  overflow-y: auto;
  padding: 24px 20px;
  box-sizing: border-box;
  border-right: 1px solid #e2e8f0;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .re-layout { grid-template-columns: 1fr; }
  .re-filter-panel { display: none; }
  .re-filter-toggle-btn { display: flex; }
  .re-cta-banner { padding: 28px 20px; }
  .re-cta-banner h2 { font-size: 19px; }
}
@media (max-width: 600px) {
  .re-hero { padding: 40px 16px 28px; }
  .re-search-box { flex-wrap: wrap; border-radius: 12px; }
  .re-search-box select { border-left: none; border-top: 1px solid #e2e8f0; min-width: unset; flex: 1; }
  .re-search-btn { width: 100%; justify-content: center; }
  .re-layout { padding: 0 12px 40px; margin-top: 20px; }
  .re-grid { grid-template-columns: 1fr; }
  .re-modal { max-height: 95vh; padding: 18px; }
  .re-form-row { grid-template-columns: 1fr; }
}
