There are four damage categories.
Normal, Piercing, Elemental, Shadow.
There is no "fire" damage, no "ice" damage, no "electric" damage. These are all considered to be Elemental-category attacks.
That is, a fire-based attack will deal Elemental-category damage and possibly inflict the Fire status effect; ice is an Elemental attack with a Freeze effect.
Every "element" deals the same type of damage. Except Shadow, that's its own damage category.
Elemental defense reduces damage from all Elemental-category attacks.
Status resistances reduce the effects and duration of the associated status effect. For example, resistance to Fire will make the Fire status hurt less and expire earlier; resistance to Stun means you won't be slowed down as much, and so forth.