/* 对外门户样式：与后台共用一套色板，但独立版式（对客展示，不出现后台元素） */
:root {
  --ink: #0b1f33;
  --ink-2: #33475c;
  --muted: #6b7c90;
  --muted-2: #8a99a8;
  --line: #dbe3ec;
  --line-2: #eef2f7;
  --bg: #f5f8fb;
  --blue: #1a6ce0;
  --green: #0e9f6e;
  --gold: #c77a16;
  --radius: 14px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.p-wrap { width: min(1200px, 100% - 48px); margin: 0 auto; }

/* ---------- 头部 ---------- */
.p-head {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 31, 51, .96);
  backdrop-filter: blur(8px);
  color: #fff;
}
.p-head-in { display: flex; align-items: center; gap: 26px; height: 64px; }
.p-brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.p-logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, #1a6ce0, #0e9f6e);
  display: grid; place-items: center; font-weight: 700; font-size: 17px;
}
.p-brand b { font-size: 17px; letter-spacing: .5px; }
.p-brand i { display: block; font-style: normal; font-size: 11.5px; color: #a9bdd3; }
.p-nav { display: flex; gap: 22px; font-size: 14px; color: #c9d8e8; flex: 1; }
.p-nav a:hover { color: #fff; }
.p-nav a.on { color: #fff; box-shadow: inset 0 -2px 0 #2b82f6; }
.p-tel {
  background: #fff; color: var(--ink); border-radius: 9px;
  padding: 8px 16px; font-size: 13.5px; font-weight: 600; flex: 0 0 auto;
}

/* ---------- 首屏 ---------- */
.p-hero {
  background: linear-gradient(135deg, #0b1f33 0%, #123a5c 55%, #16436e 100%);
  color: #fff; padding: 54px 0 44px;
}
.p-hero h1 { font-size: 30px; line-height: 1.35; margin: 0 0 12px; letter-spacing: .5px; }
.p-hero p { margin: 0; color: #a9bdd3; font-size: 14.5px; max-width: 720px; }
.p-stats { display: flex; gap: 40px; margin-top: 30px; flex-wrap: wrap; }
.p-stat .v { font-size: 26px; font-weight: 700; }
.p-stat .v span { font-size: 13px; font-weight: 400; color: #a9bdd3; margin-left: 4px; }
.p-stat .l { font-size: 12px; color: #8fa7bf; margin-top: 2px; }

/* ---------- 筛选 ---------- */
.p-filter {
  background: #fff; border-radius: var(--radius);
  padding: 14px; margin: -26px auto 26px; position: relative;
  box-shadow: 0 8px 26px rgba(11, 31, 51, .1);
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
.p-filter input {
  flex: 1 1 240px; min-width: 180px; height: 44px;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 0 14px; font-size: 14.5px; outline: none; background: #fff;
}
.p-filter input:focus { border-color: var(--blue); }
.p-filter select {
  height: 44px; border: 1px solid var(--line); border-radius: 10px;
  padding: 0 12px; font-size: 14px; background: #fff; color: var(--ink-2);
}
.p-filter .p-reset { height: 44px; padding: 0 14px; border: 1px solid var(--line); background: #fff; border-radius: 10px; color: var(--muted); font-size: 13.5px; }

/* ---------- 列表 ---------- */
.p-list-hd { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.p-list-hd h2 { font-size: 19px; margin: 0; }
.p-list-hd .p-count { font-size: 13px; color: var(--muted-2); }
.p-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; padding-bottom: 40px; }
.p-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 2px 10px rgba(11, 31, 51, .06);
  transition: transform .16s, box-shadow .16s;
  display: flex; flex-direction: column;
}
.p-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(11, 31, 51, .12); }
.p-card-top {
  height: 116px; position: relative;
  background: linear-gradient(135deg, #0d2740, #1b4c78);
  color: #fff; padding: 16px 18px; display: flex; flex-direction: column; justify-content: space-between;
}
.p-card-top::after {
  content: ""; position: absolute; right: -20px; bottom: -40px;
  width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle, rgba(43, 130, 246, .35), transparent 70%);
}
.p-badges { display: flex; gap: 8px; font-size: 12px; }
.p-badges span { background: rgba(255, 255, 255, .16); border-radius: 6px; padding: 3px 8px; }
.p-badges span.mode { background: rgba(255, 255, 255, .92); color: var(--ink); font-weight: 600; }
.p-card-price { font-size: 23px; font-weight: 700; letter-spacing: .5px; }
.p-card-price i { font-size: 12px; font-weight: 400; color: #a9bdd3; margin-left: 6px; font-style: normal; }
.p-card-body { padding: 15px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.p-card-title { font-size: 15.5px; font-weight: 600; line-height: 1.45; margin-bottom: 6px; }
.p-card-meta { font-size: 12.8px; color: var(--muted); }
.p-card-specs { display: flex; gap: 12px; margin: 11px 0 12px; font-size: 12.8px; color: var(--ink-2); flex-wrap: wrap; }
.p-card-specs span { background: #f4f7fb; border-radius: 6px; padding: 4px 8px; }
.p-card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.p-tag { font-size: 12px; color: var(--blue); background: #e8f1fe; border-radius: 5px; padding: 3px 7px; }
.p-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line-2); padding-top: 12px; }
.p-card-foot .p-code { font-size: 12px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.p-card-foot .p-more { font-size: 13px; color: var(--blue); font-weight: 600; }

/* ---------- 房源详情 ---------- */
.p-detail { padding: 26px 0 50px; }
.p-crumb { font-size: 13px; color: var(--muted-2); margin-bottom: 14px; }
.p-crumb a { color: var(--blue); }
.p-detail-hero {
  background: linear-gradient(135deg, #0b1f33, #14395c);
  color: #fff; border-radius: var(--radius); padding: 26px 26px 24px;
}
.p-detail-hero .p-badges { margin-bottom: 12px; }
.p-detail-hero h1 { font-size: 25px; margin: 0 0 10px; line-height: 1.4; }
.p-detail-hero .p-addr { color: #a9bdd3; font-size: 13.5px; }
.p-detail-kpis { display: flex; gap: 34px; margin-top: 22px; flex-wrap: wrap; }
.p-kpi .v { font-size: 24px; font-weight: 700; }
.p-kpi .l { font-size: 12px; color: #8fa7bf; margin-top: 2px; }
.p-detail-body { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px; margin-top: 20px; align-items: start; }
.p-block { background: #fff; border-radius: var(--radius); padding: 20px 22px; box-shadow: 0 2px 10px rgba(11, 31, 51, .06); }
.p-block h2 { font-size: 16px; margin: 0 0 14px; }
.p-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; }
.p-spec .l { font-size: 12.5px; color: var(--muted-2); }
.p-spec .v { font-size: 15px; margin-top: 2px; }
.p-detail-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 16px; }
.p-aside { display: flex; flex-direction: column; gap: 20px; }
.p-contact-card { background: linear-gradient(135deg, #0b1f33, #16436e); color: #fff; border-radius: var(--radius); padding: 22px; }
.p-contact-card h2 { font-size: 16px; margin: 0 0 6px; }
.p-contact-card .p-cs { font-size: 12.8px; color: #a9bdd3; margin-bottom: 16px; }
.p-contact-card .p-person { font-size: 14.5px; margin-bottom: 4px; }
.p-contact-card .p-phone { font-size: 22px; font-weight: 700; letter-spacing: .5px; margin-bottom: 16px; }
.p-contact-card .p-btn { width: 100%; justify-content: center; background: #fff; color: var(--ink); margin-bottom: 8px; }
.p-contact-card .p-btn.p-btn-ghost { background: transparent; border: 1px solid rgba(255, 255, 255, .3); color: #fff; }

.p-map-mini { height: 260px; border-radius: 10px; overflow: hidden; background: #e8eef5; position: relative; }
#pMini { position: absolute; inset: 0; }
.p-map-big { height: min(66vh, 620px); border-radius: var(--radius); overflow: hidden; background: #e8eef5; position: relative; }
#pMap { position: absolute; inset: 0; }

/* ---------- 地图页 ---------- */
.p-map-page { padding: 24px 0 44px; }
.p-map-layout { display: grid; grid-template-columns: 1fr 320px; gap: 18px; }
.p-map-side { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 10px rgba(11, 31, 51, .06); }
.p-map-side .p-side-hd { padding: 13px 16px; border-bottom: 1px solid var(--line-2); font-size: 13px; color: var(--muted); }
.p-map-side .p-side-list { max-height: min(66vh, 566px); overflow: auto; }
.p-side-item { padding: 12px 16px; border-bottom: 1px solid var(--line-2); display: flex; justify-content: space-between; gap: 10px; }
.p-side-item:hover { background: #f7fafd; }
.p-side-item .t { font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.p-side-item .s { font-size: 12px; color: var(--muted-2); margin-top: 3px; }
.p-side-item .p { font-size: 14px; font-weight: 700; color: var(--blue); white-space: nowrap; }

/* ---------- 服务范围 ---------- */
.p-service { padding: 44px 0 10px; }
.p-service-t { font-size: 19px; margin: 0 0 18px; }
.p-service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.p-service-item { background: #fff; border-radius: var(--radius); padding: 20px 22px; box-shadow: 0 2px 10px rgba(11, 31, 51, .06); }
.p-si-t { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.p-si-s { font-size: 13px; color: var(--muted); line-height: 1.75; }

/* ---------- 自绘瓦片地图 ---------- */
.pm-canvas { position: absolute; inset: 0; overflow: hidden; background: #e9eff5; cursor: grab; }
.pm-canvas.dragging { cursor: grabbing; }
.pm-tiles, .pm-pins { position: absolute; inset: 0; }
.pm-tiles img { position: absolute; width: 256px; height: 256px; display: block; user-select: none; pointer-events: none; }
.pm-zoom { position: absolute; left: 10px; top: 10px; z-index: 3; display: flex; flex-direction: column; box-shadow: 0 1px 6px rgba(11, 31, 51, .2); border-radius: 6px; overflow: hidden; }
.pm-zoom button { width: 30px; height: 30px; border: 0; background: #fff; font-size: 16px; line-height: 1; color: var(--ink); }
.pm-zoom button:hover { background: #f2f6fa; }
.pm-attr { position: absolute; right: 6px; bottom: 4px; z-index: 3; font-size: 11px; color: #5c6d80; background: rgba(255, 255, 255, .82); padding: 1px 6px; border-radius: 4px; }
.pm-pin {
  position: absolute; transform: translate(-50%, -100%);
  background: #fff; border: 1px solid var(--blue); color: var(--blue);
  font-size: 12px; font-weight: 700; line-height: 1.3; padding: 3px 8px; border-radius: 8px;
  white-space: nowrap; box-shadow: 0 2px 6px rgba(11, 31, 51, .18); cursor: pointer;
}
.pm-pin.rent { border-color: var(--green); color: var(--green); }
.pm-pin.deal { border-color: #97a4b3; color: #64748b; }
.pm-pin:hover { z-index: 2; box-shadow: 0 3px 10px rgba(11, 31, 51, .28); }

/* ---------- 联系 / 页脚 ---------- */
.p-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 42px; padding: 0 18px; border-radius: 9px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  font-size: 14px;
}
.p-btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
.p-contact { background: #0b1f33; color: #fff; padding: 34px 0; }
.p-contact-box { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.p-contact-t { font-size: 20px; font-weight: 700; }
.p-contact-s { font-size: 13px; color: #a9bdd3; margin-top: 6px; }
.p-contact-act { display: flex; gap: 10px; }
.p-contact-act .p-btn { background: #fff; color: var(--ink); }
.p-contact-act .p-btn-primary { background: #1a6ce0; color: #fff; border-color: #1a6ce0; }
.p-foot { padding: 26px 0 40px; background: #fff; }
.p-foot-row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.p-foot-t { font-weight: 600; font-size: 14px; }
.p-foot-s { font-size: 12.5px; color: var(--muted-2); margin-top: 4px; }
.p-foot-note { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); font-size: 12px; color: var(--muted-2); }
.p-loading, .p-empty { text-align: center; padding: 60px 0; color: var(--muted-2); font-size: 14px; }

/* ---------- 首页顶图：园区照片 + 公司标语 ---------- */
.p-hero { position: relative; overflow: hidden; background: linear-gradient(135deg, #0b1f33, #16436e); color: #fff; padding: 62px 0 54px; }
.p-hero-bg {
  position: absolute; inset: 0;
  background: url("../assets/hero-park.jpg") center 62% / cover no-repeat;
  filter: saturate(1.05) brightness(1.06);
  transform: scale(1.02);
}
.p-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(6, 18, 31, .88) 0%, rgba(8, 22, 38, .70) 40%, rgba(9, 26, 45, .40) 72%, rgba(9, 26, 45, .26) 100%);
}
.p-hero::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 42%;
  background: linear-gradient(to top, rgba(6, 18, 31, .72), transparent);
  z-index: 1;
}
.p-hero-in { position: relative; z-index: 2; }
.p-hero-kicker { font-size: 13px; letter-spacing: 2px; color: #9fb8d2; margin-bottom: 14px; }
.p-hero h1 { font-size: 38px; line-height: 1.3; margin: 0 0 14px; letter-spacing: .5px; }
.p-hero .p-hero-sub { color: #b6c9dd; }
.p-stats { display: flex; gap: 40px; margin-top: 26px; flex-wrap: wrap; }

/* ---------- 找房模块（地图 + 区域） ---------- */
.p-find { padding: 34px 0 10px; }
.p-find-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.p-find-hd h2 { font-size: 19px; margin: 0; }
.p-find-body { display: grid; grid-template-columns: 1fr 330px; gap: 18px; align-items: start; }
.p-find .p-map-big { height: min(58vh, 460px); }
.p-find-page .p-map-big { height: min(66vh, 560px); }

/* ---------- 推荐房源 ---------- */
.p-hot { padding: 30px 0 46px; }

/* ---------- 区域找房 ---------- */
.p-area-page { padding: 26px 0 34px; }
.p-area-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.p-area-card {
  background: #fff; border-radius: var(--radius); padding: 20px 22px;
  box-shadow: 0 2px 10px rgba(11, 31, 51, .06); display: block;
  transition: transform .16s, box-shadow .16s;
}
.p-area-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(11, 31, 51, .12); }
.p-area-name { font-size: 19px; font-weight: 700; }
.p-area-count { font-size: 13px; color: var(--muted); margin-top: 6px; }
.p-area-count b { font-size: 20px; color: var(--blue); margin-right: 2px; }
.p-area-meta { font-size: 12.5px; color: var(--muted-2); margin-top: 8px; }
.p-area-go { margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--blue); }
.p-area-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; }
.p-chip {
  font: inherit; font-size: 13px; line-height: 1.2; padding: 8px 14px; border-radius: 20px; cursor: pointer;
  background: #fff; color: var(--ink-2); border: 1px solid var(--line);
  display: inline-flex; align-items: center; gap: 6px;
}
.p-chip:hover { border-color: #b9d0ef; }
.p-chip.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.p-chip i { font-style: normal; font-size: 11.5px; color: var(--muted-2); }
.p-chip.on i { color: rgba(255, 255, 255, .8); }
.p-area-back { display: flex; gap: 10px; padding: 6px 0 30px; }

/* ---------- 卡片：经纪人联系方式 ---------- */
.p-card-link { display: flex; flex-direction: column; flex: 1; }
.p-agent {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 11px 16px; border-top: 1px solid var(--line-2); background: #fbfdff;
  font-size: 12.5px;
}
.p-agent-name { color: var(--muted); }
.p-agent-tel { color: var(--blue); font-weight: 700; font-variant-numeric: tabular-nums; }
.p-agent-link { margin-left: auto; color: var(--blue); font-weight: 600; }
.p-detail-note {
  margin-top: 16px; padding: 12px 14px; background: #f5f9fe; border-radius: 10px;
  font-size: 12.5px; color: var(--muted); line-height: 1.75;
}

/* ---------- 联系区：经纪人 + 在线留言 ---------- */
.p-contact-grid { display: grid; grid-template-columns: 1fr 1.35fr; gap: 26px; align-items: start; }
.p-contact-cardp { color: #fff; }
.p-contact-cardp .p-person { font-size: 15px; margin-bottom: 6px; }
.p-contact-cardp .p-phone { font-size: 26px; font-weight: 700; letter-spacing: .5px; margin-bottom: 6px; }
.p-contact-cardp .p-cs { font-size: 12.5px; color: #a9bdd3; margin-bottom: 16px; }
.p-lead-wrap { background: #fff; border-radius: var(--radius); padding: 22px 24px; color: var(--ink); }
.p-lead-t { font-size: 18px; margin: 0 0 14px; }
.p-lead { display: flex; flex-direction: column; gap: 10px; }
.p-lead-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.p-lead input, .p-lead textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 13px; font: inherit; font-size: 14px; color: var(--ink);
  outline: none; background: #fff; resize: vertical;
}
.p-lead input:focus, .p-lead textarea:focus { border-color: var(--blue); }
.p-lead-act { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.p-lead-tip { font-size: 12.5px; color: var(--muted-2); line-height: 1.7; margin-top: 4px; }
.p-lead-tip.ok { color: var(--green); }
.p-lead-tip.bad { color: var(--gold); }

/* ---------- 手机底部操作条 ---------- */
.p-mbar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(11, 31, 51, .96); backdrop-filter: blur(8px);
}
.p-mbar .p-btn { flex: 1; justify-content: center; }

@media (max-width: 960px) {
  .p-detail-body { grid-template-columns: 1fr; }
  .p-map-layout { grid-template-columns: 1fr; }
  .p-map-side .p-side-list { max-height: 300px; }
  .p-find-body { grid-template-columns: 1fr; }
  .p-find .p-map-big { height: 340px; }
  .p-contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .p-wrap { width: calc(100% - 28px); }
  .p-head-in { height: auto; gap: 6px 12px; padding: 9px 0 10px; flex-wrap: wrap; }
  .p-nav { width: 100%; order: 2; gap: 16px; font-size: 12.5px; overflow-x: auto; flex: 0 0 auto; }
  .p-nav a { flex: 0 0 auto; white-space: nowrap; }
  .p-nav::-webkit-scrollbar { display: none; }
  .p-tel { display: none; }
  .p-hero { padding: 34px 0 30px; }
  .p-hero h1 { font-size: 25px; }
  .p-hero-kicker { font-size: 11.5px; letter-spacing: 1.4px; margin-bottom: 10px; }
  .p-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; margin-top: 20px; }
  .p-stat .v { font-size: 20px; }
  .p-find { padding-top: 24px; }
  .p-find .p-map-big { height: 300px; }
  .p-find .p-find-hd h2 { font-size: 17px; }
  .p-area-chips { margin-bottom: 14px; }
  .p-grid { grid-template-columns: 1fr; }
  .p-specs { grid-template-columns: 1fr 1fr; }
  .p-detail-kpis { gap: 22px; }
  .p-lead-row { grid-template-columns: 1fr; }
  .p-contact { padding-bottom: 82px; }
  .p-mbar { display: flex; }
}

/* ===== 静态页（/house/*、无 JS 首页）复用与补充样式 ===== */
.p-hero-act { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.p-detail-main { display: block; }
.p-detail-main h2 { font-size: 17px; margin: 20px 0 12px; }
.p-detail-side { display: grid; gap: 14px; align-content: start; }
.p-agent-card {
  background: linear-gradient(135deg, #0b1f33, #14405f);
  border-radius: 14px;
  padding: 22px 24px;
  color: #fff;
}
.p-agent-card .p-contact-act { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.p-detail-side .p-lead {
  background: #fff;
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 6px 18px rgba(11, 31, 51, .06);
}
.p-detail-side .p-lead h3 { font-size: 15.5px; margin: 0 0 4px; }
.p-seo-text { margin-top: 34px; border-top: 1px solid var(--line, #e6ecf3); padding-top: 22px; }
.p-seo-text h2 { font-size: 18px; margin: 0 0 10px; }
.p-seo-text p { color: var(--muted, #52657a); line-height: 1.9; font-size: 14.5px; }
.p-seo-districts { margin: 10px 0 4px; padding-left: 18px; color: var(--muted, #52657a); font-size: 14px; line-height: 2; }
.p-seo-desc, .p-seo-loc { color: var(--muted, #52657a); line-height: 1.95; font-size: 14.5px; }
.p-seo-loc { font-size: 13px; }
@media (max-width: 640px) {
  .p-detail-side { gap: 12px; }
  .p-agent-card { padding: 18px 18px; }
}

