@charset "utf-8";

:root {
    --primary: #046E72;
    --primary-dark: #035A5D;
    --primary-light: #E6F5F5;
    --accent: #e8a825;
    --accent-light: #fef7e8;
    --text: #333;
    --text-light: #666;
    --text-muted: #999;
    --border: #e5e5e5;
    --bg: #f7f8fa;
    --white: #fff;
    --shadow: 0 2px 12px rgba(0,0,0,.08);
    --radius: 6px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
h1, h2, h3, h4, h5, h6 { margin: 0; }
body { font-family: "Microsoft YaHei","PingFang SC","Helvetica Neue",Arial,sans-serif; color: var(--text); background: var(--bg); font-size: 14px; line-height: 1.6; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); text-decoration: none; }
img { max-width: 100%; height: auto; }
ul,ol { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0; }

/* ========== SECTION COMMON ========== */
.section { padding: 60px 0; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 28px; color: var(--text); margin:0 0 8px; }
.section-title .title-line { width: 40px; height: 3px; background: var(--primary); margin: 12px auto 0; border-radius: 2px; }

/* ========== PROPERTY CARD ========== */
.property-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.property-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: all .25s; }
.property-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.property-card .card-img { position: relative; height: 180px; background: #e9ecef; overflow: hidden; }
.property-card .card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.property-card:hover .card-img img { transform: scale(1.05); }
.property-card .card-img .tag { position: absolute; top: 10px; left: 10px; background: var(--primary); color: #fff; font-size: 12px; padding: 2px 10px; border-radius: 3px; }
.property-card .card-body { padding: 16px; }
.property-card .card-body h3 { font-size: 16px; margin:0 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.property-card .card-body h3 a { color: #333; font-weight: bold;}
.property-card .card-body .meta { display: flex; gap: 12px; font-size: 13px; color: var(--text-light);}
.property-card .card-body .price { color: #e74c3c; font-size: 20px; font-weight: 700; }
.property-card .card-body .price small { font-size: 12px; font-weight: 400; color: var(--text-muted); }
.property-card .card-body .price-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.property-card .card-body .price-row .p-main { color: #e74c3c; font-size: 20px; font-weight: 700; }
.property-card .card-body .price-row .p-main small { font-size: 12px; font-weight: 400; color: var(--text-muted); }
.property-card .card-body .price-row .p-sub { color: var(--primary); font-size: 14px; font-weight: 600; }
.property-card .card-body .price-row .p-sub small { font-size: 12px; font-weight: 400; color: var(--text-muted); }
.p-total-price { color: #f60 !important; }
.p-total-price small { color: #f60 !important; }
.property-card .card-body .card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.property-card .card-body .card-tags span { font-size: 12px; padding: 2px 8px; background: var(--primary-light); color: var(--primary); border-radius: 3px; }

/* ========== FILTER BAR ========== */
.filter-bar { background: var(--white); padding: 20px 24px; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 24px; }
.filter-bar .filter-row { display: flex; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--border); position: relative; }
.filter-bar .filter-row:last-child { border-bottom: none; }
.filter-bar .filter-label { font-weight: 600; width: 80px; flex-shrink: 0; color: var(--text); line-height: 28px; }
.filter-bar .filter-options { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex: 1; }
.filter-bar .filter-options.collapsed { overflow: hidden; max-height: 36px; }
.filter-bar .filter-options a { padding: 4px 14px; border-radius: 4px; font-size: 13px; color: var(--text-light); white-space: nowrap; }
.filter-bar .filter-options a:hover, .filter-bar .filter-options a.active { background: var(--primary); color: #fff; }
.filter-bar .filter-more { flex-shrink: 0; margin-left: 0; padding: 4px 14px; border-radius: 4px; font-size: 13px; color: var(--text-light); cursor: pointer; white-space: nowrap; text-decoration: none; }
.filter-bar .filter-more:hover { border-color: var(--primary); color: var(--primary); }

/* ========== LISTING LAYOUT ========== */
.listing-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; }

/* Sidebar */
.sidebar .widget { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.sidebar .widget h3 { font-size: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--primary); margin-bottom: 12px;margin-top:0; }
.sidebar .widget ul li { padding: 6px 0; border-bottom: 1px dashed var(--border); }
.sidebar .widget ul li:last-child { border-bottom: none; }
.sidebar .widget ul li a { color: var(--text-light); font-size: 13px; text-decoration: none; }
.sidebar .widget ul li a:hover { color: var(--primary); }

/* ========== DETAIL PAGE ========== */
.detail-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; }
.detail-layout > main { min-width: 0; }
.detail-gallery { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 24px; }
.detail-gallery .gallery-main { height: 420px; border-radius: var(--radius); overflow: hidden; background: #e9ecef; margin-bottom: 12px; }
.detail-gallery .gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.detail-gallery .gallery-thumbs { width: 100%; overflow-x: auto; overflow-y: hidden; white-space: nowrap; scrollbar-width: thin; scrollbar-color: #ccc transparent; padding-bottom: 4px; }
.detail-gallery .gallery-thumbs::-webkit-scrollbar { height: 6px; }
.detail-gallery .gallery-thumbs::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
.detail-gallery .gallery-thumbs::-webkit-scrollbar-track { background: transparent; }
.detail-gallery .gallery-thumbs .thumb { display: inline-block; width: 80px; height: 60px; margin-right: 8px; border-radius: 4px; overflow: hidden; cursor: pointer; border: 2px solid transparent; opacity: .7; transition: all .2s; vertical-align: top; background: #e9ecef; position: relative; }
.detail-gallery .gallery-thumbs .thumb:last-child { margin-right: 0; }
.detail-gallery .gallery-thumbs .thumb.active, .detail-gallery .gallery-thumbs .thumb:hover { border-color: var(--primary); opacity: 1; }
.detail-gallery .gallery-thumbs .thumb img { width: 100%; height: 100%; object-fit: cover; }

.detail-info { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 24px; }
.detail-info h1 { font-size: 24px; margin-bottom: 12px; }

/* 标签行（通用） */
.info-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.info-tags span { padding: 4px 12px; background: var(--accent-light); color: var(--accent); border-radius: 4px; font-size: 13px; font-weight: 600; }

.detail-desc { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 24px; }
.detail-desc h2 { font-size: 18px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.detail-desc .info-table { width: 100%; border-collapse: collapse; }
.detail-desc .info-table th, .detail-desc .info-table td { padding: 10px 12px; border-bottom: 1px dashed var(--border); text-align: left; font-size: 14px; }
.detail-desc .info-table th { width: 120px; color: #333; font-weight: 400; background: #fafafa; }

.detail-contact { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.detail-contact h2 { font-size: 18px; margin-bottom: 16px;margin-top:0; }
.detail-contact .contact-form .form-group { margin-bottom: 14px; display: flex; gap: 8px; align-items: center; }
.detail-contact .contact-form input, .detail-contact .contact-form select, .detail-contact .contact-form textarea { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; outline: none; transition: border-color .2s; box-sizing: border-box; }
.detail-contact .contact-form .gender-select { width: 80px; flex-shrink: 0; height: 42px; padding: 0 28px 0 10px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 10px center; appearance: none; -webkit-appearance: none; cursor: pointer; }
.detail-contact .contact-form .form-group input[name="name"] { flex: 1; }
.detail-contact .contact-form input:focus, .detail-contact .contact-form select:focus, .detail-contact .contact-form textarea:focus { border-color: var(--primary); }
.detail-contact .contact-form select { height: 42px; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; cursor: pointer; }
.detail-contact .contact-form textarea { height: 80px; resize: vertical; }
.detail-contact .contact-form .btn-submit { width: 100%; padding: 12px; background: var(--primary); color: #fff; border: none; border-radius: var(--radius); font-size: 16px; cursor: pointer; }

/* 表单图标 - 电话和日历 */
/* BS5 已移除 .form-group，沿用 BS3 的表单间距 */
.form-group { margin-bottom: 15px; }
.form-phone-group, .form-date-group { position: relative; }
.form-phone-group input, .form-date-group input { padding-right: 36px; }
.form-phone-group::after, .form-date-group::after {
    content: ''; position: absolute; right: 12px; top: 50%;
    transform: translateY(-50%); width: 20px; height: 20px;
    background: no-repeat center/contain; pointer-events: none;
}
.form-phone-group::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='1.5'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E"); }
.form-date-group::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='1.5'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E"); }
/* 隐藏浏览器原生日期图标，用自定义图标代替 */
.form-date-group input[type="date"]::-webkit-calendar-picker-indicator { opacity: 0; z-index: 1; cursor: pointer; }
.detail-contact .contact-form .btn-submit:hover { background: var(--primary-dark); }

/* ========== NEWS ========== */
/* 资讯正文富文本排版（web_news_detail .news-body，内容由后台编辑无法用工具类控制） */
.news-body { line-height: 1.9; color: var(--text-light); font-size: 15px; }
.news-body p { margin-bottom: 16px; }
.news-body table { border-collapse: collapse; width: 100%; margin-bottom: 16px; }
.news-body table th,
.news-body table td { border: 1px solid var(--border); padding: 8px 12px; }
.news-body table th { background: #f5f5f5; font-weight: 600; }
.news-body table th:first-child,
.news-body table td:first-child { width: 28.57%; }
.news-body table th:last-child,
.news-body table td:last-child { width: 71.43%; }
.news-body table.contact-table td { width: 50% !important; }
.news-body h2 { font-size: 18px; }
.news-body h3 { font-size: 16px; }

/* ========== PAGINATION ========== */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 30px; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; color: var(--text-light); }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ========== BREADCRUMB ========== */
.breadcrumb { padding: 14px 0; font-size: 13px; color: var(--text-muted); background: var(--bg); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 6px; }

/* ========== RESPONSIVE ========== */
@media (max-width: 991px) {
    .property-grid { grid-template-columns: repeat(2,1fr); }
    .listing-layout { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
    .property-grid { grid-template-columns: 1fr; }
    .detail-gallery .gallery-main { height: 260px; }
    .detail-layout { grid-template-columns: 1fr !important; }
}

/* 列表页搜索框（rent/sale/project 筛选栏上方） */
.list-search { display: flex; gap: 12px; margin-bottom: 16px; }
.list-search .list-search-input { position: relative; flex: 0 0 380px; display: flex; }
.list-search input { width: 100%; height: 46px; border: 1px solid var(--border); border-radius: 8px; padding: 0 40px 0 44px; font-size: 14px; outline: none; background: #fff; }
.list-search input:focus { border-color: var(--primary); }
.list-search .list-search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #999; pointer-events: none; }
.list-search .list-search-clear { display: none; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border: none; background: #e0e0e0; border-radius: 50%; color: #666; font-size: 15px; line-height: 1; cursor: pointer; padding: 0; }
.list-search .list-search-clear:hover { background: #ccc; color: #333; }
.list-search .list-search-clear.show { display: block; }
.list-search button { height: 46px; border: none; border-radius: 8px; font-size: 15px; cursor: pointer; }
.list-search button[type="submit"] { padding: 0 36px; background: var(--primary); color: #fff; }
.list-search button[type="submit"]:hover { background: var(--primary-dark); }

@media (max-width: 768px) {
    .list-search { flex-direction: column; }
    .list-search .list-search-input { flex: 1 1 auto; }
    .list-search button { width: 100%; }
}
