/* 移动端底部分类导航 */
.mobile-category-container {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

@media (max-width: 767px) {
    .mobile-category-container {
        display: block;
    }
    
    /* 隐藏桌面端分类 */
    .sidebar .product-categories-widget {
        display: none;
    }
    
    /* 为主内容区添加底部间距，避免被导航遮挡 */
    .main-content-area {
        padding-bottom: 120px;
    }
}

/* 一级分类横向滚动 */
.category-level-1 {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    padding: 8px 0;
    background: #f8f8f8;
    border-bottom: 1px solid #eee;
    -webkit-overflow-scrolling: touch;
    font-size: 13px;
}

.cat-l1-item {
    padding: 6px 10px;
    margin: 0 3px;
    border-radius: 10px;
    cursor: pointer;
    flex-shrink: 0;
    color: #333;
}

.cat-l1-item.active {
    background: #2c3e50;
    color: #fff;
}

/* 二级分类横向滚动 */
.category-level-2 {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    padding: 5px 0;
    -webkit-overflow-scrolling: touch;
}

.cat-l2-item {
    padding: 5px 10px;
    margin: 0 3px;
    border-radius: 10px;
    flex-shrink: 0;
    color: #333;
    text-decoration: none;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 11px;
}

.cat-l2-item.active {
    background: #2c3e50;
    color: #fff;
    border-color: #337ab7;
}

/* 加载状态 */
.loading {
    padding: 10px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.no-subcategories {
    padding: 10px;
    color: #666;
    font-style: italic;
}





/* 电脑端分类样式调整 */
.sidebar .product-categories .children {
    display: none; /* 默认隐藏所有二级分类 */
    padding-left: 15px;
    margin-top: 5px;
}

.sidebar .product-categories .current-cat > .children,
.sidebar .product-categories .current-cat-parent > .children {
    display: block; /* 只显示当前激活的二级分类 */
}

/* 当前分类样式 */
.sidebar .product-categories .current-cat > a,
.sidebar .product-categories .current-cat-parent > a {
    color: #007bff;
    font-weight: 600;
}