Always be ready to walk out the door without buying. I didn't know that when I bought my first car, and I paid too much.Walk if they won't work with what you can afford.
Also: if you are able to buy the car for cash, DO NOT TELL them that upfront. When hubby and I bought our first car as a couple, I told him that. The salesman said, "We have some really great rates right now!"
"How much?" I asked.
"11%!"
I laughed and said, "Nobody's paying us 11% on our money. We're going to pay cash."
Oh, my his face fell. I bet we saved $1000 or more on that purchase, back in the 90s.