.hero {
    height: 500px;
    margin-top: auto;
    position: relative;
    overflow: hidden;
    z-index: 1;
}


.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.slide-1 {
    background-color: #000;
    background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url("../img/hero-bg.png");

}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 0 20px;
}

.slide-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
}

.slide-content p {
    font-size: 18px;
    margin-bottom: 30px;
}

/* 全局基础样式 */
:root {
    --primary-color: #f8c630;
    --text-dark: #1a365d;
    --text-gray: #666;
    --success-color: #27ae60;
    --bg-light: #f9f9f9;
    --border-color: #ddd;
    --gap-sm: 10px;
    --gap-md: 20px;
    --gap-lg: 30px;
    --card-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* 按钮通用样式 */
.cta-button {
    background: var(--primary-color);
    color: var(--text-dark);
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.3s;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.cta-button:hover {
    background: #e9b510;
}

.cta-button:active {
    background: #d8a400;
}

/* 车辆列表样式 */
.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--gap-lg);
    margin-top: var(--gap-lg);
}

.car-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.car-img-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.car-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.car-card:hover .car-img {
    transform: scale(1.05);
}

/* 加载中占位图 */
.img-skeleton {
    width: 100%;
    height: 200px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.car-info {
    padding: var(--gap-md);
}

.car-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.car-spec {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 12px;
    line-height: 1.5;
}

.price-tag {
    font-size: 24px;
    color: #e74c3c;
    font-weight: bold;
    margin: 10px 0;
}

.certification {
    display: flex;
    gap: var(--gap-sm);
    margin-bottom: var(--gap-md);
    flex-wrap: wrap;
}

.certification-tag {
    font-size: 14px;
    color: var(--success-color);
    background-color: #f1f9f7;
    padding: 3px 10px;
    border-radius: 12px;
}

/* 空数据/加载状态样式 */
.empty-state, .loading-state, .error-state {
    text-align: center;
    padding: var(--gap-lg) 0;
    color: var(--text-gray);
}

.empty-icon, .error-icon {
    font-size: 48px;
    margin-bottom: var(--gap-md);
    color: #ccc;
}

.empty-state h3, .loading-state h3, .error-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.empty-state p, .error-state p {
    margin-bottom: var(--gap-md);
}

/* 详情弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: var(--gap-md);
}

.modal-content {
    background: white;
    border-radius: 10px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: var(--gap-lg);
    position: relative;
}

.modal-close {
    position: absolute;
    top: var(--gap-md);
    right: var(--gap-md);
    font-size: 24px;
    cursor: pointer;
    color: var(--text-gray);
}

.modal-close:hover {
    color: #e74c3c;
}

.modal h3 {
    font-size: 22px;
    margin-bottom: var(--gap-md);
}

.modal-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap-md);
    margin-bottom: var(--gap-md);
}

.modal-detail-item {
    margin-bottom: 8px;
}

.modal-detail-label {
    font-weight: 600;
    color: var(--text-dark);
}

/* 响应式适配（移动端优化） */
@media (max-width: 768px) {

    .hero {
    height: 700px;
    margin-top: auto;
    position: relative;
    overflow: hidden;
    }

    .slide-content h2 {
    font-size: 28px;
    margin-bottom: 20px;
    }
    .filter-toggle {
        display: block;
    }

    .filter-options {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: var(--gap-md);
    }

    .filter-options.show {
        display: flex;
    }

    .filter-options select,
    .filter-options input {
        width: 100%;
        min-width: unset;
    }

    .cars-grid {
        grid-template-columns: 1fr;
        gap: var(--gap-md);
    }

    .modal-detail {
        grid-template-columns: 1fr;
    }

    .price-tag {
        font-size: 20px;
    }
}