:root {
  --ink: #17212b;
  --muted: #637083;
  --line: #dfe5ea;
  --paper: #ffffff;
  --soft: #f5f7f8;
  --green: #14795f;
  --blue: #285a9f;
  --gold: #b6811c;
  --coral: #c94c3b;
  --shadow: 0 20px 55px rgba(23, 33, 43, .12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f8faf9;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  width: 100%;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 44px);
  border-bottom: 1px solid rgba(223, 229, 234, .9);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(23, 33, 43, .07);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: linear-gradient(135deg, var(--green), var(--blue));
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 750;
  letter-spacing: 0;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  color: #fff;
  background: var(--green);
  box-shadow: 0 10px 24px rgba(20, 121, 95, .18);
}

.btn.zalo {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 10px 24px rgba(40, 90, 159, .18);
}

.btn.light {
  border-color: var(--line);
  color: var(--ink);
  background: #fff;
}

.page-hero {
  position: relative;
  display: flex;
  min-height: clamp(360px, 47vw, 560px);
  align-items: flex-end;
  padding: 56px clamp(16px, 5vw, 72px);
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(110, 0, 0, .34) 0%, rgba(110, 0, 0, .16) 42%, rgba(110, 0, 0, 0) 72%),
    var(--hero-image) center / cover no-repeat,
    #24323b;
}

.page-hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: rgba(255, 255, 255, .32);
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(820px, 100%);
  flex-direction: column;
  gap: 18px;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.page-hero .eyebrow {
  color: #c7f4e7;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 680px;
  color: rgba(255, 255, 255, .84);
  font-size: 18px;
  line-height: 1.6;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.metric {
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 8px;
  background: rgba(100, 0, 0, .22);
  backdrop-filter: blur(12px);
}

.metric strong {
  display: block;
  font-size: 24px;
}

.metric span {
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
}

.shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 22px;
  padding: 26px clamp(16px, 4vw, 44px) 54px;
}

.filters {
  position: sticky;
  top: 78px;
  align-self: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 12px 34px rgba(23, 33, 43, .07);
}

.filters-head,
.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.filters-head strong,
.results-head strong {
  font-size: 18px;
}

.field {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.field label {
  color: #334154;
  font-size: 13px;
  font-weight: 750;
}

.field input,
.field select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}

.range-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #38465a;
  background: #fff;
  cursor: pointer;
}

.chip.active {
  border-color: rgba(20, 121, 95, .5);
  color: var(--green);
  background: #ecf7f3;
}

.results-head {
  min-height: 66px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.results-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.listing-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 12px 30px rgba(23, 33, 43, .07);
}

.listing-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #dfe5ea;
}

.listing-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.listing-card:hover .listing-image img {
  transform: scale(1.04);
}

.status {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 9px;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  font-size: 12px;
  font-weight: 850;
}

.status.hot {
  background: var(--coral);
}

.listing-body {
  display: grid;
  gap: 11px;
  padding: 14px;
}

.listing-title {
  min-height: 48px;
  font-size: 17px;
  line-height: 1.35;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.price {
  color: var(--green);
  font-size: 22px;
  font-weight: 900;
}

.area {
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--blue);
  background: #edf3fb;
  font-size: 12px;
  font-weight: 800;
}

.meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.meta span {
  min-height: 38px;
  padding: 8px;
  border-radius: 8px;
  color: #425168;
  background: var(--soft);
  font-size: 13px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tags span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #5d4b18;
  background: #fff3cf;
  font-size: 12px;
  font-weight: 700;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.empty {
  display: none;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  background: #fff;
}

.empty.show {
  display: block;
}

.modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(14, 22, 30, .62);
}

.modal-wrap.open {
  display: grid;
}

.modal {
  width: min(980px, 100%);
  max-height: min(760px, 92vh);
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
}

.modal-media {
  min-height: 460px;
  background: #dfe5ea;
}

.modal-media img {
  width: 100%;
  height: 100%;
  min-height: 460px;
  object-fit: cover;
}

.modal-body {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.close {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.detail-list div {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detail-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.detail-list strong {
  display: block;
  margin-top: 4px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: none;
  max-width: min(420px, calc(100vw - 36px));
  padding: 13px 15px;
  border-radius: 8px;
  color: #fff;
  background: #17212b;
  box-shadow: var(--shadow);
}

.toast.show {
  display: block;
}

.landing {
  min-height: 100vh;
  background: linear-gradient(135deg, rgba(20, 121, 95, .12), rgba(182, 129, 28, .12)), #f8faf9;
}

.landing-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.landing-hero {
  width: min(860px, 100%);
  padding: clamp(26px, 6vw, 58px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.landing-hero h1 {
  margin-top: 12px;
}

.landing-hero p {
  max-width: 660px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

@media (max-width: 1120px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 880px) {
  .topbar {
    position: sticky;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-actions {
    display: flex;
    width: 100%;
  }

  .nav-actions .btn {
    flex: 1;
  }

  .shell,
  .modal-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .modal-media,
  .modal-media img {
    min-height: 300px;
  }

  .page-hero {
    min-height: 430px;
    padding-top: 44px;
    padding-bottom: 36px;
  }

  .filters {
    position: static;
  }
}

@media (max-width: 620px) {
  .page-hero,
  .shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero-copy {
    min-height: 0;
  }

  .hero-metrics,
  .grid,
  .detail-list,
  .card-actions {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 34px;
  }
}
