The idea that Scotland must automatically be socialist because it's poor is wrong.
Firstly, it's not especially poor, as others have said.
Secondly, there are traditional Scottish values that the Tories could have appealed to. Let us not forget that Adam Smith, the original apostle of the market, was himself a Scot. Thrift (or value-for-money), hard-work, personal liberty, self-reliance, UK-orientated (as opposed to Scottish-orientated) patriotism, are all traditional Scottish values - and natural territory for the conservatives to fight on.
What lost the Conservatives Scotland, I think is the perception that a bunch of English were lording over the Scots, harshly, and with no regard for Scottish opinion and without even having a Scottish mandate. Holding relatively few seats and ruling Scotland in what is perceived as a doctrinaire manner then becomes a cause to lose yet more seats, in a downward spiral.
Give Maggie a Scottish Willie (I mean as in a Willie Whitelaw type figure), who persuades her to temper her language with regard to Scotland, and take care to appear inclusive and understanding of Scotland, and the political situation there would be much different now.