For all the justifiable concern about the miserable summer for the Giants’ offense, it’s been easy to forget what the franchise did during the offseason: Spent a ton of money with a majority of it going to the defense.

That defense, led by what could be one of the best secondaries the Giants have had in decades, has the look of one of the top five defenses in the league.

Granted it’s all just on paper at the moment, because the defense hasn’t exactly had a stellar summer itself, but the potential is easy to see if you can ignore all those ridiculous yellow flags the refs have been throwing all summer at helpless defensive backs. Taking a cue from the Super Bowl champion Seattle Seahawks, the Giants built their defense from back to front — unusual for them, but necessary in an increasingly quick-pass-happy league — adding cornerbacks Dominique Rodgers-Cromartie, Walt Thurmond and Zack Bowman and safety Quintin Demps to an already solid secondary.

On Opening Night, Sept. 8, in Detroit, they’re going to be put to a difficult immediate test.

“Exactly,” cornerback Prince Amukamara said. “The Lions offense likes to sling it. It’s definitely going to be a great challenge for us.”

There isn’t a much more lethal combination in the NFC than Matthew Stafford-to-Calvin Johnson. Plus, the Lions have the underrated Golden Tate and the troublesome Kevin Ogletree at wide receiver , rookie tight end Eric Ebron and running back Reggie Bush as key components of the passing game. A year ago Stafford threw for 4,650 yards and 29 touchdowns, and Johnson caught 84 passes for 1,492 yards and 12 scores.

The Lions had the NFL’s sixth-ranked offense, and it was still considered a pretty down year in Detroit.