v3.24.2.u1
Revenue - Additional Information (Detail) - USD ($)
$ in Thousands
3 Months Ended 6 Months Ended
Jun. 30, 2024
Jun. 30, 2023
Jun. 30, 2024
Jun. 30, 2023
Disaggregation Of Revenue [Line Items]        
Percentage of recognized revenue from contract liability balances     86.00% 88.00%
Net sales $ 4,456,340 $ 4,528,890 $ 8,347,692 $ 8,412,204
Lumber and Lumber Sheet Goods        
Disaggregation Of Revenue [Line Items]        
Net sales 1,194,847 $ 1,060,371 2,175,393 $ 1,937,231
Lumber and Lumber Sheet Goods | Reclassification        
Disaggregation Of Revenue [Line Items]        
Net sales   0.10%   0.10%
Manufactured Products        
Disaggregation Of Revenue [Line Items]        
Net sales 1,054,943 $ 1,294,156 2,034,287 $ 2,357,236
Manufactured Products | Reclassification        
Disaggregation Of Revenue [Line Items]        
Net sales   0.50%   (1.80%)
Windows, Doors and Millwork        
Disaggregation Of Revenue [Line Items]        
Net sales 1,115,340 $ 1,091,905 2,146,067 $ 2,170,400
Windows, Doors and Millwork | Reclassification        
Disaggregation Of Revenue [Line Items]        
Net sales   (1.20%)   1.10%
Specialty Building Products & Services        
Disaggregation Of Revenue [Line Items]        
Net sales $ 1,091,210 $ 1,082,458 $ 1,991,945 $ 1,947,337
Specialty Building Products & Services | Reclassification        
Disaggregation Of Revenue [Line Items]        
Net sales   0.50%   0.90%