/* 首页样式 */
.header { position: relative; background: #fff; }
.banner { width: 100%; overflow: hidden; position: relative; }
.banner img { width: 100%; height: min(34vw, 420px); min-height: 220px; object-fit: cover; display: block; }

.search-bar {
    position: absolute;
    left: 15px;
    right: 15px;
    bottom: 24px;
    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: 6px;
    padding-left: 15px;
    box-shadow: 0 4px 14px rgba(0,0,0,.08);
}
.search-input {
    flex: 1;
    min-width: 0;
    padding: 11px 14px;
    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 22px;
    background: #e04a32;
    color: #fff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}
.search-btn:hover { background: #c93d28; }
.download-btn {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; background: rgba(255,255,255,.12); 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: 16px; max-width: 1200px; margin: 0 auto; }
.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-bar {
    display: flex; background: #fff; padding: 0 15px; margin-bottom: 10px; position: sticky; top: 0; z-index: 40;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); max-width: 1200px; margin-left: auto; margin-right: auto; border-radius: 0 0 12px 12px;
}
.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;
    max-width: 1200px; margin: 0 auto;
}
.project-card { background: #fff; border-radius: 14px; overflow: hidden; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; box-shadow: 0 2px 10px rgba(0,0,0,0.04); }
.project-card:hover { transform: translateY(-5px); box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.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; min-height: 42px; }
.project-price { font-size: 18px; color: #e04a32; font-weight: bold; margin-bottom: 8px; }
.project-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: #999; }
.project-status { padding: 3px 8px; border-radius: 999px; font-size: 11px; }
.status-upcoming { background: #fff2e9; color: #e67e22; }
.status-ongoing { background: #ffefef; color: #e04a32; }
.status-ended { background: #f0f0f0; color: #777; }
.load-more { text-align: center; color: #999; font-size: 13px; padding: 12px 0 86px; }
.back-to-top { position: fixed; right: 22px; bottom: 82px; width: 42px; height: 42px; border-radius: 50%; background: #e04a32; color: #fff; display: none; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(0,0,0,.2); cursor: pointer; z-index: 80; }
.back-to-top.show { display: flex; }

@media (max-width: 768px) {
    .banner img { height: auto; min-height: 0; }
    .search-bar { bottom: 16px; }
    .menu-grid { grid-template-columns: repeat(5, 1fr); gap: 10px; }
    .menu-item img { width: 42px; height: 42px; }
    .menu-item span { font-size: 12px; }
    .tab-bar { top: 0; border-radius: 0; }
    .project-list { grid-template-columns: 1fr; padding: 12px; }
    .project-image { height: 220px; }
}

@media (min-width: 1024px) {
    body { min-width: 1000px; }
    .header, .category-menu, .tab-bar, .project-list, .load-more { width: min(1200px, calc(100vw - 48px)); }
    .header, .category-menu, .tab-bar, .project-list, .load-more { margin-left: auto; margin-right: auto; }
    .header { margin-top: 18px; border-radius: 18px; overflow: hidden; box-shadow: 0 6px 20px rgba(0,0,0,.06); }
    .category-menu { border-radius: 16px; box-shadow: 0 4px 16px rgba(0,0,0,.04); }
    .tab-bar { top: 10px; }
}
