/* ==========================================================================
   IslandKeys — Houzez-inspired real-estate theme (shared by website + app)
   Clean, professional UI. Not a copy of Houzez's proprietary assets.
   ========================================================================== */

:root {
  --ink: #1a202c;
  --ink-soft: #4a5568;
  --ink-faint: #a0aec0;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --line: #e2e8f0;

  /* Houzez-like brand: deep teal/green + warm accent */
  --brand: #0a7d64;
  --brand-dark: #065f4c;
  --brand-soft: #e3f3ee;
  --accent: #ef7c2b;
  --accent-soft: #fdeede;

  --rent: #0a7d64;
  --rent-soft: #e3f3ee;
  --sale: #c2410c;
  --sale-soft: #fdeede;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --shadow: 0 4px 6px -1px rgba(16,24,40,.08), 0 2px 4px -2px rgba(16,24,40,.06);
  --shadow-lg: 0 20px 40px -12px rgba(16,24,40,.22);
  --maxw: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: 14px; cursor: pointer;
  border: 1.5px solid transparent; border-radius: var(--radius-sm);
  padding: 11px 20px; transition: all .15s ease; white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { filter: brightness(.95); }
.btn-ghost { background: #fff; color: var(--brand); border-color: var(--brand); }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-light { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-light:hover { border-color: var(--ink-faint); }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 26px; font-size: 15px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 70px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 21px; letter-spacing: -.02em; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), #10b981);
  color: #fff; display: grid; place-items: center; font-size: 18px;
}
.brand b { color: var(--brand); }
.main-nav { display: flex; gap: 6px; margin-left: 8px; }
.nav-link {
  padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: 14.5px;
  color: var(--ink-soft); transition: all .15s;
}
.nav-link:hover { color: var(--ink); background: var(--bg); }
.nav-link.active { color: var(--brand); background: var(--brand-soft); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.user-chip { position: relative; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.user-chip .avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--brand);
  color: #fff; display: grid; place-items: center; font-weight: 700;
}
.user-menu {
  position: absolute; top: 48px; right: 0; min-width: 190px; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg);
  padding: 8px; display: none; flex-direction: column; gap: 2px;
}
.user-chip.open .user-menu { display: flex; }
.user-menu a, .user-menu button {
  text-align: left; background: none; border: 0; font: inherit; font-size: 14px;
  padding: 10px 12px; border-radius: 8px; cursor: pointer; color: var(--ink);
}
.user-menu a:hover, .user-menu button:hover { background: var(--bg); }
.user-menu .umname { font-weight: 700; padding: 10px 12px 4px; }
.user-menu .umail { font-size: 12.5px; color: var(--ink-faint); padding: 0 12px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff;
  background: linear-gradient(rgba(6,40,33,.72), rgba(6,40,33,.72)),
    url("https://images.unsplash.com/photo-1512917774080-9991f1c4c750?auto=format&fit=crop&w=1920&q=70") center/cover;
}
.hero-inner { padding: 92px 0 110px; text-align: center; }
.hero h1 { font-size: 46px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.hero p { font-size: 18px; margin-top: 14px; color: rgba(255,255,255,.9); }

/* Search widget */
.search-widget {
  background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg);
  max-width: 920px; margin: 30px auto 0; padding: 10px; text-align: left;
}
.search-tabs { display: flex; gap: 6px; padding: 4px; }
.search-tab {
  background: none; border: 0; font: inherit; font-weight: 700; font-size: 14px;
  color: var(--ink-soft); padding: 9px 18px; border-radius: 9px; cursor: pointer;
}
.search-tab.active { background: var(--brand); color: #fff; }
.search-fields { display: grid; grid-template-columns: 1.6fr 1fr 1fr auto; gap: 8px; padding: 6px; }
.search-fields .field { display: flex; flex-direction: column; gap: 4px; }
.search-fields label { font-size: 11.5px; font-weight: 700; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .04em; padding-left: 4px; }
.search-fields input, .search-fields select {
  border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; font: inherit; font-size: 14px; color: var(--ink);
}
.search-fields input:focus, .search-fields select:focus { outline: 0; border-color: var(--brand); }
.search-fields .btn { align-self: end; height: 44px; }

/* ---------- Section ---------- */
.section { padding: 64px 0; }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 { font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.section-head p { color: var(--ink-soft); margin-top: 8px; font-size: 16px; }
.section-head.left { text-align: left; }

/* ---------- Property cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 26px; }
.prop-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s;
  display: flex; flex-direction: column;
}
.prop-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.prop-media { position: relative; aspect-ratio: 16/10; background: var(--brand-soft); overflow: hidden; }
.prop-media img { width: 100%; height: 100%; object-fit: cover; }
.prop-media .ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 46px; color: var(--brand); }
.badge {
  position: absolute; top: 12px; left: 12px; font-size: 12px; font-weight: 700;
  padding: 5px 11px; border-radius: 999px; color: #fff; backdrop-filter: blur(4px);
}
.badge.rent { background: var(--rent); }
.badge.sale { background: var(--sale); }
.badge-type {
  position: absolute; top: 12px; right: 12px; font-size: 11.5px; font-weight: 700;
  padding: 5px 10px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; text-transform: capitalize;
}
.fav-btn {
  position: absolute; bottom: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.92); border: 0; cursor: pointer; font-size: 18px; display: grid; place-items: center;
}
.fav-btn.on { color: #e23744; }
.prop-body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.prop-price { font-size: 21px; font-weight: 800; color: var(--brand-dark); }
.prop-price small { font-size: 13px; font-weight: 600; color: var(--ink-faint); }
.prop-title { font-size: 16.5px; font-weight: 700; margin: 6px 0 2px; line-height: 1.35; }
.prop-loc { color: var(--ink-soft); font-size: 13.5px; display: flex; align-items: center; gap: 5px; }
.prop-specs {
  display: flex; gap: 16px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
  color: var(--ink-soft); font-size: 13.5px; font-weight: 600; flex-wrap: wrap;
}
.prop-specs span { display: inline-flex; align-items: center; gap: 5px; }
.prop-foot { margin-top: auto; }

/* ---------- Footer ---------- */
.site-footer { background: #0c1f1a; color: #cbd5d1; padding: 56px 0 28px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.site-footer a { display: block; color: #9fb3ad; font-size: 14px; padding: 5px 0; }
.site-footer a:hover { color: #fff; }
.footer-brand { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 10px; }
.footer-bottom { border-top: 1px solid #1d3730; margin-top: 36px; padding-top: 20px; font-size: 13px; color: #7d938d; text-align: center; }

/* ---------- Forms / panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 28px; }
.panel.narrow { max-width: 460px; margin: 40px auto; }
.panel.wide { max-width: 860px; margin: 32px auto; }
.panel h2 { font-size: 23px; font-weight: 800; }
.panel .sub { color: var(--ink-soft); margin: 4px 0 20px; font-size: 14.5px; }
label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; }
.input, .select, textarea.input {
  width: 100%; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 13px; font: inherit; font-size: 14.5px; color: var(--ink); background: #fff;
}
.input:focus, .select:focus, textarea.input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea.input { min-height: 110px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row.full { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); }

/* pills */
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink-soft); }
.pill.on { background: var(--brand); color: #fff; border-color: var(--brand); }

/* thumbs */
.thumb-strip { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.thumb { position: relative; width: 92px; height: 72px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 13px; }

/* ---------- Misc ---------- */
.muted { color: var(--ink-faint); font-size: 13px; }
.empty { text-align: center; color: var(--ink-soft); padding: 60px 20px; }
.empty .big { font-size: 48px; margin-bottom: 10px; }
.skeleton { height: 340px; border-radius: var(--radius); background: linear-gradient(90deg, #eef1f6, #f6f8fb, #eef1f6); background-size: 200% 100%; animation: sk 1.3s infinite; }
@keyframes sk { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 100; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: #c0392b; } .toast.success { background: var(--brand); }

.breadcrumb { color: var(--ink-faint); font-size: 13px; margin: 20px 0; }
.breadcrumb a:hover { color: var(--brand); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .search-fields { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 34px; }
  .main-nav { display: none; }
}
@media (max-width: 520px) {
  .search-fields { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
