In Spain it is always best to ask the tourism office/ police station/ local town hall to be absolutely certain as Spain has a lot of [over] regulation (drone paranoia) and huge, regressive fines if you infringe on anything.
Those national airspace height/ distance restrictions do not universally apply in Spain, I'm afraid to say. There are many exceptions, and most of those are provincial. Spain has a system of very devolved and proportionally represented governments and provincial governments, all of which have differing laws and some of which do the opposite even to nationally based laws and guidelines.
Do not fly in national parks or reserves either, hefty fines to be had there. Catalunya has a devolved government (as are most regions in Spain), so you need to check out for any localised nuances in the law. Nationally speaking in Spain, as of right now, drones are classed as model aircraft, governed by the national model flying club, and hobbyists must fly in designated areas only and get membership of the national model flying club. Spain will come down on you very hard if you fly anywhere where forest fire helicopter zones or military or civilian aerodromes have take off/ landing flight paths. I have read and seen in Spain of stories of people getting 6 figure fines due to Spanish air force jets being scrambled to investigate "unidentified flying objects" such as UAVs, and they will give you the bill, potentially. Spain has some of the single most regressive laws towards drones in the whole EU, beaten only by Sweden and Belgium. It is not entirely banned, but I urge you to thoroughly do your local research before thinking of taking off.
My experience of Spain is through my having a Spanish wife, and I go 3 times a year there.