Joanna the Mad drowns in Tagus river in 1494 (it almost happened IOTL) so it is her sister Maria who marries Philip Habsburg, meanwhile Catherine of Aragon marries Manuel Aviz as his second wife.
Family of Maria:
Maria I (1482-1520) Queen of Castile 1504, m. a) Philip (1478-1506) Duke of Burgundy b) Alfonso (1489-1563) Duke of Segorbe, King of Castile iure uxoris
1a) Eleanor (1499-1515) Duchess of Burgundy 1506, m. Ernest I (1496-1550) Holy Roman Emperor*
2a) Isabella (1501-1556) Duchess of Burgundy 1515, m. Henry VIII (1491-1547) King of England
3a) Charles (1503)
4a) Catherine (1505-1555) m. Louis II (1506-1526) King of Bohemia and Hungary
5a) Joanna (1506-1539) m. John II (1503-1539) King of Portugal (see below)
6b) Ferdinand (1509-1512)
7b) John III (1510-1568) King of Spain, m. a) Beatrice of Portugal (1509-1537) see below, b) Margaret of France (1523-1576)
8b) Maria (1512)
* Son of HRE Maximilian I and Bianca Maria Sforza
Family of Catherine:
Catherine of Aragon (1485-1536) m. Manuel I (1469-1521) King of Portugal
1) John III (1504-1549) King of Portugal 1521, m. Joanna of Spain (1506-1539)
2) Ferdinand (1506)
3) Isabella (1507-1509)
4) Beatrice (1509-1537) m. John III (1510-1568) King of Spain
5) Isabella (1511-1566) m. Francis I (1494-1547) King of France
6) Louis (1514)
7) Afonso (1516-1540) Duke of Beja