This seems to be a very common discussion point, even among professional economists.
As you pointed out, there are many things that factor into the _cost_ of good, including the price. The _cost_ is the total of what you forsake to have the good - including your time, effort, risk, annoyance, attention, and so on.
IMO, the only logically consistent way to look at this is to start from the observation that every choice means forsaking some other option (which always includes doing nothing). Therefore, cost of any choice is the value, to you at that moment, of the next-best option, which was forsaken.
Rationality simply means executing your preferred choice. That's all it has to mean. All the confusion vanishes once you accept this definition.
This approach clarifies a lot of common errors. If I prefer a nice TV to the cheap one, but it costs too much, then my preferred _choice_ is the cheap TV, even if my preferred _TV_ was the expensive one. My choice takes everything else that I regard as significant into account.
Here's an old exam question that really nails the point home:
You are hungry, and you have five dollars in your pocket. There is exactly one place to get food, which offers a tuna sandwich for $3.50 and a ham sandwich for $4.50. You would rather buy either of these sandwiches than go hungry.
What is the _cost_ of the ham sandwich?
"$4.50" is incorrect. That is the _price_.
"A tuna sandwich and $1.00" is the correct answer.
(post is archived)