/*
Theme Name: xinfangshuo
Theme URI: https://localhost
Description: 新房说 - 房产新房资讯与看房团主题。内置楼盘/看房团/轮播管理，自带 REST API（命名空间 xfs/v1）供微信小程序调用。
Version: 1.0.0
Author: xinfangshuo
Text Domain: xinfangshuo
*/

:root{
  --xfs-red:#e02e24;
  --xfs-red-dark:#c0231a;
  --xfs-bg:#f5f6f8;
  --xfs-text:#222;
  --xfs-gray:#8a8f99;
  --xfs-border:#eee;
}
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:"PingFang SC","Microsoft YaHei",Arial,sans-serif;background:var(--xfs-bg);color:var(--xfs-text);font-size:14px}
a{color:inherit;text-decoration:none}
ul{list-style:none}
img{display:block;max-width:100%}
.wrap{width:1200px;max-width:94%;margin:0 auto}
.clearfix::after{content:"";display:block;clear:both}

/* ===== 顶栏 ===== */
.xfs-top{background:#fff;border-bottom:1px solid var(--xfs-border)}
.xfs-top .wrap{display:flex;align-items:center;height:64px}
.xfs-logo{font-size:24px;font-weight:700;color:var(--xfs-red);margin-right:36px;white-space:nowrap}
.xfs-logo span{font-size:12px;color:var(--xfs-gray);font-weight:400;margin-left:6px}
.xfs-nav{display:flex;gap:28px;flex:1}
.xfs-nav a{font-size:16px;color:#333;padding:4px 2px}
.xfs-nav a:hover,.xfs-nav a.on{color:var(--xfs-red);border-bottom:2px solid var(--xfs-red)}
.xfs-top .phone{color:var(--xfs-red);font-weight:700;font-size:15px;white-space:nowrap;margin-left:auto}

/* ===== 轮播 ===== */
.xfs-banner{position:relative;overflow:hidden;background:#ddd}
.xfs-banner .slides{display:flex;transition:transform .5s ease}
.xfs-banner .slide{min-width:100%;height:380px;position:relative;display:flex;align-items:flex-end}
.xfs-banner .slide-img{position:absolute;left:0;top:0;width:100%;height:100%;object-fit:cover;object-position:center}
.xfs-banner .slide .cap{position:relative;width:1200px;max-width:94%;margin:0 auto;padding:0 0 28px;color:#fff;text-shadow:0 2px 8px rgba(0,0,0,.55)}
.xfs-banner .cap h2{font-size:30px}
.xfs-banner .cap p{margin-top:6px;font-size:14px;opacity:.9}
.xfs-banner .dots{position:absolute;right:calc((100% - min(1200px,94%)) / 2);bottom:16px;display:flex;gap:8px}
.xfs-banner .dots i{width:26px;height:4px;background:rgba(255,255,255,.5);cursor:pointer}
.xfs-banner .dots i.on{background:var(--xfs-red)}

/* ===== 通用区块 ===== */
.xfs-block{padding:34px 0 6px}
.xfs-block-head{display:flex;align-items:baseline;margin-bottom:18px}
.xfs-block-head h2{font-size:24px}
.xfs-block-head h2::before{content:"";display:inline-block;width:5px;height:20px;background:var(--xfs-red);margin-right:10px;vertical-align:-2px}
.xfs-block-head .more{margin-left:auto;color:var(--xfs-gray);font-size:13px}
.xfs-block-head .more:hover{color:var(--xfs-red)}

/* ===== 楼盘卡片 ===== */
.lp-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}
.lp-card{background:#fff;border-radius:8px;overflow:hidden;transition:box-shadow .2s}
.lp-card:hover{box-shadow:0 6px 20px rgba(0,0,0,.1)}
.lp-card .thumb{aspect-ratio:16/9;background:#e8e8e8 center/cover no-repeat;position:relative}
.lp-card .status{position:absolute;left:0;top:10px;background:var(--xfs-red);color:#fff;font-size:12px;padding:2px 10px;border-radius:0 10px 10px 0}
.lp-card .status.q{background:#f59a23}
.lp-card .status.z{background:#9aa0aa}
.lp-card .body{padding:12px 14px 14px}
.lp-card h3{font-size:17px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lp-card .price{color:var(--xfs-red);font-size:18px;font-weight:700;margin:6px 0 2px}
.lp-card .price small{font-size:12px;font-weight:400;color:var(--xfs-gray)}
.lp-card .meta{color:var(--xfs-gray);font-size:12px;line-height:1.7;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lp-card .tags{margin-top:8px;display:flex;flex-wrap:wrap;gap:6px}
.lp-card .tags em{font-style:normal;font-size:12px;color:var(--xfs-red);border:1px solid rgba(224,46,36,.4);border-radius:3px;padding:1px 6px}

/* ===== 看房团 ===== */
.tuan-list{display:flex;flex-direction:column;gap:14px}
.tuan-item{display:flex;background:#fff;border-radius:8px;overflow:hidden}
.tuan-item .thumb{width:220px;min-height:140px;background:#e8e8e8 center/cover no-repeat;flex-shrink:0}
.tuan-item .body{padding:14px 18px;flex:1;display:flex;flex-direction:column;justify-content:center}
.tuan-item h3{font-size:18px}
.tuan-item .info{color:var(--xfs-gray);font-size:13px;margin-top:8px;line-height:1.8}
.tuan-item .info b{color:var(--xfs-text);font-weight:400}
.tuan-item .act{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:0 26px;border-left:1px dashed var(--xfs-border)}
.tuan-item .act .st{font-size:14px;font-weight:700;color:var(--xfs-red);margin-bottom:10px}
.tuan-item .act .st.full{color:var(--xfs-gray)}
.btn{display:inline-block;background:var(--xfs-red);color:#fff;border:none;border-radius:20px;padding:8px 30px;font-size:14px;cursor:pointer}
.btn:hover{background:var(--xfs-red-dark)}
.btn.gray{background:#c8ccd4;cursor:not-allowed}

/* ===== 资讯 ===== */
.news-list{display:flex;flex-direction:column;gap:0;background:#fff;border-radius:8px;padding:6px 20px}
.news-item{display:flex;gap:18px;padding:16px 0;border-bottom:1px solid var(--xfs-border)}
.news-item:last-child{border-bottom:none}
.news-item .thumb{width:180px;height:110px;border-radius:6px;background:#e8e8e8 center/cover no-repeat;flex-shrink:0}
.news-item h3{font-size:17px;line-height:1.5}
.news-item:hover h3{color:var(--xfs-red)}
.news-item .sum{color:var(--xfs-gray);font-size:13px;margin-top:8px;line-height:1.7;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.news-item .date{color:#bbb;font-size:12px;margin-top:8px}

/* ===== 筛选栏 ===== */
.filter-bar{background:#fff;border-radius:8px;padding:12px 18px;margin-bottom:18px;display:flex;gap:10px;flex-wrap:wrap}
.filter-bar a{padding:4px 14px;border-radius:16px;font-size:13px;color:#555}
.filter-bar a.on,.filter-bar a:hover{background:var(--xfs-red);color:#fff}

/* ===== 详情页 ===== */
.detail-main{display:flex;gap:22px;align-items:flex-start;padding-top:22px}
.detail-left{flex:1;min-width:0;width:100%}
.detail-side{width:300px;flex-shrink:0}
.crumb{font-size:13px;color:var(--xfs-gray);padding:14px 0 0}
.crumb a:hover{color:var(--xfs-red)}
.d-card{background:#fff;border-radius:8px;padding:22px;margin-bottom:18px}
.d-card h1{font-size:26px;display:flex;align-items:center;gap:12px}
.d-card h1 .status{font-size:13px;background:var(--xfs-red);color:#fff;border-radius:3px;padding:2px 10px;font-weight:400}
.d-info{display:grid;grid-template-columns:repeat(3,1fr);gap:12px 20px;margin-top:18px}
.d-info .it{font-size:14px;color:var(--xfs-text)}
.d-info .it span{color:var(--xfs-gray);margin-right:8px}
.d-price{color:var(--xfs-red);font-size:28px;font-weight:700}
.d-price small{font-size:13px;color:var(--xfs-gray);font-weight:400}
.d-content{line-height:1.9;font-size:15px}
.d-content img{border-radius:6px;margin:10px 0}
.d-content p{margin-bottom:10px}
/* ===== 楼盘详情图集（贝壳式大图轮播+分类缩略图） ===== */
.hero{background:#fff;border-radius:8px;margin-bottom:18px;overflow:hidden}
.hero-stage{position:relative;height:440px;background:#1c1c1c;user-select:none}
.hero-img{width:100%;height:100%;object-fit:cover;display:block;cursor:grab}
.hero-video{width:100%;height:100%;display:none;background:#000}
.hero-channels{display:none;position:absolute;left:0;top:0;width:100%;height:100%;align-items:center;justify-content:center}
.hero-channels-bg{position:absolute;left:0;top:0;width:100%;height:100%;object-fit:cover;opacity:.45}
.hero-channels-tip{position:relative;text-align:center;color:#fff;padding:0 20px}
.hero-channels-ic{width:80px;height:80px;border-radius:50%;background:rgba(255,255,255,.18);border:2px solid rgba(255,255,255,.6);color:#fff;font-size:30px;display:flex;align-items:center;justify-content:center;margin:0 auto 14px}
.hero-channels-tip p{margin:4px 0;font-size:15px}
.hero-count{position:absolute;right:14px;bottom:14px;background:rgba(0,0,0,.5);color:#fff;font-size:13px;padding:2px 10px;border-radius:12px}
.hero-arrow{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:72px;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.35);color:#fff;font-size:32px;text-decoration:none;border-radius:8px;z-index:2}
.hero-arrow:hover{background:rgba(0,0,0,.6)}
.hero-prev{left:14px}
.hero-next{right:14px}
.hero-btns{position:absolute;left:16px;bottom:16px;display:flex;gap:10px;z-index:2;flex-wrap:wrap}
.hero-btn{background:rgba(255,255,255,.94);color:#333;border:0;border-radius:6px;font-size:13px;padding:8px 14px;cursor:pointer;display:inline-flex;align-items:center;gap:4px}
button.hero-btn:hover{background:#fff}
.hero-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;padding:14px}
.hero-gi{cursor:pointer}
.hero-gi-img{height:92px;border-radius:6px;background:#e8e8e8 center/cover no-repeat;border:2px solid transparent;box-sizing:border-box;position:relative;overflow:hidden}
.hero-gi.on .hero-gi-img{border-color:var(--xfs-red)}
.hero-gi-cap{position:absolute;left:0;right:0;bottom:0;background:rgba(0,0,0,.35);color:#fff;font-size:12px;font-weight:600;text-align:center;padding:5px 4px;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hero-gi.on .hero-gi-cap{background:rgba(224,46,36,.85);color:#fff}
.hero-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:34px;height:34px;border-radius:50%;background:rgba(0,0,0,.45);color:#fff;display:flex;align-items:center;justify-content:center;font-size:14px}
@media (max-width:960px){.hero-grid{grid-template-columns:repeat(4,1fr)}}
@media (max-width:720px){
  .hero-stage{height:260px}
  /* 手机：轮播图按图片原始比例自适应，隐藏标题 */
  .xfs-banner .slide{height:auto}
  .xfs-banner .slide-img{position:static;width:100%;height:auto;display:block}
  .xfs-banner .cap{display:none}
}
.side-card{background:#fff;border-radius:8px;padding:20px;margin-bottom:18px;text-align:center}
.side-card .tel{color:var(--xfs-red);font-size:24px;font-weight:700;margin:8px 0}
.side-card p{color:var(--xfs-gray);font-size:13px;line-height:1.8}
.side-card .btn{margin-top:12px;width:100%;text-align:center}

/* ===== 报名表单 ===== */
.signup-form .row{margin-bottom:14px;text-align:left}
.signup-form label{display:block;font-size:13px;color:var(--xfs-gray);margin-bottom:6px;text-align:left}
.signup-form input,.signup-form textarea{width:100%;border:1px solid #ddd;border-radius:6px;padding:9px 12px;font-size:14px;outline:none}
.signup-form input:focus,.signup-form textarea:focus{border-color:var(--xfs-red)}
.signup-ok{background:#f0faf0;border:1px solid #b7e2b7;color:#2c7a2c;border-radius:8px;padding:16px 20px;margin-bottom:16px}

/* ===== 分页 ===== */
.xfs-pager{text-align:center;padding:26px 0}
.xfs-pager .page-numbers{display:inline-block;padding:6px 14px;background:#fff;border-radius:6px;margin:0 4px;color:#555;font-size:13px}
.xfs-pager .current{background:var(--xfs-red);color:#fff}

/* ===== 页脚 ===== */
.xfs-footer{margin-top:40px;background:#2b2b31;color:#9aa0aa;padding:26px 0;text-align:center;font-size:13px;line-height:2}

/* 文章页 */
.post-body{background:#fff;border-radius:8px;padding:30px;margin-top:16px}
.post-body h1{font-size:26px;text-align:center}
.post-meta{text-align:center;color:var(--xfs-gray);font-size:13px;margin:12px 0 22px}
.empty-tip{background:#fff;border-radius:8px;padding:60px 0;text-align:center;color:var(--xfs-gray)}

@media (max-width:900px){
  .lp-grid{grid-template-columns:repeat(2,1fr)}
  .detail-main{flex-direction:column}
  .detail-side{width:100%}
  .tuan-item{flex-direction:column}
  .tuan-item .thumb{width:100%}
  .xfs-nav{display:none}
  .d-info{grid-template-columns:1fr 1fr}
}

/* ===== 二手房（贝壳式） ===== */
.es-total{font-size:14px;color:var(--xfs-gray);margin-bottom:14px}
.es-total b{color:var(--xfs-red);font-size:18px;margin:0 2px}
.es-list{background:#fff;border-radius:8px;overflow:hidden}
.es-card{display:flex;gap:16px;padding:18px 20px;border-bottom:1px solid var(--xfs-border)}
.es-card:last-child{border-bottom:0}
.es-card:hover{background:#fafafa}
.es-thumb{width:180px;aspect-ratio:16/9;flex-shrink:0;background:#e8e8e8 center/cover no-repeat;border-radius:4px}
.es-body{flex:1;min-width:0}
.es-body h3{font-size:18px;color:#333;margin-bottom:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.es-card:hover h3{color:var(--xfs-red)}
.es-community{font-size:13px;color:#555;margin-bottom:4px}
.es-meta{font-size:14px;color:#555;margin-bottom:4px}
.es-sub{font-size:12px;color:#999;margin-bottom:8px}
.es-tags em{display:inline-block;font-style:normal;font-size:12px;color:#666;background:#f5f5f5;border-radius:2px;padding:2px 6px;margin-right:6px}
.es-price{flex-shrink:0;min-width:110px;text-align:right}
.es-price .num{font-size:26px;font-weight:700;color:var(--xfs-red);line-height:1.4}
.es-price .num small{font-size:14px;font-weight:400}
.es-price .unit{font-size:12px;color:#999;margin-top:4px}

/* 二手房详情页 */
.es-head{display:flex;gap:24px;background:#fff;border-radius:8px;padding:20px;margin:16px 0}
.es-gal{width:60%;flex-shrink:0}
.es-gal-stage{position:relative;aspect-ratio:16/9;background:#1c1c1c;border-radius:4px;overflow:hidden}
.es-gal-img{width:100%;height:100%;object-fit:cover;display:block}
.es-gal-count{position:absolute;right:10px;top:10px;background:rgba(0,0,0,.4);color:#fff;font-size:12px;border-radius:10px;padding:2px 10px}
.es-gal-thumbs{display:flex;gap:8px;margin-top:10px;overflow-x:auto}
.es-gal-thumbs img{width:76px;height:56px;object-fit:cover;border:2px solid transparent;border-radius:3px;cursor:pointer;flex-shrink:0}
.es-gal-thumbs img.on{border-color:var(--xfs-red)}
.es-info{flex:1;min-width:0}
.es-title{font-size:20px;color:#333;margin:10px 0}
.es-info-price{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}
.es-info-price .num{font-size:36px;font-weight:700;color:var(--xfs-red)}
.es-info-price .wan{font-size:16px;color:var(--xfs-red)}
.es-info-price .unit{font-size:14px;color:#999;margin-left:12px}
.es-info-sub{font-size:11px;color:#999;white-space:nowrap;text-align:right}
.es-quick{display:flex;border-top:1px solid var(--xfs-border);border-bottom:1px solid var(--xfs-border);padding:12px 0;margin-bottom:12px}
.es-quick .it{flex:1;text-align:center;font-size:12px;color:#999}
.es-quick .it span{display:block;font-size:16px;font-weight:700;color:#333;margin-bottom:4px}
/* 详情字段 PC/手机双名称切换 */
.lbl-mb{display:none}
/* 经纪人卡片 */
.es-agent{border-top:1px solid var(--xfs-border);padding:18px 0 4px;margin-top:14px}
.es-agent-top{display:flex;align-items:center;gap:18px}
.es-agent-avatar{width:96px;height:96px;border-radius:50%;object-fit:cover;background:#e8e8e8;flex-shrink:0}
.es-agent-info{flex:1;min-width:0}
.es-agent-name{font-size:20px;font-weight:700;color:#222}
.es-agent-name .bd{font-style:normal;font-size:12px;font-weight:400;color:#5a7ba6;background:#f0f4fa;border-radius:2px;padding:2px 8px;margin-left:10px;vertical-align:3px}
.es-agent-name .bd.gray{color:#8a94a6;background:#e8ebf0}
.es-agent-name .bd svg{vertical-align:-2px}
.es-agent-intro{font-size:15px;color:#333;margin-top:8px}
.es-agent-code{font-size:14px;color:#999;margin:16px 0 16px 114px}
.es-agent-btns{display:flex;gap:14px}
.es-agent-btns .btn-tel{flex:1;background:#3370ff;color:#fff;font-size:20px;font-weight:700;border-radius:4px;padding:13px 0;text-align:center;white-space:nowrap}
.es-agent-btns .btn-wx{width:170px;display:inline-flex;align-items:center;justify-content:center;gap:8px;background:#fff;color:#3370ff;border:1px solid #3370ff;font-size:16px;border-radius:4px;cursor:pointer;white-space:nowrap}
.es-sec{background:#fff;border-radius:8px;padding:18px 20px;margin-bottom:16px}
.es-table{width:100%;border-collapse:collapse}
.es-table th{font-weight:400;color:#999;font-size:13px;text-align:left;padding:9px 8px;width:16%}
.es-table td{font-size:13px;color:#333;padding:9px 8px;width:34%}
.es-photos{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.es-photos img{width:100%;height:160px;object-fit:cover;border-radius:4px}
.es-content{font-size:14px;line-height:1.9;color:#444}
.es-lightbox{display:none;position:fixed;left:0;top:0;right:0;bottom:0;background:rgba(0,0,0,.85);z-index:999;align-items:center;justify-content:center}
.es-lightbox img{max-width:92%;max-height:92%}

/* 首页精选二手房 */
.es-home-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.es-home-card{background:#fff;border-radius:8px;overflow:hidden;transition:box-shadow .2s}
.es-home-card:hover{box-shadow:0 6px 18px rgba(0,0,0,.08)}
.es-home-card .thumb{height:130px;background:#e8e8e8 center/cover no-repeat}
.es-home-card .body{padding:10px 12px 14px}
.es-home-card h3{font-size:14px;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-bottom:4px}
.es-home-card:hover h3{color:var(--xfs-red)}
.es-home-card .meta{font-size:12px;color:#999;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.es-home-card .price{font-size:18px;font-weight:700;color:var(--xfs-red);margin-top:4px}
.es-home-card .price small{font-size:12px;font-weight:400}
.es-home-card .price .unit{float:right;font-size:12px;font-weight:400;color:#999;line-height:2.1}

@media (max-width:900px){
  .es-head{flex-direction:column}
  .es-gal{width:100%}
  .es-thumb{width:120px;aspect-ratio:16/9;height:auto}
  .es-card{padding:14px}
  .es-price{min-width:84px}
  .es-price .num{font-size:20px}
  .es-photos{grid-template-columns:repeat(2,1fr)}
  .es-home-grid{grid-template-columns:repeat(2,1fr)}
  .es-table th{width:22%}
  .es-table td{width:28%}
  .es-agent-avatar{width:72px;height:72px}
  .es-agent-code{margin-left:90px}
  .es-agent-btns .btn-tel{font-size:16px}
  .es-agent-btns .btn-wx{width:130px;font-size:14px}
  .lbl-pc{display:none}
  .lbl-mb{display:inline}
}
