Some stores are modern-day general stores (Costco, Walmart) so you will end up purchasing from several categories on one trip (gift, groceries, home maintenance). YNAB, for example, allows for splitting a single transaction across several categories but you have to figure out what the cost of that individual item was.
It’s annoying to do in Canada where sales tax is not included. The fly in the ointment is that certain categories are tax-exempt (essential foods, kids’ clothing) but not others (prepackaged foods, adult clothing).
If your shopping trip is across three or more categories (gifts, clothing, food), you’ll have to figure out which items were tax-exempt before you can do any subdivision.