I think it is not surprising it has happened and we can hope that the situation will calm down. The Catalans have felt they have been suppressed for a long time and had to do something. the PP is a type of a party that work on the basis of provocation and have been for like a decade showing the Catalans (and previously to the Basques) a finger. So obviously, the Catalans rightly felt there was no justice, they have been contributing the most to the national treasury (I think the fifth) but were not getting not much back.

Plus, the idea that Spain is a uniform country is a myth. The Catalans and the Basque country and Galicia have their own culture and language and Catalonia has always been the most open to the world, things have usually started there (e.g. the trends and design, Gaudi and so on) and they are closest to Europe, also augmented with Barcelona being a port.
So they were actually not asking for that much or were excessive in their demands.

It is not very clear how many people/what percentage of the Catalan population really want independence (it is said that it is almost half).
If Spain did the same as UK and Scotland, and declared few years that there would be a legal referendum, it is unlikely that there would really be an independence result. But at least the Catalans would be given such option and fair treatment and justice and opportunity to properly decide about their governance. The Spanish government have been totally idiotic and have actually fueled this situation, see above mentioned finger to the Catalans. So we can hope that the result will be that there will be given a chance of proper referendum.

The question however, is if it is such a disaster if Catalonia becomes independent. It is not a bad idea if it is handled properly and not the end of the world. I think the future of Europe being the continent of nation states is outdated. nation states are the past. I can very much imagine Europe of regions and city states, which was a sort of the way how Europe worked for much longer than the nation states. I know the problem with multi-ethnic empires but I think the EU would be ok as collection of different regions, or Swiss or former city states model.
sort of the past showing the way to the future. but then, the problem of borders and containment is actually a problem. I remember that I read how e.g. in the medieval times, in Denmark, some provinces/duchies officially belongs to the German empire but people were subject to King of Denmark and nobody give two hoots about it until the Treaty of
Westphalia and when it was decided that each "nation" had to have a border and they started wars over borders and frontiers.

And it has been already happening with the revolt of the countryside -
e.g. in UK with Brexit or in USA with Trump and now we also see the revolt of some cities ;)

Anyhow, what I am trying to say is that i think the future needs is some sort of flattening the authority from central level to more local one, to region or city and then some sort of cooperation in a bigger conglomerate (it can be EU, plus Germany might deliver this anyhow, as they do believe in regions and Germany is based on regions). and giving people more power on local level rather than deciding everything from the top/capital/elites.

But hopefully, what should come out of this - or what I hope will - in Spain is that the Catalans will get a proper referendum and the opportunity to decide. and also, that the Spanish monarchy will go as the recent events show that some arguments for it fail and it is totally

I stand corrected re the sentence where i said this was the city joining the revolt of the countryside. it seems that even in Catalonia, it was mostly the countryside and Barcelona had more ppl for the unity.
in any case, it is the classical case and what is happening elsewhere that the elites and the center and the capital do not listen and do not care for the "countryside" and population at large wants. and simply does not listen to their concerns.

I stand with the Catalan people and their right to determine their own future and how to govern their affairs.
I wish them
good luck -