SAN FRANCISCO — The California Supreme Court on Wednesday left intact a ruling that allows customers to sue Amazon.com for failing to warn buyers that some products it sells may contain hazardous substances such as mercury.