/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* 容器样式 */
.container {
    width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航 */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo h1 {
    font-size: 24px;
    color: #1a73e8;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #1a73e8;
}

.shop-btn {
    background-color: #1a73e8;
    color: #fff !important;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.shop-btn:hover {
    background-color: #1557b0;
}

/* 英雄区域 */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://trae-api-cn.mchost.guru/api/ide/v1/text_to_image?prompt=modern%20technology%20background&image_size=landscape_16_9');
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    margin-top: 80px;
}

.hero-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 40px;
    max-width: 800px;
}

/* 按钮样式 */
.btn-primary {
    display: inline-block;
    background-color: #1a73e8;
    color: #fff;
    padding: 12px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: #1557b0;
}

.btn-secondary {
    display: inline-block;
    background-color: transparent;
    color: #1a73e8;
    padding: 10px 20px;
    border: 1px solid #1a73e8;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #1a73e8;
    color: #fff;
}

/* 关于我们 */
.about {
    padding: 100px 0;
    background-color: #f9f9f9;
}

.about h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 60px;
    color: #333;
}

.about-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.about-text {
    flex: 1;
    padding-right: 60px;
}

.about-text h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #1a73e8;
}

.about-text p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
}

/* 产品中心 */
.products {
    padding: 100px 0;
}

.products h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 60px;
    color: #333;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.product-item {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-item img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    margin-bottom: 20px;
    border-radius: 8px;
}

.product-item h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.product-item p {
    margin-bottom: 20px;
    line-height: 1.6;
}

/* 团队介绍 */
.team {
    padding: 100px 0;
    background-color: #f9f9f9;
}

.team h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 60px;
    color: #333;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.team-item {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.team-item img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
}

.team-item h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.team-position {
    color: #1a73e8;
    font-weight: bold;
    margin-bottom: 15px;
}

.team-item p {
    line-height: 1.6;
    color: #666;
}

/* 新闻动态 */
.news {
    padding: 100px 0;
    background-color: #f9f9f9;
}

.news h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 60px;
    color: #333;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.news-item {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.news-item h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.news-date {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.news-item p {
    margin-bottom: 20px;
    line-height: 1.6;
}

/* 网上商城 */
.shop {
    padding: 100px 0;
}

.shop h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 60px;
    color: #333;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.shop-item {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.shop-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.shop-item img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    margin-bottom: 15px;
    border-radius: 8px;
}

.shop-item h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.price {
    font-size: 20px;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 15px;
}

.add-to-cart {
    background-color: #1a73e8;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.add-to-cart:hover {
    background-color: #1557b0;
}

/* 联系我们 */
.contact {
    padding: 100px 0;
    background-color: #f9f9f9;
}

.contact h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 60px;
    color: #333;
}

.contact-content {
    display: flex;
    justify-content: space-between;
}

.contact-info {
    flex: 1;
    padding-right: 60px;
}

.contact-info h3 {
    font-size: 24px;
    margin-bottom: 30px;
    color: #1a73e8;
}

.contact-info p {
    margin-bottom: 20px;
    line-height: 1.6;
}

.contact-form {
    flex: 1;
}

.contact-form h3 {
    font-size: 24px;
    margin-bottom: 30px;
    color: #1a73e8;
}

.contact-form form {
    display: flex;
    flex-direction: column;
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.contact-form textarea {
    height: 150px;
    resize: vertical;
}

/* 页脚 */
footer {
    background-color: #333;
    color: #fff;
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-logo h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.footer-logo p {
    color: #ccc;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 18px;
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #1a73e8;
}

.footer-contact p {
    margin-bottom: 10px;
    color: #ccc;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #444;
    color: #ccc;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        width: 90%;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .shop-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero-content h2 {
        font-size: 36px;
    }

    .about-content,
    .contact-content {
        flex-direction: column;
    }

    .about-text {
        padding-right: 0;
        margin-bottom: 40px;
    }

    .contact-info {
        padding-right: 0;
        margin-bottom: 40px;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .shop-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .team-item {
        margin-bottom: 20px;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-links,
    .footer-contact {
        margin-top: 30px;
    }
}

@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 28px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .shop-grid {
        grid-template-columns: 1fr;
    }
}

/* 购物车样式 */
.cart {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background-color: #fff;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    transition: right 0.3s ease;
    padding: 30px;
    overflow-y: auto;
}

.cart.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.cart-header h3 {
    font-size: 20px;
    color: #333;
}

.close-cart {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.cart-item {
    display: flex;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 20px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
}

.cart-item-price {
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 10px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
}

.cart-item-quantity button {
    width: 30px;
    height: 30px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    cursor: pointer;
    font-size: 16px;
}

.cart-item-quantity input {
    width: 50px;
    height: 30px;
    text-align: center;
    border: 1px solid #ddd;
    margin: 0 10px;
}

.cart-total {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.cart-total h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
}

.cart-total-amount {
    font-size: 24px;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 30px;
}

.checkout-btn {
    display: block;
    width: 100%;
    background-color: #1a73e8;
    color: #fff;
    padding: 15px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.checkout-btn:hover {
    background-color: #1557b0;
}

.cart-toggle {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background-color: #1a73e8;
    color: #fff;
    padding: 15px 10px;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
}

.cart-count {
    position: absolute;
    top: -10px;
    left: -10px;
    background-color: #e74c3c;
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 订单成功页面 */
.order-success {
    padding: 100px 0;
    text-align: center;
}

.order-success h2 {
    font-size: 36px;
    color: #27ae60;
    margin-bottom: 30px;
}

.order-success p {
    font-size: 18px;
    margin-bottom: 40px;
    color: #333;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1a73e8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 消息提示 */
.message {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    color: #fff;
    font-size: 16px;
    z-index: 1002;
    animation: slideIn 0.3s ease;
}

.message.success {
    background-color: #27ae60;
}

.message.error {
    background-color: #e74c3c;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 图片懒加载 */
img {
    transition: opacity 0.3s ease;
}

img.lazy {
    opacity: 0;
}

img.lazy.loaded {
    opacity: 1;
}