* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f5f5f5;
    color: #333;
    padding-top: 60px;
}

/* 顶部导航栏 */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1001;
}

.hamburger-btn {
    width: auto;
    height: auto;
    background: #ff4d4f;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 8px 15px;
    color: white;
    font-size: 14px;
    transition: background 0.3s;
}

.hamburger-btn:hover {
    background: #979797;
}

.hamburger-btn i {
    font-size: 14px;
}

.hamburger-btn span {
    display: none;
}

.nav-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.3s;
}

.nav-logo-link:hover {
    opacity: 0.8;
}

.nav-logo {
    height: 40px;
    max-width: 150px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 20px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #1890ff;
}

/*  
.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.login-btn {
    background: #ff4d4f;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.login-btn:hover {
    background: #e63939;
}

/* 美化语言切换下拉菜单样式（图2 风格） */
/* .lang-dropdown {
    position: relative;
    min-width: 140px;
} */

/* 按钮（文本风格，不像 button） */
/* .lang-btn {
    background: transparent;
    border: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    color: #333;
    padding: 0;
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    line-height: 1;
}

.lang-btn:hover {
    color: #d60000;
} */

/* remove default focus outline but keep an accessible focus-visible style */
/* .lang-btn:focus {
    outline: none;
}
.lang-btn:focus-visible {
    outline: 2px solid rgba(214,0,0,0.12);
    outline-offset: 2px;
    border-radius: 4px;
}

.lang-btn i { color: #666; font-size: 12px; } */

/* 下拉菜单（白底，带小指示三角） */
/* .lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    min-width: 180px;
    display: none;
    overflow: hidden;
    z-index: 1000;
} */

/* 指示三角 */
/* .lang-menu::before {
    content: "";
    position: absolute;
    top: -7px; */
    /* 根据按钮位置微调 */
    /* right: 22px; 
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: -2px -2px 4px rgba(0,0,0,0.04);
} */

/* 显示状态 */
.lang-menu.show {
    display: block;
}

/* 每一项 */
/* .lang-item {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    transition: background .15s, color .15s;
    border-bottom: 1px solid #f2f2f2;
}
.lang-item:last-child { border-bottom: none; } */

/* hover */
/* .lang-item:hover {
    background: #f7f7f7;
} */

/* 当前语言：红色文字（而非红底） */
/* .lang-item.active {
    color: #d60000;
    font-weight: 600;
    background: transparent;
} */


/* 导航菜单 */
.nav-menu {
    position: fixed;
    right: -100%;
    top: 0;
    width: 80%;
    max-width: 375px;
    height: 100vh;
    background: white;
    z-index: 1003;
    overflow-y: auto;
    transition: right 0.3s ease;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
}

.nav-menu.active {
    right: 0;
}

.nav-menu-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    gap: 10px;
}

.reset-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #ff4d4f;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.reset-btn:hover {
    background: #ff7875;
}

.reset-btn i {
    font-size: 16px;
}

.filter-apply-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #1890ff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.filter-apply-btn:hover {
    background: #40a9ff;
}

.filter-apply-btn i {
    font-size: 16px;
}

.nav-menu-logo img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.nav-close-btn {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-close-btn:hover {
    color: #333;
}

.nav-menu-content {
    padding: 0;
}

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1002;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.container {
    display: flex;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    gap: 20px;
    position: relative;
}

.filter-section {
    border-bottom: 1px solid #e8e8e8;
    padding: 15px 20px;
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.filter-header:hover {
    color: #1890ff;
}

.filter-header i {
    font-size: 12px;
    color: #999;
}

.filter-content {
    margin-top: 15px;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-item input {
    margin-right: 8px;
    cursor: pointer;
}

.checkbox-item:hover {
    color: #1890ff;
}

/* 主内容 */
.main-content {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.header-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.breadcrumb-with-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.breadcrumb {
    font-size: 14px;
    color: #666;
    margin: 0;
}


.breadcrumb .active {
    color: #ff4d4f;
}

.search-bar {
    display: flex;
    gap: 10px;
}

.search-bar input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
}

.search-bar input:focus {
    outline: none;
    border-color: #1890ff;
}

.search-btn {
    padding: 10px 20px;
    background: #1890ff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.search-btn:hover {
    background: #40a9ff;
}

/* 房产网格 */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.property-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.property-image {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.property-card:hover .property-image img {
    transform: scale(1.05);
}

.new-badge {
    position: absolute;
    top: 0;
    left: 0;
    background: #1890ff;
    color: white;
    padding: 8px 20px;
    font-size: 12px;
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0% 100%);
}

.favorite-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.favorite-btn:hover {
    background: white;
    transform: scale(1.1);
}

.favorite-btn i {
    color: #999;
    font-size: 18px;
}

.favorite-btn.active i {
    color: #ff4d4f;
}

.property-info {
    padding: 20px;
}

.property-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 12px;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.property-price {
    font-size: 20px;
    font-weight: bold;
    color: #ff4d4f;
}

.top-nav {
    display: flex;
    align-items: center;
    padding: 0 24px;
    height: 64px;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-size: 15px;
    padding: 8px 0;
    position: relative;
}

.nav-links a.active {
    color: #d60000;
    font-weight: 600;
}

.nav-links a.active::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #d60000;
}

/* 响应式设计 */
/* 电脑版本 */
@media (min-width: 1201px) {
    .property-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

/* 平板版本 */
@media (min-width: 769px) and (max-width: 1200px) {
    .property-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 手机版本（iPhone等）*/
@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }

    .top-nav {
        display: flex;
        align-items: center;
        gap: 4px;
        padding: 0 10px;
    }

    .nav-logo {
        height: 30px;
        max-width: 100px;
        object-fit: contain;
        flex-shrink: 0;
    }

    .nav-links {
        display: flex;
        flex: 1;
        min-width: 0;
        gap: 10px;
        margin: 0 10px;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        list-style: none;
        padding: 0;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-links li {
        flex-shrink: 0;
        list-style: none;
    }

    .nav-links a {
        font-size: 12px;
        padding: 6px 8px;
        color: #333;
        text-decoration: none;
        transition: color 0.3s;
    }

    .nav-links a:hover,
    .nav-links a.active {
        color: #ff4d4f;
    }

    .container {
        padding: 10px;
    }

    .header-section {
        padding: 12px;
        margin-bottom: 12px;
    }

    .breadcrumb-with-filter {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .breadcrumb {
        font-size: 12px;
        margin: 0;
    }

    .property-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .property-card {
        border-radius: 6px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    }

    .property-image {
        height: 180px;
    }

    .property-info {
        padding: 12px;
    }

    .property-title {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .property-price {
        font-size: 16px;
    }

    .new-badge {
        font-size: 10px;
        padding: 6px 12px;
    }

    .favorite-btn {
        width: 32px;
        height: 32px;
        top: 10px;
        right: 10px;
    }

    .favorite-btn i {
        font-size: 16px;
    }

    .nav-actions {
        display: none;
    }

    .top-nav {
        height: 50px;
        padding: 0 12px;
    }

    .nav-logo {
        height: 30px;
        max-width: 100px;
        object-fit: contain;
        flex-shrink: 0;
    }

    .hamburger-btn {
        width: auto;
        height: auto;
        padding: 6px 12px;
        font-size: 13px;
        gap: 4px;
    }

    .hamburger-btn i {
        font-size: 12px;
    }
}
