He suffered with the Lions for years, so now that they're finally winning ... Tim Allen isn't just bragging about his squad, he's talking SMACK about another NFC team.

Allen hit up the Casamigos Tequila party in Beverly Hills this weekend dressed up as Lions QB Matt Stafford (this was before Matt's fake-spike that killed the Cowboys).

But when the "Last Man Standing" star rolled up to the shindig in full uniform, one of the photogs joked, "Hey Tim, the Giants really need your help. They're doing really bad."

Tim's response -- "F**k the Giants."