/* 导航栏下拉菜单的主要样式设置 */
.mega-dropdown {
    /* 设置为静态定位，确保下拉菜单能够正确显示 */
    position: static !important;
}

/* 下拉菜单容器的基本样式 */
.mega-dropdown-menu {
    width: 100%;
    padding: 20px 0;
    margin-top: 0;
    background-color: #fff;
    border: none;
    border-radius: 0;
    /* 添加阴影效果增加层次感 */
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    /* 初始状态设置为隐藏 */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    /* 添加过渡效果使显示更流畅 */
    transition: all 0.3s ease;
    position: absolute;
    left: 0;
    right: 0;
}

/* 鼠标悬停时显示下拉菜单 */
.mega-dropdown:hover .mega-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 产品分类列表样式 */
.product-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 产品分类列表项样式 */
.product-category-list li {
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

/* 产品分类列表项悬停和激活状态样式 */
.product-category-list li:hover,
.product-category-list li.active {
    background-color: var(--primary-color);
    color: #fff;
}

/* 产品分类列表项文本样式 */
.product-category-list li span {
    display: block;
    position: relative;
    padding-right: 20px;
}

/* 产品分类内容区域基本样式 */
.product-category-content {
    padding: 15px;
    display: none;
}

/* 产品分类内容区域激活状态样式 */
.product-category-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
    opacity: 1;
    visibility: visible;
}

/* 产品分类标题样式 */
.product-category-title {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* 产品项目网格布局 */
.product-item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 20px;
}

/* 单个产品项目的基本样式 */
.product-item {
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.5s ease forwards;
}

/* 产品图片容器样式 */
.product-item .img {
    display: block;
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 8px;
    position: relative;
    /* 增加padding-top值以确保图片容器有足够空间 */
    /* padding-top: 200%; */
    height: 120px;  /* 设置固定高度 */
    width: 300px;   /* 设置固定宽度 */
    margin: 0 auto; /* 居中显示 */
}

/* 产品图片样式 */
.product-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 150%;
    height: 100%;
    /* 调整object-fit属性以确保图片完整显示 */
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* 产品图片悬停效果 */
.product-item:hover img {
    transform: scale(1.1);
}

/* 产品标题样式 */
.product-item .proTitle {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

/* 产品标题悬停效果 */
.product-item:hover .proTitle {
    color: var(--primary-color);
}

/* 淡入动画关键帧 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 向上滑动动画关键帧 */
@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}