How should sub-items behave with multi-select controls?

The scenario: A user can add individual items to an order, or use a template to get started, which preselects several items. If a template is used, the user can de-select items that they don't want to include in the order, and adjust the quantity and units on items. For example, the user can choose 3 green apples, or a box of green apples. The template gives the user a rough idea of how to get started with an order.

The question: Some items contain variants, such as milk in the example below. We would want the user to easily add or remove specific kinds of milk. The system would provide defaults on the sub-items - in the below example, by default, there would be 5 units of regular milk and 5 units of strawberry milk in this order, but the user should be able to adjust the kind and quantity of each kind of milk.

Here is the pattern I've come up with (very early on):

Weekly Shopping List with several checkboxes next to items, some of which are indented to form a subset

I see at least two potential problems with it:

  • Indenting the checkboxes visually throws off the select all / deselect all function. In fact, I'm wondering if subitems should behave differently with it. If the user deselects all and then selects all again, it seems like it could get messy with subitems, and items that were previously set to a quantity of zero.
  • In this design, there isn't a total for each "main" item, such as milk in general, so it's on the user to keep a total in their head if they want to add combinations together. (It seems impossible to do this when the user can mix or match unit types.)

Is this too complex to work with a checklist? Or are there considerations that might make it work?