/* 首页样式 */

/* 顶部Banner */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
}

.banner {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* 搜索栏 */
.search-bar {
    position: absolute;
    top: 65%;
    left: 15px;
    right: 15px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    z-index: 10;
}

.search-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 25px;
    padding-right: 5px;
    padding-left: 15px;
}

.search-input {
    flex: 0 1 auto;
    width: 150px;
    padding: 10px 20px 10px 25px;
    border: none !important;
    background: transparent;
    font-size: 14px;
    border-radius: 0;
}

.search-input:focus {
    outline: none;
    border: none !important;
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    padding: 8px 20px;
    background: #e04a32;
    color: #fff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    margin-left: 25px;
}

.search-btn:hover {
    background: #c93d28;
}

.call-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: transparent;
    border-radius: 50%;
    flex-shrink: 0;
}

.call-btn img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.download-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: transparent;
    border-radius: 50%;
    flex-shrink: 0;
}

.download-btn img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* 分类菜单 */
.category-menu {
    background: #fff;
    padding: 20px 15px;
    margin-bottom: 10px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.menu-item:hover {
    transform: translateY(-3px);
}

.menu-item img {
    width: 50px;
    height: 50px;
    margin-bottom: 8px;
}

.menu-item span {
    font-size: 13px;
    color: #333;
    text-align: center;
}

/* Tab切换 */
.tab-bar {
    display: flex;
    background: #fff;
    padding: 0 15px;
    margin-bottom: 10px;
    position: sticky;
    top: 120px;
    z-index: 99;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 15px 0;
    cursor: pointer;
    position: relative;
    font-size: 15px;
    color: #666;
    transition: color 0.3s;
}

.tab-item.active {
    color: #e04a32;
    font-weight: bold;
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: #e04a32;
    border-radius: 2px;
}

/* 项目列表 */
.project-list {
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.project-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f0f0f0;
}

.project-info {
    padding: 15px;
}

.project-title {
    font-size: 15px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.project-price {
    font-size: 18px;
    color: #e04a32;
    font-weight: bold;
    margin-bottom: 8px;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
}

.project-status {
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
}

.status-upcoming {
    background: #fff3e0;
    color: #ff9800;
}

.status-ongoing {
    background: #e8f5e9;
    color: #4caf50;
}

.status-ended {
    background: #f5f5f5;
    color: #999;
}

/* 加载更多 */
.load-more {
    text-align: center;
    padding: 20px;
    color: #666;
    cursor: pointer;
}

.load-more:hover {
    color: #e04a32;
}

/* 返回顶部 */
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 80px;
    width: 45px;
    height: 45px;
    background: #e04a32;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #c93d28;
}

/* 底部导航 */
.footer-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    display: flex;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
    z-index: 100;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
    color: #999;
    font-size: 12px;
    transition: color 0.3s;
}

.nav-item.active {
    color: #e04a32;
}

.nav-item .icon {
    font-size: 22px;
    margin-bottom: 3px;
}

.nav-item .nav-icon {
    width: 20px;
    height: 20px;
    margin-bottom: 3px;
}

/* 响应式 */
@media (max-width: 768px) {
    .menu-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 15px;
    }

    .menu-item img {
        width: 45px;
        height: 45px;
    }

    .menu-item span {
        font-size: 12px;
    }

    .project-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 10px;
    }

    .project-image {
        height: 150px;
    }

    .tab-bar {
        top: 100px;
    }
}
