/* Shared keyboard focus ring. Keep this late in the file so component-level
   hover/focus color changes do not remove visible focus affordance. */
.cos-shell :is(
	a,
	button,
	summary,
	[tabindex],
	input[type="button"],
	input[type="submit"],
	input[type="reset"]
):focus-visible {
	outline: var(--focus-outline);
	outline-offset: var(--focus-outline-offset);
}

/* Text controls already communicate focus through their border. Adding the
   shared outline on top creates a duplicated ring around every input. */
.cos-shell :is(
	input:not([type]),
	input[type="date"],
	input[type="datetime-local"],
	input[type="email"],
	input[type="month"],
	input[type="number"],
	input[type="password"],
	input[type="search"],
	input[type="tel"],
	input[type="text"],
	input[type="time"],
	input[type="url"],
	input[type="week"],
	select,
	textarea
):focus,
.cos-shell :is(
	input:not([type]),
	input[type="date"],
	input[type="datetime-local"],
	input[type="email"],
	input[type="month"],
	input[type="number"],
	input[type="password"],
	input[type="search"],
	input[type="tel"],
	input[type="text"],
	input[type="time"],
	input[type="url"],
	input[type="week"],
	select,
	textarea
):focus-visible,
.cos-shell :is(.select2-selection, .select2-search__field):focus,
.cos-shell :is(.select2-selection, .select2-search__field):focus-visible {
	outline: 0;
	border-color: var(--ink);
}

.cos-shell :is(input[type="checkbox"], input[type="radio"]):not(
	.cos-shipping-methods__input,
	.cos-payment-methods__input
):focus-visible {
	outline: var(--focus-outline);
	outline-offset: var(--focus-outline-offset);
}

/* iOS Safari faz zoom automático ao focar um campo com font-size < 16px. Só em
   tablet/mobile (≤1024px, apanha iPhones e iPads incl. landscape) forçamos 16px
   em todos os controlos de texto para evitar esse salto de zoom. No desktop
   mantém-se a tipografia de design, mais pequena. Mexe só no font-size — o resto
   do estilo de cada campo (cor, border, padding) fica intacto. */
@media (max-width: 1024px) {
	.cos-shell :is(
		input:not([type]),
		input[type="date"],
		input[type="datetime-local"],
		input[type="email"],
		input[type="month"],
		input[type="number"],
		input[type="password"],
		input[type="search"],
		input[type="tel"],
		input[type="text"],
		input[type="time"],
		input[type="url"],
		input[type="week"],
		select,
		textarea
	) {
		font-size: 16px;
	}
}

/* Print */
@media print {
	.nav, .utility, .cos-newsletter, .footer, .stuck-bar, .cos-filters { display: none; }
}
