I personally see idea A much more complete, with some adjustments.
– should the query be cleared as soon as they make a selection? –
The problem I see in this design is that the query and the chips share the same field and the result is very confusing for the user. The logic would be a text editing field and the chip's area. The text inside a chip is not editable, while the query is. There is a possibility that the user wants to add one more character to those already written, I would keep the query but in a separate field and the chips in a clearly non-editable area.
– Once the user selects a category, since they must only select one, should other Categories not be shown anymore –
Pretty much EVERY TIME I have to select a checkbox, I always select the wrong one the first time. The only way to not start the search process over again in the event of an error is to keep all possibilities clearly visible. Ultimately, it would be useful to continue showing all possible categories and hide the subcategories of the unselected ones.
– Once the user selects a category, should the rest of its child Subcategories appear automatically –
I would let the user decide if he/she wants to see all the subcategories with a View all option. At this point, I think the most important action is the immediate search with the typed characters than displaying all the subcategories of an item. If there are three subcategories, it would not be a problem, but if there are more than ten, I would let the user choose if they want to momentarily abandon the search and use vertical scrolling to see all the content of the results field.