* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif; 
    background: #f5f7fa; 
    color: #333;
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* 头部 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 30px 0;
    margin-bottom: 20px;
}
.header h1 { font-size: 28px; font-weight: 600; }
.subtitle { opacity: 0.9; margin-top: 5px; }
.back-link { color: #fff; font-size: 16px; }

/* 筛选栏 */
.filter-bar {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.filter-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.filter-form input, .filter-form select {
    padding: 8px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
}
.filter-form button {
    padding: 8px 20px;
    background: #409eff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.reset-btn {
    padding: 8px 16px;
    color: #909399;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
}
.result-count { color: #606266; font-size: 14px; }
.result-count strong { color: #409eff; font-size: 16px; }

/* 房源卡片列表 */
.house-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.house-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s;
    display: block;
}
.house-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.house-img {
    position: relative;
    height: 200px;
    overflow: hidden;
}
.house-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.floor-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
}
.house-info { padding: 15px; }
.house-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #303133;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.house-meta {
    display: flex;
    gap: 12px;
    color: #909399;
    font-size: 13px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.house-desc {
    color: #606266;
    font-size: 13px;
    margin-bottom: 12px;
    height: 40px;
    overflow: hidden;
}
.house-price {
    display: flex;
    align-items: baseline;
    gap: 5px;
}
.price-num {
    font-size: 24px;
    font-weight: 700;
    color: #f56c6c;
}
.price-unit {
    color: #909399;
    font-size: 13px;
}
.year-price {
    margin-left: auto;
    color: #909399;
    font-size: 12px;
}

/* 分页 */
.pagination {
    text-align: center;
    margin: 30px 0;
}
.pagination a {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 4px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    color: #606266;
    background: #fff;
}
.pagination a.active {
    background: #409eff;
    color: #fff;
    border-color: #409eff;
}

/* 详情页 */
.detail-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    margin-bottom: 40px;
}
.image-gallery {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.main-image {
    width: 100%;
    height: 450px;
    margin-bottom: 15px;
    border-radius: 6px;
    overflow: hidden;
}
.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.thumb-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}
.thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
}
.thumb.active { border-color: #409eff; }
.no-image {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #909399;
    background: #f5f7fa;
    border-radius: 6px;
}

.detail-section {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ebeef5;
    color: #303133;
}
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}
.info-item label {
    display: block;
    color: #909399;
    font-size: 13px;
    margin-bottom: 4px;
}
.info-item span {
    color: #303133;
    font-size: 15px;
    font-weight: 500;
}
.price-section .price-box {
    display: flex;
    gap: 40px;
}
.price-item { text-align: center; }
.price-label {
    display: block;
    color: #909399;
    margin-bottom: 8px;
}
.price-value {
    font-size: 28px;
    font-weight: 700;
    color: #f56c6c;
}
.description {
    color: #606266;
    line-height: 1.8;
    white-space: pre-wrap;
}

/* 侧边栏 */
.contact-card, .tip-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.contact-card h3 {
    font-size: 18px;
    margin-bottom: 15px;
    text-align: center;
}
.contact-tip {
    text-align: center;
    color: #606266;
    margin-bottom: 5px;
    font-size: 14px;
}
.contact-btn { margin: 20px 0; }
.btn-primary {
    display: block;
    width: 100%;
    padding: 12px;
    background: #f56c6c;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
}
.contact-note {
    text-align: center;
    color: #909399;
    font-size: 12px;
}
.tip-card p {
    padding: 6px 0;
    color: #606266;
    font-size: 14px;
}

/* 底部 */
.footer {
    background: #303133;
    color: #909399;
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    margin-top: 40px;
}
.empty-tip {
    text-align: center;
    padding: 60px 0;
    color: #909399;
    grid-column: 1 / -1;
}

/* 响应式 */
@media (max-width: 768px) {
    .detail-container { grid-template-columns: 1fr; }
    .info-grid { grid-template-columns: repeat(2, 1fr); }
    .main-image { height: 250px; }
    .house-list { grid-template-columns: 1fr; }
}