/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, Simsun, sans-serif;
    background: #f5f5f5;
}

/* 状态栏 */
.status-bar {
    height: 44px;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

/* 导航栏 */
.nav-bar {
    height: 44px;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.logo {
    height: 24px;
}

/* 搜索栏 */
.search-bar {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    background: #fff;
}

.search-input {
    flex: 1;
    height: 36px;
    margin-left: 8px;
    padding: 0 12px;
    background: #f5f5f5;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.search-btn {
    padding: 0 16px;
    height: 36px;
    background: #00B578;
    color: #fff;
    border: none;
    border-radius: 4px;
}

/* 主导航 */
.main-nav {
    height: 44px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    background: #fff;
}

.main-nav a {
    padding: 0 16px;
    color: #333;
    text-decoration: none;
}

.main-nav a.active {
    color: #00B578;
    border-bottom: 2px solid #00B578;
}

/* 功能网格 */
.feature-grid {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    background: #fff;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature-item img {
    width: 44px;
    height: 44px;
    margin-bottom: 8px;
}

/* 功能网格图标样式 */
.feature-item i {
    font-size: 24px;
    width: 44px;
    height: 44px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

/* 二手车 */
.feature-item:nth-child(1) i {
    color: #00B578;
    background: rgba(0, 181, 120, 0.1);
}

/* 卖车 */
.feature-item:nth-child(2) i {
    color: #2B5AED;
    background: rgba(43, 90, 237, 0.1);
}

/* 低息分期 */
.feature-item:nth-child(3) i {
    color: #FF6B23;
    background: rgba(255, 107, 35, 0.1);
}

/* 帮您选车 */
.feature-item:nth-child(4) i {
    color: #8A2BE2;
    background: rgba(138, 43, 226, 0.1);
}

/* 以旧换新 */
.feature-item:nth-child(5) i {
    color: #00CED1;
    background: rgba(0, 206, 209, 0.1);
}

/* 新能源 */
.feature-item:nth-child(6) i {
    color: #FFB700;
    background: rgba(255, 183, 0, 0.1);
}

/* 排行榜 */
.feature-item:nth-child(7) i {
    color: #FF4D4F;
    background: rgba(255, 77, 79, 0.1);
}

/* 本地服务 */
.feature-item:nth-child(8) i {
    color: #13C2C2;
    background: rgba(19, 194, 194, 0.1);
}

/* 高分好车 */
.feature-item:nth-child(9) i {
    color: #FAAD14;
    background: rgba(250, 173, 20, 0.1);
}

/* 特价新车 */
.feature-item:nth-child(10) i {
    color: #EB2F96;
    background: rgba(235, 47, 150, 0.1);
}

/* 添加hover效果 */
.feature-item:hover i {
    transform: scale(1.1);
}

.feature-item span {
    font-size: 12px;
    color: #333;
}

/* 底部Tab栏 */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    display: flex;
    background: #fff;
    border-top: 1px solid #eee;
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    text-decoration: none;
}

.tab-item i {
    font-size: 22px;
    margin-bottom: 3px;
}

.tab-item span {
    font-size: 10px;
}

.tab-item.active {
    color: #00B578;
}

.tab-item.active i {
    color: #00B578;
}

/* 试驾banner */
.try-banner {
    margin: 12px 16px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
}

.try-banner img {
    width: 24px;
    height: 24px;
    margin-right: 8px;
}

.try-banner span {
    flex: 1;
    font-size: 14px;
    color: #333;
}

/* 限时秒杀 */
.flash-sale {
    margin: 12px 0;
    background: #fff;
    padding: 16px;
}

.flash-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.flash-header .title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.flash-header .countdown {
    margin-left: 8px;
    color: #FF4D4F;
    font-size: 14px;
}

.car-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.car-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.car-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.car-info {
    padding: 8px;
}

.car-name {
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.car-price {
    display: flex;
    align-items: center;
}

.car-price .price {
    font-size: 16px;
    font-weight: 500;
    color: #FF4D4F;
}

.car-price .discount {
    margin-left: 8px;
    font-size: 12px;
    color: #FF4D4F;
    background: rgba(255,77,79,0.1);
    padding: 2px 4px;
    border-radius: 2px;
}

/* 底部Tab图标 */
.tab-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

.tab-item span {
    font-size: 12px;
}

/* 状态栏图标 */
.status-icons i {
    margin-left: 4px;
    font-size: 14px;
    color: #000;
}

/* 搜索区域优化 */
.city-select {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #333;
}

.city-select i {
    margin-left: 4px;
    font-size: 12px;
    color: #999;
}

.search-input i {
    margin-right: 8px;
    font-size: 16px;
    color: #999;
}

.search-input input {
    flex: 1;
    border: none;
    background: none;
    font-size: 14px;
    color: #333;
}

.search-input input::placeholder {
    color: #999;
}

/* 限时秒杀样式优化 */
.countdown .time-num {
    display: inline-block;
    padding: 2px 4px;
    background: #FF4D4F;
    color: #fff;
    border-radius: 2px;
    font-weight: 500;
}

/* 商品列表样式 */
.car-list {
    margin-top: 12px;
    padding: 0 16px;
}

.car-card {
    margin-bottom: 12px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.car-img {
    position: relative;
    height: 200px;
}

.car-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.car-img .tag {
    position: absolute;
    left: 8px;
    top: 8px;
    padding: 2px 6px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 12px;
    border-radius: 2px;
}

.car-content {
    padding: 12px;
}

.car-title {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
}

.car-desc {
    font-size: 14px;
    color: #999;
    margin-bottom: 8px;
}

.car-price-wrap {
    display: flex;
    align-items: baseline;
    margin-bottom: 8px;
}

.car-price-wrap .price {
    font-size: 20px;
    font-weight: 500;
    color: #FF4D4F;
}

.car-price-wrap .original {
    margin-left: 8px;
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
}

.car-tags {
    display: flex;
    gap: 8px;
}

.car-tags .tag {
    padding: 2px 6px;
    background: rgba(255,77,79,0.1);
    color: #FF4D4F;
    font-size: 12px;
    border-radius: 2px;
}

/* 导航栏图标 */
.nav-bar .back i {
    font-size: 14px;
    margin-right: 4px;
}

.nav-bar .fa-comments {
    font-size: 20px;
    color: #666;
}

/* 试驾banner图标 */
.try-banner .fa-car {
    font-size: 20px;
    color: #00B578;
    margin-right: 8px;
}

.try-banner .fa-chevron-right {
    font-size: 14px;
    color: #999;
}

/* 底部Tab图标 */
.tab-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

.tab-item.active i {
    color: #00B578;
}

/* 轮播图样式 */
.carousel-container {
    width: 100%;
    height: 150px;
    overflow: hidden;
    position: relative;
    margin: 10px 0;
}

.carousel-wrapper {
    display: flex;
    width: 400%; /* 4张图片 */
    height: 100%;
    animation: carousel 12s infinite linear;
}

.carousel-slide {
    width: 25%; /* 100%/4 */
    height: 100%;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes carousel {
    0% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-25%);
    }
    50% {
        transform: translateX(-50%);
    }
    75% {
        transform: translateX(-75%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* 鼠标悬停时暂停动画 */
.carousel-container:hover .carousel-wrapper {
    animation-play-state: paused;
} 