The Spanish pharmacy and the Swiss pharmacy are similar only abroad. Same green sign, same layout, same feeling that you can go for whatever you need. But as soon as you start ordering, the differences appear. In Spain you are used to entering, ordering what you need and leaving in two minutes. In Switzerland, that same tour can end with the pharmacist explaining that you need a prescription, or with the box marking a price you did not expect.
Many medicines sold in Spain without a prescription require a prescription. It's not whimsical: Swiss regulation is simply more restrictive. Certain antibiotics, strong anti-inflammatories, some anti-influenza drugs, codeine medications. What you bought without thinking at the pharmacy in your neighborhood may require a visit to the doctor first, which depending on the canton and if you have a family doctor costs between 20 and 60 francs, plus the wait. And the prices do not accompany either: a paracetamol of 40 tablets is around 8-12 francs, a box of ibuprofen something similar.
That said, there are things to know so you don't overpay. The basic insurance (LAMal) covers the drugs included in the official list of specialties, but only after the annual excess is exhausted, which is at least 300 francs, and with a copayment of 10% above. What is sold without a prescription is never covered by LAMal. What it covers, there is a way to reduce the cost: the pharmacist is required by law to offer you the cheapest generic drug equivalent, unless the doctor has expressly stated otherwise. If they don't offer it to you, you can order it yourself. Many do not know and pay for the original without any need.