﻿:root {
    --primary-color: #003366;
    --secondary-color: #06b590;
    --accent-color: #ff6b6b;
}

.products-wrapper {
    background: #f8f9fa;
    min-height: 100vh;
    padding: 60px 0 110px 0;
}

.flcontainer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.widget-wrapper {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

.widget-header {
    background: var(--primary-color);
    color: white;
    padding: 15px 20px;
}
    .widget-header h6 {
        color:#FFF;
    }
        .widget-header h6 a {
            color:#FFF;
        }
.widget-title {
    margin: 0;
    font-size: 1.4em;
    font-weight: 600;
    color:#FFF !important;
}

.widget-content {
    padding: 0;
}

/* 移除固定高度和滚动条 */
.category-widget {
    max-height: none; /* 移除固定高度 */
    overflow-y: visible;
    ; /* 移除滚动条 */
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item.dropdown {
    border-bottom: 1px solid #f0f0f0;
}

    .nav-item.dropdown:last-child {
        border-bottom: none;
    }

.category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    cursor: pointer;
}

    .category-link:hover {
        background: #f8f9fa;
        color: var(--primary-color);
    }

    .category-link.active {
        background: var(--primary-color);
        color: white;
    }

/* 修改二级菜单高度控制 */
.sub-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #f8f9fa;
    max-height: 0; /* 初始高度为0 */
    overflow: hidden; /* 隐藏溢出内容 */
    transition: max-height 0.3s ease; /* 平滑过渡 */
}

/* 激活状态下高度自适应 */
.nav-item.dropdown.active .sub-category-list {
    max-height: 1000px; /* 设置足够大的高度值 */
}

.sub-category-item {
    border-bottom: 1px solid #e9ecef;
}

    .sub-category-item:last-child {
        border-bottom: none;
    }

.sub-category-link {
    display: block;
    padding: 10px 20px 10px 40px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

    .sub-category-link:hover {
        background: #e9ecef;
        color: var(--primary-color);
    }

    .sub-category-link.active {
        background: var(--primary-color);
        color: white;
    }

.category-icon {
    transition: transform 0.3s ease;
}

.nav-item.dropdown.active .category-icon {
    transform: rotate(90deg);
}

.products-main-content {
    padding-left: 30px;
}

.category-display {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.current-category-title {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 600;
}

.sub-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.sub-category-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

    .sub-category-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        border-color: var(--primary-color);
    }

.sub-category-icon {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.sub-category-name {
    font-weight: 500;
    color: #333;
    margin: 0;
}

.sub-category-count {
    color: #666;
    font-size: 12px;
}

@media (max-width: 768px) {
    .products-main-content {
        padding-left: 0;
        margin-top: 30px;
    }

    .sub-category-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}
