

.wb-catloop {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

.wb-catloop-all .wb-catloop-group {
    margin-bottom: 2px;
}

.wb-catloop-all .wb-catloop-group:last-child {
    margin-bottom: 0;
}

.wb-catloop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #1a1a4e;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

.wb-catloop-header:hover {
    box-shadow: 0 2px 8px rgba(26, 26, 78, 0.25);
}

.wb-catloop-header.active {
    background: #0d0d38;
    box-shadow: inset 3px 0 0 #fff, 0 2px 8px rgba(26, 26, 78, 0.3);
}

.wb-catloop-header-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    transition: color 0.25s ease, opacity 0.25s ease;
    margin: 0;
    flex: 1;
}

.wb-catloop-header-title:hover {
    opacity: 0.85;
    color: #fff;
}

.wb-catloop-header .wb-catloop-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 28px;
    padding: 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    flex-shrink: 0;
    margin-left: 12px;
    transition: color 0.25s ease, background-color 0.25s ease;
}

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

.wb-catloop-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.wb-catloop-item:last-child {
    border-bottom: none;
}

.wb-catloop-item:hover {
    background: #f8f8fc;
}

.wb-catloop-item.active {
    background: #f0f0ff;
}

.wb-catloop-item a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    flex: 1;
    transition: color 0.25s ease;
}

.wb-catloop-item a:hover {
    color: #1a1a4e;
}

.wb-catloop-item.active a {
    color: #1a1a4e;
    font-weight: 600;
}

.wb-catloop-item .wb-catloop-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    flex: 1;
}

.wb-catloop-item .wb-catloop-count {
    font-size: 13px;
    color: #999;
    flex-shrink: 0;
    margin-left: 8px;
    font-weight: 500;
}

.wb-catloop-attr-section {
    padding: 0 20px 16px;
}

.wb-catloop-attr-title {
    font-weight: 700;
    color: #1a1a4e;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 20px 0 12px;
    padding: 0;
}

.wb-catloop-attr-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wb-catloop-attr-item {
    display: flex;
    align-items: center;
    padding: 4px 0;
}

.wb-catloop-attr-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    width: 100%;
    margin: 0;
    transition: color 0.2s ease;
}

.wb-catloop-attr-item label:hover {
    color: #1a1a4e;
}

.wb-catloop-attr-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #1a1a4e;
}

.wb-catloop-attr-label {
    font-size: 13px;
    color: #444;
    line-height: 1.4;
    flex: 1;
}

.wb-catloop-attr-count {
    color: #999;
    font-size: 12px;
}

.wb-catloop-filter-divider {
    border: none;
    border-top: 1px solid #eee;
    margin: 16px 20px;
}

.wb-catloop-filter-section {
    padding: 0 20px 16px;
}

.wb-catloop-filter-title {
    font-weight: 700;
    color: #1a1a4e;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 20px 0 12px;
    padding: 0;
}

.wb-catloop-filter-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wb-catloop-filter-item {
    display: flex;
    align-items: center;
    padding: 4px 0;
}

.wb-catloop-filter-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    width: 100%;
    margin: 0;
    transition: color 0.2s ease;
}

.wb-catloop-filter-item label:hover {
    color: #1a1a4e;
}

.wb-catloop-filter-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #1a1a4e;
}

.wb-catloop-filter-label {
    font-size: 13px;
    color: #444;
    line-height: 1.4;
    flex: 1;
}

.wb-catloop-filter-count {
    color: #999;
    font-size: 12px;
}

.wb-catloop-cat-title {
    font-weight: 700;
    color: #333;
    padding: 14px 20px 8px;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.wb-catloop-search {
    position: relative;
    padding: 0 16px 6px;
}

.wb-catloop-search-input {
    width: 100%;
    padding: 10px 38px 10px 14px;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    font-size: 13px;
    color: #333;
    background: #f9f9fb;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    box-sizing: border-box;
}

.wb-catloop-search-input:focus {
    border-color: #1a1a4e;
    box-shadow: 0 0 0 3px rgba(26, 26, 78, 0.08);
    background: #fff;
}

.wb-catloop-search-input::placeholder {
    color: #aaa;
}

.wb-catloop-search-icon {
    position: absolute;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
    display: flex;
    align-items: center;
    transition: color 0.25s ease;
}

.wb-catloop-search-input:focus ~ .wb-catloop-search-icon {
    color: #1a1a4e;
}

@media (max-width: 767px) {
    .wb-catloop-header {
        padding: 14px 16px;
        padding-right: 40px;
        position: relative;
        cursor: pointer;
    }

    .wb-catloop-item {
        padding: 10px 16px;
    }

    .wb-catloop-attr-section {
        padding: 0;
    }

    .wb-catloop-filter-section {
        padding: 0;
    }

    .wb-catloop-attr-list,
    .wb-catloop-filter-list {
        padding: 0;
    }

    .wb-catloop-filter-divider {
        margin: 12px 20px;
    }

    .wb-catloop-all .wb-catloop-group {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .wb-catloop-all .wb-catloop-group:last-child {
        border-bottom: none;
    }

    .wb-catloop-list {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
    }
    .wb-catloop-list.wb-expanded {
        max-height: 2000px;
    }

    .wb-catloop-attr-list {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, padding 0.35s ease;
    }
    .wb-catloop-attr-list.wb-expanded {
        max-height: 2000px;
        padding-left: 20px;
        padding-right: 20px;
        padding-bottom: 8px;
    }

    .wb-catloop-filter-list {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, padding 0.35s ease;
    }
    .wb-catloop-filter-list.wb-expanded {
        max-height: 2000px;
        padding-left: 20px;
        padding-right: 20px;
        padding-bottom: 8px;
    }

    .wb-catloop-cat-body {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
    }
    .wb-catloop-cat-body.wb-expanded {
        max-height: 5000px;
    }

    .wb-catloop-cat-title,
    .wb-catloop-attr-title,
    .wb-catloop-filter-title {
        cursor: pointer;
        position: relative;
        padding: 14px 20px;
        padding-right: 40px;
    }

    .wb-catloop-header {
        padding: 14px 16px;
        padding-right: 40px;
        position: relative;
        cursor: pointer;
    }

    .wb-catloop-cat-title::after,
    .wb-catloop-attr-title::after,
    .wb-catloop-filter-title::after {
        content: '';
        position: absolute;
        right: 20px;
        top: 50%;
        width: 8px;
        height: 8px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: translateY(-60%) rotate(45deg);
        transition: transform 0.25s ease;
        opacity: 0.6;
    }

    .wb-catloop-cat-title.wb-toggle-open::after,
    .wb-catloop-attr-title.wb-toggle-open::after,
    .wb-catloop-filter-title.wb-toggle-open::after {
        transform: translateY(-30%) rotate(-135deg);
    }

    .wb-catloop-header::after {
        content: '';
        position: absolute;
        right: 20px;
        top: 50%;
        width: 8px;
        height: 8px;
        border-right: 2px solid #fff;
        border-bottom: 2px solid #fff;
        transform: translateY(-60%) rotate(45deg);
        transition: transform 0.25s ease;
        opacity: 0.7;
    }
    .wb-catloop-header.wb-toggle-open::after {
        transform: translateY(-30%) rotate(-135deg);
    }
}
