/* 房产网 · 门户样式
   风格：现代房产平台 / 品牌蓝 / 干净明亮 / 卡片化 / 微动效
   说明：自定义类为唯一依赖，Tailwind CDN 仅作补充（离线加载失败不影响观感） */
@import url('https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css');

:root {
  --brand: #0B6CFF;
  --brand-light: #1E80FF;
  --brand-deep: #0052D9;
  --bg: #F5F7FA;
  --bg-card: #FFFFFF;
  --text: #1D2129;
  --text-2: #4E5969;
  --text-3: #86909C;
  --line: #E5E6EB;
  --danger: #F53F3F;
  --success: #00B42A;
  --warn: #FF7D00;
  --radius: 16px;
  --shadow-sm: 0 2px 8px rgba(13, 26, 51, .06);
  --shadow-md: 0 8px 24px rgba(13, 26, 51, .10);
  --shadow-lg: 0 16px 40px rgba(11, 108, 255, .16);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* ---------- 城市切换器（全国省 / 市 / 县三级） ---------- */
.city-picker { position: relative; display: inline-block; }
.city-btn { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--text); font-size: 13px; }
.city-btn .pin { color: var(--brand); }
.city-btn i { font-style: normal; color: var(--text-3); font-size: 12px; }
.city-btn:hover { border-color: var(--brand); color: var(--brand); }
.city-panel { display: none; position: absolute; top: 38px; left: 0; z-index: 80; width: 660px; max-width: 92vw; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 16px; }
.city-panel.show { display: block; }
.city-hot b, .city-col b { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.city-hot { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 13px; color: var(--text-2); }
.chip.on, .chip:hover { border-color: var(--brand); color: var(--brand); background: rgba(11, 108, 255, .06); }
.city-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 12px 0; }
.city-col { min-width: 0; }
.col-scroll { max-height: 220px; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.col-item { text-align: left; padding: 6px 8px; border: 0; background: transparent; border-radius: 8px; font-size: 13px; color: var(--text-2); }
.col-item:hover { background: var(--bg); color: var(--brand); }
.col-item.on { background: rgba(11, 108, 255, .08); color: var(--brand); font-weight: 600; }
.city-foot { display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 12px; }
.city-tip { font-size: 12px; color: var(--text-3); padding: 6px 8px; }
.city-loading { font-size: 13px; color: var(--text-3); padding: 8px; }
@media (max-width: 640px) { .city-cols { grid-template-columns: 1fr; } .col-scroll { max-height: 150px; } }

/* ---------- 顶部导航 ---------- */
.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);
}
.nav-wrap {
  max-width: 1240px; margin: 0 auto; height: 64px;
  display: flex; align-items: center; gap: 28px; padding: 0 20px;
}
.logo { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 600; letter-spacing: .5px; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px; color: #fff;
  background: linear-gradient(135deg, var(--brand-light), var(--brand-deep));
  display: flex; align-items: center; justify-content: center; font-weight: 700;
  box-shadow: 0 6px 16px rgba(11, 108, 255, .35);
}
.logo small { font-size: 12px; color: var(--text-3); font-weight: 400; }
.nav-links { display: flex; gap: 22px; }
.nav-links a { color: var(--text-2); font-size: 15px; padding: 6px 0; position: relative; transition: color .2s; }
.nav-links a:hover { color: var(--brand); }
.nav-links a.active { color: var(--brand); font-weight: 600; }
.nav-links a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--brand); border-radius: 2px;
}
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.nav-user { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.nav-user img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--text); font-size: 14px; transition: all .2s;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
  border-color: transparent; color: #fff; font-weight: 500;
  box-shadow: 0 6px 16px rgba(11, 108, 255, .25);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); color: #fff; }
.btn-lg { height: 48px; padding: 0 28px; font-size: 16px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- 布局 ---------- */
.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.page { padding: 28px 0 60px; }
.section { margin-bottom: 40px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.section-title { font-size: 22px; font-weight: 600; }
.section-sub { color: var(--text-3); font-size: 13px; margin-top: 4px; }
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  border: 1px solid rgba(229, 230, 235, .7);
}

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, #0B4FD9 0%, #0B6CFF 45%, #1E80FF 100%);
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(800px 320px at 80% 10%, rgba(255, 255, 255, .22), transparent),
              radial-gradient(600px 260px at 10% 90%, rgba(0, 0, 0, .18), transparent);
}
.hero-inner { position: relative; max-width: 1240px; margin: 0 auto; padding: 72px 20px 60px; }
.hero h1 { font-size: 38px; font-weight: 600; letter-spacing: 1px; margin-bottom: 10px; }
.hero p { color: rgba(255, 255, 255, .85); margin-bottom: 28px; }
.search-box {
  background: #fff; border-radius: 16px; padding: 10px; display: flex; gap: 10px;
  box-shadow: 0 20px 50px rgba(3, 24, 71, .35);
}
.search-box input {
  flex: 1; height: 46px; border: none; outline: none; padding: 0 14px; font-size: 15px; border-radius: 10px;
}
.search-tabs { display: flex; gap: 6px; padding: 0 4px; }
.search-tabs button {
  border: none; background: transparent; padding: 0 14px; height: 34px; border-radius: 8px;
  color: var(--text-2); font-size: 14px; transition: all .2s;
}
.search-tabs button.on { background: rgba(11, 108, 255, .1); color: var(--brand); font-weight: 600; }
.hero-stats { display: flex; gap: 36px; margin-top: 26px; }
.hero-stats div b { display: block; font-size: 26px; font-weight: 600; }
.hero-stats div span { font-size: 12px; color: rgba(255, 255, 255, .8); }

/* ---------- 快捷入口 ---------- */
.quick-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.quick-item {
  background: #fff; border-radius: 14px; padding: 20px 12px; text-align: center;
  box-shadow: var(--shadow-sm); transition: all .25s; border: 1px solid transparent;
}
.quick-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(11, 108, 255, .3); }
.quick-item .qi-icon { font-size: 24px; margin-bottom: 8px; }
.quick-item b { display: block; font-size: 15px; font-weight: 600; }
.quick-item span { font-size: 12px; color: var(--text-3); }

/* ---------- 房源卡片 ---------- */
.house-card {
  background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s; border: 1px solid rgba(229, 230, 235, .7);
}
.house-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.house-card .thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #EEF1F6; }
.house-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.house-card:hover .thumb img { transform: scale(1.06); }
.house-card .thumb .noimg {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: var(--text-3); font-size: 13px; background: linear-gradient(135deg, #EEF2F9, #E4EBF7);
}
.badge-video {
  position: absolute; left: 10px; bottom: 10px; background: rgba(0, 0, 0, .6); color: #fff;
  font-size: 12px; padding: 3px 8px; border-radius: 20px; backdrop-filter: blur(4px);
}
.house-card .body { padding: 14px 16px 16px; }
.house-card .title { font-size: 15px; font-weight: 600; margin-bottom: 8px; line-height: 1.4; }
.house-card .meta { color: var(--text-3); font-size: 12px; margin-bottom: 10px; }
.house-card .meta i { font-style: normal; margin: 0 4px; color: var(--line); }
.house-card .foot { display: flex; align-items: baseline; justify-content: space-between; }
.price { color: var(--danger); font-size: 20px; font-weight: 600; }
.price small { font-size: 12px; font-weight: 400; margin-left: 2px; }
.unit-price { color: var(--text-3); font-size: 12px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag {
  background: rgba(11, 108, 255, .08); color: var(--brand); font-size: 12px;
  padding: 2px 8px; border-radius: 6px;
}
.tag.gray { background: #F2F3F5; color: var(--text-2); }

/* ---------- 筛选栏 ---------- */
.filter-bar { background: #fff; border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.filter-row:last-child { margin-bottom: 0; }
.filter-label { color: var(--text-3); font-size: 13px; min-width: 48px; }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--text-2);
  padding: 6px 14px; border-radius: 20px; font-size: 13px; transition: all .2s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.filter-input { height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; width: 96px; outline: none; }
.filter-input:focus { border-color: var(--brand); }
.filter-sep { color: var(--line); }
.selected-tags { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--line); }
.selected-tag {
  background: rgba(11, 108, 255, .08); color: var(--brand); border-radius: 6px;
  padding: 4px 10px; font-size: 12px; display: inline-flex; align-items: center; gap: 6px;
}
.selected-tag b { cursor: pointer; font-weight: 400; opacity: .7; }

/* ---------- 详情 ---------- */
.detail-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.gallery { background: #0F172A; border-radius: var(--radius); overflow: hidden; position: relative; }
.gallery-main { aspect-ratio: 16 / 10; background: #0F172A; }
.gallery-main img, .gallery-main video { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; background: #0B1220; }
.gallery-thumbs img { width: 84px; height: 56px; object-fit: cover; border-radius: 6px; opacity: .65; cursor: pointer; transition: all .2s; border: 2px solid transparent; }
.gallery-thumbs img.on, .gallery-thumbs img:hover { opacity: 1; border-color: var(--brand-light); }
.gallery-empty { aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; color: #94A3B8; }
.info-card { padding: 20px; }
.info-card h2 { font-size: 20px; font-weight: 600; margin-bottom: 14px; }
.price-bar { display: flex; align-items: baseline; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.price-bar .price { font-size: 30px; }
.params { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 18px 20px; }
.params div span { display: block; color: var(--text-3); font-size: 12px; margin-bottom: 4px; }
.params div b { font-size: 15px; font-weight: 500; }
.desc { padding: 0 20px 20px; color: var(--text-2); line-height: 1.9; white-space: pre-wrap; }
.side-card { padding: 20px; position: sticky; top: 84px; }
.side-card .owner { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.side-card .owner img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: #EEF1F6; }
.wx-qrcode { text-align: center; padding: 14px; background: #F7F9FC; border-radius: 12px; margin-bottom: 14px; }
.wx-qrcode img { width: 140px; height: 140px; object-fit: contain; margin: 0 auto 8px; border-radius: 8px; }
.video-item { display: flex; gap: 10px; padding: 10px; border-radius: 10px; background: #F7F9FC; margin-bottom: 8px; cursor: pointer; transition: all .2s; }
.video-item:hover { background: rgba(11, 108, 255, .08); }
.video-item .vi-cover { width: 96px; height: 60px; border-radius: 6px; object-fit: cover; background: #E4EBF7; }
.video-item b { font-size: 13px; font-weight: 500; display: block; margin-bottom: 4px; }
.video-item span { font-size: 12px; color: var(--text-3); }
.video-player { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; margin-bottom: 12px; background: #000; }

/* ---------- 表单 ---------- */
.form-row { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; margin-bottom: 14px; }
.form-row label { color: var(--text-2); text-align: right; }
.form-control { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; outline: none; transition: border-color .2s; font-size: 14px; }
.form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11, 108, 255, .12); }
textarea.form-control { height: auto; padding: 10px 12px; line-height: 1.7; }
select.form-control { background: #fff; }
.step-bar { display: flex; gap: 8px; margin-bottom: 22px; }
.step { flex: 1; text-align: center; padding: 10px; border-radius: 10px; background: #F2F3F5; color: var(--text-3); font-size: 13px; transition: all .25s; }
.step.on { background: linear-gradient(135deg, var(--brand-light), var(--brand)); color: #fff; font-weight: 500; box-shadow: 0 6px 14px rgba(11, 108, 255, .25); }
.upload-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.upload-box {
  aspect-ratio: 4 / 3; border: 1px dashed var(--line); border-radius: 12px; display: flex;
  flex-direction: column; align-items: center; justify-content: center; color: var(--text-3);
  cursor: pointer; transition: all .2s; background: #FAFBFD; position: relative; overflow: hidden;
}
.upload-box:hover { border-color: var(--brand); color: var(--brand); background: rgba(11, 108, 255, .04); }
.upload-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.upload-box .del {
  position: absolute; top: 6px; right: 6px; background: rgba(0, 0, 0, .55); color: #fff;
  width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; z-index: 2;
}

/* ---------- 状态与提示 ---------- */
.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; background: #F2F3F5; color: var(--text-2); }
.badge-success { background: rgba(0, 180, 42, .12); color: var(--success); }
.badge-warning { background: rgba(255, 125, 0, .12); color: var(--warn); }
.badge-danger { background: rgba(245, 63, 63, .12); color: var(--danger); }
.badge-primary { background: rgba(11, 108, 255, .12); color: var(--brand); }
.empty { text-align: center; padding: 60px 20px; color: var(--text-3); }
.empty .em-icon { font-size: 40px; margin-bottom: 12px; opacity: .5; }
.skeleton { background: linear-gradient(90deg, #EEF1F6 25%, #F7F9FC 37%, #EEF1F6 63%); background-size: 400% 100%; animation: sk 1.4s ease infinite; border-radius: 8px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.toast {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%) translateY(-20px);
  background: rgba(29, 33, 41, .92); color: #fff; padding: 10px 20px; border-radius: 10px;
  z-index: 999; opacity: 0; transition: all .25s; font-size: 14px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 分页 ---------- */
.pagination { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 28px; }
.pagination button { height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.pagination button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.pagination button:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 个人中心 ---------- */
.mine-layout { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: start; }
.mine-menu { background: #fff; border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow-sm); }
.mine-menu a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--text-2); transition: all .2s; }
.mine-menu a:hover { background: #F5F7FA; color: var(--brand); }
.mine-menu a.on { background: rgba(11, 108, 255, .1); color: var(--brand); font-weight: 600; }
.list-row { display: flex; gap: 14px; padding: 14px; border-bottom: 1px solid var(--line); align-items: center; }
.list-row:last-child { border-bottom: none; }
.list-row .lr-thumb { width: 120px; height: 84px; border-radius: 10px; object-fit: cover; background: #EEF1F6; }
.list-row .lr-main { flex: 1; min-width: 0; }
.list-row .lr-title { font-weight: 600; margin-bottom: 6px; }

/* ---------- 页脚 ---------- */
.site-footer { background: #0F172A; color: #94A3B8; padding: 36px 20px; margin-top: 40px; }
.footer-inner { max-width: 1240px; margin: 0 auto; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer b { color: #E2E8F0; display: block; margin-bottom: 10px; font-size: 15px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .quick-grid { grid-template-columns: repeat(3, 1fr); }
  .detail-layout { grid-template-columns: 1fr; }
  .side-card { position: static; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .grid-4, .grid-3, .quick-grid { grid-template-columns: 1fr; }
  .hero-inner { padding: 48px 20px 40px; }
  .hero h1 { font-size: 26px; }
  .params { grid-template-columns: repeat(2, 1fr); }
  .mine-layout { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .form-row label { text-align: left; }
}
