﻿/* 亚星房视界 - 全局样式 v4 · 精致升级 */
:root {
  --bg: #ffffff;
  --bg-card: #f8f9fb;
  --bg-card-hover: #f0f3f7;
  --bg-elevated: #f5f7fa;
  --border: #e8ecf1;
  --border-light: #f0f2f5;
  --text: #1a1a1a;
  --text-dim: #555;
  --text-muted: #999;
  --gold: #00ae66;
  --gold-hover: #009959;
  --green: #00ae66;
  --orange: #e8833a;
  --red: #d9534f;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 2px 12px rgba(0,0,0,0.04);
  --shadow-hover: 0 8px 28px rgba(0,0,0,0.1);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.03);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.85;
  font-size: 15px;
  letter-spacing: 0.02em;
}
p { margin-bottom: 12px; }
a { color: var(--gold); text-decoration: none; transition: all .2s; }
a:hover { color: var(--gold-hover); }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* 导航 */
.navbar {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.navbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.logo { font-size: 20px; font-weight: 800; color: var(--text); letter-spacing: 0.5px; }
.logo span { color: var(--gold); }
.nav-links { display: flex; gap: 24px; align-items: center; list-style: none; }
.nav-links a { color: var(--text-dim); font-size: 14px; transition: all .2s; position: relative; padding: 4px 0; }
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); font-weight: 600; }
.nav-links a.active::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 2px; background: var(--gold); border-radius: 2px;
}
.btn {
  display: inline-block; padding: 10px 22px; border-radius: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer; border: none;
  transition: all .2s; text-align: center;
}
.btn-gold { background: linear-gradient(135deg, #00ae66, #009959); color: #fff; box-shadow: 0 4px 14px rgba(0,174,102,0.25); }
.btn-gold:hover { background: linear-gradient(135deg, #00c074, #00ae66); transform: translateY(-1px); color:#fff; }
.btn-outline { background: transparent; color: var(--gold); border: 1px solid var(--gold); }
.btn-outline:hover { background: rgba(0,174,102,0.08); }
.btn-block { display: block; width: 100%; }
.hamburger { display: none; background: none; border: none; color: var(--text); font-size: 24px; cursor: pointer; }

/* 悬浮 */
.floating-cta { position: fixed; right: 20px; bottom: 20px; z-index: 99; display: flex; flex-direction: column; gap: 10px; }
.float-btn {
  width: 54px; height: 54px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; box-shadow: var(--shadow); cursor: pointer; border: none; transition: transform .2s;
}
.float-btn:hover { transform: scale(1.08); }
.float-phone { background: linear-gradient(135deg, #00ae66, #009959); color: #fff; }
.float-wechat { background: linear-gradient(135deg, #5a9a6a, #4a8a5a); color: #fff; }

.wechat-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; align-items: center; justify-content: center; }
.wechat-modal.show { display: flex; }
.wechat-modal-box { background: #fff; padding: 32px; border-radius: 16px; text-align: center; max-width: 320px; width: 90%; box-shadow: var(--shadow); }
.wechat-modal-box img { width: 200px; height: 200px; margin: 0 auto 16px; border-radius: 12px; }
.wechat-modal-box h3 { margin-bottom: 8px; font-size: 18px; color: var(--text); }
.wechat-modal-box p { color: var(--text-dim); font-size: 13px; margin-bottom: 8px; }

/* 回到顶部按钮 */
.back-to-top {
  position: fixed; right: 20px; bottom: 90px; width: 44px; height: 44px;
  border-radius: 50%; background: #fff; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  font-size: 18px; color: var(--text-dim); box-shadow: var(--shadow);
  transition: var(--transition); opacity: 0; visibility: hidden; z-index: 98;
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--gold); color: #fff; border-color: var(--gold); transform: translateY(-2px); }

/* 面包屑导航 */
.breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { margin: 0 8px; }

/* 页面头部 */
.page-header { background: linear-gradient(135deg, #f0f9f5 0%, #ffffff 100%); padding: 40px 0; border-bottom: 1px solid var(--border); margin-bottom: 32px; }
.page-header h1 { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.page-header .sub { color: var(--text-dim); font-size: 15px; }

/* 搜索框样式 */
.search-box {
  position: relative; max-width: 500px; margin: 0 auto 28px;
}
.search-box input {
  width: 100%; padding: 12px 20px 12px 44px; border-radius: 24px;
  border: 1px solid var(--border); background: #fff; font-size: 14px;
  transition: var(--transition); box-shadow: var(--shadow-card);
}
.search-box input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(0,174,102,0.1); }
.search-box::before {
  content: '🔍'; position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  font-size: 16px; opacity: 0.6;
}

/* 筛选按钮组 */
.filter-group { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.filter-btn {
  padding: 6px 16px; border-radius: 20px; border: 1px solid var(--border);
  background: #fff; color: var(--text-dim); font-size: 13px; cursor: pointer;
  transition: var(--transition);
}
.filter-btn:hover { border-color: var(--gold); color: var(--gold); }
.filter-btn.active { background: var(--gold); color: #fff; border-color: var(--gold); }

.mobile-bar { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--border); padding: 10px 16px; z-index: 150; gap: 10px; }
.mobile-bar .btn { flex: 1; padding: 12px; }

/* 区块 */
.section { padding: 56px 0; }
.section-title { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.section-sub { color: var(--text-dim); margin-bottom: 28px; }
.section-title .accent { color: var(--gold); }

.card {
  background: var(--bg-card); border-radius: var(--radius);
  overflow: hidden; transition: var(--transition); border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
}
.card:hover {
  background: var(--bg-card-hover); border-color: var(--border);
  box-shadow: var(--shadow-hover); transform: translateY(-2px);
}

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

.tag { display: inline-block; padding: 2px 10px; border-radius: 4px; font-size: 12px; background: rgba(0,174,102,0.1); color: var(--gold); margin-right: 6px; margin-bottom: 4px; }
.tag-green { background: rgba(0,174,102,0.1); color: var(--green); }
.tag-orange { background: rgba(232,131,58,0.1); color: var(--orange); }

/* 页脚 */
.footer { background: #f5f7fa; border-top: 1px solid var(--border); padding: 48px 0 100px; margin-top: 40px; color: var(--text-muted); font-size: 13px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
.footer h4 { color: var(--text); margin-bottom: 12px; font-size: 14px; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 8px; }
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--text); }
.footer-bottom { text-align: center; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border); }

/* 房源卡片 */
.listing-card { cursor: pointer; }
.listing-img { width: 100%; height: 200px; object-fit: cover; background: var(--bg-elevated); }
.listing-body { padding: 16px; }
.listing-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.listing-price { color: var(--gold); font-size: 20px; font-weight: 800; }
.listing-price small { font-size: 13px; color: var(--text-dim); font-weight: 400; }
.listing-meta { color: var(--text-dim); font-size: 13px; margin: 8px 0; }
.listing-comment { font-size: 13px; color: var(--text-dim); border-left: 3px solid var(--gold); padding-left: 10px; margin-top: 10px; }

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; color: var(--text-dim); }
.form-control {
  width: 100%; padding: 11px 14px; border-radius: 8px;
  background: #fff; border: 1px solid var(--border);
  color: var(--text); font-size: 14px; transition: border-color .2s;
}
.form-control:focus { outline: none; border-color: var(--gold); }
textarea.form-control { resize: vertical; min-height: 80px; }

/* 表格 */
table.info-table { width: 100%; border-collapse: collapse; }
.info-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.info-table td:first-child { color: var(--text-dim); width: 140px; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; padding: 20px; gap: 16px; border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
  .nav-links a.active::after { display: none; }
  .hamburger { display: block; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .floating-cta { display: none; }
  .back-to-top { bottom: 80px; right: 16px; }
  .mobile-bar { display: flex; }
  .section { padding: 36px 0; }
  .section-title { font-size: 22px; }
  .container { padding: 0 16px; }
  .wechat-modal-box { padding: 24px; }
  .wechat-modal-box img { width: 180px; height: 180px; }
}

