/* 分类菜单重构 - 使用Flex布局 */
.shop-category-wrapper {
    position: absolute;
    top: 100%;
    left: 0;
    width: 1200px;
    z-index: 999;
    display: none; /* 默认隐藏 */
}

/* 触发类 - 确保与原始结构兼容 */
li.category:hover .shop-category-wrapper {
    display: block;
}

/* 一级分类容器 */
.shop-category-container {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #eee;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-height: 400px;
    width: 200px;
    position: relative;
    z-index: 1001;
}

/* 一级分类项目 */
.shop-category-item {
    padding: 0.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    text-align: left;
}

/* 一级分类链接 */
.shop-category-link {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    border-left: 3px solid transparent;
    text-decoration: none;
    position: relative;
    transition: all 0.2s ease;
    height: 36px; /* 固定高度确保一致性 */
    width: 100%; /* 占满整个宽度 */
    box-sizing: border-box; /* 确保padding不会增加宽度 */
}

/* 分类图片样式 */
.shop-category-image {
    width: 20px;
    height: 20px;
    object-fit: contain;
    margin-right: 10px;
    border-radius: 3px;
    flex-shrink: 0; /* 防止图片被压缩 */
}

.shop-category-text {
    flex: 1; /* 允许文本占据剩余空间 */
    color: #333 !important;
    font-size: 14px;
    line-height: 20px; /* 与图标高度一致 */
    white-space: nowrap; /* 防止文本换行 */
    overflow: hidden; /* 隐藏溢出内容 */
    text-overflow: ellipsis; /* 文本溢出显示省略号 */
}

/* 一级分类链接箭头 */
.shop-category-link:after {
    content: "\f105";
    font-family: "FontAwesome";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

/* 一级分类悬停效果 */
.shop-category-item:hover .shop-category-link {
    background: #fff;
    color: #007bff;
    border-left-color: #007bff;
}

/* 二级分类容器 - 关键改动：固定位置显示 */
.shop-subcategory-container {
    /*display: none; !* 默认隐藏 *!*/
}

/* 使用固定定位的二级分类容器 */
#fixed-subcategory-container {
    position: absolute;
    left: 200px;
    top: 0;
    width: 1040px;
    min-height: 450px;
    background: #fff;
    padding: 15px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    z-index: 1000;
    /*display: none; !*    默认隐藏 *!*/
    /*overflow-y: auto;*/
    display: grid;
    grid-template-columns: 740px 300px; /* 设置两列的固定宽度 */
    gap:0;
}


/* 二级分类块 */
.shop-subcategory-block {
    display: flex;
    flex:1;
    margin-bottom: 3px;
    border-bottom: 1px dashed #eee;
    padding-bottom: 3px;
}

.category-side-left {
    width: 710px;
}
.category-side-ad {
    position: absolute;
    right:0px;
    top: 0;
    height: 450px;
    border: 1px solid #eee; /* 添加边框便于调试 */
    background: #f9f9f9; /* 添加背景色便于调试 */
    z-index: 999; /* 确保广告在顶层显示 */
}
.category-side-ad img {

}
/* 二级分类标题区域 */
.shop-subcategory-header {
    flex: 1 0 auto;

    max-width: 180px;
}

/* 二级分类标题 */
.shop-subcategory-title {
    font-weight: bold;
    font-size: 14px;
    color: #555!important;
    text-decoration: none;
    display: inline-block;

    text-shadow: 0 1px 1px rgba(255,255,255,0.8);
}

.shop-subcategory-title:hover {
    color: #007bff!important;
}

/* 三级分类容器 */
.shop-third-category-wrapper {
    flex: 4;
    display: flex;
    flex-wrap: wrap;

}

/* 三级分类项目 */
.shop-third-category-item {
    margin-right: 5px;
    margin-bottom: 5px;
    color: #666!important;
    font-size: 13px;
    text-decoration: none;

    white-space: nowrap;
    background-color: rgba(255,255,255,0.7);
    padding: 0 5px!important;
    border-radius: 3px;
}

.shop-third-category-item:hover {
    color: #007bff!important;
    background-color: #f5f5f5;
}
.category-menu-container {
    position: relative;
}
/* 响应式调整 */
@media (max-width: 991px) {
    .shop-category-wrapper {
        width: 100%;
        position: static;
    }
    #fixed-subcategory-container {
        grid-template-columns: 1fr; /* 单列堆叠 */
    }

    .category-side-ad {
        position: static; /* 解除绝对定位 */
        margin-top: 15px;
    }
    

    .shop-third-category-wrapper {
        margin-left: 20px;
    }
}

.adimages{
    display: grid;
    /* 设置最多 5 列，每列最小宽度为 0，确保内容能正确显示 */
    grid-template-columns: repeat(auto-fill, minmax(17%, 1fr));
    max-width: 5fr;
    width: 100%;
    height: 80px;
    gap: 2px; /* 可根据需要调整列与行之间的间距 */
}
.adimages .adimageitem{
    width: 100%;

}

.adimages .adimageitem img{
    width: 100%;
    height: auto;

}