:root {
  --ink: #12384a;
  --blue: #2d5f84;
  --deep: #17485c;
  --aqua: #6fb8bd;
  --sand: #e5d7c1;
  --paper: #f7f8f7;
  --white: #ffffff;
  --muted: #6d7c82;
  --line: rgba(18, 56, 74, 0.14);
  --shadow: 0 18px 55px rgba(18, 56, 74, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans TC", "Segoe UI", Arial, sans-serif;
}

button,
select,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 82px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgba(247, 248, 247, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand img {
  display: block;
  width: 184px;
  height: auto;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 26px;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

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

.language-toggle {
  display: inline-grid;
  gap: 4px;
  min-width: 150px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.language-toggle select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  padding: 0 12px;
  font-weight: 900;
}

.lang-btn {
  display: none;
}

.icon-btn,
.outline-btn,
.primary-btn,
.chip,
.details-btn,
.info-list button {
  min-height: 42px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  padding: 0 16px;
  font-weight: 800;
}

.header-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.primary-btn {
  border: 0;
  color: var(--white);
  background: var(--blue);
  box-shadow: 0 10px 22px rgba(45, 95, 132, 0.24);
}

.outline-btn:hover,
.icon-btn:hover,
.chip:hover,
.details-btn:hover,
.info-list button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.hero {
  position: relative;
  min-height: calc(100vh - 82px);
  display: grid;
  align-items: end;
  padding: 120px clamp(18px, 5vw, 72px) 48px;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 35, 48, 0.78), rgba(10, 35, 48, 0.24) 54%, rgba(10, 35, 48, 0.08)),
    url("https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.hero-content {
  position: relative;
  max-width: 1180px;
  color: var(--white);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--aqua);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(56px, 9vw, 132px);
  line-height: 0.9;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 660px;
  margin: 22px 0 30px;
  font-size: 20px;
  line-height: 1.7;
}

.search-panel {
  display: grid;
  grid-template-columns: 170px repeat(4, minmax(128px, 1fr)) auto;
  gap: 12px;
  max-width: 1180px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.search-panel label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.search-panel select {
  width: 100%;
  min-height: 42px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  padding: 0 10px;
  font-weight: 800;
}

.segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  align-self: end;
}

.segment-btn {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--white);
  font-weight: 900;
}

.segment-btn.active {
  color: var(--white);
  background: var(--deep);
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.quick-stats div {
  padding: 26px;
  border-right: 1px solid var(--line);
}

.quick-stats strong {
  display: block;
  color: var(--blue);
  font-size: 34px;
}

.quick-stats span {
  color: var(--muted);
  font-weight: 700;
}

.deal-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 42px clamp(18px, 5vw, 72px);
  background: #eef3f2;
}

.deal-card {
  min-height: 260px;
  display: grid;
  align-content: end;
  gap: 14px;
  padding: 28px;
  border-radius: 8px;
  color: var(--white);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.deal-card h2,
.deal-card p {
  margin: 0;
}

.deal-card p:not(.eyebrow) {
  max-width: 620px;
  line-height: 1.8;
}

.sale-card {
  background-image:
    linear-gradient(180deg, rgba(18, 56, 74, 0.18), rgba(18, 56, 74, 0.88)),
    url("https://images.unsplash.com/photo-1600607687939-ce8a6c25118c?auto=format&fit=crop&w=1200&q=80");
}

.rent-card {
  background-image:
    linear-gradient(180deg, rgba(18, 56, 74, 0.14), rgba(18, 56, 74, 0.86)),
    url("https://images.unsplash.com/photo-1582268611958-ebfd161ef9cf?auto=format&fit=crop&w=1200&q=80");
}

.section,
.feature-band,
.contact-section {
  padding: 82px clamp(18px, 5vw, 72px);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.05;
}

.toolbar {
  display: flex;
  gap: 8px;
}

.chip.active {
  color: var(--white);
  background: var(--blue);
}

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

.property-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.property-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(18, 56, 74, 0.08);
}

.card-image-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #dce5e5;
}

.card-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.favorite-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: var(--deep);
  background: rgba(255, 255, 255, 0.92);
  font-size: 22px;
}

.favorite-toggle.saved {
  color: #b34d4d;
}

.card-body {
  padding: 18px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.tag,
.status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  background: rgba(111, 184, 189, 0.16);
  color: var(--deep);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.property-card h3,
.development h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.location {
  margin: 0 0 14px;
  color: var(--muted);
  font-weight: 700;
}

.specs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.price {
  color: var(--blue);
  font-size: 20px;
}

.feature-band {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1fr);
  gap: 36px;
  align-items: center;
  background: var(--deep);
  color: var(--white);
}

.feature-band p,
.split p,
.contact-section p,
.development p {
  color: inherit;
  line-height: 1.8;
}

.feature-band img,
.development img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 42px;
  align-items: center;
  background: #eef3f2;
}

.info-list {
  display: grid;
  gap: 14px;
}

.development {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 30px;
  align-items: center;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.contact-section {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: 38px;
  align-items: start;
  background: var(--white);
}

.contact-form {
  display: grid;
  gap: 12px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 13px 14px;
  color: var(--ink);
  background: var(--paper);
}

.contact-form textarea {
  min-height: 132px;
  resize: vertical;
}

.channel-connect {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: 28px;
  align-items: center;
  padding: 48px clamp(18px, 5vw, 72px);
  background: var(--deep);
  color: var(--white);
}

.channel-connect p {
  line-height: 1.8;
}

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

.channel-btn {
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  color: var(--white);
  text-decoration: none;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.08);
}

.channel-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.modal {
  width: min(680px, calc(100vw - 32px));
  border: 0;
  border-radius: 8px;
  padding: 28px;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.modal::backdrop {
  background: rgba(8, 28, 38, 0.58);
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #eef3f2;
  color: var(--ink);
  font-size: 24px;
}

.modal h3 {
  margin: 0 0 12px;
  font-size: 30px;
}

.modal img {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 18px;
}

.hidden {
  display: none !important;
}

.property-detail-page {
  padding: 34px clamp(18px, 5vw, 72px) 82px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 22px;
  color: var(--muted);
  font-weight: 800;
}

.breadcrumb button {
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 0;
  font-weight: 900;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 34px;
  align-items: start;
}

.gallery {
  display: grid;
  gap: 12px;
}

.main-photo-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  background: #dce5e5;
  box-shadow: var(--shadow);
}

.main-photo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 240ms ease;
}

.main-photo-wrap:hover .main-photo {
  transform: scale(1.035);
}

.thumb-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.thumb {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 2px solid transparent;
  border-radius: 6px;
  background: var(--white);
  padding: 0;
  box-shadow: 0 8px 18px rgba(18, 56, 74, 0.08);
}

.thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 180ms ease;
}

.thumb:hover,
.thumb.active {
  border-color: var(--aqua);
}

.thumb:hover img {
  transform: scale(1.18);
}

.detail-summary {
  position: sticky;
  top: 108px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 12px 30px rgba(18, 56, 74, 0.08);
}

.detail-summary h1 {
  margin: 10px 0 10px;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.05;
}

.detail-location {
  margin: 0 0 18px;
  color: var(--muted);
  font-weight: 800;
}

.detail-price {
  display: block;
  margin: 18px 0;
  color: var(--blue);
  font-size: 34px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 20px 0;
}

.overview-item {
  min-height: 72px;
  padding: 12px;
  border-radius: 6px;
  background: #eef3f2;
}

.overview-item strong {
  display: block;
  font-size: 20px;
}

.overview-item span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 34px;
  margin-top: 44px;
}

.detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.tab-btn {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  padding: 0 16px;
  font-weight: 900;
}

.tab-btn.active {
  color: var(--white);
  background: var(--blue);
}

.tab-panel {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.tab-panel h2 {
  margin-bottom: 16px;
  font-size: 34px;
}

.tab-panel p {
  line-height: 1.85;
}

.tab-panel .property-grid {
  align-items: stretch;
}

.tab-panel .property-grid .card-image {
  aspect-ratio: 4 / 3;
  height: auto;
  border-radius: 8px;
}

.feature-list,
.address-list,
.quick-links {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.feature-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-list li,
.address-list li,
.quick-links a {
  padding: 12px 14px;
  border-radius: 6px;
  background: #eef3f2;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.detail-sidebar {
  display: grid;
  gap: 18px;
  align-self: start;
}

.side-box {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.side-box h3 {
  margin: 0 0 14px;
}

.mini-form {
  display: grid;
  gap: 10px;
}

.mini-form input,
.mini-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: var(--paper);
}

.mini-form textarea {
  min-height: 112px;
}

@media (max-width: 1040px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .search-panel,
  .property-grid,
  .property-grid.compact,
  .feature-band,
  .split,
  .development,
  .contact-section,
  .detail-hero,
  .detail-content {
    grid-template-columns: 1fr 1fr;
  }

  .search-panel .primary-btn,
  .segment {
    grid-column: span 2;
  }
}

@media (max-width: 720px) {
  .site-header,
  .search-panel,
  .quick-stats,
  .deal-split,
  .property-grid,
  .property-grid.compact,
  .feature-band,
  .split,
  .development,
  .contact-section,
  .channel-connect,
  .channel-actions {
    grid-template-columns: 1fr;
  }

  .brand img {
    width: 150px;
  }

  .header-actions {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .hero {
    min-height: 860px;
    padding-top: 56px;
  }

  .hero h1 {
    font-size: 58px;
  }

  .hero-copy {
    font-size: 17px;
  }

  .search-panel .primary-btn,
  .segment {
    grid-column: auto;
  }

  .quick-stats div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .section-head {
    display: grid;
  }

  .detail-hero,
  .detail-content,
  .feature-list {
    grid-template-columns: 1fr;
  }

  .detail-summary {
    position: static;
  }

  .thumb-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 520px) {
  body {
    font-size: 15px;
  }

  .site-header {
    gap: 12px;
    padding: 10px 14px;
  }

  .brand img {
    width: 128px;
  }

  .nav {
    gap: 18px;
    padding: 6px 0 8px;
    scrollbar-width: none;
  }

  .nav a {
    min-width: max-content;
    font-size: 15px;
  }

  .header-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .language-toggle {
    grid-column: 1 / -1;
  }

  .icon-btn,
  .outline-btn,
  .primary-btn,
  .chip,
  .details-btn,
  .info-list button {
    width: 100%;
    min-height: 46px;
    padding: 0 12px;
  }

  .hero {
    min-height: auto;
    padding: 54px 14px 28px;
  }

  .hero h1 {
    font-size: 46px;
  }

  .hero-copy {
    margin: 16px 0 18px;
    font-size: 16px;
  }

  .search-panel {
    gap: 10px;
    padding: 12px;
  }

  .section,
  .feature-band,
  .contact-section,
  .property-detail-page {
    padding: 52px 14px;
  }

  .quick-stats strong {
    font-size: 28px;
  }

  .property-card h3,
  .development h3 {
    font-size: 21px;
  }

  .card-footer {
    display: grid;
  }

  .detail-summary,
  .tab-panel,
  .side-box {
    padding: 18px;
  }

  .detail-summary h1 {
    font-size: 34px;
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }

  .detail-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .modal {
    padding: 22px;
  }
}
