The debit card of Berliner Sparkasse works that way (paying in shops and domestic, Sparkasse-owned ATM is free, taking out money abroad isn’t). However, you can’t pay too much with that debit card outside Germany, so they have this “travel pack credit card” – taking out money with it abroad is free (if the ATM allows it), but using it otherwise still incurs a transaction fee.