GALLERY: 49ers lose control in second half, fall in Detroit