“Detention” sounds excessive. I also think probably some sort of tolerance for minor infractions, and beyond that, escalating warnings before serious corrective measures, is called for, so it gives students the chance to become more self-aware and self-correct.
The reaction to talking should be pointing out the impact of their behavior (making hearing difficult, distracting and wasting the time of everyone there), and on repeat, expressing disappointment for the talkers’ lack of consideration and self-control, and expecting them to self-correct, which requires giving them the opportunity to self-correct, while not making an ass of the faculty by requiring them to over-punish mistakes.
The reason why is that immediate escalation to punishments is less humane, exceeds social norms, needlessly escalates student-teacher relationships to something hostile, infantilizing, archaic, and unpleasant, and doesn’t leave room for positive relationships and self-correction (see studies on fear’s effect on learning ability). It’s also ineffective and tends to backfire because of the negative context and resentment for unfair mistreatment for innocent mistakes.
The punishment should be the same for both sexes, because otherwise it exposes the school’s rules as pointlessly sexist. The school should lead by example by not having sexist and needlessly punitive rules.