The grandson of the late Teflon Don is eyeing a plea deal, his attorney said following a brief court appearance in the beefy 23-year-old’s drug case Wednesday.

“We’re just ironing out some details,” Gambino grandson John Gotti’s lawyer, Gerard Marrone, told The Post.

Despite the fact that a Queens judge set bail at $2 million during the mob scion’s last hearing, Marrone said his client plans to remain behind bars as a “good faith” gesture.

“Why let him out when we’re so close to a plea?” the attorney shrugged. “We feel it’s good faith to keep him in there.”

The young Gotti appeared cheerful during his short stint in the Queens courtroom — grinning at his father and a female friend as he was led in.

He gave the duo a merry wave as he was led out, after which Marrone beamed that his client was doing well behind bars.

“His spirits are very well,” the attorney said. “He’s working out. He’s still in his drug program doing well. We want him to make a positive time of it while he’s in [Rikers].”

Dad Peter Gotti — son of the notorious Dapper Don — has been by his son’s side since his June and July arrests, and in the pews for each appearance.

He declined to comment.

The tatted-up defendant had faced up to 25 years-to-life in prison if convicted on felony drug peddling charges following a raid of his Howard Beach home that netted a trove of drugs, cash, and prescription pads.

Gotti will return to court Feb. 8.