Yes, you need to hire an attorney or ask that one be appointed for you. They may have had good cause to detain you for investigation depending on your behavior ... and two people getting into a parked car with the windows down in an area where there have been drug transactions IS likely a good reason to support a detention ... the bit about getting in to make a phone was a wee bit weak.
But, having reasonable, articulable suspicion to detain does not grant probable cause to conduct a search. There are a number of possibilities under which a search might be legal and you may not find out what they are hanging their hat on unless this goes to court.

