/* ==========================================================================
   详情页 / 发现页 / 新房页 / 房贷计算器 / 发布页 —— 复刻自 house.css + list.css
   ========================================================================== */

/* ==========================================================================
   1. 房源详情页 (.house_detail)
   ========================================================================== */

/* 顶部图集 */
.house_album { position: relative; background: #000; }
.house_album .swiper-slide img { width: 100%; height: 240px; object-fit: cover; }
.house_album .album_num {
  position: absolute; right: 12px; bottom: 12px; z-index: 5;
  background: rgba(0, 0, 0, .5); color: #fff;
  font-size: var(--fs-sm); padding: 3px 10px; border-radius: 12px;
}
.house_album .album_back {
  position: absolute; left: 12px; top: 12px; z-index: 6;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(0, 0, 0, .35);
  display: flex; align-items: center; justify-content: center;
}
.house_album .album_back::before {
  content: ""; width: 8px; height: 8px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(45deg); margin-left: 3px;
}

/* 核心信息卡 */
.house_core {
  background: var(--bg-white);
  padding: 14px var(--page-pad);
  border-bottom: 8px solid var(--bg-body);
}
.house_core .core_price {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 10px;
}
.house_core .core_price .total {
  color: var(--c-price); font-size: 26px; font-weight: 700; line-height: 1;
}
.house_core .core_price .total .unit { font-size: var(--fs-md); font-weight: 400; }
.house_core .core_price .avg { font-size: var(--fs-sm); color: var(--c-muted); }
.house_core .core_title {
  font-size: 17px; font-weight: 700; color: var(--c-title);
  line-height: 24px; margin-bottom: 12px;
}

/* 参数行（房型/面积/朝向等） */
.house_core .core_params {
  display: flex; flex-wrap: wrap;
  background: var(--bg-panel);
  border-radius: var(--r-md);
  padding: 12px 8px;
}
.house_core .core_params dl {
  width: 33.33%; text-align: center; margin-bottom: 8px;
}
.house_core .core_params dl:nth-last-child(-n+3) { margin-bottom: 0; }
.house_core .core_params dt { font-size: var(--fs-sm); color: var(--c-text-weak); margin-bottom: 4px; }
.house_core .core_params dd { font-size: var(--fs-md); color: var(--c-title); font-weight: 700; }

/* 标签行 */
.house_core .core_tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.house_core .core_tags span {
  background: #eaf7f1; color: var(--c-primary);
  font-size: 11px; padding: 3px 8px; border-radius: var(--r-sm);
}

/* 通用信息区块 */
.house_sec {
  background: var(--bg-white);
  margin-bottom: 8px;
  padding: 14px var(--page-pad);
}
.house_sec .sec_title {
  font-size: 16px; font-weight: 700; color: var(--c-title);
  padding-left: 10px; position: relative;
  margin-bottom: 12px;
}
.house_sec .sec_title::before {
  content: ""; position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 15px; background: var(--c-primary); border-radius: 1px;
}

/* 基础信息表 */
.info_table { display: flex; flex-wrap: wrap; }
.info_table dl {
  width: 50%; display: flex; padding: 9px 0;
  border-bottom: 1px dashed var(--line);
}
.info_table dt { width: 76px; color: var(--c-text-weak); font-size: var(--fs-sm); flex-shrink: 0; }
.info_table dd { color: var(--c-text); font-size: var(--fs-sm); flex: 1; }

/* 房源描述 */
.house_desc { font-size: 14px; line-height: 26px; color: var(--c-text); }
.house_desc p { margin-bottom: 8px; }
.house_desc .desc_toggle {
  display: block; text-align: center; color: var(--c-primary);
  font-size: var(--fs-sm); margin-top: 6px;
}
.house_desc.collapsed { max-height: 130px; overflow: hidden; }

/* 位置周边 */
.map-box { height: 180px; background: var(--bg-body); border-radius: var(--r-md); position: relative; overflow: hidden; margin-bottom: 12px; }
.map-box::after {
  content: "位置示意图"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--c-text-weak); font-size: var(--fs-sm);
}
/* 有真实瓦片时隐藏占位文字，并提示可点击导航 */
.map-box.has-tiles::after { display: none; }
.map-box.has-tiles { cursor: pointer; }
.map_tiles { position: absolute; inset: 0; overflow: hidden; }
.map_tile { position: absolute; width: 256px; height: 256px; max-width: none; display: block; pointer-events: none; user-select: none; -webkit-user-drag: none; }
/* 中心房源标注（水滴 pin + 阴影） */
.map_pin {
  position: absolute; z-index: 3; width: 18px; height: 18px;
  transform: translate(-50%, -100%) rotate(-45deg);
  background: var(--c-danger, #e54d42); border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
.map_pin::after {
  content: ""; position: absolute; left: 4px; top: 4px;
  width: 6px; height: 6px; background: #fff; border-radius: 50%;
}
.map-box .map_addr {
  position: absolute; left: 10px; bottom: 10px; right: 10px;
  background: rgba(255, 255, 255, .95);
  border-radius: var(--r-md); padding: 8px 10px;
  font-size: var(--fs-sm); color: var(--c-text); z-index: 2;
}
/* 周边配套 Tab */
.poi_tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 12px; overflow-x: auto; }
.poi_tabs a {
  flex-shrink: 0; padding: 9px 0; margin-right: 20px;
  font-size: var(--fs-sm); color: var(--c-text-sub); position: relative;
}
.poi_tabs a.on { color: var(--c-primary); font-weight: 700; }
.poi_tabs a.on::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--c-primary);
}
.poi_list li {
  display: flex; justify-content: space-between;
  padding: 9px 0; border-bottom: 1px dashed var(--line);
  font-size: var(--fs-sm);
}
.poi_list li .poi_name { color: var(--c-text); }
.poi_list li .poi_dist { color: var(--c-text-weak); }

/* 经纪人卡片 */
.agent_card {
  display: flex; align-items: center;
  padding: 12px 0;
}
.agent_card .avatar {
  width: 52px; height: 52px; border-radius: 50%; overflow: hidden;
  background: #ddd; flex-shrink: 0; margin-right: 12px;
}
.agent_card .avatar img { width: 100%; height: 100%; object-fit: cover; }
.agent_card .info { flex: 1; }
.agent_card .info .name { font-size: var(--fs-md); font-weight: 700; color: var(--c-title); margin-bottom: 4px; }
.agent_card .info .shop { font-size: var(--fs-sm); color: var(--c-text-weak); }
.agent_card .btn_call {
  width: 74px; height: 32px; line-height: 32px; text-align: center;
  background: var(--c-primary); color: #fff;
  border-radius: 16px; font-size: var(--fs-sm); font-weight: 700;
  flex-shrink: 0;
}

/* 举报条 */
.report_bar {
  text-align: center; padding: 14px 0;
  font-size: var(--fs-sm); color: var(--c-text-weak);
  background: var(--bg-white);
}
.report_bar a { text-decoration: underline; }

/* 详情页底部操作栏 */
.detail_foot {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 640px; height: var(--nav-h);
  background: var(--bg-white); border-top: 1px solid var(--line-nav);
  z-index: 80; display: flex; align-items: center;
  padding: 0 var(--page-pad);
}
.detail_foot .foot_ico {
  width: 52px; text-align: center;
  font-size: 11px; color: var(--c-text-sub);
}
.detail_foot .foot_ico i {
  display: block; width: 20px; height: 20px; margin: 0 auto 2px;
  border: 2px solid var(--c-text-sub); border-radius: 4px;
}
.detail_foot .btn_call {
  flex: 1; height: 42px; line-height: 42px; text-align: center;
  background: var(--c-primary); color: #fff;
  border-radius: 21px; font-size: 16px; font-weight: 700;
  margin-left: 10px;
}

/* ==========================================================================
   2. 发现页 (.faxian)
   ========================================================================== */
.fag_item {
  background: var(--bg-white);
  padding: 12px var(--page-pad);
  display: flex; gap: 10px;
  border-bottom: 1px solid var(--line-card);
}
.fag_item .fag_thumb {
  width: 100px; height: 75px; border-radius: var(--r-sm);
  overflow: hidden; background: var(--bg-body); flex-shrink: 0;
}
.fag_item .fag_thumb img { width: 100%; height: 100%; object-fit: cover; }
.fag_item .fag_info { flex: 1; overflow: hidden; }
.fag_item .fag_info .fag_title {
  font-size: var(--fs-md); font-weight: 700; color: var(--c-title);
  margin-bottom: 5px; line-height: 19px;
}
.fag_item .fag_info .fag_desc {
  font-size: var(--fs-sm); color: var(--c-text-weak);
  margin-bottom: 5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fag_item .fag_info .fag_bottom {
  display: flex; align-items: center; justify-content: space-between;
}
.fag_item .fag_info .fag_author {
  font-size: 11px; color: var(--c-text-weak);
}
.fag_item .fag_info .fag_author .badge {
  display: inline-block; font-size: 10px; padding: 1px 5px;
  border-radius: var(--r-sm); margin-right: 4px;
}
.fag_item .fag_info .fag_author .badge.geren { background: var(--c-geren); color: #fff; }
.fag_item .fag_info .fag_author .badge.zhongjie { background: var(--c-primary-87); color: #fff; }

/* ==========================================================================
   3. 新房页 (.xinfang)
   ========================================================================== */
.xf_filter {
  background: var(--bg-white);
  position: sticky; top: 44px; z-index: 55;
  border-bottom: 1px solid var(--line);
}
.xf_filter .xf_tabs { display: flex; border-bottom: 1px solid var(--line); }
.xf_filter .xf_tabs li { flex: 1; text-align: center; padding: 11px 0; }
.xf_filter .xf_tabs li a { font-size: var(--fs-sm); color: var(--c-text-sub); }
.xf_filter .xf_tabs li.on a { color: var(--c-primary); font-weight: 700; }

.xf_panel { display: none; background: var(--bg-white); padding: 12px var(--page-pad) 4px; }
.xf_panel.show { display: block; }
.xf_panel .xf_row { display: flex; margin-bottom: 10px; }
.xf_panel .xf_row .xf_label {
  width: 58px; flex-shrink: 0;
  font-size: var(--fs-sm); color: var(--c-text-weak);
  line-height: 30px;
}
.xf_panel .xf_row .xf_opts {
  flex: 1; display: flex; flex-wrap: wrap; gap: 8px;
}
.xf_panel .xf_row .xf_opts a {
  padding: 5px 12px;
  font-size: var(--fs-sm); color: var(--c-text-sub);
  background: var(--bg-panel); border-radius: var(--r-md);
}
.xf_panel .xf_row .xf_opts a.on {
  background: #e6f3ee; color: var(--c-primary); font-weight: 700;
}

/* 新房卡片 */
.xf_card {
  background: var(--bg-white);
  padding: 12px var(--page-pad);
  display: flex; gap: 12px;
  border-bottom: 1px solid var(--line-card);
}
.xf_card .xf_thumb {
  width: 116px; height: 87px; border-radius: var(--r-md);
  overflow: hidden; background: var(--bg-body); flex-shrink: 0;
}
.xf_card .xf_thumb img { width: 100%; height: 100%; object-fit: cover; }
.xf_card .xf_info { flex: 1; display: flex; flex-direction: column; }
.xf_card .xf_info .xf_name {
  font-size: var(--fs-md); font-weight: 700; color: var(--c-title);
  margin-bottom: 6px; line-height: 19px;
}
.xf_card .xf_info .xf_addr {
  font-size: var(--fs-sm); color: var(--c-text-weak);
  margin-bottom: 6px;
}
.xf_card .xf_info .xf_tags { margin-bottom: 6px; }
.xf_card .xf_info .xf_tags span {
  display: inline-block; font-size: 10px; color: var(--c-text-weak);
  background: var(--bg-body); padding: 1px 6px; border-radius: var(--r-sm);
  margin-right: 5px;
}
.xf_card .xf_info .xf_bottom {
  margin-top: auto; display: flex; align-items: baseline; justify-content: space-between;
}
.xf_card .xf_info .xf_price { color: var(--c-price); font-size: 16px; font-weight: 700; }
.xf_card .xf_info .xf_price .unit { font-size: 11px; font-weight: 400; }
.xf_card .xf_info .xf_status {
  font-size: 11px; color: var(--c-primary);
  border: 1px solid var(--c-primary); border-radius: var(--r-sm);
  padding: 1px 6px;
}
.xf_card .xf_info .xf_status.sold { color: var(--c-text-weak); border-color: #ddd; }

/* ==========================================================================
   4. 房贷计算器 (.calc)
   ========================================================================== */
.calc_tabs {
  display: flex; background: var(--bg-white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 44px; z-index: 55;
}
.calc_tabs a {
  flex: 1; text-align: center; padding: 13px 0;
  font-size: var(--fs-md); color: var(--c-text-sub);
  position: relative;
}
.calc_tabs a.on { color: var(--c-primary); font-weight: 700; }
.calc_tabs a.on::after {
  content: ""; position: absolute; left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 30px; height: 2px; background: var(--c-primary);
}

.calc_form { background: var(--bg-white); padding: 4px var(--page-pad) 14px; }
.calc_row {
  display: flex; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.calc_row .calc_label { width: 90px; color: var(--c-text-sub); font-size: var(--fs-md); flex-shrink: 0; }
.calc_row .calc_val { flex: 1; text-align: right; }
.calc_row .calc_val input {
  text-align: right; font-size: var(--fs-md); color: var(--c-title);
  width: 100%; font-weight: 700;
}
.calc_row .calc_val input::placeholder { color: var(--c-text-weak); font-weight: 400; }
.calc_row .calc_val .unit { color: var(--c-text-weak); margin-left: 4px; }

/* 分段选择（首付比例/期限/利率） */
.seg_group { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0; }
.seg_group a {
  padding: 6px 0; width: calc(25% - 6px);
  text-align: center; font-size: var(--fs-sm);
  background: var(--bg-panel); color: var(--c-text-sub);
  border-radius: var(--r-md);
}
.seg_group a.on { background: var(--c-primary); color: #fff; font-weight: 700; }

/* 计算结果 */
.calc_result {
  background: linear-gradient(135deg, #0b7a52, #2fb287);
  color: #fff; padding: 20px var(--page-pad);
  margin-bottom: 8px;
}
.calc_result .res_title { font-size: var(--fs-sm); opacity: .85; margin-bottom: 6px; }
.calc_result .res_main { font-size: 30px; font-weight: 700; line-height: 1.2; margin-bottom: 14px; }
.calc_result .res_main .unit { font-size: var(--fs-md); font-weight: 400; }
.calc_result .res_sub { display: flex; gap: 24px; font-size: var(--fs-sm); }
.calc_result .res_sub span { opacity: .9; }

.calc_btn {
  padding: 16px var(--page-pad) 24px;
  background: var(--bg-white);
  margin-bottom: calc(var(--nav-h) + 8px);
}
.calc_btn a {
  display: block; height: 46px; line-height: 46px; text-align: center;
  background: var(--c-primary); color: #fff;
  border-radius: var(--r-lg); font-size: 17px; font-weight: 700;
}

/* ==========================================================================
   5. 发布页 (.fabu)
   ========================================================================== */
.fabu_banner {
  background: linear-gradient(135deg, #0b7a52, #2fb287);
  color: #fff; padding: 22px var(--page-pad);
}
.fabu_banner h2 { font-size: 18px; margin-bottom: 6px; }
.fabu_banner p { font-size: var(--fs-sm); opacity: .9; }

.fabu_grid {
  background: var(--bg-white);
  margin-top: 8px;
  padding: 6px 0;
}
.fabu_grid li {
  display: flex; align-items: center;
  padding: 15px var(--page-pad);
  border-bottom: 1px solid var(--line);
}
.fabu_grid li:last-child { border-bottom: 0; }
.fabu_grid li i {
  width: 40px; height: 40px; border-radius: 10px;
  background: #eaf7f1; margin-right: 14px; flex-shrink: 0;
  background-repeat: no-repeat; background-position: center; background-size: 22px;
}
.fabu_grid li .fb_text { flex: 1; }
.fabu_grid li .fb_text .fb_name { font-size: var(--fs-md); color: var(--c-title); font-weight: 700; margin-bottom: 3px; }
.fabu_grid li .fb_text .fb_desc { font-size: var(--fs-sm); color: var(--c-text-weak); }
.fabu_grid li .fb_arrow {
  width: 7px; height: 7px;
  border-top: 1px solid var(--c-text-weak); border-right: 1px solid var(--c-text-weak);
  transform: rotate(45deg); flex-shrink: 0;
}

.fabu_tips {
  padding: 14px var(--page-pad) 20px;
  font-size: var(--fs-sm); color: var(--c-text-weak);
  line-height: 22px;
}
.fabu_tips h4 { color: var(--c-text-sub); margin-bottom: 6px; font-size: var(--fs-sm); }

/* 新房「离我最近」距离标签 */
.xf_dist {
  margin-left: auto; margin-right: 8px;
  font-size: var(--fs-xs); color: var(--c-primary);
}
