trieste in italy is not far from piran and you can drive there easily or go by ferry from piran.
trieste is an italian town with a lot of austrian influence in it´s architecture as it was part of the austrian/hungarian empire for many years.
it´s main square is located right by the sea dn that makes it a very pleasant town to visit.
the town also has several good places to eat and a good shopping district.
Another day excursion maybe would be Trieste in Italy. It's another country of course but Trieste looks, smells like many Slovenian Coastal towns although much more hectic & busy, as a hub to enter the rest of Italy & also to enter Slovenia on the Coast !
Many mighty fine architectures in Trieste that is so full of history, that shouldn't be missed.