/* 新的产品超级菜单样式 - 基于参考设计重新优化 */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border-radius: 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-15px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    margin-top: 12px;
    width: 95vw;
    max-width: 1200px;
    overflow: hidden;
}

.nav-item.dropdown:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* 新的产品超级菜单主容器 */
.nav-pro {
    width: 100%;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
}

.main-width {
    display: flex;
    min-height: 500px;
    width: 100%;
}

/* 左侧分类导航区域 */
.type {
    width: 220px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-right: 1px solid #e9ecef;
    padding: 24px 0;
    flex-shrink: 0;
}

.type .con {
    margin-bottom: 12px;
}

.type .con span {
    display: block;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.type .con span:hover,
.type .con span.on {
    background: #fff;
    color: #e74c3c;
    border-left-color: #e74c3c;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.15);
}

.type .con span.on::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid #e74c3c;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.type .con span a {
    color: inherit;
    text-decoration: none;
}

/* 右侧产品展示区域 */
.box {
    flex: 1;
    padding: 24px;
    background: #fff;
    overflow: visible;
}

.mega-menu .nav-pro .box .item {
    display: none;
}

.mega-menu .nav-pro .box .item.on {
    display: block;
}

.slide-pic ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
    min-height: 350px;
}

.slide-pic li {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    border-radius: 0;
    padding: 8px;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: visible;
}

.slide-pic li:hover {
    transform: translateY(-4px);
    box-shadow: none;
    border-color: transparent;
}

.slide-pic li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.slide-pic li img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}

.slide-pic li:hover img {
    transform: scale(1.05);
}

.slide-pic li p {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
    text-align: center;
    line-height: 1.4;
    word-break: break-word;
}

.slide-pic li:hover p {
    color: #e74c3c;
}

/* 更多链接 */
.more {
    margin-top: 24px;
    text-align: center;
}

.more a {
    display: inline-block;
    padding: 10px 24px;
    background: #e74c3c;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.2);
}

.more a:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.4);
}

/* 响应式设计 */
@media (max-width: 1400px) {
    .mega-menu {
        width: 98vw;
        max-width: 1100px;
    }
    
    .type {
        width: 200px;
    }
    
    .slide-pic ul {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 20px;
    }
    
    .slide-pic li img {
        width: 96px;
        height: 96px;
    }
}

@media (max-width: 1200px) {
    .mega-menu {
        width: 100vw;
        max-width: 1000px;
    }
    
    .type {
        width: 180px;
    }
    
    .slide-pic ul {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 16px;
    }
    
    .slide-pic li {
        padding: 12px;
    }
    
    .slide-pic li img {
        width: 84px;
        height: 84px;
    }
    
    .slide-pic li p {
        font-size: 13px;
    }
}

@media (max-width: 1024px) {
    .main-width {
        flex-direction: column;
        min-height: auto;
    }
    
    .type {
        width: 100%;
        background: #f8f9fa;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
        padding: 16px 0;
    }
    
    .type .con {
        display: inline-block;
        margin-right: 12px;
        margin-bottom: 8px;
    }
    
    .type .con span {
        padding: 10px 16px;
        border-radius: 20px;
        border-left: none;
        font-size: 13px;
    }
    
    .type .con span:hover,
    .type .con span.on {
        background: #e74c3c;
        color: #fff;
        border-left: none;
        box-shadow: 0 2px 8px rgba(231, 76, 60, 0.2);
    }
    
    .type .con span.on::after {
        display: none;
    }
    
    .box {
        padding: 20px;
    }
    
    .slide-pic ul {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 12px;
    }
    
    .slide-pic li {
        padding: 8px;
    }
    
    .slide-pic li img {
        width: 72px;
        height: 72px;
    }
    
    .slide-pic li p {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .mega-menu.pc-menu {
        display: none;
    }
    
    .mobile-dropdown {
        display: block;
    }
    
    .nav-item.dropdown .mobile-dropdown {
        display: block;
    }
}

@media (min-width: 769px) {
    .mobile-dropdown {
        display: none;
    }
}

/* 兼容性样式 - 保持与现有代码的兼容 */
.mega-menu-content.category-layout {
    display: none;
}

.mega-menu-categories {
    display: none;
}

.mega-menu-products {
    display: none;
}

.mega-menu .products-grid {
    display: none;
} 