/**
 * 织梦好房项目样式文件 - 美化版
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --primary-dark: #5a67d8;
    --secondary-color: #764ba2;
    --accent-color: #ff6b6b;
    --accent-light: #ff8787;
    --success-color: #51cf66;
    --warning-color: #fab005;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --text-light: #a0aec0;
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-tertiary: #edf2f7;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
    --gradient-warm: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    background: var(--bg-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.header {
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.logo {
    font-size: 26px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform var(--transition-fast);
}

.logo:hover {
    transform: scale(1.02);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    transition: color var(--transition-fast);
    position: relative;
    padding: 4px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-normal);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* 搜索区域样式 */
.search-section {
    background: var(--gradient-primary);
    padding: 100px 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.search-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.search-box {
    text-align: center;
    position: relative;
    z-index: 1;
}

.search-box h1 {
    font-size: 42px;
    margin-bottom: 12px;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-box p {
    font-size: 18px;
    margin-bottom: 40px;
    opacity: 0.95;
    font-weight: 400;
}

.search-form {
    max-width: 900px;
    margin: 0 auto;
}

.search-inputs {
    display: flex;
    gap: 12px;
    background: rgba(255, 255, 255, 0.98);
    padding: 12px;
    border-radius: 60px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.search-inputs input,
.search-inputs select {
    flex: 1;
    padding: 14px 24px;
    border: 2px solid transparent;
    border-radius: 40px;
    font-size: 15px;
    outline: none;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all var(--transition-fast);
    font-weight: 500;
}

.search-inputs input:focus,
.search-inputs select:focus {
    background: var(--bg-primary);
    border-color: var(--primary-color);
}

.search-inputs input::placeholder {
    color: var(--text-light);
}

.search-btn {
    background: var(--gradient-accent);
    color: white;
    border: none;
    padding: 14px 36px;
    border-radius: 40px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    transition: all var(--transition-fast);
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.search-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.5);
}

.search-btn:active {
    transform: translateY(0) scale(0.98);
}

/* 筛选区域样式 */
.filter-section {
    background: var(--bg-primary);
    padding: 40px 0;
    box-shadow: var(--shadow-sm);
}

.filter-form {
    max-width: 1000px;
    margin: 0 auto;
}

.filter-inputs {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-inputs input,
.filter-inputs select {
    padding: 12px 18px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all var(--transition-fast);
    font-weight: 500;
}

.filter-inputs input:focus,
.filter-inputs select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.reset-btn {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition-fast);
    border: none;
    cursor: pointer;
}

.reset-btn:hover {
    background: var(--border-color);
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* 房源区域样式 */
.properties-section {
    padding: 60px 0;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 32px;
    color: var(--text-primary);
    font-weight: 800;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.view-all:hover {
    color: var(--primary-dark);
    transform: translateX(4px);
}

.count {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
}

.properties-grid {
    column-count: 3;
    column-gap: 20px;
}

.properties-grid .property-card-link {
    break-inside: avoid;
    margin-bottom: 20px;
    display: block;
}

@media (min-width: 1200px) {
    .properties-grid {
        column-count: 4;
    }
}

.property-card-link {
    text-decoration: none;
    color: inherit;
}

.property-card {
    background: var(--bg-primary);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all var(--transition-normal);
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
}

.property-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: -1;
}

.property-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.2);
}

.property-card:hover::before {
    opacity: 0.03;
}

.property-image {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.property-card:hover .property-image img {
    transform: scale(1.1);
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 56px;
}

.property-type {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    color: white;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.property-type.sale {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.95) 0%, rgba(255, 135, 135, 0.95) 100%);
}

.property-type.rent {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
}

.property-info {
    padding: 24px;
}

.property-title {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
    line-height: 1.4;
}

.property-address {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.property-features {
    display: flex;
    gap: 24px;
    margin-bottom: 18px;
    color: var(--text-secondary);
    font-size: 14px;
}

.property-features span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.property-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 18px;
}

.property-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.property-price .price {
    font-size: 30px;
    font-weight: 800;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.property-price .unit {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-left: 4px;
}

/* 无数据样式 */
.no-data {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
    grid-column: 1 / -1;
}

.no-data p {
    font-size: 18px;
    margin-bottom: 24px;
}

/* 底部导航栏样式 - APP风格 */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
}

.bottom-nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 12px;
    transition: all var(--transition-fast);
}

.bottom-nav-item i {
    font-size: 22px;
}

.bottom-nav-item span {
    font-size: 12px;
    font-weight: 600;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
}

.bottom-nav-item.active i {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 页脚样式 */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer p {
    opacity: 0.8;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding-bottom: 100px;
    }
    
    .nav {
        padding: 12px 0;
    }

    .nav-links {
        display: none;
    }

    .bottom-nav {
        display: block;
    }

    .properties-section {
        padding-bottom: 100px;
    }

    .detail-section {
        padding-bottom: 100px !important;
    }

    .footer {
        display: none;
    }

    .search-section {
        padding: 60px 0;
    }

    .search-box h1 {
        font-size: 28px;
    }

    .search-box p {
        font-size: 15px;
        margin-bottom: 28px;
    }

    .search-inputs {
        flex-direction: column;
        border-radius: 20px;
        padding: 16px;
        gap: 10px;
    }

    .search-inputs input,
    .search-inputs select,
    .search-btn {
        width: 100%;
        border-radius: 12px;
        padding: 14px 20px;
    }

    .properties-grid {
        column-count: 2;
        column-gap: 12px;
    }
    
    .properties-grid .property-card-link {
        margin-bottom: 12px;
    }
    
    .property-card .property-image {
        height: auto;
        min-height: 200px;
        aspect-ratio: 4/3;
    }
    
    .property-card .property-image img {
        height: 100%;
    }
    
    .property-card .property-info {
        padding: 18px;
    }
    
    .property-card .property-title {
        font-size: 17px;
        margin-bottom: 10px;
    }
    
    .property-card .property-address {
        font-size: 13px;
        margin-bottom: 14px;
    }
    
    .property-card .property-features {
        flex-wrap: wrap;
        gap: 14px;
        margin-bottom: 14px;
    }
    
    .property-card .property-features span {
        font-size: 13px;
    }
    
    .property-card .property-price .price {
        font-size: 24px;
    }
    
    .property-card .property-price .unit {
        font-size: 13px;
    }

    .filter-section {
        padding: 24px 0;
    }

    .filter-inputs {
        flex-direction: column;
        gap: 10px;
    }

    .filter-inputs input,
    .filter-inputs select,
    .search-btn,
    .reset-btn {
        width: 100%;
    }

    .detail-section {
        padding: 30px 0;
        padding-bottom: 100px;
    }

    .detail-info {
        padding: 24px !important;
    }

    .detail-title {
        font-size: 24px !important;
    }

    .detail-price {
        font-size: 32px !important;
    }

    .detail-meta {
        gap: 20px !important;
        flex-wrap: wrap;
    }

    .detail-meta-item .value {
        font-size: 22px !important;
    }

    .detail-image {
        min-height: 280px !important;
        min-width: 100% !important;
    }

    .properties-section {
        padding: 40px 0;
    }

    .section-title {
        flex-direction: column;
        gap: 16px;
        text-align: center;
        align-items: flex-start;
    }

    .section-title h2 {
        font-size: 26px;
    }

    .logo {
        font-size: 22px !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .properties-grid {
        column-count: 2;
        column-gap: 10px;
    }
    
    .properties-grid .property-card-link {
        margin-bottom: 10px;
    }

    .search-box h1 {
        font-size: 24px;
    }

    .search-box p {
        font-size: 14px;
    }

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

    .property-price .price {
        font-size: 20px;
    }

    .property-info {
        padding: 16px;
    }

    .section-title h2 {
        font-size: 24px;
    }
}
