Barcelona would aptly fit the shopping, nightlife and beach, if they left out Malaga and Marbella, they could maybe have 2-3 nights in Barcelona at the end of the trip.
Have you looked at going straight to Alicante on day 1
spend 2 nights Alicante - has a nice beach as well as good shops
spend 2 nights Granada
spennd 3 nights Barcelona
Fly home.
_________________________
Jan
. _o
. -\<,
() / ()