You denied yourself whatever because you were surprised, the dealer didn’t explain things, and you didn’t have time to carefully think it thru. This practice has been building for several years in my area, NJ near NYC.
AND they were wrong, there should be no add-on if using a debit card which is essentially the same as cash in it’s implementation.
Online sales has improved competitiveness, lower costs have resulted in nearly everything, isn’t it weird that Sears, their origin a big mail order catalog, and/or Kodak, A&P ... failed, how could they not figure it out?
Thus profit margins have narrowed, everywhere, and in order to compete, keep the net price down, then it makes sense to pass any added fees back to the customer who chooses to use a CC that involves an added charge to the seller. Equipment; Services; Restaurants ..... they all must compete.
To keep the net price down, I understand sellers wanting to use PayPal Friends and Family, but it opens the door for fraud, I hope they will let me pay the add-on fee to get price protection, some hope they will split the fee, whatever.
I go out once a week for dinner with a friend, for nearly 40 years now; we usually just give them two cards, 50/50 split, lately we are bringing more cash with us.

