We introduce semidistrim lattices, a simultaneous generalization of semidistributive and trim lattices that preserves many of their common properties. We prove that the elements of a semidistrim lattice correspond to the independent sets in an associated graph called the Galois graph, that products and intervals of semidistrim lattices are semidistrim, and that the order complex of a semidistrim lattice is either contractible or homotopy equivalent to a sphere.Semidistrim lattices have a natural rowmotion operator, which simultaneously generalizes Barnard's κ map on semidistributive lattices as well as Thomas and the second author's rowmotion on trim lattices. Every lattice has an associated pop-stack sorting operator that sends an element x to the meet of the elements covered by x. For semidistrim lattices, we are able to derive several intimate connections between rowmotion and pop-stack sorting, one of which involves independent dominating sets of the Galois graph.