/* ============================================================
   好房帮 · 单边代理服务商 — 展示网站样式
   品牌：橙 #F39700 / 深灰 #3E3A39
   设计：简约、大气、精致 · 移动端优先 · 响应式
   ============================================================ */

:root {
  --brand: #F39700;
  --brand-deep: #D97E00;
  --brand-soft: #FFF4E3;
  --brand-tint: #FDF9F2;
  --ink: #3E3A39;
  --ink-2: #6B6560;
  --ink-3: #A39C97;
  --bg: #F7F5F2;
  --surface: #FFFFFF;
  --line: #ECE7E1;
  --success: #2E8B57;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 4px rgba(62,58,57,.05);
  --shadow-md: 0 6px 24px rgba(62,58,57,.09);
  --shadow-lg: 0 16px 48px rgba(62,58,57,.16);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --topbar-h: 60px;
  --maxw: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--topbar-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(1.6) blur(12px);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}
.topbar__logo { height: 34px; width: auto; }
.topbar__nav { display: flex; gap: 6px; }
.topbar__nav a {
  font-size: 15px; font-weight: 600; color: var(--ink-2);
  padding: 7px 14px; border-radius: 999px;
  transition: color .18s, background .18s;
}
.topbar__nav a.active { color: var(--brand-deep); background: var(--brand-soft); }
.topbar__nav a:active { background: var(--brand-soft); }

/* ---------- 首页 ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(243,151,0,.16), transparent 60%),
    radial-gradient(800px 400px at -10% 110%, rgba(243,151,0,.10), transparent 55%),
    linear-gradient(180deg, #FFFFFF 0%, var(--brand-tint) 100%);
  padding: clamp(24px, 4.8vw, 56px) 20px clamp(20px, 3.6vw, 40px);
  text-align: center;
  overflow: hidden;
}
.hero__logo { height: clamp(48px, 10.5vw, 82px); width: auto; margin: 0 auto 11px; filter: drop-shadow(0 4px 16px rgba(217,126,0,.18)); }
.hero__title { font-size: clamp(26px, 5.4vw, 42px); font-weight: 800; letter-spacing: .06em; }
.hero__sub { margin-top: 8px; font-size: clamp(14px, 3vw, 17px); color: var(--ink-2); letter-spacing: .16em; }
.hero__divider {
  width: 40px; height: 3px; border-radius: 2px;
  background: var(--brand); margin: 14px auto 0;
}
.hero__stats {
  margin: 20px auto 0; display: flex; justify-content: center; gap: clamp(18px, 6vw, 56px);
}
.hstat { min-width: 72px; }
.hstat__num { font-size: clamp(24px, 5vw, 34px); font-weight: 800; color: var(--brand-deep); font-variant-numeric: tabular-nums; }
.hstat__num small { font-size: .55em; font-weight: 700; margin-left: 1px; }
.hstat__label { font-size: 12px; color: var(--ink-3); letter-spacing: .12em; margin-top: 2px; }

.entries { max-width: 920px; margin: 0 auto; padding: 20px 20px 0; position: relative; display: grid; gap: 12px; }
@media (min-width: 720px) { .entries { grid-template-columns: 1fr 1fr; gap: 18px; padding-top: 34px; } }
.entry {
  position: relative; display: block; overflow: hidden;
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 18px 22px 18px; box-shadow: var(--shadow-md);
  transition: transform .22s ease, box-shadow .22s ease;
}
.entry:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.entry::after {
  content: ""; position: absolute; right: -46px; top: -46px;
  width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle, rgba(243,151,0,.14), transparent 68%);
}
.entry--listings::after { background: radial-gradient(circle, rgba(243,151,0,.16), transparent 68%); }
.entry--cases::after { background: radial-gradient(circle, rgba(62,58,57,.10), transparent 68%); }
.entry__tag {
  display: inline-block; font-size: 12px; font-weight: 700;
  letter-spacing: .16em; color: var(--brand-deep);
  background: var(--brand-soft); border-radius: 999px; padding: 4px 12px;
}
/* 数量与箭头并入标题行：卡片不再有独立的「43套 + 箭头」尾行，整体更矮 */
.entry__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 12px;
}
.entry__title {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px;
  font-size: clamp(20px, 4.4vw, 25px); font-weight: 800; letter-spacing: .03em;
}
.entry__count {
  font-style: normal; font-size: 20px; font-weight: 800;
  color: var(--brand); font-variant-numeric: tabular-nums; line-height: 1;
}
.entry__count small { font-size: 11.5px; font-weight: 600; color: var(--ink-3); margin-left: 1px; }
.entry__desc { margin-top: 7px; font-size: 13.5px; color: var(--ink-2); max-width: 34em; line-height: 1.6; text-wrap: pretty; }
.entry__meta { display: none; }
.entry__arrow {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .2s;
}
.entry:hover .entry__arrow { background: var(--brand); transform: translateX(3px); }

/* 三条服务说明并成一行，手机首屏即可看全 */
.home-note {
  max-width: 920px; margin: 20px auto 0; padding: 0 16px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
}
@media (min-width: 720px) { .home-note { gap: 14px; padding: 0 20px; margin-top: 26px; } }
.hnote {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 6px; text-align: center;
}
.hnote b { display: block; font-size: 13px; color: var(--ink); letter-spacing: .01em; }
.hnote span { display: block; margin-top: 3px; font-size: 11px; line-height: 1.45; color: var(--ink-3); text-wrap: balance; }
@media (min-width: 480px) {
  .hnote { padding: 14px 10px; border-radius: var(--radius); }
  .hnote b { font-size: 15px; }
  .hnote span { font-size: 12.5px; }
}

/* ---------- 列表页 ---------- */
.listpage { max-width: var(--maxw); margin: 0 auto; padding: 20px 16px 60px; }
@media (min-width: 720px) { .listpage { padding: 32px 24px 80px; } }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.pagehead h1 { font-size: clamp(22px, 4.4vw, 30px); font-weight: 800; letter-spacing: .02em; }
.pagehead h1 em { font-style: normal; color: var(--brand-deep); }
.pagehead__count { font-size: 13px; color: var(--ink-3); }

.toolbar { position: sticky; top: var(--topbar-h); z-index: 40; margin: 0 -16px 18px; padding: 12px 16px 10px; background: rgba(247,245,242,.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
@media (min-width: 720px) { .toolbar { margin: 0 -24px 22px; padding: 14px 24px 12px; } }
.searchbar { position: relative; }
.searchbar input {
  width: 100%; height: 44px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--surface); padding: 0 42px 0 42px;
  font-size: 15px; font-family: inherit; color: var(--ink); outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.searchbar input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(243,151,0,.14); }
.searchbar input::placeholder { color: var(--ink-3); }
.searchbar .ico-search { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--ink-3); pointer-events: none; }
.searchbar .search-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; background: var(--line); color: var(--ink-2); font-size: 14px; display: none; align-items: center; justify-content: center; }
.searchbar .search-clear.show { display: flex; }

.chips { display: flex; gap: 8px; margin-top: 11px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  background: var(--surface); border: 1.5px solid var(--line);
  padding: 6px 15px; border-radius: 999px; transition: all .16s;
}
.chip.active { color: #fff; background: var(--ink); border-color: var(--ink); }
.chip.sorter.active { color: #fff; background: var(--brand); border-color: var(--brand); }

/* 房源卡片 */
.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card__cover { position: relative; aspect-ratio: 4 / 3; background: #EFEAE4; overflow: hidden; }
.card__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card:hover .card__cover img { transform: scale(1.045); }
.card__badges { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; }
.badge {
  font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  padding: 3px 9px; border-radius: 999px; color: #fff;
  background: rgba(62,58,57,.78); backdrop-filter: blur(4px);
}
.badge--media { background: rgba(243,151,0,.92); }
.card__count { position: absolute; right: 10px; bottom: 10px; font-size: 11.5px; font-weight: 600; color: #fff; background: rgba(0,0,0,.5); backdrop-filter: blur(4px); border-radius: 999px; padding: 3px 10px; }
.card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.card__title { font-size: 16.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card__title .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--brand); flex-shrink: 0; }
.card__specs { margin-top: 6px; font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 0; }
.card__specs i { font-style: normal; color: var(--ink-3); margin: 0 7px; }
.card__layout { font-weight: 700; color: var(--brand-deep); background: var(--brand-soft); border-radius: 6px; padding: 2px 8px; margin-right: 7px; }
.card__foot { margin-top: auto; padding-top: 12px; display: flex; align-items: baseline; justify-content: space-between; }
.card__price { font-size: 21px; font-weight: 800; color: var(--brand-deep); font-variant-numeric: tabular-nums; }
.card__price small { font-size: 12px; font-weight: 600; color: var(--ink-3); margin-left: 2px; }
.card__price .per { font-size: 12px; color: var(--ink-3); font-weight: 500; margin-left: 6px; }
.card__dealinfo { font-size: 12.5px; color: var(--ink-3); text-align: right; }
.card__dealinfo b { color: var(--success); font-size: 14px; }
.card__days { margin-top: 2px; }
.fast-badge { color: var(--brand-deep); font-weight: 700; }

.empty { text-align: center; padding: 70px 20px; color: var(--ink-3); }
.empty .big { font-size: 40px; margin-bottom: 10px; }
.empty p { font-size: 14px; }

/* ---------- 详情页 ---------- */
.detail { max-width: 920px; margin: 0 auto; padding: 18px 16px 70px; }
@media (min-width: 720px) { .detail { padding: 28px 24px 90px; } }
.crumb { font-size: 13px; color: var(--ink-3); margin-bottom: 12px; }
.crumb a { color: var(--ink-2); }
.crumb a:hover { color: var(--brand-deep); }

.detail__hero {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 16 / 10; background: #EFEAE4; box-shadow: var(--shadow-md);
}
.detail__hero img { width: 100%; height: 100%; object-fit: cover; }
.detail__hero-nav {
  position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between; align-items: flex-end;
  padding: 26px 14px 12px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.55));
}
.detail__hero-count { color: #fff; font-size: 12.5px; font-weight: 600; background: rgba(0,0,0,.4); border-radius: 999px; padding: 3px 11px; backdrop-filter: blur(4px); }
.hero-arrow {
  width: 38px; height: 38px; border-radius: 50%; font-size: 20px;
  background: rgba(255,255,255,.9); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.hero-arrow:active { background: #fff; }
.detail__title { margin-top: 20px; font-size: clamp(21px, 4.6vw, 28px); font-weight: 800; letter-spacing: .02em; }
.detail__sub { margin-top: 6px; font-size: 14px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 0; }
.detail__sub i { font-style: normal; color: var(--ink-3); margin: 0 8px; }

.detail__pricebar {
  margin-top: 18px; background: var(--surface); border-radius: var(--radius);
  padding: 18px 20px; display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; box-shadow: var(--shadow-sm); border: 1px solid var(--line);
}
.pricebox .p-main { font-size: 32px; font-weight: 800; color: var(--brand-deep); font-variant-numeric: tabular-nums; line-height: 1.2; }
.pricebox .p-main small { font-size: 14px; font-weight: 600; margin-left: 2px; }
.pricebox .p-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.pricebox--deal .p-main { color: var(--success); }

.detail__stats { margin-top: 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 640px) { .detail__stats { grid-template-columns: repeat(5, 1fr); gap: 12px; } }
.dstat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 10px; text-align: center; }
.dstat__v { font-size: clamp(16px, 3.4vw, 20px); font-weight: 800; font-variant-numeric: tabular-nums; }
.dstat__v small { font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.dstat__k { margin-top: 3px; font-size: 11.5px; color: var(--ink-3); letter-spacing: .08em; }

.detail__section { margin-top: 26px; }
.detail__h2 {
  font-size: 17px; font-weight: 800; letter-spacing: .04em;
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.detail__h2::before { content: ""; width: 4px; height: 17px; border-radius: 2px; background: var(--brand); }

.introtext {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 22px; font-size: 14.5px; color: var(--ink-2);
  white-space: pre-wrap; word-break: break-word; line-height: 1.85;
  box-shadow: var(--shadow-sm);
}

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(4, 1fr); gap: 10px; } }
.gallery button { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #EFEAE4; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.gallery button:hover img { transform: scale(1.06); }
.gallery .more {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(62,58,57,.55); color: #fff; font-size: 14px; font-weight: 700;
  backdrop-filter: blur(1px);
}

.videolist { display: grid; gap: 14px; }
@media (min-width: 720px) { .videolist { grid-template-columns: 1fr 1fr; } }
.videocard {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--ink); aspect-ratio: 16 / 10; box-shadow: var(--shadow-sm);
}
.videocard video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }

.backbtn {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 34px; font-size: 14px; font-weight: 600; color: var(--ink-2);
  padding: 10px 20px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--surface); transition: all .18s;
}
.backbtn:hover { color: var(--brand-deep); border-color: var(--brand); background: var(--brand-soft); }

/* ---------- 灯箱 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(20,18,17,.94);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn .18s ease;
}
.lightbox[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } }
.lightbox__stage { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 46px 12px 60px; }
.lightbox__stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; user-select: none; -webkit-user-drag: none; }
.lightbox__stage video { max-width: 100%; max-height: 100%; }
.lightbox__close, .lightbox__prev, .lightbox__next {
  position: absolute; color: #fff; width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,.12); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  transition: background .15s;
}
.lightbox__close:hover, .lightbox__prev:hover, .lightbox__next:hover { background: rgba(255,255,255,.26); }
.lightbox__close { top: max(14px, env(safe-area-inset-top)); right: 14px; }
.lightbox__prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 8px; top: 50%; transform: translateY(-50%); }
.lightbox__counter {
  position: absolute; bottom: max(18px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.85); font-size: 13px; font-variant-numeric: tabular-nums;
  background: rgba(255,255,255,.12); border-radius: 999px; padding: 4px 14px; backdrop-filter: blur(6px);
}

/* ---------- 返回顶部 ---------- */
.backtop {
  position: fixed; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 60;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: 18px;
  box-shadow: var(--shadow-md); opacity: .92;
  transition: opacity .2s, transform .2s;
}
.backtop:hover { background: var(--brand); }
.backtop[hidden] { display: none; }

/* ---------- 页脚 ---------- */
.footer {
  background: var(--ink); color: rgba(255,255,255,.85);
  padding: 44px 20px calc(34px + env(safe-area-inset-bottom));
  text-align: center; margin-top: 30px;
}
.footer__logo { height: 31px; width: auto; margin: 0 auto 16px; opacity: .92; display: block; }
.footer__slogan { font-size: 14px; letter-spacing: .3em; color: rgba(255,255,255,.75); }
.footer__note { margin-top: 10px; font-size: 12px; color: rgba(255,255,255,.4); }
.footer__stamp { color: rgba(255,255,255,.62); }
.footer__icp { margin-top: 8px; font-size: 12px; }
.footer__icp a { color: rgba(255,255,255,.45); text-decoration: none; }
.footer__icp a:hover { color: rgba(255,255,255,.75); }
.footer__gaj { margin-top: 4px; font-size: 12px; line-height: 1; }
.footer__gaj a { color: rgba(255,255,255,.45); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.footer__gaj a:hover { color: rgba(255,255,255,.75); }
.footer__gaj img { height: 14px; width: auto; display: block; }

/* ---------- 入场动画 ---------- */
.rise { animation: rise .4s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.rise:nth-child(2) { animation-delay: .05s; }
.rise:nth-child(3) { animation-delay: .1s; }
.rise:nth-child(4) { animation-delay: .15s; }
.rise:nth-child(5) { animation-delay: .2s; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
