The spanish throne fell into the Habsburgs through a woman Juana La Loca.
It was only with the Bourbon Felipe V that the Salic Law was introduced in Spain.
Although IIRC the kingdom of Aragon had some suspitions on acknowledging female succession.
When Pss Isabel, elder daughter of the Catholic Kings, married D.Manuel I, king of Portugal, Fernando and Isabel invited the couple to Spain to be sworn their successors.
Aragon was the most reticent on acknowledging the couple.
Answering your questions, "your" Infanta Isabel would be Carlos II successor.
Her marriage might have opened a can of worms.
Eventually France and Austria would fight to impose a candidate to her hand among the available princes.
This may be a somewhat stupid question; but I just wanted to clarify:
SUPPOSE he had died leaving only a daughter (let's call her Isabel). Would it have been clear according to the laws at the time (1700) that she would have been the eventual successor to the Spanish throne?
One assumes that she would not have married a foreign royal, especially a king, like her aunt Maria Teresa (consort of the famous "Sun" King Louis XIV of France) -- much less left her native land, HAD she been her father's heir.
It's all a chicken-and-egg situation, when it comes to princesses, royal marriages, and succession rights. I was just speculating on the scenario where there was a hypothetical Infanta Isabel (as opposed to a preferred Prince of the Asturias) and whether, in fact, she would have been able to inherit the throne from King Carlos II WITHOUT a bloody succession war.
This is no place or time to recount the messy affair known as the War of the Spanish Succession ...