/* 主体内容样式 */
.house-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 90px 20px 20px;
}

/* 搜索筛选区域样式 */
.house-filter {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-box input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
}

.search-btn {
    padding: 0 30px;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-btn:hover {
    background: #4f46e5;
}

/* 标签页样式 */
.filter-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 15px;
}

.tab-btn {
    padding: 8px 20px;
    border: none;
    background: none;
    color: #666;
    cursor: pointer;
    position: relative;
    font-size: 15px;
}

.tab-btn.active {
    color: #6366f1;
    font-weight: 500;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #6366f1;
}

/* 筛选选项样式 */
.filter-options {
    display: flex;
    gap: 15px;
}

.filter-options select {
    padding: 8px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    min-width: 120px;
    cursor: pointer;
}

/* 房源列表样式 */
.house-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 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.1);
    transition: transform 0.3s ease;
}

.house-card:hover {
    transform: translateY(-5px);
}

.house-image {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2 宽高比 */
    overflow: hidden;
}

.house-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.house-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(99, 102, 241, 0.9);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.house-info {
    padding: 15px;
}

.house-title {
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.house-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.house-tags span {
    background: #f5f5f5;
    color: #666;
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 12px;
}

.house-detail {
    display: flex;
    gap: 15px;
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.house-location {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #999;
    font-size: 12px;
    margin-bottom: 10px;
}

.location-icon {
    width: 12px;
    height: 12px;
    background: #999;
    border-radius: 50%;
}

.house-price {
    color: #f5222d;
    font-size: 20px;
    font-weight: 500;
}

.house-price .unit {
    font-size: 14px;
    font-weight: normal;
    margin-left: 4px;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
}

.page-item, .page-next {
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
}

.page-item:hover, .page-next:hover {
    border-color: #6366f1;
    color: #6366f1;
}

.page-item.active {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .house-main {
        padding: 70px 15px 15px;
    }

    .filter-tabs {
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .filter-options {
        flex-wrap: wrap;
    }

    .filter-options select {
        flex: 1;
        min-width: calc(50% - 8px);
    }

    .house-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .search-box {
        flex-direction: column;
    }

    .search-btn {
        width: 100%;
        padding: 12px;
    }

    .filter-options select {
        min-width: 100%;
    }

    .house-title {
        font-size: 15px;
    }

    .house-tags span {
        padding: 1px 6px;
        font-size: 11px;
    }

    .house-detail {
        font-size: 13px;
    }
}
/* 底部按钮样式 */
.house-actions {
    display: flex;
    justify-content: space-around;
    padding: 12px;
    border-top: 1px solid #eee;
    margin-top: 10px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    background: #f5f5f5;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #e0e0e0;
}

.action-btn span {
    margin-right: 6px;
}

/* 二维码弹窗样式 */
.qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.qr-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    width: 300px;
    max-width: 90%;
}

.qr-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.qr-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-btn {
    border: none;
    background: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.qr-content {
    text-align: center;
}

.qr-image {
    width: 200px;
    height: 200px;
    margin-bottom: 10px;
}

.qr-content p {
    margin: 0;
    color: #666;
}

/* 图标样式 */
.icon-download, .icon-qrcode {
    width: 16px;
    height: 16px;
    margin-left: 4px;
}
/* 添加一些新的样式 */
.qr-tip {
    color: #999;
    font-size: 14px;
    margin-top: 8px;
}

/* 为新房和二手房添加不同的按钮颜色 */
.house-card[data-type="new"] .action-btn {
    background: #f5f0ff;
    color: #722ed1;
}

.house-card[data-type="new"] .action-btn:hover {
    background: #efdbff;
}

.house-card[data-type="second"] .action-btn {
    background: #f0f5ff;
    color: #1890ff;
}

.house-card[data-type="second"] .action-btn:hover {
    background: #dbedff;
}

/* 优化按钮样式 */
.action-btn {
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.action-btn:active {
    transform: translateY(1px);
}

/* 优化弹窗样式 */
.qr-modal {
    backdrop-filter: blur(4px);
}

.qr-container {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 联系方式弹窗样式 */
.qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.qr-card {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    max-width: 340px;
    width: 90%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: modalFadeIn 0.3s ease;
}

.contact-info-box {
    background: #f3f4f6;
    padding: 16px;
    border-radius: 8px;
    margin: 16px 0;
    text-align: left;
}

.contact-name {
    color: #374151;
    font-size: 15px;
    margin: 0 0 8px;
}

.contact-phone {
    color: #111827;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px;
}

.contact-tip {
    color: #6366f1;
    font-size: 13px;
    margin: 0;
}

.qr-card h3 {
    color: #1f2937;
    font-size: 18px;
    margin: 0 0 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.qr-image {
    margin: 20px auto;
    width: 180px;
    height: 180px;
}

.qr-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-card p {
    color: #6b7280;
    margin: 12px 0;
    line-height: 1.5;
}

.qr-card .close-btn {
    margin-top: 20px;
    padding: 8px 32px;
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 15px;
}

.qr-card .close-btn:hover {
    background: #4f46e5;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
