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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f0f4f8;
}

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

/* 工业风颜色 */
:root {
    --primary-color: #333333;
    --secondary-color: #0066CC;
    --accent-color: #f0f4f8;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #e1e8f0;
}

/* 导航栏 */
.header {
    background-color: #e6eef5;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo img {
    height: 80px;
    width: auto;
}

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

.nav-item {
    margin-left: 40px;
}

.nav-item a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.mobile-nav-toggle {
    display: none;
    cursor: pointer;
}

.mobile-nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* 轮播图 */
.banner {
    margin-top: 100px;
    position: relative;
    overflow: hidden;
}

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

.banner-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

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

.banner-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-content {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    padding: 40px;
    border-radius: 8px;
    max-width: 90%;
    white-space: nowrap;
}

.banner-content h1 {
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: 700;
}

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

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--secondary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #0052a3;
}

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

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

.banner-dot.active {
    background-color: var(--secondary-color);
}

/* 核心优势 */
.advantages {
    padding: 80px 0;
    background-color: #fff;
}

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 60px;
    color: var(--primary-color);
    position: relative;
}

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

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

.advantage-item {
    text-align: center;
    padding: 30px;
    background-color: var(--accent-color);
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.advantage-icon {
    margin-bottom: 20px;
}

.advantage-item h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary-color);
}

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

/* 产品展示预览 */
.products-preview {
    padding: 80px 0;
    background-color: var(--accent-color);
}

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

.product-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    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: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

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

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

.product-item a {
    text-decoration: none;
    color: inherit;
}

.text-center {
    text-align: center;
}

/* 产品平铺展示 */
.products-flat {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.product-flat-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-flat-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

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

/* 厂区环境预览 */
.factory-preview {
    padding: 80px 0;
    background-color: #fff;
}

.factory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.factory-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.factory-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.factory-item a {
    display: block;
}

/* 联系信息 */
.contact-preview {
    padding: 80px 0;
    background-color: var(--accent-color);
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.contact-icon {
    margin-right: 20px;
}

.contact-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
}

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

.contact-content a {
    color: var(--secondary-color);
    text-decoration: none;
}

.contact-content a:hover {
    text-decoration: underline;
}

/* 页脚 */
.footer {
    background-color: #e6eef5;
    color: var(--secondary-color);
    padding: 60px 0 30px;
}

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

.footer-logo img {
    height: 80px;
    width: auto;
}

.footer-links h3,
.footer-contact h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

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

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

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

.footer-links a:hover {
    color: var(--secondary-color);
}

.footer-contact p {
    margin-bottom: 10px;
    color: var(--secondary-color);
}

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

.footer-contact a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(0, 102, 204, 0.3);
    font-size: 14px;
    color: var(--secondary-color);
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

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

.back-to-top:hover {
    background-color: #0052a3;
    transform: translateY(-5px);
}

/* 产品展示 - 全屏瀑布流 */
.products-fullscreen {
    padding: 140px 20px 20px;
    background-color: var(--accent-color);
    min-height: calc(100vh - 100px);
}

.products-masonry-full {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    max-width: 1800px;
    margin: 0 auto;
}

.products-masonry-full .product-masonry-item {
    background-color: transparent;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.products-masonry-full .product-masonry-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.products-masonry-full .product-masonry-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.products-masonry-full .product-masonry-item:hover img {
    transform: scale(1.05);
}

@media (max-width: 1200px) {
    .products-masonry-full {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .products-fullscreen {
        padding: 130px 15px 30px;
    }
    
    .products-masonry-full {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
}

@media (max-width: 576px) {
    .products-masonry-full {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

/* 按需定制横幅 */
.custom-banner {
    text-align: center;
    padding: 30px 20px;
    background-color: var(--accent-color);
}

.custom-banner p {
    font-size: 14px;
    color: #888;
    letter-spacing: 2px;
    margin: 0;
}

/* 品牌标语背景条 */
.brand-slogan {
    background-color: #e0e0e0;
    background-image: 
        linear-gradient(135deg, rgba(180, 180, 180, 0.4) 25%, transparent 25%),
        linear-gradient(225deg, rgba(180, 180, 180, 0.4) 25%, transparent 25%),
        linear-gradient(45deg, rgba(180, 180, 180, 0.4) 25%, transparent 25%),
        linear-gradient(315deg, rgba(180, 180, 180, 0.4) 25%, transparent 25%);
    background-size: 20px 20px;
    background-position: 0 0, 10px 0, 10px -10px, 0px 10px;
    padding: 50px 20px;
    text-align: center;
    position: relative;
}

.brand-slogan::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(220, 220, 220, 0.85) 0%, rgba(200, 200, 200, 0.85) 50%, rgba(220, 220, 220, 0.85) 100%);
    z-index: 1;
}

.slogan-content {
    position: relative;
    z-index: 2;
}

.slogan-content h3 {
    font-size: 28px;
    color: #fff;
    margin: 0;
    letter-spacing: 3px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 600;
}

@media (max-width: 768px) {
    .custom-banner {
        padding: 20px 15px;
    }
    
    .custom-banner p {
        font-size: 12px;
    }
    
    .brand-slogan {
        padding: 35px 15px;
    }
    
    .slogan-content h3 {
        font-size: 20px;
        letter-spacing: 2px;
    }
}

.products-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-gap: 20px;
    grid-auto-rows: 0;
}

.product-masonry-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-masonry-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* 产品预览模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    overflow: hidden;
}

.modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--secondary-color);
}

.modal-slides {
    width: 100%;
    height: calc(100vh - 150px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-slide {
    display: none;
    max-width: 90%;
    max-height: 100%;
}

.modal-slide.active {
    display: block;
}

.modal-slide img {
    max-width: 100%;
    max-height: calc(100vh - 150px);
    width: auto;
    height: auto;
    object-fit: contain;
}

.modal-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 30px;
    pointer-events: none;
}

.modal-control {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.modal-control:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.modal-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    overflow-x: auto;
    padding: 10px 0;
    max-width: 90%;
    scrollbar-width: thin;
    scrollbar-color: var(--secondary-color) rgba(255, 255, 255, 0.1);
}

.modal-thumbs::-webkit-scrollbar {
    height: 6px;
}

.modal-thumbs::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.modal-thumbs::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 3px;
}

.modal-thumb {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s ease;
    border-radius: 4px;
    overflow: hidden;
}

.modal-thumb.active {
    opacity: 1;
    border: 2px solid var(--secondary-color);
}

.modal-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 厂区环境页 */
.factory-page {
    padding: 160px 0 80px;
    background-color: var(--accent-color);
}

.factory-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.factory-gallery-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.factory-gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.factory-gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

/* 关于我们页 */
.about-page {
    padding: 160px 0 80px;
    background-color: #fff;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.about-text {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-color);
}

.about-text h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.about-text p {
    margin-bottom: 20px;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.about-advantages {
    background-color: var(--accent-color);
    padding: 60px 0;
    margin-top: 60px;
}

/* 联系我们 */
.contact-page,
.contact-section {
    padding: 80px 0;
    background-color: var(--accent-color);
}

.contact-form {
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 60px;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

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

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

.form-submit {
    background-color: var(--secondary-color);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.form-submit:hover {
    background-color: #0052a3;
}

.contact-details {
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.contact-details-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.contact-details-icon {
    margin-right: 20px;
    color: var(--secondary-color);
}

.contact-details-content h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.contact-details-content p {
    color: var(--text-light);
    font-size: 14px;
}

.contact-details-content a {
    color: var(--secondary-color);
    text-decoration: none;
}

.contact-details-content a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        padding: 15px 0;
    }

    .logo img {
        height: 65px;
    }

    .nav {
        position: fixed;
        top: 95px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 95px);
        background-color: #e6eef5;
        transition: left 0.3s ease;
        z-index: 999;
    }

    .nav.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
        padding: 40px 0;
    }

    .nav-item {
        margin: 20px 0;
    }

    .mobile-nav-toggle {
        display: block;
    }

    .banner-slider {
        height: 100vh;
    }

    .banner-content {
        padding: 20px;
    }

    .banner-content h1 {
        font-size: 16px;
    }

    .banner-content p {
        font-size: 16px;
    }

    .section-title {
        font-size: 28px;
    }

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

    .products-masonry {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .advantages-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .products-flat {
        grid-template-columns: repeat(2, 1fr);
    }

    .factory-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-logo img {
        height: 65px;
    }

    .contact-form,
    .contact-details {
        padding: 30px;
    }

    .factory-page,
    .about-page {
        padding: 140px 0 60px;
    }
}

@media (max-width: 480px) {
    .banner-slider {
        height: 100vh;
    }

    .banner-content {
        padding: 15px;
        top: 33.33%;
    }

    .banner-content h1 {
        font-size: 14px;
    }

    .banner-content p {
        font-size: 14px;
    }

    .section-title {
        font-size: 24px;
    }

    .advantages-list {
        grid-template-columns: 1fr;
    }

    .products-grid,
    .factory-grid,
    .contact-info {
        grid-template-columns: 1fr;
    }

    .products-flat {
        grid-template-columns: repeat(2, 1fr);
    }

    .factory-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .products-fullscreen {
        padding: 120px 10px 20px;
    }

    .factory-page,
    .about-page {
        padding: 130px 0 50px;
    }

    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }
}

/* 图片懒加载 */
.lazy-load {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.lazy-load.loaded {
    opacity: 1;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0052a3;
}