道草(みちくさ)を食(く)う (michikusa o kuu) literally means ‘to eat grass on the road’. Figuratively, it means that you stop by somewhere and waste time/do something unplanned on the way to the destination. This idiom originates from how a horse suddenly stops and eats grass along the road.
(〜で)道草を食う: waste time/loiter/do something unplanned/loiter (at ~) on one’s way
I stopped by at a convenience store and I ended up being late.
literally “sell oil” and figuratively “waste time somewhere (esp. during working hours or before coming home from school)”
“stop by somewhere”