Quarterly report pursuant to Section 13 or 15(d)

Debt - Additional Information (Details)

v3.23.3
Debt - Additional Information (Details) - USD ($)
$ in Thousands
9 Months Ended
Sep. 28, 2023
Sep. 30, 2023
May 05, 2023
Dec. 31, 2022
Dec. 21, 2016
Line of Credit Facility [Line Items]          
Capital One line of credit   $ 331,665   $ 256,430  
Agreement With M&T Bank [Member]          
Line of Credit Facility [Line Items]          
Credit agreement amendment description   On September 28, 2023, GPM amended its credit agreement with M&T Bank (the “M&T Credit Agreement”) to increase the line of credit for purchases of equipment thereunder from $20.0 million to $45.0 million, which may be borrowed in tranches, advanced until September 28, 2026.      
Debt instrument, periodic payment, interest 2.75%        
GPM [Member]          
Line of Credit Facility [Line Items]          
Line of Credit Facility, Capacity Available for Trade Purchases $ 4,800        
GPM [Member] | Agreement With M&T Bank [Member]          
Line of Credit Facility [Line Items]          
Line of Credit Facility, Capacity Available for Trade Purchases $ 45,000       $ 20,000
Revolving Credit Facility [Member] | Gpmp          
Line of Credit Facility [Line Items]          
Line of Credit Facility, Maximum Borrowing Capacity     $ 1,000,000    
Revolving Credit Facility [Member] | Gpmp | Maximum          
Line of Credit Facility [Line Items]          
Capital One line of credit     $ 800,000    
Revolving Credit Facility [Member] | Gpmp | Minimum          
Line of Credit Facility [Line Items]          
Capital One line of credit       $ 500,000