:root {
  --color-primary: #0b3d5c;
  --color-primary-dark: #072a40;
  --color-accent: #c8922a;
  --color-accent-soft: #f4e8d2;
  --color-bg: #f7f9fb;
  --color-surface: #ffffff;
  --color-text: #1a2b3c;
  --color-muted: #5c6b7a;
  --color-border: #dde5ec;
  --color-success: #0f7b4a;
  --color-error: #b42318;
  --shadow-sm: 0 4px 16px rgba(11, 61, 92, 0.08);
  --shadow-md: 0 12px 40px rgba(11, 61, 92, 0.12);
  --radius: 12px;
  --radius-lg: 20px;
  --container: 1120px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  color: var(--color-accent);
}

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

.site-main {
  min-height: 60vh;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-text);
  font-weight: 700;
}

.site-logo__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-primary), #145a82);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__list a {
  color: var(--color-text);
  font-weight: 500;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn--primary {
  background: var(--color-accent);
  color: #fff;
}

.btn--primary:hover {
  background: #b07d1f;
  color: #fff;
}

.btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn--sm {
  padding: 8px 16px;
  font-size: 14px;
}

.btn--block {
  width: 100%;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary) 55%, #145a82);
  color: #fff;
  padding: 72px 0;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  margin: 12px 0 16px;
}

.hero p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
}

.hero__stats strong {
  display: block;
  font-size: 1.25rem;
}

.hero__stats span {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}

.hero__panel {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-soft);
}

/* Sections */
.section {
  padding: 72px 0;
}

.section--muted {
  background: #eef3f7;
}

.section__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}

.section__header h2 {
  margin: 0;
  font-size: 2rem;
}

.section__header p {
  margin: 8px 0 0;
  color: var(--color-muted);
}

.page-hero {
  background: var(--color-surface);
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--color-border);
}

.page-hero--compact {
  padding-top: 32px;
}

.page-hero h1 {
  margin: 12px 0 8px;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--color-muted);
}

.breadcrumb span {
  margin: 0 8px;
}

/* Cards */
.cards-grid {
  display: grid;
  gap: 24px;
}

.cards-grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

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

.info-card,
.property-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.info-card {
  padding: 24px;
}

.info-card h3,
.property-card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.info-card p,
.property-card p {
  color: var(--color-muted);
  margin: 0;
}

.info-card time {
  display: block;
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: 8px;
}

.property-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #dfe7ee;
}

.property-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.property-card__placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--color-muted);
}

.property-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--color-accent);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
}

.property-card__body {
  padding: 20px;
}

.property-card__meta {
  font-size: 0.9rem;
}

.property-card__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 12px 0;
  font-weight: 600;
}

.property-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status {
  font-size: 0.85rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e8f5ee;
  color: var(--color-success);
}

.status--sold {
  background: #fdecec;
  color: var(--color-error);
}

.status--reserved {
  background: #fff4e5;
  color: #9a6700;
}

.link-arrow::after {
  content: " →";
}

.check-list {
  list-style: none;
  padding: 0;
}

.check-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.process-steps li {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
}

.process-steps strong {
  display: block;
  color: var(--color-accent);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.process-steps span {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

.process-steps--detailed {
  grid-template-columns: repeat(3, 1fr);
}

/* Content layouts */
.content-layout,
.property-detail,
.contact-layout {
  display: grid;
  gap: 32px;
}

.content-layout {
  grid-template-columns: 1fr 320px;
}

.property-detail {
  grid-template-columns: 1fr 320px;
}

.property-detail__gallery {
  grid-column: 1 / -1;
}

.property-detail__cover {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 12px;
}

.property-detail__thumbs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.property-detail__thumbs img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
}

.property-detail__content {
  grid-column: 1;
}

.property-detail__sidebar {
  grid-column: 2;
  grid-row: 2;
}

.info-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.spec-list {
  margin: 0;
}

.spec-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}

.spec-list dt {
  color: var(--color-muted);
}

.spec-list dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.entry-content h2,
.entry-content h3 {
  margin-top: 1.6em;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}

.data-table th {
  background: #eef3f7;
}

.notice-box {
  margin-top: 24px;
  padding: 16px 18px;
  border-left: 4px solid var(--color-accent);
  background: var(--color-accent-soft);
  border-radius: 8px;
}

.notice,
.notice-success,
.notice-error {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.notice-success {
  background: #e8f5ee;
  color: var(--color-success);
}

.notice-error {
  background: #fdecec;
  color: var(--color-error);
}

/* Filter bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: end;
  margin-bottom: 28px;
  padding: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.filter-bar label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
}

.filter-bar input,
.filter-bar select,
.lead-form input,
.lead-form select,
.lead-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.filter-bar__checkbox {
  flex-direction: row !important;
  align-items: center;
}

/* Lead form */
.lead-form-section {
  background: var(--color-primary-dark);
  color: #fff;
  padding: 72px 0;
}

.lead-form-section h2 {
  margin: 0 0 8px;
}

.lead-form-section p {
  color: rgba(255, 255, 255, 0.8);
}

.lead-form__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.lead-form label span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.lead-form__full {
  grid-column: 1 / -1;
}

.lead-form__honeypot {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.contact-layout {
  grid-template-columns: 320px 1fr;
  align-items: start;
}

.contact-qr {
  margin-top: 16px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0 20px;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  padding: 18px 0;
}

.faq-item p {
  margin: 0 0 18px;
  color: var(--color-muted);
}

/* Footer */
.site-footer {
  background: #071e2e;
  color: rgba(255, 255, 255, 0.82);
  padding-top: 56px;
}

.site-footer h3,
.site-footer h4 {
  color: #fff;
  margin-top: 0;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
}

.footer-contact,
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-contact li,
.footer-links li {
  margin-bottom: 8px;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.88);
}

.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 20px 0 28px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Floating contact */
.floating-contact {
  position: fixed;
  right: 20px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 90;
}

.floating-contact__btn {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.floating-contact__btn--wechat {
  background: #07c160;
}

.floating-contact__btn--phone {
  background: var(--color-primary);
}

.floating-contact__btn--form {
  background: var(--color-accent);
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.modal__content {
  position: relative;
  background: #fff;
  padding: 28px;
  border-radius: var(--radius);
  max-width: 320px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.modal__close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: 0;
  background: none;
  font-size: 24px;
  cursor: pointer;
}

.empty-state {
  text-align: center;
  color: var(--color-muted);
  padding: 40px 0;
}

.pagination {
  margin-top: 32px;
}

.pagination .nav-links {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.pagination a,
.pagination span {
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
}

/* Admin gallery */
.migrate-gallery-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.migrate-gallery-item {
  position: relative;
}

.migrate-remove-image {
  position: absolute;
  top: 4px;
  right: 4px;
  border: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 960px) {
  .hero__grid,
  .content-layout,
  .property-detail,
  .contact-layout,
  .site-footer__grid,
  .cards-grid--3,
  .cards-grid--2,
  .process-steps,
  .process-steps--detailed {
    grid-template-columns: 1fr;
  }

  .property-detail__sidebar,
  .property-detail__content {
    grid-column: auto;
    grid-row: auto;
  }

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

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    inset: 72px 0 auto 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: 0.2s ease;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
  }

  .lead-form__grid {
    grid-template-columns: 1fr;
  }
}
