/* 
 * 宁波庆昌镒万汽车配件有限公司 - 网站样式表
 * 技术栈：HTML5 + CSS3 + JavaScript
 */

/* ==================== 基础重置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e3a5f;
    --secondary-color: #c0c0c0;
    --accent-color: #ff6b35;
    --text-color: #333;
    --text-light: #666;
    --bg-light: #f5f5f5;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== 按钮样式 ==================== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 16px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #2a4a73;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 58, 95, 0.3);
}

.btn-accent {
    background-color: var(--accent-color);
    color: var(--white);
}

.btn-accent:hover {
    background-color: #e55a2b;
    transform: translateY(-2px);
}

/* ==================== 顶部导航 ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.logo img {
    height: 50px;
    margin-right: 10px;
}

.nav-menu {
    display: flex;
    gap: 40px;
}

.nav-menu a {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
    position: relative;
    padding: 5px 0;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

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

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

/* 下拉菜单样式 */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    border-radius: 5px;
    padding: 10px 0;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 1001;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    color: var(--text-color);
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.dropdown-menu a::after {
    display: none;
}

.dropdown > a::after {
    content: ' ▼';
    font-size: 10px;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

/* ==================== Banner轮播 ==================== */
.banner {
    margin-top: 80px;
    position: relative;
    height: 600px;
    overflow: hidden;
}

.banner-slider {
    position: relative;
    height: 100%;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

.banner-slide.active {
    opacity: 1;
}

.banner-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.8) 0%, rgba(30, 58, 95, 0.4) 100%);
}

.banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    max-width: 800px;
    padding: 0 20px;
}

.banner-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.banner-content p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.banner-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.banner-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: var(--transition);
}

.banner-dot.active {
    background-color: var(--white);
    width: 30px;
    border-radius: 6px;
}

.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.banner-arrow:hover {
    background-color: rgba(255,255,255,0.4);
}

.banner-arrow.prev {
    left: 30px;
}

.banner-arrow.next {
    right: 30px;
}

/* ==================== 页面标题Banner ==================== */
.page-banner {
    margin-top: 80px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2a4a73 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.page-banner h1 {
    font-size: 42px;
    margin-bottom: 10px;
}

.page-banner p {
    font-size: 18px;
    opacity: 0.9;
}

/* ==================== 面包屑导航 ==================== */
.breadcrumb {
    background-color: var(--bg-light);
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.breadcrumb ul {
    display: flex;
    gap: 10px;
    align-items: center;
}

.breadcrumb li {
    font-size: 14px;
    color: var(--text-light);
}

.breadcrumb li::after {
    content: '>';
    margin-left: 10px;
}

.breadcrumb li:last-child::after {
    content: '';
}

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

/* ==================== 区块标题 ==================== */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
}

.section-title p {
    color: var(--text-light);
    font-size: 16px;
    margin-top: 20px;
}

/* ==================== 首页区块 ==================== */
.section {
    padding: 80px 0;
}

.section-light {
    background-color: var(--bg-light);
}

/* 公司简介区块 */
.about-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.about-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

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

.about-content p {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: var(--accent-color);
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 5px;
}

/* 产品分类区块 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.product-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: var(--transition);
}

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

.product-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2a4a73 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 60px;
}

.product-info {
    padding: 25px;
}

.product-info h3 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.product-info p {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
}

.product-link {
    color: var(--accent-color);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.product-link:hover {
    gap: 10px;
}

/* 质量优势区块 */
.quality-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.quality-item {
    text-align: center;
    padding: 40px 20px;
    background-color: var(--white);
    border-radius: 10px;
    transition: var(--transition);
}

.quality-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.quality-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2a4a73 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--white);
    font-size: 36px;
}

.quality-item h3 {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.quality-item p {
    color: var(--text-light);
    font-size: 14px;
}

/* 新闻动态区块 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.news-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.news-image {
    height: 180px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #999 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 48px;
}

.news-content {
    padding: 25px;
}

.news-date {
    font-size: 14px;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.news-content h3 {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 10px;
    line-height: 1.4;
}

.news-content p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
}

/* ==================== 关于我们页面 ==================== */
.about-section {
    padding: 60px 0;
}

.about-content-full h3 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
}

.about-content-full p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.feature-box {
    padding: 30px;
    background-color: var(--bg-light);
    border-radius: 10px;
    text-align: center;
}

.feature-box i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-box h4 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.feature-box p {
    color: var(--text-light);
    font-size: 14px;
}

/* ==================== 产品中心页面 ==================== */
.products-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
}

.products-sidebar {
    background-color: var(--bg-light);
    padding: 30px;
    border-radius: 10px;
    height: fit-content;
}

.products-sidebar h3 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
}

.category-list li {
    margin-bottom: 10px;
}

.category-list a {
    display: block;
    padding: 12px 15px;
    border-radius: 5px;
    color: var(--text-color);
    transition: var(--transition);
}

.category-list a:hover,
.category-list a.active {
    background-color: var(--primary-color);
    color: var(--white);
}

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

.product-detail-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.product-detail-image {
    height: 250px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2a4a73 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 80px;
}

.product-detail-info {
    padding: 30px;
}

.product-detail-info h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.product-specs {
    margin: 20px 0;
}

.product-specs li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    color: var(--text-light);
}

.product-specs li:last-child {
    border-bottom: none;
}

/* ==================== 质量保证页面 ==================== */
.quality-section {
    padding: 60px 0;
}

.quality-content h3 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.quality-content p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 20px;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.cert-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.cert-image {
    height: 200px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #999 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 64px;
}

.cert-info {
    padding: 25px;
}

.cert-info h4 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.cert-info p {
    color: var(--text-light);
    font-size: 14px;
}

/* ==================== 研发中心页面 ==================== */
.rd-section {
    padding: 60px 0;
}

.rd-content h3 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.rd-content p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 20px;
}

.rd-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.rd-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: var(--transition);
}

.rd-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.rd-image {
    height: 180px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2a4a73 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 60px;
}

.rd-info {
    padding: 25px;
}

.rd-info h4 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.rd-info p {
    color: var(--text-light);
    font-size: 14px;
}

/* ==================== 联系我们页面 ==================== */
.contact-section {
    padding: 60px 0;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info h3 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background-color: var(--bg-light);
    border-radius: 10px;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2a4a73 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 24px;
    flex-shrink: 0;
}

.contact-text h4 {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.contact-text p {
    color: var(--text-light);
}

.contact-form {
    background-color: var(--bg-light);
    padding: 40px;
    border-radius: 10px;
}

.contact-form h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

.map-container {
    margin-top: 60px;
    height: 400px;
    background: linear-gradient(135deg, #e0e0e0 0%, #c0c0c0 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 18px;
}

/* ==================== 底部信息 ==================== */
.footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

.footer-brand p {
    opacity: 0.8;
    line-height: 1.8;
    font-size: 14px;
}

.footer-links h4 {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
}

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

.footer-links a {
    opacity: 0.8;
    font-size: 14px;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    opacity: 0.8;
    font-size: 14px;
}

/* ==================== 返回顶部按钮 ==================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    font-size: 20px;
}

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

.back-to-top:hover {
    background-color: var(--accent-color);
    transform: translateY(-5px);
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1024px) {
    .products-grid,
    .quality-features,
    .news-grid,
    .about-features,
    .rd-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--white);
        flex-direction: column;
        padding: 40px;
        transition: var(--transition);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .banner {
        height: 400px;
    }
    
    .banner-content h1 {
        font-size: 32px;
    }
    
    .banner-content p {
        font-size: 16px;
    }
    
    .about-preview,
    .contact-layout {
        grid-template-columns: 1fr;
    }
    
    .products-layout {
        grid-template-columns: 1fr;
    }
    
    .products-list {
        grid-template-columns: 1fr;
    }
    
    .products-sidebar {
        order: -1;
    }
    
    .products-grid,
    .quality-features,
    .news-grid,
    .about-features,
    .rd-grid,
    .cert-grid {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-links h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .page-banner h1 {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .banner-content h1 {
        font-size: 24px;
    }
    
    .section-title h2 {
        font-size: 28px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}
