Miller takes loss as Padres beat Cardinals 4-2