/* 龙洞网 · 蓝灰极简风 · 移动优先 · 纯白背景 */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    background: #ffffff; /* 纯白背景 */
    color: #3c434a;
    line-height: 1.7;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

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

/* 页头 */
.site-header { background: #fff; border-bottom: 1px solid #dcdcde; padding: 14px 0; }
.site-header .inner { display: flex; align-items: center; justify-content: space-between; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.site-logo { font-size: 18px; font-weight: 600; color: #007cba; letter-spacing: .05em; }
.site-nav a { margin-left: 16px; font-size: 14px; color: #50575e; }
.site-nav a:hover { color: #007cba; }
.site-nav .nav-user { font-size: 14px; color: #50575e; margin-left: 16px; }

/* 页面标题区 */
.page-head { padding: 22px 0 16px; }
.page-head h1 { font-size: 20px; margin: 0 0 4px; color: #3c434a; font-weight: 600; }
.page-head .sub { font-size: 13px; color: #8c8f94; }

/* 筛选栏 */
.filter-bar { background: #fff; border: 1px solid #dcdcde; border-radius: 4px; padding: 14px 16px; margin-bottom: 18px; }
.filter-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.filter-title { font-size: 13px; color: #8c8f94; }

.filter-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.filter-row:last-child { margin-bottom: 0; }
.filter-label { flex-shrink: 0; font-size: 13px; color: #8c8f94; width: 40px; }
.filter-scroll { flex: 1; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 2px 0; }
.filter-scroll::-webkit-scrollbar { display: none; }

/* 筛选标签 */
.chip {
    flex-shrink: 0;
    display: inline-flex; align-items: center;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 13px;
    border: 1px solid #dcdcde;
    background: #fff;
    color: #50575e;
    cursor: pointer;
    transition: all .15s ease;
    user-select: none;
    white-space: nowrap;
    min-height: 36px;
}
.chip:hover { border-color: #8c8f94; color: #3c434a; }
.chip.active { background: #e5f5fa; border-color: #007cba; color: #007cba; font-weight: 500; }

.chip-toggle {
    flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: 4px;
    border: 1px solid #dcdcde;
    background: #fff;
    color: #8c8f94;
    font-size: 18px; line-height: 1;
    cursor: pointer;
    transition: all .15s ease;
}
.chip-toggle:hover { border-color: #007cba; color: #007cba; }
.chip-toggle.open { border-color: #007cba; color: #007cba; transform: rotate(45deg); }

.filter-more { display: none; padding-top: 12px; border-top: 1px dashed #dcdcde; margin-top: 12px; }
.filter-more.open { display: block; }

.active-filters { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.active-filters .tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 4px; background: #f6f7f7; font-size: 12px; color: #3c434a; border: 1px solid #dcdcde; }
.active-filters .tag .x { cursor: pointer; color: #8c8f94; font-weight: 700; padding: 0 4px; }
.active-filters .tag .x:hover { color: #d63638; }

/* 排序栏 */
.sort-bar { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.sort-tabs { display: inline-flex; background: #f0f0f1; padding: 3px; border-radius: 6px; gap: 2px; border: 1px solid #e5e5e5; }
.sort-tab { padding: 6px 16px; font-size: 13px; color: #50575e; border-radius: 4px; transition: all 0.2s ease; cursor: pointer; white-space: nowrap; }
.sort-tab:hover { color: #007cba; }
.sort-tab.active { background: #fff; color: #007cba; font-weight: 500; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.sort-bar .sort-note { font-size: 12px; color: #8c8f94; display: block; margin-top: 6px; width: 100%; }
.sort-bar .total-count { font-size: 13px; color: #8c8f94; margin-top: 6px; }

/* 房源列表 */
.listing-grid { display: flex; flex-direction: column; gap: 14px; }

.listing-card {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    overflow: hidden;
    transition: border-color .15s ease;
    position: relative;
    display: block;
}
.listing-card:hover { border-color: #8c8f94; }
.listing-card .cover { height: 200px; background: #f0f0f1; display: flex; align-items: center; justify-content: center; color: #8c8f94; font-size: 13px; }
.listing-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.listing-card .body { padding: 14px 16px 16px; }
.listing-card .title-row { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.listing-card .rent { font-size: 22px; font-weight: 600; color: #007cba; }
.listing-card .rent-unit { font-size: 13px; color: #8c8f94; font-weight: 400; }
.listing-card .total-rent { font-size: 13px; color: #50575e; margin-bottom: 8px; }
.listing-card .meta { font-size: 13px; color: #8c8f94; display: flex; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 10px; }
.listing-card .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.listing-card .tags span { padding: 2px 8px; border-radius: 4px; font-size: 12px; background: #f6f7f7; color: #50575e; border: 1px solid #dcdcde; }
.listing-card .tags .tag-verified { background: #e5f5fa; color: #007cba; border-color: #b3e0f2; }
.listing-card .tags .tag-unverified { background: #fff8e8; color: #8a6d20; border-color: #f0d8a0; }
.listing-card .fav-btn {
    position: absolute; top: 12px; right: 12px;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,.9);
    border: 1px solid #dcdcde; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #8c8f94;
    transition: all .15s ease;
}
.listing-card .fav-btn:hover { color: #d63638; border-color: #d63638; }
.listing-card .fav-btn.active { color: #d63638; border-color: #d63638; }

/* 空状态 */
.empty-state { padding: 50px 20px; text-align: center; color: #8c8f94; font-size: 14px; background: #fff; border: 1px dashed #dcdcde; border-radius: 4px; }

/* 通用卡片 */
.card { background: #fff; border: 1px solid #dcdcde; border-radius: 4px; padding: 18px; margin-bottom: 16px; }
.card h3 { margin: 0 0 14px; font-size: 15px; color: #3c434a; font-weight: 600; }

/* 成本卡片 */
.cost-card { background: #fff; border: 1px solid #dcdcde; border-radius: 4px; padding: 18px; margin-bottom: 16px; }
.cost-card h3 { margin: 0 0 14px; font-size: 15px; color: #3c434a; font-weight: 600; }
.cost-row { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f1; }
.cost-row:last-child { border-bottom: none; }
.cost-row .label { color: #50575e; }
.cost-row .value { color: #3c434a; font-weight: 500; white-space: nowrap; margin-left: 10px; }
.cost-row.total { margin-top: 6px; padding-top: 12px; border-top: 1px solid #dcdcde; font-size: 14px; }
.cost-row.total .value { color: #007cba; font-size: 20px; font-weight: 600; }
.cost-row .sub-note { font-size: 12px; color: #8c8f94; }

/* 费用明细特殊状态 */
.cost-row .value-warn {
    color: #dba617;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.cost-row .value-warn::before {
    content: "!";
    display: inline-block;
    width: 14px;
    height: 14px;
    line-height: 14px;
    text-align: center;
    background: #f0d8a0;
    color: #8a6d20;
    border-radius: 50%;
    font-size: 10px;
    font-weight: bold;
}
.cost-row .value-none { color: #8c8f94; }
.cost-row .value-free { color: #007cba; }

/* 详情页 */
.detail-title { font-size: 20px; font-weight: 600; color: #3c434a; margin: 0 0 6px; line-height: 1.4; }
.detail-sub { font-size: 13px; color: #8c8f94; margin-bottom: 16px; }

.gallery { background: #fff; border: 1px solid #dcdcde; border-radius: 4px; padding: 10px; margin-bottom: 16px; }
.gallery .main-img { height: 240px; background: #f0f0f1; border-radius: 2px; display: flex; align-items: center; justify-content: center; color: #8c8f94; font-size: 14px; overflow: hidden; }
.gallery .main-img img { width: 100%; height: 100%; object-fit: cover; }
.gallery .thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.gallery .thumbs::-webkit-scrollbar { display: none; }
.gallery .thumbs .thumb { width: 68px; height: 52px; border-radius: 2px; background: #f0f0f1; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #8c8f94; cursor: pointer; border: 2px solid transparent; overflow: hidden; }
.gallery .thumbs .thumb.active { border-color: #007cba; }
.gallery .thumbs .thumb img { width: 100%; height: 100%; object-fit: cover; }

/* 详情页联系方式卡片 */
.contact-card { background: #fff; border: 1px solid #dcdcde; border-radius: 4px; padding: 18px; margin-bottom: 16px; }
.contact-card h3 { margin: 0 0 12px; font-size: 15px; color: #3c434a; font-weight: 600; }
.contact-card .price-line { display: flex; align-items: baseline; gap: 6px; margin-bottom: 6px; }
.contact-card .price-big { font-size: 24px; font-weight: 600; color: #007cba; }
.contact-card .price-unit { font-size: 13px; color: #8c8f94; }
.contact-card .total-hint { font-size: 13px; color: #50575e; margin-bottom: 14px; }
.contact-card .contact-value { font-size: 16px; color: #007cba; font-weight: 600; padding: 12px 14px; background: #e5f5fa; border: 1px solid #b3e0f2; border-radius: 4px; margin: 8px 0; word-break: break-all; text-align: center; }
.contact-card .contact-tip { font-size: 13px; color: #50575e; margin: 8px 0; }
.contact-card .contact-warn { font-size: 12px; color: #8c8f94; margin-top: 8px; text-align: center; }

/* 信息网格 */
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 18px; }
.info-item { font-size: 14px; }
.info-item .k { color: #8c8f94; font-size: 12px; display: block; margin-bottom: 2px; }
.info-item .v { color: #3c434a; }

.compare-high { color: #d63638; font-weight: 500; }
.compare-low { color: #007cba; font-weight: 500; }
.compare-normal { color: #50575e; }

.leased-badge { display: inline-block; padding: 4px 10px; border-radius: 4px; background: #f0f0f1; color: #50575e; font-size: 12px; margin-bottom: 8px; border: 1px solid #dcdcde; }

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; border-radius: 4px; background: #007cba; color: #fff; font-size: 14px; border: 1px solid #007cba; cursor: pointer; transition: all .15s ease; min-height: 40px; }
.btn:hover { background: #005a87; border-color: #005a87; }
.btn-ghost { background: #fff; color: #007cba; border: 1px solid #007cba; }
.btn-ghost:hover { background: #e5f5fa; }
.btn-block { display: flex; width: 100%; }

/* 查看房东其它房源按钮 */
.btn-other-listings {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: #e5f5fa;
    border: 1px solid #b3e0f2;
    border-radius: 4px;
    color: #007cba;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}
.btn-other-listings:hover {
    background-color: #d0ebf7;
    border-color: #8ecdec;
    color: #005a87;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.btn-other-listings svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* 详情页返回导航优化 */
.back-nav { margin-bottom: 16px; display: flex; align-items: center; }
.back-link { display: inline-flex; align-items: center; padding: 6px 14px; background: #fff; border: 1px solid #dcdcde; border-radius: 4px; font-size: 13px; color: #50575e; transition: all 0.2s ease; gap: 6px; }
.back-link:hover { background: #f6f7f7; border-color: #8c8f94; color: #3c434a; }
.back-link svg { width: 16px; height: 16px; fill: currentColor; }

/* 发布页的单选行 */
.radio-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; font-size: 14px; }
.radio-row label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: #3c434a; }
.radio-row input[type="number"] { width: 80px; padding: 6px 10px; border: 1px solid #dcdcde; border-radius: 4px; }

/* 页脚 */
.site-footer { padding: 32px 16px 24px; text-align: center; font-size: 12px; color: #8c8f94; margin-top: 28px; }

/* ========== 平板 ========== */
@media (min-width: 640px) {
    .container { padding: 0 20px; }
    .listing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .listing-card .cover { height: 180px; }
    .gallery .main-img { height: 340px; }
    .page-head h1 { font-size: 22px; }
}

/* ========== PC ========== */
@media (min-width: 960px) {
    .listing-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
    .detail-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
    .detail-side { position: sticky; top: 20px; }
}