Two Higgs-doublet models usually consider an ad-hoc Z2 discrete symmetry to avoid flavor changing neutral currents. We consider a new class of two Higgs-doublet models where Z2 is enlarged to the symmetry group F Z2, i.e. an inner semi-direct product of a discrete symmetry group F and Z2. In such a scenario the symmetry constrains the Yukawa interactions but goes unnoticed by the scalar sector. In the most minimal scenario, Z3 Z2 = D3, flavor changing neutral currents mediated by scalars are absent at tree and one-loop level, while at the same time predictions to quark and lepton mixing are obtained, namely a trivial CKM matrix and a PMNS matrix (upon introduction of three heavy right-handed neutrinos) containing maximal atmospheric mixing. Small extensions allow to fully reproduce mixing parameters, including cobimaximal mixing in the lepton sector (maximal atmospheric mixing and a maximal CP phase).