/* 基础样式重置与设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #34495e;
}

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

.section-padding {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.line {
    width: 100px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 0 auto;
}

.btn-primary {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    display: inline-block;
    padding: 8px 16px;
    background-color: transparent;
    color: var(--secondary-color);
    text-decoration: none;
    border: 1px solid var(--secondary-color);
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 14px;
}

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

/* 导航栏样式 */
.navbar {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo h1 {
    font-size: 24px;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a.active,
.nav-links a:hover {
    color: var(--secondary-color);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 3px 0;
}

/* 英雄区域样式 */
.hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    text-align: center;
    padding: 0 20px;
    background: transparent;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.hero-background .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-background .slide.active {
    opacity: 1;
}

/* 关于我们样式 */
.about {
    background-color: var(--light-color);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    line-height: 1.6;
    color: var(--dark-color);
}

.about-content p {
    margin-bottom: 20px;
    font-size: 16px;
}

/* 产品中心样式 */
.products {
    background-color: white;
}

.product-categories {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.category-btn {
    background-color: white;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 8px 16px;
    margin: 0 10px 10px 0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.category-btn.active,
.category-btn:hover {
    background-color: var(--secondary-color);
    color: white;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-10px);
}

.product-img img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

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

.product-info p {
    color: var(--dark-color);
    margin-bottom: 15px;
    line-height: 1.5;
}

/* 联系我们样式 */
.contact {
    background-color: var(--light-color);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .1);
}

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

.contact-info p {
    margin-bottom: 15px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
}

.contact-info i {
    margin-right: 10px;
    color: var(--secondary-color);
}

.contact-form {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .1);
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

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

/* 页脚样式 */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 50px 0 20px;
}

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

.footer-logo h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.footer-logo p {
    color: #ecf0f1;
    opacity: 0.8;
}

.footer-links h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.footer-links ul {
    list-style: none;
}

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

.footer-links a {
    color: #ecf0f1;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 1;
}

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

/* 响应式设计 - 移动端适配 */
@media (max-width: 768px) {
    /* 导航栏响应式 */
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background-color: white;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding: 20px;
        width: 100%;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 10px 0;
        text-align: center;
    }

    .mobile-menu-btn {
        display: flex;
    }

    /* 英雄区域响应式 */
    .hero {
        height: 70vh;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 1rem;
        max-width: 90%;
    }

    /* 通用样式响应式 */
    .section-padding {
        padding: 40px 0;
    }

    .section-title h2 {
        font-size: 26px;
    }

    /* 关于我们响应式 */
    .about-content {
        padding: 0 15px;
    }

    /* 产品中心响应式 */
    .product-categories {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
        margin-bottom: 20px;
    }

    .category-btn {
        margin: 0 8px 8px 0;
        white-space: nowrap;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-card {
        max-width: 350px;
        margin: 0 auto;
    }

    /* 联系我们响应式 */
    .contact-content {
        grid-template-columns: 1fr;
    }

    .contact-info, .contact-form {
        padding: 20px;
    }

    /* 页脚响应式 */
    .footer {
        padding: 30px 0 15px;
    }

    .footer-content {
        gap: 25px;
    }
}

/* 小屏手机适配 (小于 576px) */
@media (max-width: 576px) {
    .hero {
        height: 60vh;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .btn-primary {
        padding: 10px 20px;
        font-size: 14px;
    }

    .product-info h3 {
        font-size: 18px;
    }

    .contact-info h3, .contact-form h3 {
        font-size: 20px;
    }

    .form-group input, .form-group textarea {
        padding: 10px;
        font-size: 14px;
    }
}

/* 平板适配 */
@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}