Cacti have evolved several defensive mechanisms to protect themselves from herbivores. These include spines, which are modified leaves, and a thick, waxy epidermis. Some cacti also produce toxic or bitter-tasting compounds that deter animals from eating them. At the cellular level, these defenses can be linked to specialized cells that produce or store these compounds.