It really isn't possible to speak about Spanish food or the Mediterranean diet without noting the importance of the rich legacy of Al-Andalus gastronomy. Much of the current cuisine of the Iberian country is heir of the Muslim tradition, an empire that occupied up to 70% of the country at some point. This occupation extended from 711 to 1492, the year that Spain was unified and America was discovered.
Al-Andalus gastronomy is much reflected in the mediterranean diet, with some variations of course, such as the consumption of pork. This inheritance is specially marked in Andalusia, where gazpachos and other cold soups are originally from, but this influence is also reflected in other areas such as Alicante (Valencia) where a typical nougat is made, Murcia, Almeria and many more regions.
Just like in any other gastronomy, different food was consumed according to social class, cities and rural areas. The preparation methods varied as well. The tradition of Al-Andalus gastromomy is very rich and varied. They had less prohibitions than Jews, in fact mainly pork and fermented drinks were forbidden, however this precept was not always respected or followed 100% in Muslim Spain.
The Arab tradition in Spain also contributed to the Spanish vocabulary. If you study Spanish in Spain you will learn all about this. Many of the Moorish dishes and ingredients that made it into the Spanish language begin with the letter 'a' such as the culinary words like albóndiga (meatballs), aceite (oil), aceituna (olives), arroz (rice), etc.
The higher classes consumed little or no fish and shellfish. There was no religious prohibition related to products from the sea, but rather it was the doctors that discouraged them from the kitchens, arguing that it's pestilent odour and strong taste was not healthy. Nowadays fried fish is very common in the gastronomy of the southern Spanish region of Andalusia.
However the Al-andalus gastronomy of the more humble classes, specially those who lived near the coasts ate plenty of fish; raw, fried or salted, the most common were sardines and tuna. In fact, one of the main cookery techniques that the Arabs brought to Spain was pickling, especially fish in vinegar solutions. Today, you will find that pickled anchovies and sardines are commonly eaten as a tapa when served on a piece of bread.
There are many products that the Arabs introduced in the Iberian peninsula: eggplant, spinach, sugar cane, rice, apricots and citrics among others. It's true that olives have been cultivated in Spain from pre historic times, but the olive culture increased considerably under the Al-Andalus empire. The introduction of irrigation ditches, cisterns and draining systems contributed largely to it. But it wasn't only the olive production that increased with these improvements, but all kinds of crops.
The meats that the arabs prefered were lamb and poultry; basically with little grease. They would be marinated overnight in milk or vinegar, seasoned with vegetables such as onion, garlic, fennel and olives and spiced with cinnamon and coriander. Overall, the Al-Andalus diet was very healthy, especially compared to those typical from other regions of Spain with little or no Arab influence.
The Moors brought heaps of technology to the Iberian peninsular, but not all of them were for food. It is thanks to the Moors that the Spanish learnt how to use stills for distilling alcohol. The Moors didn't drink alcohol for religious purposes so they have developed these stills to create alcohols for medicinal purposes instead, as well as to produce perfumes. However, the Spanish used them to make alcohols that were able to be drunk such as licor de orujo, which is made from grape must.
Other areas of the Spanish gastronomy that were affected by the Moors include desserts. The Moors brought sugarcane to Spain and taught the Spanish how to refine it. This helped to revolutionise Spanish cakes and other sweets which has generally been made in a similar fashion to bread and then sweetened with honey. Other desserts influenced by the Moorish culture include arrope, a syrup which is used in a similar way to marmalade.
If you ever get a chance to go to Spain, make sure that you try out some of these dishes, and do not forget that it was the Moors who brought them to Spain all those centuries ago. Religion has played a large part in Spain's history, but as you will surely see, it is most visible in its gastronomy!