measures. See “Non-GAAP Financial Measures” and Item 8 of Part II, “Financial Statements and Supplementary Data—Note 1—Description of Business and Accounting Policies—Stock-Based Compensation.” 

We recorded charges related to Fire phone inventory valuation and supplier commitment costs, substantially all of which, $170 million, was recorded during the third quarter of 2014. 

Cost of Sales 

Cost of sales consists of the purchase price of consumer products and digital media content where we record revenue gross, including Prime Instant Video, packaging supplies, and inbound and outbound shipping costs, including sortation and delivery centers, and related equipment costs. Shipping costs to receive products from our suppliers are included in our inventory, and recognized as cost of sales upon sale of products to our customers. 

The increase in cost of sales in absolute dollars in 2014 , 2013 , and 2012 , compared to the comparable prior year periods, is primarily due to increased product, digital media content, and shipping costs resulting from increased sales, as well as from expansion of digital offerings. The increase in 2014 was also impacted by Fire phone inventory valuation and supplier commitment costs. 

Gross margin increased in 2014 , compared to the comparable prior year periods, primarily due to service sales increasing as a percentage of total sales. Service sales represent third-party seller fees earned (including commissions) and related shipping fees, digital content subscriptions, and non-retail activities such as AWS, advertising services, and our co-branded credit card agreements. 

We believe that income (loss) from operations is a more meaningful measure than gross profit and gross margin due to the diversity of our product categories and services. 

Fulfillment 

Fulfillment costs as a percentage of net sales may vary due to several factors, such as payment processing and related transaction costs, our level of productivity and accuracy, changes in volume, size, and weight of units received and fulfilled, timing of fulfillment capacity expansion, the extent we utilize fulfillment services provided by third parties, mix of products and services sold, and our ability to affect customer service contacts per unit by implementing improvements in our operations and enhancements to our customer self-service features. Additionally, because payment processing and fulfillment costs associated with seller transactions are based on the gross purchase price of underlying transactions, and payment processing and related transaction and fulfillment costs are higher as a percentage of sales versus our retail sales, sales by our sellers have higher fulfillment costs as a percent of net sales. 

The increase in fulfillment costs in absolute dollars in 2014, 2013, and 2012 , compared to the comparable prior year periods, is primarily due to variable costs corresponding with increased physical and digital product and service sales volume, inventory levels, and sales mix; costs from expanding fulfillment capacity; and payment processing and related transaction costs. 

We seek to expand our fulfillment capacity to accommodate greater