Wasn’t the Fourth of July a wonderful day, Red Sox fans? Boston trounced the Texas Rangers 11-4 for its sixth straight win while the Yankees dropped four games back with a 3-1 loss to the lowly Blue Jays.

The only question was just how much of a lead the Red Sox could build over the final five days before the All-Star break.

Insert pin, pop bubble.

Those invincible Red Sox turned mortal, losing 4 of 5 games. The Yankees hardly took advantage, going 1-3. They and the Rays are 31/2 games behind as the second half of the season begins Friday.

Boston’s mini-slide culminated in two straight losses that accentuated its weaknesses:

First there were the disappearing bats in a 1-0 loss Saturday, spoiling a rare Rick Porcello gem by backing him with only three hits.

Then there was the 5-3 loss to the Rays on Sunday, with the bullpen giving up three runs, spoiling David Price’s start (six innings, two runs).

Instead of steamrolling into the break, Boston looked vulnerable – still a formidable team, no question, but a team that can go flat.

What will the second half hold? Will the Red Sox surge like in 2013 (39-26 in the second half on the way to the World Series title) or collapse like in 2011 (35-37 and out of the playoffs).

With the retirement of David Ortiz, the Red Sox need some swagger, and that could be up to Dustin Pedroia – who’s been there, done that – to provide. Associated Press/Aaron Josefczyk

Let’s take a gander at some key factors:

Home, sweet Fenway: Of its 73 remaining games, Boston has 42 at home. The Red Sox are 25-14 at Fenway and 25-25 on the road.

Starting depth: Boston ranks third in the American League in starters’ ERA (4.21) and that’s with Price (3.91) making only nine starts and getting stronger with each one. Plus, Eduardo Rodriguez (3.54) is coming off the disabled list.

Bullpen questions: It seems silly to pick on the relievers, who rank second in the AL in ERA (3.08) and holds (55). This is a group that has produced even with the losses of Tyler Thornburg (gone for 2017), Carson Smith (still on the DL) and Robbie Ross (hurt after eight games).

Closer Craig Kimbrel (1.19 ERA) has been other-worldly, but can the Red Sox find a reliable setup man? Matt Barnes (3.57 ERA) was given the job but has been inconsistent and his 21 walks in 401/3 innings is troublesome. By comparison, Kimbrel has five walks in 372/3 innings.

Joe Kelly (1.49 ERA) looks like an answer although he lost Sunday’s game. He’s only been used on consecutive days three times. He should be fresh for the second half. With Ross out, Robby Scott (4.09 ERA) was an effective lefty until stumbling in July (five runs in 31/3 innings).

Pat Neshek, a Philadelphia reliever who made it to the All-Star Game, is in the final year of his contract, and Boston figures to make a pitch to get him before the end of the month. Associated Press/Julie Jacobson

Here is where “Trader Dave” Dombrowski may go to work. The obvious target is right-handed All-Star Pat Neshek (1.27 ERA) in the final year of his contract with the awful Phillies. Right-handed batters are hitting .234 against him but lefties are only batting .188. Neshek has allowed only five walks in 351/3 innings.

Disappearing lineup: The Red Sox have been shut out seven times this season, compared to six all last year. One problem is the lack of oomph – only 92 home runs, last in the league, compared to the Rays (133) and Yankees (132).

David Ortiz obviously is missed but others have fallen off the mark. Xander Bogaerts hit 21 homers last year and only six to date. Bogaerts is a key. He slumped in the second half last season (.253) and is only hitting .143 in July. Boston needs his bat.

I don’t know, third base: Yes, the position has been a joke (worthy of Abbott and Costello) until recently, when Deven Marrero and Tzu-Wei Lin became a darling duo. Who knows how long the kids will keep it up? Brock Holt could help. No one believes Pablo Sandoval will, and Jhonny Peralta was released Thursday while with Triple-A Pawtucket. Rafael Devers (18 home runs in Portland) could be a surprise call-up, or Dombrowski might look elsewhere, perhaps trading for Todd Frazier (15 home runs) of the White Sox.

Players worthy of a call: The Red Sox have intriguing folks in the minors, besides Devers.

For a team that needs power, there’s a guy hammering away in Pawtucket. Bryce Brentz has 12 home runs since May 31 and just won the Triple-A Home Run Derby. Maybe he could play a little outfield, maybe a little DH. Why not?

Also, lefty starter Jalen Beeks is intriguing. Since being promoted from Portland in June, Beeks has 41 strikeouts and 14 walks in 372/3 innings in Pawtucket. Opponents are batting .210 against him. Maybe he could get a spot start in August or a chance in the bullpen?

Looking for a leader: No one can step into Ortiz’s shoes. Dustin Pedroia and his strut bring a lot and Chris Sale has been a plus. But this team needs more borderline arrogance – a refusal to lose. You saw it in 2004, 2007 and 2013.

How about 2017?

These talented Red Sox can go far, but like in those seven shutout losses, they also can fall flat.

Kevin Thomas can be reached at 791-6411 or:

[email protected]

Twitter: @ClearTheBases