Macroalgal blooms alter community structure and primary productivity in marine ecosystems