Apple hits $4trn amid market rally and hot iPhone 17 sales