/* 基础样式 */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: #333;
}

header {
    background-color: #2b2828; /* 淡灰色背景 */
    color: white;
    padding: 1rem;
    text-align: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-container {
    display: flex;
    align-items: center;
    margin-right: auto; /* 确保logo容器靠左对齐 */
}

.nav-links {
    display: flex;
    justify-content: flex-end;
    flex: 1;
}

.search-container {
    margin: 1rem auto;
    max-width: 600px;
    display: flex;
}

.search-container input {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 4px 0 0 4px;
}

.search-container button {
    padding: 0.5rem 1rem;
    background-color: #ff6b6b;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    margin-bottom: 1rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group select {
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.view-toggle {
    text-align: center;
    margin: 1rem 0;
}

.view-toggle button {
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    border: none;
    border-radius: 4px;
    background-color: #ddd;
    cursor: pointer;
}

.view-toggle button.active {
    background-color: #4a90e2;
    color: white;
}

/* 排序选项样式 */
.sort-options {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.5rem 0 1rem;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    flex-wrap: wrap;
}

.sort-options span {
    margin-right: 10px;
    font-weight: bold;
}

.sort-btn {
    padding: 5px 10px;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sort-btn:hover {
    background-color: #e9ecef;
}

.sort-btn.active {
    background-color: #4a90e2;
    color: white;
    border-color: #4a90e2;
}

.sort-btn.active[data-order="desc"]::after {
    content: " ↓";
}

.sort-btn.active[data-order="asc"]::after {
    content: " ↑";
}

/* 卡片视图样式 */
.properties-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.property-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.property-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.property-info {
    padding: 1rem;
}

.property-info h3 {
    margin-top: 0;
}

.property-price {
    color: #ff6b6b;
    font-weight: bold;
    font-size: 1.2rem;
}

/* 经纪人信息样式 */
.agent-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #eee;
}

.agent-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.agent-avatar {
    transition: transform 0.3s ease;
}

.agent-avatar:hover {
    transform: scale(1.1);
}

/* 表格视图样式 */
.properties-table {
    width: 100%;
    padding: 1rem;
    overflow-x: auto;
}

.properties-table table {
    width: 100%;
    border-collapse: collapse;
}

.properties-table th, .properties-table td {
    padding: 0.75rem;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.properties-table th {
    background-color: #f8f9fa;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .properties-container {
        grid-template-columns: 1fr;
    }
    
    .filters {
        flex-direction: column;
        align-items: center;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        align-items: flex-start;
    }
    
    .logo-container {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 10px;
        flex-wrap: nowrap;
        white-space: nowrap;
        overflow-x: auto;
        width: 100%;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    .logo-container::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .site-name {
        display: inline-block !important;
    }
    
    .logo-container .cloud-tour {
        display: inline-flex;
        align-items: center;
    }
    
    .nav-links {
        margin-top: 10px;
        justify-content: space-between;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        white-space: nowrap;
        width: 100%;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    .nav-links::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .nav-links a {
        margin: 5px 8px;
        display: inline-flex;
        align-items: center;
    }
    
    .cloud-tour {
        display: inline-flex !important;
        align-items: center;
    }
    
    /* 移动设备上的排序选项样式 */
    .sort-options {
        flex-wrap: wrap;
        padding: 5px;
    }
    
    .sort-options span {
        width: 100%;
        text-align: center;
        margin-bottom: 5px;
    }
    
    .sort-btn {
        margin: 3px;
        padding: 4px 8px;
        font-size: 0.9rem;
    }
}

/* 平板电脑屏幕 */
@media (min-width: 768px) and (max-width: 1024px) {
    .site-name {
        display: inline-block !important;
    }
    
    .nav-links a {
        margin: 0 15px;
    }
}

@media (min-width: 1025px) {
    .site-name {
        display: inline-block !important;/* 平板电脑屏幕//logo全景找房 */
    }
}

@media (min-width: 1200px) {
    .properties-container {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .nav-links a {
        margin: 0 20px;
    }
    
    .header-content {
        padding: 0 2rem;
    }
}

@media (min-width: 1600px) {
    .properties-container {
        grid-template-columns: repeat(8, 1fr);
    }
}