A traditional Catalan farmhouse is known as a 'mas' or 'masia', as in the famed FC Barcelona football (soccer) training academy, La Masia, where Messi et al. learned their trade.
The design is very often, viewed from the from, like a traditional 'child's drawing' of a house with a gable end, but lop-sided, with one side extending downwards, like a squatting bird with one wing outstretched.
That extended section to the side would house the livestock, a barn integrated into the farmhouse itself. A lot of them have now been converted into boutique hotels and holiday rental properties, and they tend to be really full of character. And really old in many cases, as you say.
Some are even fortified with a tower, like a miniature castle, reflecting the warfare and brigandry of the country's past.
Glad you enjoyed your visit to this part of the world, Melissa!