That's not at all how consumer goods are priced. It's the cost of goods, which entails a lot of things like R&D, marketing, promotional discounting, indirects (like corporate costs), logistics / transport of goods, etc. And the final pricing is not even based on all of that plus margin. The goal is to optimize price to find the perfect balance of revenue and profit. Underpricing leaves money on the table. Overpricing means lost sales.
My gut reaction is that $329 is too high for that segment, but that's based on where the competition has priced their products and the seeming marketability of those products. However, Apple has surely done some pretty detailed analysis in defining the price points to maximize revenue and profit. And I'm also confident that the Apple product isn't going to be a piece of crap with no resale value.
I am happy that Apples marketing specialists don't trust on your guts. Said that, of course my way to put all R&D, logistict, salaries, and whatever other costs turn up, in to one position "margin" is simplistic and maybe not quite fair. but I just wanted to keep it short.
Nevertheless, 329$ is, considering the value of the pruduct, a very nice price.