/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #e74c3c;
    --secondary-color: #3498db;
    --accent-color: #2ecc71;
    --highlight-color: #f39c12;
    --dark-color: #333;
    --light-color: #f8f8f8;
}

body {
    font-family: 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.btn {
    display: inline-block;
    padding: 10px 25px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 头部样式 */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.logo p {
    font-size: 14px;
    color: var(--secondary-color);
}

/* 首页与关于页 Logo 区域 */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-image {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: contain;
}

.logo h1 {
    margin: 0;
    line-height: 1.1;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    font-size: 16px;
    font-weight: bold;
    position: relative;
    color: var(--dark-color);
}

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

nav ul li a.active:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

/* 轮播图样式已移除 */

/* 特色区域样式 */
.features {
    padding: 60px 0;
    background-color: #fff;
}

.features .container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.feature-box {
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
    border-top: 3px solid transparent;
}

.feature-box:nth-child(1) {
    border-top-color: var(--primary-color);
}

.feature-box:nth-child(2) {
    border-top-color: var(--secondary-color);
}

.feature-box:nth-child(3) {
    border-top-color: var(--accent-color);
}

.feature-box:nth-child(4) {
    border-top-color: var(--highlight-color);
}

.feature-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.feature-box h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.feature-box:nth-child(1) h3 {
    color: var(--primary-color);
}

.feature-box:nth-child(2) h3 {
    color: var(--secondary-color);
}

.feature-box:nth-child(3) h3 {
    color: var(--accent-color);
}

.feature-box:nth-child(4) h3 {
    color: var(--highlight-color);
}

/* 热门车型样式 */
.popular-cars {
    padding: 40px 0;
    background-color: #f8f8f8;
    text-align: center;
}

.popular-cars .container {
    max-width: 1000px;
    padding: 0 10px;
}

.popular-cars h2 {
    font-size: 32px;
    margin-bottom: 30px;
    color: var(--dark-color);
    position: relative;
    display: inline-block;
}

.popular-cars h2:after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin: 10px auto;
}

.car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 30px auto;
}

.car-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
}

.car-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.car-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    background-color: #f9f9f9;
    padding: 10px;
}

.car-item h3, .car-item h4 {
    font-size: 18px;
    margin: 15px 15px 10px 15px;
    color: var(--secondary-color);
    text-align: left;
}

.car-item p {
    color: #777;
    padding: 0 15px 20px 15px;
    text-align: left;
    margin: 0;
}

/* 页面头部样式 */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    padding: 50px 0;
    text-align: center;
}

.page-header h2 {
    font-size: 32px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* 车型类别样式 */
.car-categories {
    padding: 60px 0;
}

.category-nav {
    margin-bottom: 40px;
}

.category-nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.category-nav ul li {
    margin: 0 10px;
}

.category-nav ul li a {
    display: block;
    padding: 10px 20px;
    background-color: #f1f1f1;
    border-radius: 30px;
    color: var(--dark-color);
    font-weight: bold;
}

.category-nav ul li a:hover, .category-nav ul li a.active {
    background-color: var(--primary-color);
    color: #fff;
}

.car-category {
    margin-bottom: 60px;
}

.car-category h3 {
    font-size: 24px;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    color: var(--secondary-color);
}

.car-specs {
    padding: 0 20px 20px;
    text-align: left;
}

.car-specs li {
    margin-bottom: 8px;
    color: #666;
}

/* 关于我们页面样式 */
.about-content {
    padding: 60px 0;
    background-color: #fff;
}

.about-info, .about-mission, .about-vision, .about-advantage {
    margin-bottom: 40px;
}

.about-content h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.about-content p {
    margin-bottom: 15px;
    color: #555;
}

.about-advantage ul li {
    margin-bottom: 30px;
    padding-left: 20px;
    border-left: 3px solid var(--accent-color);
}

.about-advantage h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* 联系我们页面样式 */
.contact-content {
    padding: 60px 0;
    background-color: #fff;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
}

.contact-info ul li {
    margin-bottom: 15px;
    color: #555;
}

.contact-info ul li strong {
    color: var(--primary-color);
    font-weight: bold;
    display: inline-block;
    min-width: 80px;
}

.contact-form {
    background-color: #f8f8f8;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.contact-form h3 {
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
    outline: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.map-section {
    padding: 60px 0;
    background-color: #f8f8f8;
}

.map-section h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.map-container {
    height: 400px;
    background-color: #eee;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.map-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #777;
}

/* 页脚样式 */
footer {
    background-color: #333;
    color: #fff;
    padding: 60px 0 30px;
}

.footer-info, .footer-nav {
    margin-bottom: 30px;
}

footer .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

footer h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--highlight-color);
}

footer p {
    margin-bottom: 10px;
    color: #bbb;
}

.footer-nav ul li {
    margin-bottom: 10px;
}

.footer-nav ul li a {
    color: #bbb;
}

.footer-nav ul li a:hover {
    color: var(--primary-color);
}

.copyright {
    grid-column: 1 / -1;
    border-top: 1px solid #444;
    padding-top: 20px;
    text-align: center;
    color: #999;
}

.copyright a {
    color: var(--secondary-color);
}

.copyright a:hover {
    color: var(--primary-color);
}

/* 优化社交媒体和二维码显示样式 */
.social-media {
    margin-top: 20px;
    display: flex;
    gap: 30px;
    justify-content: center;
}

.social-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.social-platform {
    display: flex;
    align-items: center;
    color: #bbb;
    margin-bottom: 15px;
    padding: 5px;
    border-radius: 4px;
    white-space: nowrap; /* 防止文字换行 */
}

.social-platform img {
    width: 24px;
    height: 24px;
    margin-right: 8px;
}

.qrcode-display {
    background: #fff;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    text-align: center;
    width: 200px; /* 设置固定宽度，适应二维码尺寸 */
    height: 200px; /* 设置固定高度，避免容器过长 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.qrcode-display img {
    width: 180px; /* 从120px增加到180px，提高二维码可读性 */
    height: 180px; /* 从120px增加到180px，提高二维码可读性 */
    display: block;
    object-fit: contain;
    border-radius: 4px;
}

/* 为移动设备优化弹窗位置 */
@media (max-width: 768px) {
    .qrcode-popup {
        bottom: 50px;
        left: -60px;
    }
    
    .qrcode-popup:after {
        left: 80px;
    }
}

/* 响应式布局 */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    
    nav ul {
        margin-top: 20px;
    }
    
    nav ul li {
        margin: 0 10px;
    }
    
    .slider-container {
        padding-bottom: 80%; /* 移动端使用更高的高宽比 */
    }
    
    .slide-content h2 {
        font-size: 24px;
    }
    
    .slide-content p {
        font-size: 14px;
    }
    
    .car-grid {
        grid-template-columns: 1fr; /* 移动设备上单列显示 */
    }
    
    .feature-box, .car-item {
        margin-bottom: 20px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 5px 10px;
    }
    
    .slider-container {
        padding-bottom: 100%; /* 更小屏幕使用更高的高宽比 */
    }
    
    .slide-content h2 {
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .slide-content p {
        font-size: 12px;
        margin-bottom: 15px;
    }
    
    .prev-btn, .next-btn {
        width: 30px;
        height: 30px;
    }
    
    .page-header {
        padding: 30px 0;
    }
}

/* 筛选样式 */
.car-filters {
    margin: 30px 0 40px 0;
}

.filter-group {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.filter-group label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 12px;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-options.active {
    display: flex;
}

.filter-item {
    padding: 8px 20px;
    border: 1px solid #eee;
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    color: #333;
}

.filter-item:hover {
    background-color: #f9f9f9;
    border-color: #ddd;
}

.filter-item.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* 车辆信息样式 */
.car-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.car-category {
    color: #999;
    font-size: 14px;
    margin: 0 0 10px 0;
}

.car-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.car-tags .tag {
    display: inline-block;
    padding: 3px 10px;
    background-color: #f0f0f0;
    border-radius: 12px;
    font-size: 12px;
    color: #666;
}

.car-price {
    display: flex;
    align-items: baseline;
    margin-bottom: 8px;
}

.car-price .price {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.car-price .price-unit {
    font-size: 14px;
    color: #999;
    margin-left: 4px;
}

.car-deposit {
    font-size: 13px;
    color: #777;
    margin-bottom: 15px;
}

.car-info .btn {
    margin-top: auto;
    text-align: center;
}

/* 加载和空状态 */
.loading-message, .no-cars-message {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
    grid-column: 1 / -1;
}
/* 首页 Hero 模块 */
.hero {
    background: linear-gradient(135deg, #ffffff 0%, #f7f9fc 100%);
    padding: 40px 0;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.hero-content h2 {
    font-size: 36px;
    color: var(--dark-color);
    margin-bottom: 14px;
}

.hero-content p {
    font-size: 17px;
    color: #545454;
    margin-bottom: 24px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-actions .btn {
    min-width: 150px;
}

.btn.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn.btn-secondary:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.hero-visual {
    position: relative;
    flex: 1;
    max-width: 480px;
    width: 100%;
}

.hero-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.12);
    background: #f1f4f7;
    min-height: 320px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    pointer-events: none;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-slide a {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    cursor: pointer;
    transition: background 0.3s ease;
    z-index: 2;
}

.hero-nav:hover,
.hero-nav:focus-visible {
    background: rgba(0, 0, 0, 0.65);
}

.hero-nav-prev {
    left: 14px;
}

.hero-nav-next {
    right: 14px;
}

.hero-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
}

.hero-dot.is-active {
    transform: scale(1.2);
    background: var(--primary-color);
}

/* 信任背书 */
.trust {
    background-color: #fff;
    padding: 20px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.trust-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    color: #555;
}

.trust-icon {
    color: var(--accent-color);
    font-weight: bold;
}

/* CTA 区块 */
.cta {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    text-align: center;
    padding: 40px 0;
}

.cta h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.cta p {
    margin-bottom: 20px;
}

/* 响应式 */
@media (max-width: 992px) {
    .hero .container {
        gap: 24px;
        flex-direction: column;
        text-align: center;
    }
    .hero-content {
        max-width: 640px;
        margin: 0 auto;
    }
    .hero-visual {
        max-width: 560px;
    }
    .hero-slider {
        aspect-ratio: 16 / 10;
        min-height: 280px;
    }
    .trust-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 32px 0;
    }
    .hero-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
    .hero-slider {
        aspect-ratio: 16 / 11;
        min-height: 240px;
    }
    .hero-nav {
        width: 34px;
        height: 34px;
        font-size: 20px;
    }
}
/* 移动端优化 */
@media (max-width: 768px) {
  /* 头部与导航 */
  header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .logo-image { width: 32px; height: 32px; }
  nav ul {
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
  }
  nav ul li { margin-left: 0; }
  nav ul li a { font-size: 15px; }

  /* 特色区域 */
  .features { padding: 40px 0; }
  .features .container { grid-template-columns: 1fr; gap: 16px; }
  .feature-box { padding: 20px; }

  /* 热门车型 */
  .popular-cars h2 { font-size: 28px; }
  .car-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .car-item img { height: 190px; padding: 6px; }
}

@media (max-width: 480px) {
  /* 全局按钮 */
  .btn { padding: 8px 18px; font-size: 14px; }

  .logo-image { width: 28px; height: 28px; }

  /* Hero 文案与栅格 */
  .hero-content h2 { font-size: 28px; }
  .hero-content p { font-size: 14px; }
  .hero-dots { bottom: 10px; }
  .hero-slider { min-height: 200px; }
  .hero-slider {
    aspect-ratio: 4 / 3;
  }

  /* 信任背书栅格 */
  .trust-grid { grid-template-columns: 1fr; }

  /* 热门车型单列 */
  .popular-cars h2 { font-size: 24px; }
  .car-grid { grid-template-columns: 1fr; }
  .car-item img { height: auto; padding: 4px; }
}
