Matt Cain allowed just two runs on four hits over seven innings, but the Giants were 1-for-9 with runners in scoring position and lost 3-1.