It says 336 grams of carbs as a number for getting total carbohydrates.
336 grams of rice is ~100 grams of carbs (Google source).
It's not 336 grams of a carb source, it's 336 grams of carbs in total if that makes sense. So you'd have to eat ~1kg rice to get in 336g carbs, not that you should haha.
And yes that's true, different foods have different amounts of calories, hence different macros: protein, fat, carbs.
So you might not know, but 1g of carb is 4 calories, 1g of protein is 4 calories and 1g of fat is 9 calories.
So if we calculate 336*4 for carbs, 224*4 for protein and 68*9 for fat and add them all, we get the total calories:
1344 Calories of Carbs =>
896 Calories of Protein => 1344+896+612 = 2852 Calories, which is close enough to 3000.
612 Calories of Fat =>
Hope that made more sense. So it's not the grams of food, but total carbs from foods, so you'll probably be eating more grams of a specific food.