With 8 days and a small child in tow, I would stick with 2 locations max and day trip from there if you want to see other places.
Zagreb is a pleasant city but not a ‘must see’ IMHO. It’s not a patch on Budapest or Prague. Given your time constraints and that you’re flying into and out of Dubrovnik, you should stick with the coast.
Have a great trip, Croatia is lovely! As are it’s wines!