/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    max-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;
    transition: all 0.3s ease;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 10px;
}

.logo span {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 5px 0;
}

.nav-links a:hover {
    color: #e74c3c;
}

/* 下拉菜单 */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    z-index: 1;
    border-radius: 4px;
    top: 100%;
    left: 0;
}

.dropdown-content a {
    color: #2c3e50;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    cursor: pointer;
    font-size: 24px;
    color: #2c3e50;
}

/* 移动端菜单 */
.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.mobile-links {
    list-style: none;
    padding: 20px;
}

.mobile-links li {
    margin-bottom: 15px;
}

.mobile-links a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    display: block;
    padding: 10px 0;
    transition: color 0.3s ease;
}

.mobile-links a:hover {
    color: #e74c3c;
}

/* 移动端下拉菜单 */
.mobile-dropdown-content {
    display: none;
    padding-left: 20px;
}

.mobile-dropdown.active .mobile-dropdown-content {
    display: block;
}

/* 首页大图 */
.hero-section {
    height: 100vh;
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 70px;
}

.hero-content {
    color: #fff;
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
}

.hero-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.hero-content p {
    font-size: 24px;
    margin-bottom: 30px;
    text-align: center;
}

.btn {
    display: inline-block;
    background-color: #e74c3c;
    color: #fff;
    padding: 15px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn:hover {
    background-color: #c0392b;
    transform: translateY(-3px);
}

/* 产品分类 */
.categories-section {
    padding: 80px 0;
    background-color: #fff;
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: #2c3e50;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: #e74c3c;
    margin: 15px auto 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.category-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.category-item:hover {
    transform: translateY(-10px);
}

.category-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 30px 20px 20px;
    color: #fff;
}

.category-overlay h4 {
    font-size: 20px;
    margin-bottom: 15px;
}

.category-btn {
    display: inline-block;
    background-color: rgba(231, 76, 60, 0.9);
    color: #fff;
    padding: 8px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.category-btn:hover {
    background-color: #e74c3c;
}

/* 产品展示 */
.products-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.product-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.product-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 18px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.product-desc {
    color: #7f8c8d;
    margin-bottom: 15px;
    font-size: 14px;
}

.product-price {
    font-size: 20px;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 20px;
}

.add-to-cart {
    display: block;
    width: 100%;
    background-color: #3498db;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.add-to-cart:hover {
    background-color: #2980b9;
}

/* 新闻资讯 */
.news-section {
    padding: 80px 0;
    background-color: #fff;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.news-item {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.news-date {
    color: #e74c3c;
    font-weight: 500;
    margin-bottom: 10px;
}

.news-title {
    font-size: 20px;
    margin-bottom: 15px;
    color: #2c3e50;
}

.news-excerpt {
    color: #7f8c8d;
    margin-bottom: 20px;
    line-height: 1.8;
}

.read-more {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #2980b9;
}

/* 客户评价 */
.testimonials-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    position: relative;
}

.testimonials-slider {
    display: flex;
    overflow: hidden;
    position: relative;
    margin-bottom: 30px;
}

.testimonial-slide {
    min-width: 100%;
    transition: transform 0.5s ease;
}

.testimonial-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.testimonial-rating {
    margin-bottom: 20px;
}

.testimonial-rating i {
    color: #f1c40f;
    font-size: 24px;
    margin: 0 5px;
}

.testimonial-text {
    font-size: 20px;
    line-height: 1.8;
    margin-bottom: 30px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-right: 20px;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.author-info h5 {
    font-size: 18px;
    margin-bottom: 5px;
}

.author-info p {
    color: rgba(255, 255, 255, 0.8);
}

.slider-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.prev-slide, .next-slide {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.prev-slide:hover, .next-slide:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* 联系我们 */
.contact-section {
    padding: 80px 0;
    background-color: #fff;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
}

.contact-item i {
    color: #e74c3c;
    font-size: 24px;
    margin-right: 20px;
    margin-top: 5px;
}

.contact-text h4 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.contact-text p {
    color: #7f8c8d;
    line-height: 1.6;
}

.contact-form {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.submit-btn {
    width: 100%;
    background-color: #e74c3c;
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #c0392b;
}

/* 页脚 */
.footer {
    background-color: #2c3e50;
    color: #fff;
    padding: 80px 0 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 50px;
    margin-bottom: 50px;
}

.footer-logo img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 20px;
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.footer-links h4,
.footer-categories h4,
.footer-social h4 {
    font-size: 20px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4::after,
.footer-categories h4::after,
.footer-social h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: #e74c3c;
}

.footer-links ul,
.footer-categories ul {
    list-style: none;
}

.footer-links li,
.footer-categories li {
    margin-bottom: 15px;
}

.footer-links a,
.footer-categories a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover,
.footer-categories a:hover {
    color: #e74c3c;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover {
    background-color: #e74c3c;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #e74c3c;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 999;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-content h2 {
        font-size: 36px;
    }
    
    .hero-content p {
        font-size: 18px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .header .container {
        padding: 15px;
    }
    
    .logo img {
        width: 40px;
        height: 40px;
    }
    
    .logo span {
        font-size: 20px;
    }
    
    .hero-content h2 {
        font-size: 28px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}