/* 1. Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

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

/* 2. Layout & Container Styles */
.site {
    max-width: 1480px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

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

.section-header h2 {
    font-size: 36px;
    margin-bottom: 15px;
    color: #222;
}

.section-header p {
    font-size: 18px;
    color: #666;
}

/* 3. Header & Navigation Styles */
.site-header {
    background: #ae0007;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: 70px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.site-header .site {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    width: 200px;
    height: auto;
    aspect-ratio: 2.14; /* 保持原始长宽比 */
}

.site-logo {
    display: flex;
    align-items: center;
}

.site-logo img {
    height: 90px;
    width: auto;
}

.main-navigation {
    flex: 1;
    margin: 0 40px;
}

.nav-menu {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    color: #fff;
    padding: 25px 15px;
    display: block;
    font-size: 15px;
    transition: all 0.3s ease;
}

.nav-menu > li > a:hover {
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.1);
}

/* Mega Menu Styles */
.menu-dropdown {
    position: fixed;
    left: 0;
    right: 0;
    top: 70px;
    width: 100%;
    background: #fff;
    box-shadow: 0 3px 20px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
}

.menu-item-has-children:hover .menu-dropdown {
    opacity: 1;
    visibility: visible;
}

.mega-menu-content {
    max-width: 1480px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* Header Right Section */
.header-right {
    display: flex;
    align-items: center;
    gap: 25px; /* 增加间距 */
}
/* Language Switcher */
.wpml-ls ul {
    display: flex;
    gap: 15px;
}

.wpml-ls a {
    color: #fff;
    font-size: 14px;
    padding: 5px 8px;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.wpml-ls a:hover {
    opacity: 1;
}

.wpml-ls-current-language a {
    opacity: 1;
    font-weight: 500;
}

/* Phone Number */
#masthead-phone {
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}


/* 4. Product Categories & Sections */
.product-categories {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.product-categories .product-section {
    flex: 2;
    margin-right: 0;
}

.product-categories .product-section:nth-child(2) {
    flex: 2;
}

.product-categories .product-section:nth-child(3) {
    flex: 1.2;
}

.product-section {
    flex: 1;
    margin-bottom: 40px;
}

.product-section h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 25px;
    font-weight: 500;
}

/* 小分类容器 */
.subcategory {
    margin-bottom: 20px;
    min-height: auto; /* 移除固定最小高度 */
    width: 90%; /* 添加宽度控制 */
    margin-left: auto; /* 水平居中 */
    margin-right: auto; /* 水平居中 */
}

/* 小分类标题样式 */
.subcategory-title {
    font-size: 16px;
    color: #666;
    margin: 20px 0 15px;
    padding-left: 12px;
    border-left: 3px solid #c8161d;
}

/* 调整产品标题层级 */
.product-info h4 {
    font-size: 14px;
    margin-bottom: 4px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 产品列表布局调整 */
.product-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px; /* 减小间距从24px到15px */
    min-height: 200px; /* 减小最小高度 */
}

.softforce {
    color: #c8161d;  /* 使用与网站主题相同的红色 */
}

/* Magifloater 专用样式 */
.magifloater-wrapper {
    width: 100%;  /* 确保容器占满整个宽度 */
}

.magifloater-item {
    width: 100% !important;  /* 强制宽度100% */
    height: 200px !important;
    display: block !important;  /* 覆盖之前的flex布局 */
    padding: 0 !important;
}

.magifloater-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
}

.magifloater-item .product-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    text-align: center;
}

/* 其他样式保持不变 */
.product-categories .product-section:nth-child(3) .product-item {
    height: 200px;
    padding: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.product-categories .product-section:nth-child(3) .product-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    text-align: center;
    z-index: 1;
}

.product-categories .product-section:nth-child(3) .product-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
}

.product-item {
    height: 90px; /* 减小item高度从120px到90px */
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 10px; /* 减小内边距从15px到10px */
    border: none; 
    /* 1px solid #eee; */
    border-radius: 4px;
    transition: all 0.3s ease;
}

.product-item:hover {
    transform: none; /* 移除上浮效果 */
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* 确保产品图片大小一致 */
.product-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin: 0 15px 0 0;
    flex-shrink: 0;
}

/* 产品信息区域样式 */
.product-info {
    flex: 1;
    min-width: 0;
}


.product-info h3 {
    font-size: 13px;
    margin-bottom: 4px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-info p {
    font-size: 13px;
    color: #aaa;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 限制文字行数 */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 5. Main Content Sections */
.hero-section {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

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

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.slide.active {
    opacity: 1;
}

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

.slide-content {
    position: absolute;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    max-width: 600px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.slide-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
}

.slide-content p {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    margin-bottom: 2rem;
}

.slider-controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 10;
}

.prev-btn, .next-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
}

.prev-btn:hover, .next-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.slider-dots {
    display: flex;
    gap: 10px;
}

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

.dot.active {
    background: white;
}

.hero-buttons {
    position: absolute;
    bottom: 100px;
    left: 10%;
    display: flex;
    gap: 20px;
    z-index: 10;
}

.btn-primary, .btn-secondary {
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.3s ease, background 0.3s ease;
}

.btn-primary {
    background: #2B2D42;
    color: white;
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-primary:hover, .btn-secondary:hover {
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .slide-content {
        left: 5%;
        right: 5%;
        text-align: center;
    }
    
    .hero-buttons {
        left: 50%;
        transform: translateX(-50%);
        flex-direction: column;
        align-items: center;
    }
}

.key-products {
    padding: 60px 0;
    background: #f8f9fa;
}

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

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: #2B2D42;
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #2B2D42;
}

.section-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

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

.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .card-image img {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.2), transparent);
}

.card-content {
    padding: 30px;
}

.product-tag {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(43, 45, 66, 0.1);
    color: #2B2D42;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 15px;
}

.card-content h3 {
    font-size: 1.5rem;
    color: #2B2D42;
    margin-bottom: 12px;
}

.card-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
}

.learn-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #2B2D42;
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.3s ease;
}

.learn-more svg {
    transition: transform 0.3s ease;
}

.learn-more:hover {
    gap: 12px;
}

.learn-more:hover svg {
    transform: translateX(4px);
}

@media (max-width: 768px) {
    .key-products {
        padding: 60px 0;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 10px;
    }
}

/* 6. Applications Section */
.applications {
    padding: 80px 0;
    background: #f8f9fa;
}

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

.application-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.application-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

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

.application-card h3 {
    font-size: 20px;
    padding: 20px;
    margin: 0;
    color: #222;
}

.application-card p {
    padding: 0 20px 20px;
    color: #666;
}

/* 7. Innovation Section */
.innovation {
    padding: 100px 0;
    /* background: url('image/innovation-bg.jpg') center/cover; */
    position: relative;
    color: #fff;
}

.innovation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
}

.innovation-content {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 0 24px;
}

.innovation-content h2 {
    font-size: 36px;
    margin-bottom: 50px;
}

.innovation-stats {
    display: flex;
    justify-content: center;
    gap: 80px;
}

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

.stat-item .number {
    font-size: 48px;
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}

.stat-item .label {
    font-size: 18px;
    opacity: 0.9;
}

/* 8. News Section */
.latest-news {
    padding: 80px 0;
    background: #fff;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 50px;
}

.news-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

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

.news-content {
    padding: 20px;
}

.news-content .date {
    color: #666;
    font-size: 14px;
    display: block;
    margin-bottom: 10px;
}

.news-content h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #222;
}

.news-content p {
    color: #666;
    margin-bottom: 20px;
}

.read-more {
    color: #007bff;
    font-weight: 500;
}

.read-more:hover {
    color: #0056b3;
}

/* 9. Contact Section */
.contact-cta {
    padding: 100px 0;
    background: #CC0000;
    color: #fff;
    text-align: center;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

.cta-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

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

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* 10. Common Components */
/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: #222;
    color: #fff;
}

.btn-primary:hover {
    background: #a01218;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

/* Links */
.link-arrow {
    display: inline-flex;
    align-items: center;
    color: #007bff;
    font-size: 16px;
}

.link-arrow i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.link-arrow:hover i {
    transform: translateX(5px);
}

/* 11. Utility Classes */
.view-all {
    color: #007bff;
    font-weight: 500;
    font-size: 16px;
}

.col-raw {
    display: flex;
    gap: 30px;
}

.col-6 {
    flex: 0 0 50%;
}

/* 12. Responsive Design */
@media (max-width: 1480px) {
    .product-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .application-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1200px) {
    .site {
        padding: 0 20px;
    }
    
    .nav-menu > li > a {
        padding: 25px 15px;
    }
    
    .hero-content h1 {
        font-size: 40px;
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .main-navigation {
        margin: 0 20px;
    }
    
    .nav-menu > li > a {
        font-size: 14px;
        padding: 25px 10px;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .application-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .innovation-stats {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .site-header {
        height: auto;
    }
    
    .site {
        flex-direction: column;
        padding: 15px;
    }
    
    .main-navigation {
        display: none; /* 需要添加移动端菜单 */
    }
    
    .header-right {
        margin-top: 15px;
    }
    
    .hero-section {
        padding: 100px 0 60px;
    }
    
    .hero-content h1 {
        font-size: 32px;
    }
    
    .product-grid,
    .application-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .innovation-stats {
        flex-direction: column;
        gap: 30px;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .section-header h2 {
        font-size: 28px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
    }
}


/* Footer Styles */
.site-footer {
    background: #222;
    color: #fff;
    padding: 60px 0 20px;
}

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

.footer-column h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 500;
}

.footer-logo {
    height: 120px;
    margin-bottom: 20px;
}

.footer-column p {
    color: #999;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.6;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

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

.footer-column ul li a {
    color: #999;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: #fff;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

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

.qr-code img {
    width: 120px;
    height: 120px;
    margin-bottom: 10px;
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #999;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #999;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #fff;
}

/* Responsive Footer */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}

/* GB-LANDING */
.wiring-method {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
    gap: 20px;
}

.method-label {
    width: 200px;
}

.recommendation {
    background-color: #cc0000;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    display: inline-block;
    margin-bottom: 5px;
}

.images-container {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-grow: 1;
}

.product-image {
    position: relative;
    width: 200px;
}

.product-image img {
    width: 93%;
    height: auto;
}

.rotation-indicator {
    position: absolute;
    top: 0;
    right: -30px;
    width: 60px;
}

.rotation-text {
    font-size: 12px;
    color: #666;
    max-width: 150px;
    text-align: center;
}

.dimension-drawing {
    width: 150px;
}

.dimension-drawing img {
    width: 100%;
    height: auto;
}

.note {
    font-size: 14px;
    color: #666;
    font-style: italic;
    margin-top: 20px;
}

.model-note {
    color: #666;
    font-size: 14px;
    margin-top: 10px;
}


/* Partner */
.partner-section {
    padding: 80px 0;
    background-color: #f8f9fa;
}


.section-header {
    text-align: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 36px;
    color: #2B2D42;
    margin-bottom: 16px;
}

.section-header p {
    font-size: 18px;
    color: #666;
}

.partner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 40px;
    align-items: center;
    justify-items: center;
}

.partner-logo {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}

.partner-logo:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.partner-logo img {
    max-width: 100%;
    max-height: 60px;
    object-fit: contain;
    filter: grayscale(0%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.partner-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* 添加简单的动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.partner-logo {
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: calc(var(--animation-order) * 0.1s);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .partner-section {
        padding: 60px 0;
    }

    .partner-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 20px;
    }

    .partner-logo {
        height: 80px;
        padding: 15px;
    }

    .partner-logo img {
        max-height: 50px;
    }

    .section-header h2 {
        font-size: 28px;
    }

    .section-header p {
        font-size: 16px;
    }
}