Giants’ offense awakens but Cubs outslug SF 12-11 at Wrigley Field