Short answer. Yes. Article 1569 of the Civil Code lets you recover from the seller even if the defective thing was later lost by accident, or through your own fault: you may demand back the price you paid, less the thing's value at the time it was lost. If the seller acted in bad faith, he must also pay damages.
What the law says
If the thing sold had any hidden fault at the time of the sale, and should thereafter be lost by a fortuitous event or through the fault of the vendee, the latter may demand of the vendor the price which he paid, less the value which the thing had when it was lost.
Civil Code, Article 1569 — Loss by Fortuitous Event After a Defect. Read the full provision →
Why the later loss does not erase the seller's liability
Ordinarily, once something you own is destroyed by accident, that loss falls on you as the owner. Article 1569 changes the calculation where the thing had a hidden fault at the time of the sale: even if it is thereafter lost by a fortuitous event, or even through your own fault as the buyer, you may still demand from the seller the price you paid. The hidden defect that existed at the time of sale is what triggers this right, not the manner in which the item was later destroyed.
How the amount you can recover is calculated
Article 1569 does not let you recover the full price with no adjustment. You may demand the price you paid, less the value which the thing had when it was lost. This deduction accounts for whatever the item was still worth at the moment of its destruction, so the seller is not made to refund value that was lost simply because the item ceased to exist for reasons unrelated to the original defect, while still answering for having sold something defective in the first place.
What changes if the seller acted in bad faith
Article 1569 adds a further consequence if the vendor acted in bad faith: he shall pay damages to the vendee. This goes beyond the price-and-deduction formula that otherwise applies. Bad faith on the seller's part, such as knowing about the hidden fault and concealing it, exposes him to an additional damages claim on top of returning the adjusted price, reflecting that a dishonest seller is treated more strictly than one who sold the defective item without realizing its condition.
What you still need to establish
To rely on Article 1569, you need to be able to show that the thing had a hidden fault at the time of the sale, meaning the defect existed before the loss and was not something that developed afterward or was caused by the accident itself. The article specifically addresses a fault that already existed at the time of sale, followed by a later, separate loss of the item; establishing that sequence is central to showing the seller remains answerable despite the item's destruction.