Due to their hard work and dedication, we achieve net sales growth of 6% despite store closures in many of our international territories, and the shutdown of California salons in January.
The combination of strong consumer demand and the effectiveness of our promotional strategy, allowed us to maintain solid gross margins above our target level of 50% in the quarter.
We ended Q2 with a strong liquidity position, including $408 million of cash on the balance sheet, and zero balance outstanding our $600 million ABL credit facility.
Subsequent to the close of the quarter, we fully repaid the outstanding balance on our 5.5% senior notes due 2023, making further progress toward our goal of bringing our leverage ratio close to 2.5 times by the end of fiscal 2021.
Color increased 27% and vivid colors grew by 53% at Sally US and Canada versus the prior year.
Then it continued to be an important driver and represented 27% of our total color sales for Sally US and Canada in the quarter.
In addition, BSG also saw strengthen in the color category, which was up 17% versus the prior year.
Other categories also performed well, with nails up 20% and hair care up 9% at Sally US and Canada, and hair care up 16% at BSG.
Our e-commerce business was also an important growth driver, delivering of sales increase up 56% versus a year ago.
For the second quarter, approximately 40% of our e-commerce sales for Sally US and Canada were fulfilled by our stores, which speaks to the value of our large store portfolio when combined with our enhanced digital capabilities.
The initial test will consist of approximately 90 stores, roughly 70 Sally Beauty and 20 BSG locations, and will be spread across the country to provide us with a range of learnings in various markets.
We expect to be leveraging all of our new capabilities and tools in service of our core mission to recruit and retain color customers, and we expect to bring our debt leverage ratio closer to our target of 2.5 times.
We are pleased to see adoption rates rising on our most profitable fulfillment option, focus, which accounted for 20% of Sally US and Canada's total e-commerce sales during Q2, up from 11% in the prior quarter.
Ship from store represented an additional 20% of Sally US and Canada's total e-commerce sales for the quarter.
In Q2 purchases from our loyalty members at Sally US and Canada exceeded 72% of sales total sales and BSG US surpassed 7% of total sales.
Net sales were up 6.3% versus prior year.
And same store sales increased 6.5%.
Our global e-commerce business remains strong with consolidated sales up 56% on a year over year basis.
From a gross profit perspective, we continue to deliver margins in line with our 50% plus target levels.
Second quarter gross margin came in at 50.4%, up 110 basis points to last year.
Adjusted Gross margin was 51.2% and excludes a $7 million, writedown of PPE inventory.
In addition to the $7 million writedown, we also made the decision to donate approximately $31 million of PPE inventory that will be disseminated to organizations in need during the second half of fiscal 2021.
SG&A expense totaled $391 million.
That includes the PPE donation of $31.2 million, partially offset by $2.2 million of Canadian wage and rent subsidy credits.
On an adjusted basis, SG&A decreased by approximately $6 million, reflecting lower advertising and field labor costs, and our focus on expense control while pandemic headwinds persist.
As a percentage of sales, adjusted SG&A improved by 320 basis points, coming in at 39.1%.
In Q2, adjusted operating margin expanded by 510 basis points to 12.1%.
Adjusted EBITDA increased 55% to $141 million, and adjusted diluted earnings per share more than doubled to $0.57.
Moving to segment results at Sally Beauty same store sales increased 4.9%.
The combination of strong sales and gross margin expansion drove a significant increase in segment operating margin, which expanded 750 basis points to 18.4%.
We also delivered strong e-commerce sales at Sally, up 46% versus a year ago.
In our BSG segment, same store sales increased 9.9%, reflecting a strong rebound as restrictions ease coupled with higher operating capacity in salon and the reopening of California salons in February.
E-commerce remained strong posting growth at 68% on a year-over-year basis.
Excluding the write down of PPE inventory, gross margin was approximately flat to last year, and operating margin expanded 80 basis points to 12.5%.
We ended the quarter with $408 million of cash on the balance sheet and a zero balance on our $600 million revolving line of credit.
Inventory at quarter in totaled $950 million, essentially flat to last year, inclusive of the $31 million in PPE inventory that we expect to donate by fiscal year end.
Looking at the balance of the year, we expect to close this fiscal year with inventory in the low 900.
We generated strong cash flow from operations of $93 million in Q2 and capital expenditures totaled $12 million, putting free cash flow at $81 million.
At the end of the quarter, our net debt leverage ratio stood at 2.34.
For comparison purposes, the leverage ratio that we often say, as defined in our loan agreements, where the impact of cash on hand is capped at $100 million for net debt calculation purposes was 2.95.
Given our strong liquidity position, subsequent to the end of the quarter we fully repaid the outstanding balance of $197 million on our 5.5% unsecured notes.
We expect to continue utilizing excess cash to deleverage the balance sheet, with the goal of bringing our leverage ratio closer to 2.5 times this year.
We expect the business to generate strong cash flow from operations of more than $100 million in the second half of this fiscal year.
Keep in mind that net sales were down 28% in Q3 of last year, which reflected significant pandemic impacts in store closures globally.
We expect net sales growth of 35% to 40% in Q3 of this year, reflecting strengthening consumer demand in the US, partially offset by ongoing choppiness from pandemic headwinds in international markets.
For perspective in Q4 of 2020, net sales were down less than 1%, as restrictions lifted in store and salon reopenings took hold.

Summary:
And same store sales increased 6.5%.
Adjusted EBITDA increased 55% to $141 million, and adjusted diluted earnings per share more than doubled to $0.57.