/*
Theme Name: OFFISPACE
Theme URI: https://offispace.cn
Description: 上海办公选址网 WordPress 主题
Author: OFFISPACE
Version: 1.0
*/
:root{
  --white:#FFFFFF;
  --bg:#F5F5F5;
  --line:#E5E5E5;
  --gray:#888888;
  --dark:#333333;
  --red:#D7000F;
  --red-dark:#B00008;
  --maxw:1600px;
  --radius:12px;
  --shadow:0 2px 12px rgba(0,0,0,.06);
}
*{box-sizing:border-box;margin:0;padding:0;}
body{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",Arial,sans-serif;color:var(--dark);background:var(--white);line-height:1.6;-webkit-font-smoothing:antialiased;zoom:1;}

/* 高分辨率屏幕默认放大，打开即呈现用户手动放大后的视觉效果 */
@media(min-width:1600px){body{zoom:1.08;}}
@media(min-width:1920px){body{zoom:1.15;}}
@media(max-width:1024px){body{zoom:1;}}
a{color:inherit;text-decoration:none;}
img{max-width:100%;display:block;}
.container{max-width:var(--maxw);margin:0 auto;padding:0 20px;}
.btn{display:inline-block;background:var(--red);color:#fff;border:none;border-radius:8px;padding:12px 22px;font-size:15px;cursor:pointer;transition:.15s;}
.btn:hover{background:var(--red-dark);}
.btn-ghost{background:#fff;color:var(--red);border:1px solid var(--red);}
.btn-ghost:hover{background:var(--red);color:#fff;}
.section{padding:48px 0;}
.section-title{font-size:22px;margin-bottom:6px;}
.section-sub{color:var(--gray);margin-bottom:24px;font-size:14px;}

/* header */
.header{position:sticky;top:0;background:var(--white);border-bottom:1px solid var(--line);z-index:50;}
.header .container{display:flex;align-items:center;height:64px;}
.logo{font-size:20px;font-weight:700;color:var(--red);white-space:nowrap;flex:none;}
.logo span{color:var(--dark);font-weight:400;font-size:14px;margin-left:6px;}
.nav{display:flex;gap:26px;flex:1;justify-content:center;}
.nav a{font-size:15px;color:var(--dark);}
.nav a:hover{color:var(--red);}
.header-right{display:flex;align-items:center;gap:16px;margin-left:auto;}
.hotline{text-align:right;font-size:15px;color:var(--red);font-weight:700;line-height:1.2;}
.hotline small{display:block;color:var(--gray);font-weight:400;font-size:12px;}
.header-qr{display:flex;align-items:center;gap:12px;}
.qr-item{display:flex;flex-direction:column;align-items:center;gap:3px;cursor:pointer;}
.qr-item img{width:44px;height:44px;border-radius:6px;background:#fff;padding:2px;box-shadow:0 1px 6px rgba(0,0,0,.08);}
.qr-item span{font-size:11px;color:var(--gray);white-space:nowrap;}

/* hero */
.hero{background:linear-gradient(135deg,#fff 0%,#fafafa 100%);border-bottom:1px solid var(--line);}
.hero .container{display:grid;grid-template-columns:1.4fr 1fr;gap:32px;padding:44px 20px;}
.hero-left h1{font-size:30px;line-height:1.3;margin-bottom:6px;}
.hero-left h1 b{color:var(--red);}
.hero-left .lead{color:var(--gray);margin-bottom:20px;}
.search-box{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:16px;box-shadow:var(--shadow);}
.search-row{display:flex;gap:8px;margin-bottom:14px;}
.search-row input{flex:1;border:1px solid var(--line);border-radius:8px;padding:11px 12px;font-size:14px;outline:none;}
.search-row input:focus{border-color:var(--red);}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px;}
.chip{border:1px solid var(--line);background:#fff;border-radius:20px;padding:6px 14px;font-size:13px;color:var(--dark);cursor:pointer;}
.chip:hover,.chip.active{border-color:var(--red);color:var(--red);}
.filter-row{display:flex;gap:10px;}
.filter-row select{flex:1;border:1px solid var(--line);border-radius:8px;padding:9px 10px;font-size:13px;color:var(--dark);background:#fff;}
.hero-right{background:var(--dark);border-radius:var(--radius);padding:24px;color:#fff;align-self:start;}
.hero-right h3{font-size:18px;margin-bottom:4px;}
.hero-right p{font-size:13px;color:#ccc;margin-bottom:16px;}
.hero-right input{width:100%;border:none;border-radius:8px;padding:12px;font-size:15px;margin-bottom:12px;}
.hero-right .btn{width:100%;}
.hero-right .note{font-size:12px;color:#aaa;margin-top:10px;}
.hero-right .owner-link{display:block;text-align:center;margin-top:14px;color:#fff;border-top:1px solid #555;padding-top:12px;font-size:13px;}
.hero-right .owner-link a{color:var(--red);font-weight:700;}

/* listings */
.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;}
.card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;transition:.15s;}
.card:hover{box-shadow:var(--shadow);transform:translateY(-2px);}
.card-img{height:160px;background:#ECECEC;display:flex;align-items:center;justify-content:center;color:#bbb;font-size:13px;}
.card-body{padding:14px;}
.card-name{font-size:16px;font-weight:600;margin-bottom:4px;}
.card-loc{font-size:13px;color:var(--gray);margin-bottom:8px;}
.card-meta{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:8px;}
.price{color:var(--red);font-weight:700;font-size:16px;}
.price small{font-size:12px;color:var(--gray);font-weight:400;}
.tags{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px;}
.tag{background:var(--bg);color:var(--gray);font-size:12px;border-radius:4px;padding:3px 8px;}
.card-foot{display:flex;gap:8px;}
.card-foot .btn{flex:1;text-align:center;padding:9px 0;font-size:13px;}

/* trust bar */
.trust{background:var(--bg);padding:26px 0;}
.trust .grid4{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;text-align:center;}
.trust .item{padding:10px 12px;}
.trust .item .ic{font-size:19px;color:var(--red);font-weight:700;}
.trust .item .t{font-weight:600;margin-top:3px;font-size:15px;}
.trust .item .d{font-size:12px;color:var(--gray);margin-top:2px;}

/* owner services */
.owner{background:linear-gradient(135deg,#fff 0%,#fff5f5 100%);}
.owner-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;}
.owner-card{border:1px solid var(--line);border-radius:var(--radius);background:#fff;padding:24px;text-align:center;}
.owner-card h4{font-size:18px;margin-bottom:6px;}
.owner-card p{font-size:13px;color:var(--gray);margin-bottom:16px;min-height:38px;}
.owner-card .tagline{color:var(--red);font-weight:600;font-size:13px;margin-bottom:16px;display:block;}

/* footer */
.footer{background:var(--dark);color:#ccc;padding:36px 0;font-size:13px;}
.footer .cols{display:grid;grid-template-columns:2fr 1fr 1fr;gap:24px;}
.footer h5{color:#fff;margin-bottom:10px;font-size:14px;}
.footer a{color:#ccc;}
.footer a:hover{color:var(--red);}
.footer .beian{margin-top:24px;border-top:1px solid #444;padding-top:16px;color:#999;font-size:12px;}

/* modal */
.mask{position:fixed;inset:0;background:rgba(0,0,0,.5);display:none;align-items:center;justify-content:center;z-index:100;padding:20px;}
.mask.show{display:flex;}
.modal{background:#fff;border-radius:var(--radius);width:100%;max-width:440px;padding:26px;}
.modal h3{font-size:19px;margin-bottom:4px;}
.modal .mtype{color:var(--red);font-size:13px;font-weight:600;margin-bottom:16px;}
.modal label{display:block;font-size:13px;color:var(--dark);margin:10px 0 4px;}
.modal input,.modal textarea{width:100%;border:1px solid var(--line);border-radius:8px;padding:10px;font-size:14px;outline:none;font-family:inherit;}
.modal input::placeholder,.modal textarea::placeholder{color:#aaa;}
.modal input::-webkit-input-placeholder,.modal textarea::-webkit-input-placeholder{color:#aaa;}
.modal input:focus,.modal textarea:focus{border-color:var(--red);}
.modal .btn{width:100%;margin-top:16px;}
.modal .close{float:right;cursor:pointer;color:var(--gray);font-size:20px;line-height:1;}
.modal .ok{text-align:center;padding:20px 0;}
.modal .ok .ic{font-size:40px;color:var(--red);}
/* 电话浮层 */
.phone-modal .phone-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 0;border-bottom:1px solid var(--line);}
.phone-modal .phone-row:last-child{border-bottom:none;}
.phone-modal .phone-num{font-size:21px;font-weight:700;color:var(--red);text-decoration:none;}
.phone-modal .phone-copy{flex:none;padding:8px 18px;font-size:13px;}
.phone-modal .note{color:var(--gray);font-size:12px;margin-top:12px;}

/* 搜索未找到提示 */
.grid .empty-tip{padding:40px 16px;color:var(--gray);font-size:15px;text-align:center;background:#fff;border:1px dashed var(--line);border-radius:var(--radius);}

/* 手机号输入校验 */
.phone-input.error{border-color:var(--red);background:#fff5f5;}
.phone-error{display:none;color:var(--red);font-size:12px;margin-top:4px;}
.hero-right .phone-error{color:#ffb3b3;margin-bottom:8px;}
form label + .phone-input.error + .phone-error{margin-top:-8px;margin-bottom:10px;}

/* 租金免责声明 */
.price-notice{color:var(--gray);font-size:12px;line-height:1.5;margin-bottom:16px;text-align:center;}

/* 页脚二维码 */
.qr-block{border-top:1px solid var(--line);margin-top:30px;padding-top:26px;text-align:center;}
.qr-title{font-size:15px;font-weight:600;margin-bottom:16px;color:var(--text);}
.qr-list{display:flex;justify-content:center;gap:40px;flex-wrap:wrap;}
.qr-list div{max-width:140px;}
.qr-list img{width:120px;height:120px;border-radius:8px;background:#fff;padding:6px;box-shadow:0 2px 10px rgba(0,0,0,.06);}
.qr-list p{font-size:12px;color:var(--gray);margin-top:10px;}

/* detail */
.detail-hero{display:grid;grid-template-columns:1.2fr 1fr;gap:24px;}
.detail-img{height:300px;background:#ECECEC;display:flex;align-items:center;justify-content:center;color:#bbb;border-radius:var(--radius);}
.params{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:18px;}
.params .p{background:var(--bg);border-radius:8px;padding:10px 12px;font-size:13px;}
.params .p b{display:block;color:var(--gray);font-weight:400;font-size:12px;}
.cta-row{display:flex;gap:10px;margin-top:18px;}
.cta-row .btn{flex:1;text-align:center;}
.breadcrumb{font-size:13px;color:var(--gray);margin-bottom:14px;}

/* responsive */
@media(max-width:1024px){
  .nav{gap:18px;}
  .nav a{font-size:14px;}
  .header-right{gap:12px;}
}
@media(max-width:880px){
  .hero .container{grid-template-columns:1fr;}
  .grid,.owner-cards{grid-template-columns:1fr 1fr;}
  .trust .grid4{grid-template-columns:1fr 1fr;}
  .detail-hero{grid-template-columns:1fr;}
  .nav{display:none;}
  .header-right{gap:10px;}
  .qr-item img{width:38px;height:38px;}
  .qr-item span{font-size:10px;}
}
@media(max-width:560px){
  .grid,.owner-cards{grid-template-columns:1fr;}
  .hero-left h1{font-size:24px;}
  .header .container{height:auto;min-height:56px;padding-top:10px;padding-bottom:10px;}
  .header-right{flex-direction:column;align-items:flex-end;gap:6px;}
  .hotline{font-size:13px;}
  .hotline small{font-size:11px;}
  .qr-item img{width:34px;height:34px;}
}

/* list page horizontal cards */
.list-cards{display:flex;flex-direction:column;gap:14px;}
.list-card{display:flex;gap:14px;background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:14px;transition:.15s;align-items:stretch;}
.list-card:hover{box-shadow:var(--shadow);}
.list-img{width:140px;min-width:140px;height:100px;background:#ececec;background-size:cover;background-position:center;border-radius:8px;}
.list-info{flex:1;display:flex;flex-direction:column;justify-content:space-between;min-width:0;}
.list-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;}
.list-head h4{font-size:17px;font-weight:600;line-height:1.4;margin:0;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.list-price{font-size:18px;font-weight:700;color:var(--red);white-space:nowrap;}
.rent-est{display:inline-block;margin-left:6px;padding:1px 7px;border:1px solid var(--red);border-radius:10px;font-size:12px;line-height:18px;font-weight:400;color:var(--red);vertical-align:middle;}
.list-meta{font-size:13px;color:var(--gray);margin-top:4px;}
.list-sub{font-size:13px;color:#666;margin-top:2px;}
.list-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;}
.list-tags span{background:var(--bg);color:var(--gray);font-size:12px;border-radius:4px;padding:3px 8px;}

@media(max-width:880px){
  .list-img{width:120px;min-width:120px;height:90px;}
  .list-head h4{font-size:15px;}
  .list-price{font-size:16px;}
}
@media(max-width:560px){
  .list-card{padding:12px;gap:12px;}
  .list-img{width:100px;min-width:100px;height:80px;}
  .list-head h4{font-size:14px;white-space:normal;}
  .list-price{font-size:15px;}
  .list-tags{display:none;}
}

/* detail page layout */
.detail{display:grid;grid-template-columns:1fr 300px;gap:28px;align-items:start;}
.detail-main{min-width:0;}
.detail-side{position:sticky;top:90px;}
.detail-top{display:flex;gap:24px;align-items:flex-start;margin-bottom:4px;}
.detail-gallery{width:360px;min-width:360px;height:240px;background:#f5f5f5;border-radius:8px;overflow:hidden;}
.detail-gallery img{width:100%;height:100%;object-fit:cover;display:block;}
.detail-placeholder{width:100%;height:100%;background:#f5f5f5;}
.detail-summary{flex:1;min-width:0;}
.detail-price{font-size:26px;color:var(--red);font-weight:700;margin-bottom:6px;}
.detail-brief{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:14px;}
.brief-item{background:var(--bg);border-radius:6px;padding:10px 12px;font-size:13px;}
.brief-item span{display:block;color:var(--gray);font-size:12px;margin-bottom:2px;}
.brief-item b{font-weight:600;color:var(--dark);}

@media(max-width:1024px){
  .detail{grid-template-columns:1fr;}
  .detail-side{position:static;max-width:420px;margin:24px auto 0;}
}
@media(max-width:640px){
  .detail-top{flex-direction:column;gap:16px;}
  .detail-gallery{width:100%;min-width:auto;height:200px;}
  .detail-brief{grid-template-columns:1fr 1fr;}
}

/* side business cards */
.side-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:22px;margin-top:16px;}
.side-card h3{font-size:17px;margin:0 0 14px;}
.side-label{display:inline-block;background:#e9ecef;color:var(--gray);font-size:12px;padding:3px 10px;border-radius:20px;margin-bottom:12px;}
.side-label.red{background:#fff3f0;color:var(--red);}
.side-card-compact{display:flex;gap:14px;align-items:center;}
.side-qr{width:96px;height:96px;flex-shrink:0;background:var(--bg);border-radius:6px;overflow:hidden;}
.side-qr img{width:100%;height:100%;object-fit:cover;display:block;}
.side-info{flex:1;min-width:0;}
.side-name{font-size:18px;font-weight:700;color:var(--dark);margin-bottom:2px;}
.side-role{font-size:12px;color:var(--gray);margin-bottom:10px;}
.side-tel{font-size:17px;font-weight:700;color:var(--red);margin-bottom:4px;}
.side-hint{font-size:12px;color:var(--gray);margin:14px 0 0;}

/* homepage featured cards */
.featured-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;}
.featured-card{display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;transition:.15s;}
.featured-card:hover{box-shadow:var(--shadow);transform:translateY(-2px);}
.featured-card-main{display:block;flex:1;color:inherit;text-decoration:none;}
.featured-img{height:150px;background:#ECECEC;display:flex;align-items:center;justify-content:center;overflow:hidden;}
.featured-img img{max-width:100%;max-height:100%;width:auto;height:auto;display:block;}
.featured-img.empty{color:#bbb;font-size:15px;}
.featured-body{padding:14px;}
.featured-body h4{font-size:16px;font-weight:600;margin-bottom:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.featured-loc{font-size:12px;color:var(--gray);margin-bottom:8px;}
.featured-meta{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:8px;}
.featured-price{font-size:18px;color:var(--red);font-weight:700;}
.featured-spec{font-size:12px;color:var(--gray);}
.featured-tags{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:10px;}
.featured-tags span{background:var(--bg);color:var(--gray);font-size:11px;border-radius:4px;padding:2px 6px;}
.featured-foot{padding:0 14px 14px;}
.featured-foot-btn{display:block;width:100%;text-align:center;padding:9px 0;font-size:13px;border-radius:8px;}
.featured-specs{display:flex;flex-direction:column;gap:5px;margin:6px 0 10px;font-size:13px;color:#555;line-height:1.4;}
.featured-specs div{display:flex;gap:8px;align-items:baseline;}
.featured-specs span{flex:0 0 32px;color:#999;font-size:12px;}

/* tablet: 2 per row */
@media(max-width:880px){
  .featured-grid{grid-template-columns:repeat(2,1fr);gap:16px;}
  .featured-img{height:auto;min-height:140px;}
  .featured-img img{width:100%;height:auto;}
  .featured-img.empty{height:180px;}
  .featured-body{padding:12px;}
  .featured-foot{padding:0 12px 12px;}
}
/* mobile: 1 per row */
@media(max-width:480px){
  .featured-grid{grid-template-columns:1fr;}
  .featured-img{height:auto;min-height:160px;}
  .featured-img.empty{height:200px;}
}

/* pagination & page size selector */
.pagination{margin-top:30px;}
.pagination-bar{display:flex;align-items:center;justify-content:center;gap:16px;flex-wrap:wrap;}
.page-size-label{display:flex;align-items:center;gap:6px;font-size:14px;color:var(--gray);white-space:nowrap;}
.page-size-select{border:1px solid var(--line);border-radius:6px;padding:7px 10px;font-size:14px;color:var(--dark);background:#fff;cursor:pointer;outline:none;}
.page-size-select:focus{border-color:var(--red);}
.pagination .page-numbers{display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:34px;padding:0 10px;margin:0 3px;border:1px solid var(--line);border-radius:6px;background:#fff;color:var(--dark);font-size:14px;transition:.15s;}
.pagination .page-numbers.current{background:var(--red);color:#fff;border-color:var(--red);}
.pagination .page-numbers:hover:not(.current){border-color:var(--red);color:var(--red);}
.pagination .page-numbers.dots{border:none;background:transparent;}
@media(max-width:560px){
  .pagination-bar{flex-direction:column;gap:12px;}
  .pagination .page-numbers{min-width:30px;height:30px;padding:0 8px;font-size:13px;}
}

/* category / single article */
.hero-left h1 b{color:var(--red);}
.news-list{display:flex;flex-direction:column;gap:20px;}
.news-item{display:flex;gap:20px;background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:20px;transition:.15s;}
.news-item:hover{box-shadow:var(--shadow);}
.news-thumb{width:220px;min-width:220px;height:150px;border-radius:8px;overflow:hidden;background:#f5f5f5;}
.news-thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.news-body{flex:1;min-width:0;display:flex;flex-direction:column;}
.news-meta{display:flex;gap:12px;margin-bottom:8px;font-size:13px;color:var(--gray);}
.news-cat{color:var(--red);font-weight:600;}
.news-body h2{font-size:19px;line-height:1.4;margin-bottom:10px;}
.news-body h2 a{color:var(--dark);}
.news-body h2 a:hover{color:var(--red);}
.news-excerpt{font-size:14px;color:#666;line-height:1.7;margin-bottom:12px;flex:1;}
.news-more{font-size:14px;color:var(--red);font-weight:600;}
.news-more:hover{text-decoration:underline;}

.article-layout{display:grid;grid-template-columns:1fr 300px;gap:28px;align-items:start;}
.article-main{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:32px;min-width:0;}
.article-cover{margin:-32px -32px 24px -32px;border-radius:var(--radius) var(--radius) 0 0;overflow:hidden;max-height:360px;}
.article-cover img{width:100%;height:auto;display:block;object-fit:cover;}
.article-content{font-size:16px;line-height:1.85;color:var(--dark);}
.article-content h1,.article-content h2,.article-content h3{margin:28px 0 14px;line-height:1.4;}
.article-content h1{font-size:26px;}
.article-content h2{font-size:22px;border-bottom:1px solid var(--line);padding-bottom:8px;}
.article-content h3{font-size:18px;}
.article-content p{margin-bottom:16px;}
.article-content ul,.article-content ol{margin-bottom:16px;padding-left:24px;}
.article-content li{margin-bottom:6px;}
.article-content img{max-width:100%;height:auto;border-radius:8px;margin:16px 0;}
.article-content blockquote{border-left:4px solid var(--red);background:var(--bg);padding:16px 20px;margin:20px 0;border-radius:0 8px 8px 0;color:#555;}
.article-foot{margin-top:32px;padding-top:24px;border-top:1px solid var(--line);}
.article-side{position:sticky;top:90px;}
.side-block{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:20px;margin-bottom:16px;}
.side-block h4{font-size:15px;margin-bottom:12px;}
.side-block p{font-size:13px;color:var(--gray);margin-bottom:12px;}
.side-block ul{list-style:none;}
.side-block li{padding:8px 0;border-bottom:1px solid var(--line);font-size:14px;}
.side-block li:last-child{border-bottom:none;}
.side-block li a{color:var(--dark);}
.side-block li a:hover{color:var(--red);}

@media(max-width:1024px){
  .article-layout{grid-template-columns:1fr;}
  .article-side{position:static;max-width:420px;margin:0 auto;}
}
@media(max-width:760px){
  .news-item{flex-direction:column;gap:14px;}
  .news-thumb{width:100%;min-width:auto;height:180px;}
  .news-body h2{font-size:17px;}
  .article-main{padding:20px;}
  .article-cover{margin:-20px -20px 16px -20px;}
  .article-content{font-size:15px;}
}

/* large screens: keep 4 per row, only adjust image height */
@media(min-width:1440px){
  .featured-grid{grid-template-columns:repeat(4,1fr);}
  .featured-img{height:180px;}
}
@media(min-width:1600px){
  .container{padding:0 40px;}
}
@media(min-width:1920px){
  .featured-grid{grid-template-columns:repeat(4,1fr);}
  .featured-img{height:200px;}
}

