With all the tanned flesh, shiny bodywork and Euro chic on display here, some of the early scenes did feel a bit like watching a car advert.

Ferzan Ozpetek’s comedy drama Loose Cannons springs a few surprises – not least the long-forgotten voices of Spanish disco duo Baccara on the soundtrack. The dubious musical selections sound a jarring note in what is otherwise a witty and well-crafted tale of dysfunction within a bourgeois Italian family. To borrow that memorable last line from one of the greatest screen comedies: “Nobody’s perfect”.

Tommaso Cantone (Riccardo Scamarcio) and his elder brother Antonio (Alessandro Preziosi) are about to take over the reins of the family’s pasta business in southern Italy. But Tommaso, a writer who now lives in Rome, is determined to go his own way. He confides to his brother that he plans to come out to his relatives at an important dinner that evening. In the ultimate act of filial betrayal, Antonio steals his thunder — telling their dumbfounded parents that he is gay. Cue scenes of comic disbelief, tableware crashing to the floor, and dad Vincenzo (Ennio Fantastichini) banishing the black sheep, before keeling over from a heart attack.

Obliged to remain in the closet for the sake of his father’s health, Tommaso has to swallow his disappointment and take over at the factory. His role is to play the dutiful and straight son, while his parents fret about the social stigma caused by Antonio’s unwelcome revelation. Convinced that he’s now an object of ridicule, the macho Vincenzo overcompensates by ordering champagne when there’s nothing to celebrate and moaning to his mistress. His elegant wife Stefania (Lunetta Savino) gets her revenge on a gloating rival during an enjoyably bitchy encounter in a shop. (She also has a great put-down for Vincenzo’s lady friend.) Insults really do sound more ladylike in Italian.

After a strong opening, I did worry that Loose Cannons might turn into a spaghetti version of La Cage aux Folles — with gay guys acting straight, farce before bedtime and an excess of camp. There are some crass comments about homosexuality here – particularly from the uncomprehending Vincenzo – though nothing that’s really offensive. The second half of the film features some broad comedy as Tommaso’s boyfriend Marco (Carmine Recano) rolls into town, with three exuberantly gay pals in tow. Will these guys ruin things for Tommaso by foolishly revealing their ability to spot an Alberta Ferretti dress and singing the wrong kind of music in the shower? Just to make the point, the film cuts between Vincenzo boasting about his handsome (hetero) house guests and their bitchy bedroom conversations.

But though Ozpetek and co-writer Ivan Cotroneo keep the mood light, the emphasis on Scamarcio’s brooding Tommaso ensures there’s also some emotional weight here. The gorgeous Scamarcio, who looks a bit like Javier Bardem, is a very calm and watchful presence who reveals his emotional turmoil only in the smallest of gestures. Through him we see the rest of the family – doting but overbearing parents, boozy aunt and down-to-earth sister – and understand why he’s made a life elsewhere.

The real power behind the family isn’t Vincenzo, but his mother (played by Ilaria Occhini), who is also the original “loose cannon”. From the opening scene, there are flashback glimpses of the young Ilaria, who was deeply in love with her husband’s brother. Despite the generation gap, a lifetime of frustrated passion has given her more insight than anyone into the problems of her two grandsons. Ozpetek contrives what can accurately be described as a bittersweet and very apt ending for her. I’ll only say that it involves an excessive number of delicious pastries.

But the emotional heart of the film lies in Tommaso’s relationship with the beautiful but troubled Alba (Nicole Grimaudo), his new partner at the factory. He first spots her coolly vandalising a car with a key and a stiletto. They share their secrets over wine and late-night chats in her apartment. Although his heart lies elsewhere there’s a genuine chemistry between the two that, in a different film, might have blossomed into romance.

Ozpetek, whose previous feature was 2008’s A Perfect Day, covers some of the same territory here as Luca Guadagnino did with I Am Love. Both delve into the tensions and the betrayals within wealthy Italian families, who’ve made their money from industry. In I Am Love it was the gay daughter who shocked her father by abandoning her chosen career path. But while Guadagnino’s story began in a wintry Milan, Ozpetek’s film is a much warmer and, frankly, less pretentious affair.

Maurizio Calvesi’s stylish camerawork elegantly frames the characters within their comfortable surroundings. As Tommaso and Alba have a heart-to-heart in her kitchen, they are filmed from behind, in front of an open window. There’s also a stunning shot of the colonnaded town square at night, after a bust-up between the brothers. With all the tanned flesh, shiny bodywork and Euro chic on display here, some of the early scenes did feel a bit like watching a car advert. Still, the style is mainly unselfconscious – apart from one climactic scene in which the camera circles the table to capture reaction shots and the moment is ruined.

Loose Cannons strikes a neat balance between comedy and drama, and doesn’t fall into the trap of trying to tie up every loose end with a hug or a tearful confession. I’d happily watch the pairing of Scamarcio and Grimaudo again – preferably not accompanied by the excruciating strains of “Sorry I’m a Lady”.