Inflation cools in December, CPI shows, but grocery prices rise