/* ==================================================================
   PEDINDO ONLINE — CHECKOUT (Mercado Pago Cartão)
   ================================================================== */

/* Blindagem: o atributo nativo [hidden] deve SEMPRE esconder,
   mesmo quando o elemento está dentro de um container display:grid/flex
   (.po-summary__list, .po-checkout__grid), cujo display sobrescreveria
   a regra do user-agent. Corrige cupom/badge fantasmas e etapas que
   vazavam visíveis no layout. */
[hidden] { display: none !important; }

/* Blindagem de layout do checkout: garante que o container e a barra de
   progresso fiquem centralizados e sem vazar para os cantos, mesmo se o
   main.css do tema não carregar ou tiver .po-container conflitante.
   Corrige a barra de progresso "colada no canto superior" que descia vazando. */
.po-section,
.po-section--soft { padding: 40px 0; }
#checkout.po-container,
.po-section > .po-container {
	display: block;
	width: 100%;
	max-width: var(--po-container, 1200px);
	margin: 0 auto;
	padding: 0 24px;
	box-sizing: border-box;
}


.po-checkout__grid {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: 32px;
	align-items: start;
	max-width: 1000px;
	margin: 0 auto;
}

/* ---------- Seleção de planos ---------- */
.po-checkout__plans { display: grid; gap: 12px; margin-bottom: 28px; }

.po-checkout__plan {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	border: 2px solid var(--po-border);
	border-radius: var(--po-radius);
	padding: 18px 20px;
	cursor: pointer;
	transition: border-color .2s ease, box-shadow .2s ease;
	background: #fff;
}
.po-checkout__plan:hover { border-color: var(--po-primary-light); }
.po-checkout__plan input { position: absolute; opacity: 0; width: 0; height: 0; }
.po-checkout__plan.is-featured { border-color: var(--po-accent); box-shadow: var(--po-shadow-accent); }
.po-checkout__plan input:checked + .po-checkout__plan-body {
	border: none;
}
.po-checkout__plan:has(input:checked) {
	border-color: var(--po-primary);
	box-shadow: 0 0 0 4px rgba(28,63,170,.12);
	transform: translateY(-1px);
}
.po-checkout__plan:has(input:checked) .po-checkout__price b {
	color: var(--po-primary);
}
.po-checkout__plan-body { display: flex; flex-direction: column; gap: 2px; width: 100%; }
.po-checkout__plan-body strong { font-size: 18px; color: var(--po-text); }
.po-checkout__plan-body small { color: var(--po-success); font-weight: 600; font-size: 13px; }
.po-checkout__plan input:checked + .po-checkout__plan-body::before {
	content: '✓';
	position: absolute;
	right: 16px;
	top: 16px;
	width: 24px; height: 24px;
	background: var(--po-primary);
	color: #fff;
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-weight: 800; font-size: 13px;
}
.po-checkout__price { font-size: 22px; color: var(--po-text); }
.po-checkout__price em { font-style: normal; font-size: 14px; color: var(--po-text-muted); font-weight: 500; }

/* ---------- Cupom ---------- */
.po-checkout__coupon { margin-bottom: 28px; }
.po-checkout__coupon h3 { margin-bottom: 8px; }
.po-coupon-hint { color: var(--po-text-muted); font-size: 14px; margin: 0 0 12px; }
.po-coupon-row { display: flex; gap: 10px; }
.po-coupon-row input { flex: 1; }
.po-coupon-msg { margin-top: 8px; font-size: 14px; font-weight: 600; min-height: 18px; }
.po-coupon-msg.is-success { color: var(--po-success); }
.po-coupon-msg.is-error { color: var(--po-danger); }

/* ---------- Campos Mercado Pago ---------- */
.po-mp-field {
	background: #fff;
	border: 1px solid var(--po-border-strong);
	border-radius: var(--po-radius-sm);
	padding: 8px 4px;
	margin-bottom: 14px;
	min-height: 48px;
	display: flex;
	align-items: center;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.po-mp-field:focus-within {
	border-color: var(--po-primary);
	box-shadow: 0 0 0 4px rgba(28,63,170,.12);
}
.po-mp-field--full { margin-bottom: 18px; }
.po-mp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.po-mp-row .po-mp-field { margin-bottom: 18px; }

/* Fallback: campos nativos injetados quando o SDK do MP não preparou os
   iframes (public_key ausente). Garantem que SEMPRE dá para digitar. */
.po-mp-field .po-native-card {
	width: 100%;
	border: none;
	background: transparent;
	padding: 12px 14px;
	font-size: 16px;
	font-family: inherit;
	color: var(--po-text);
	outline: none;
}
.po-mp-field select.po-native-card {
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}
.po-mp-field .po-native-card::placeholder { color: var(--po-text-muted); }

.po-mp-error {
	color: var(--po-danger);
	font-size: 14px;
	font-weight: 600;
	min-height: 20px;
	margin-bottom: 12px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: var(--po-radius-sm);
	padding: 12px 14px;
	line-height: 1.5;
}
.po-mp-error[hidden] { display: none; }
.po-mp-error:not([hidden]) { animation: po-shake .35s ease; }
@keyframes po-shake {
	0%, 100% { transform: translateX(0); }
	20% { transform: translateX(-5px); }
	40% { transform: translateX(5px); }
	60% { transform: translateX(-3px); }
	80% { transform: translateX(3px); }
}

/* Texto somente para leitores de tela (sr-only) */
.po-sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.po-checkout__submit { margin-top: 8px; }

/* ---------- Resumo ---------- */
.po-checkout__summary {
	background: var(--po-surface);
	border: 1px solid var(--po-border);
	border-radius: var(--po-radius-lg);
	padding: 32px;
	box-shadow: var(--po-shadow-md);
	position: sticky;
	top: 90px;
}
.po-checkout__summary h3 { margin-bottom: 20px; font-size: 22px; }
.po-summary__list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 14px; }
.po-summary__list li {
	display: flex; justify-content: space-between; align-items: center; gap: 10px 12px; flex-wrap: wrap;
	font-size: 15px; color: var(--po-text-muted);
}
.po-summary__list li strong { color: var(--po-text); font-weight: 700; text-align: right; }
.po-sum-discount-row strong { font-size: 14px; line-height: 1.4; }
.po-summary__list li.is-total {
	border-top: 1px solid var(--po-border);
	padding-top: 14px;
	font-size: 17px;
}
.po-summary__list li.is-total strong { font-size: 24px; color: var(--po-primary); font-weight: 900; }
.po-summary__secure {
	background: var(--po-bg-soft);
	border-radius: var(--po-radius);
	padding: 16px 20px;
	font-size: 14px;
	color: var(--po-text-muted);
	line-height: 2;
}

/* Aviso de 2 meses grátis (mensal + cupom) */
.po-sum-free {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: -6px 0 16px;
	padding: 12px 14px;
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-left: 4px solid var(--po-success);
	border-radius: var(--po-radius);
	font-size: 13px;
	line-height: 1.5;
	color: var(--po-text);
}
.po-sum-free > span:first-child { font-size: 18px; line-height: 1.2; }
.po-sum-free strong { color: var(--po-success); font-weight: 800; }

/* ---------- Header PRÓPRIO do checkout ---------- */
.po-checkout-body {
	background: var(--po-bg-soft);
}
.po-checkout__header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255,255,255,.9);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--po-border);
}
.po-checkout__header-inner {
	max-width: 1080px;
	margin: 0 auto;
	padding: 14px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}
.po-checkout__logo { display: inline-flex; align-items: center; color: var(--po-text); }
.po-checkout__logo img,
.po-checkout__logo .po-checkout__logo-img {
	max-height: 34px;
	width: auto;
	height: auto;
}
.po-checkout__logo img[width],
.po-checkout__logo .po-checkout__logo-img[width] {
	max-height: 34px !important;
	width: auto !important;
	height: auto !important;
}
/* Logo invisível no header claro: se o custom_logo (versão BRANCA) for
   usado no lugar da variação azul, a imagem some no fundo branco.
   Garante contraste escurecendo a arte sem alterar a cor (cobre PNG
   branco + texto). O .po-checkout__logo--invert aplica contraste escuro. */
.po-checkout__logo img { filter: brightness(0.25) contrast(1.2); }
.po-checkout__logo span { font-size: 20px; font-weight: 800; font-family: var(--po-font-display); }
.po-checkout__logo span b { color: var(--po-primary); }
.po-checkout__header-right { display: flex; align-items: center; gap: 16px; }
.po-checkout__secure-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--po-success);
	background: #ecfdf5;
	border: 1px solid #a7f3d0;
	padding: 7px 13px;
	border-radius: var(--po-radius-full);
}
.po-checkout__lock { font-size: 12px; }

/* ---------- Main + Footer PRÓPRIO do checkout ---------- */
.po-checkout__main { min-height: calc(100vh - 62px - 120px); }
.po-checkout__footer {
	border-top: 1px solid var(--po-border);
	background: #fff;
	padding: 28px 24px;
}
.po-checkout__footer-inner {
	max-width: 1080px;
	margin: 0 auto;
	text-align: center;
}
.po-checkout__footer-badges {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px 18px;
	margin-bottom: 14px;
	font-size: 14px;
	font-weight: 600;
	color: var(--po-text-muted);
}
.po-checkout__footer-copy {
	font-size: 13px;
	color: var(--po-text-muted);
}
.po-checkout__footer-links a {
	color: var(--po-primary);
	font-weight: 600;
}
.po-checkout__footer-links a:hover { color: var(--po-accent); }

/* ---------- Responsivo ---------- */
@media (max-width: 768px) {
	.po-checkout__grid { grid-template-columns: 1fr; }
	.po-checkout__summary { position: static; }
	.po-mp-row { grid-template-columns: 1fr; gap: 0; }
	.po-checkout__secure-badge { display: none; }
	.po-checkout__header-inner { padding: 12px 16px; }
	.po-checkout__main { min-height: calc(100vh - 58px - 150px); }
}

/* ==================================================================
   CHECKOUT v2 — REFINAMENTO VISUAL (steps, planos, cupom, carrinho)
   ================================================================== */

/* --- Steps numerados --- */
.po-step {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 17px;
	margin: 0 0 18px;
}
.po-step__num {
	flex: none;
	width: 28px; height: 28px;
	border-radius: 50%;
	background: var(--po-primary);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: 800;
}
.po-step__opt {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--po-text-muted);
	background: var(--po-bg-soft);
	padding: 3px 9px;
	border-radius: var(--po-radius-full);
}

/* --- Cards de plano (v2) --- */
.po-checkout__plan-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
}
.po-checkout__tag {
	font-style: normal;
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .03em;
	background: var(--po-accent);
	color: #fff;
	padding: 4px 9px;
	border-radius: var(--po-radius-full);
	white-space: nowrap;
}
.po-checkout__price {
	display: flex;
	align-items: baseline;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 4px;
}
.po-checkout__price b { font-size: 26px; font-weight: 900; color: var(--po-text); }
.po-checkout__price b i { font-style: normal; font-size: 15px; font-weight: 500; color: var(--po-text-muted); }
.po-checkout__total {
	display: inline-flex;
	align-items: baseline;
	gap: 5px;
	font-size: 15px;
	font-weight: 800;
	color: var(--po-primary);
	background: rgba(28,63,170,.07);
	padding: 4px 10px;
	border-radius: var(--po-radius-sm);
}
.po-checkout__total i {
	font-style: normal;
	font-size: 12px;
	font-weight: 600;
	color: var(--po-text-muted);
}
.po-checkout__savings { color: var(--po-success) !important; }

/* --- Cupom badge (exibido APÓS aplicar) --- */
.po-coupon { margin-bottom: 30px; }
.po-coupon-badge {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 14px;
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-left: 4px solid var(--po-success);
	border-radius: var(--po-radius);
	padding: 12px 16px;
	animation: po-coupon-pop .35s ease;
}
.po-coupon-badge__icon { font-size: 22px; }
.po-coupon-badge__text { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.po-coupon-badge__text strong { color: var(--po-success); font-size: 15px; }
.po-coupon-badge__text small {
	color: var(--po-text-muted);
	font-size: 12px;
	font-family: var(--po-font-mono, monospace);
}
.po-coupon-badge__remove {
	flex: none;
	width: 30px; height: 30px;
	border-radius: 50%;
	border: 1px solid var(--po-border-strong);
	background: #fff;
	color: var(--po-text-muted);
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
	transition: background .2s ease, color .2s ease;
}
.po-coupon-badge__remove:hover { background: #fef2f2; color: var(--po-danger); border-color: var(--po-danger); }
@keyframes po-coupon-pop {
	0% { transform: translateY(-4px); opacity: 0; }
	100% { transform: translateY(0); opacity: 1; }
}

/* --- Botão de pagamento com valor --- */
.po-checkout__submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 56px;
}
.po-checkout__submit-value { font-weight: 800; opacity: .9; }

/* --- Resumo (carrinho) v2 --- */
.po-checkout__summary { border-top: 4px solid var(--po-primary); }
.po-summary__title { margin-bottom: 20px; }
.po-summary__list li.is-plan-row strong { color: var(--po-primary); }
.po-sum-value-row strong { font-size: 18px; }
.po-sum-installments-row strong { color: var(--po-text); font-size: 14px; }
.po-sum-discount-row strong { color: var(--po-success) !important; }
.po-summary__list li.is-total { padding-top: 16px; margin-top: 4px; }
.po-summary__list li.is-total strong { font-size: 26px; }
.po-summary__secure { display: grid; gap: 4px; }

/* Destaque ao aplicar cupom no resumo */
.po-sum-discount-row {
	background: rgba(34,197,94,.08);
	border-radius: var(--po-radius-sm);
	padding: 4px 8px;
	animation: po-coupon-pop .3s ease;
}
.po-sum-discount-row span { color: var(--po-success); font-weight: 700; }

@media (max-width: 520px) {
	.po-checkout__plan-top { flex-direction: column; align-items: flex-start; gap: 4px; }
	.po-checkout__tag { align-self: flex-start; }
}

/* ==================================================================
   CHECKOUT v2 — FLUXO EM 4 ETAPAS (steps sequenciais + máscaras)
   ================================================================== */

/* --- Etapa oculta até selecionar plano --- */
.po-checkout__step[hidden] { display: none; }
.po-checkout__step { animation: po-step-in .28s ease; }
@keyframes po-step-in {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: translateY(0); }
}

/* --- Botões voltar/continuar --- */
.po-checkout__nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px solid var(--po-border);
}
.po-btn--block { width: 100%; }
.po-btn--lg { min-height: 52px; font-size: 17px; }

/* --- Formulário --- */
.po-form__row { margin-bottom: 16px; }
.po-form__row > label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: var(--po-text);
	margin-bottom: 6px;
}
.po-form__row input[type="text"],
.po-form__row input[type="email"],
.po-form__row input[type="tel"],
.po-form__row select {
	width: 100%;
	padding: 13px 14px;
	border: 1px solid var(--po-border-strong);
	border-radius: var(--po-radius-sm);
	background: #fff;
	color: var(--po-text);
	font-size: 16px;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.po-form__row input:focus,
.po-form__row select:focus {
	outline: none;
	border-color: var(--po-primary);
	box-shadow: 0 0 0 4px rgba(28,63,170,.12);
}

/* --- Grid 2 colunas dentro do formulário --- */
.po-form__grid2 {
	display: grid;
	grid-template-columns: 1fr 1.5fr;
	gap: 16px;
}

/* --- Substep (título interno, ex.: "Endereço") --- */
.po-substep {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
	font-weight: 800;
	color: var(--po-text);
	margin: 26px 0 16px;
	padding-top: 20px;
	border-top: 1px dashed var(--po-border);
}
.po-substep::before {
	content: '';
	flex: none;
	width: 8px; height: 8px;
	border-radius: 50%;
	background: var(--po-primary);
}

/* --- Input com sufixo (subdomínio) --- */
.po-input-append {
	display: flex;
	align-items: stretch;
	border: 1px solid var(--po-border-strong);
	border-radius: var(--po-radius-sm);
	overflow: hidden;
	transition: border-color .2s ease, box-shadow .2s ease;
	background: #fff;
}
.po-input-append:focus-within {
	border-color: var(--po-primary);
	box-shadow: 0 0 0 4px rgba(28,63,170,.12);
}
.po-input-append input {
	flex: 1;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	padding: 13px 14px;
	font-size: 16px;
	color: var(--po-text);
	background: transparent;
}
.po-input-append input:focus { outline: none; }
.po-input-append__suffix {
	flex: none;
	display: inline-flex;
	align-items: center;
	padding: 0 14px;
	font-size: 15px;
	font-weight: 600;
	color: var(--po-text-muted);
	background: var(--po-bg-soft);
	border-left: 1px solid var(--po-border);
	white-space: nowrap;
}
.po-input-append__prefix {
	flex: none;
	display: inline-flex;
	align-items: center;
	padding-left: 14px;
	font-size: 15px;
	font-weight: 500;
	color: var(--po-text-muted);
	white-space: nowrap;
	user-select: none;
}

/* --- Hint (texto auxiliar) --- */
.po-form__hint {
	display: block;
	margin-top: 6px;
	font-size: 12.5px;
	color: var(--po-text-muted);
	line-height: 1.4;
}
.po-form__note {
	margin-top: 20px;
	font-size: 13.5px;
	color: var(--po-text-muted);
	text-align: center;
}

@media (max-width: 520px) {
	.po-form__grid2 { grid-template-columns: 1fr; gap: 0; }
	.po-checkout__nav { flex-direction: column-reverse; align-items: stretch; }
	.po-checkout__nav .po-btn { width: 100%; }
}

/* ==================================================================
   CHECKOUT v3 — PROGRESS, TOAST, FEEDBACK INLINE, SPINNER, CONFIRMAÇÃO
   ================================================================== */

/* --- Barra de progresso (1→4) ---
   Nomenclatura limpa e única: .po-steps (conteiner) / .po-steps__item
   / .po-steps__marker (bolinha) / .po-steps__label (texto). NÃO usa
   .po-step (que já existe p/ "steps numerados" do v2). Centralizada e
   sem vazar para os cantos; os conectores são ::before no próprio item. */
.po-steps {
	list-style: none;
	padding: 0;
	margin: 0 auto 36px;
	display: flex;
	align-items: stretch;
	justify-content: center;
	gap: 0;
	max-width: 720px;
	width: 100%;
	box-sizing: border-box;
}
.po-steps__item {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	position: relative;
}
/* Conector horizontal entre etapas (vem ANTES da bolinha de cada passo). */
.po-steps__item::before {
	content: '';
	position: absolute;
	top: 15px;
	left: calc(-50% + 16px); /* metade do item + metade da bolinha */
	right: calc(50% + 16px);
	height: 3px;
	background: var(--po-border);
	z-index: 0;
	border-radius: 2px;
}
.po-steps__item:first-child::before { display: none; }
.po-steps__item.is-done::before { background: var(--po-primary); }
.po-steps__item.is-current::before,
.po-steps__item.is-active::before { background: linear-gradient(90deg, var(--po-primary) 0%, var(--po-primary-light) 100%); }
.po-steps__marker {
	position: relative;
	z-index: 1;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--po-border-strong);
	color: var(--po-text-muted);
	font-size: 14px;
	font-weight: 800;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background .25s ease, border-color .25s ease, color .25s ease, box-shadow .25s ease;
}
.po-steps__label {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--po-text-muted);
	text-align: center;
	padding: 0 6px;
	max-width: 100%;
	overflow-wrap: anywhere;
}
.po-steps__item.is-done .po-steps__marker {
	background: var(--po-primary);
	border-color: var(--po-primary);
	color: #fff;
}
.po-steps__item.is-current .po-steps__marker,
.po-steps__item.is-active .po-steps__marker {
	background: var(--po-primary);
	border-color: var(--po-primary);
	color: #fff;
	box-shadow: 0 0 0 5px rgba(28,63,170,.15);
}
.po-steps__item.is-current .po-steps__label,
.po-steps__item.is-active .po-steps__label { color: var(--po-primary); font-weight: 800; }

/* --- Toast global --- */
.po-toast {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 1000;
	max-width: 380px;
	padding: 14px 18px;
	border-radius: var(--po-radius);
	background: #1f2937;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	box-shadow: var(--po-shadow-lg);
	opacity: 0;
	transform: translateY(12px);
	transition: opacity .3s ease, transform .3s ease;
	pointer-events: none;
}
.po-toast.is-visible { opacity: 1; transform: translateY(0); }
.po-toast.is-success { background: var(--po-success); }
.po-toast.is-error { background: var(--po-danger); }
@media (max-width: 520px) {
	.po-toast { left: 16px; right: 16px; bottom: 16px; max-width: none; text-align: center; }
}

/* --- Feedback inline de erro --- */
.po-form__row input.is-invalid,
.po-input-append.is-invalid,
.po-mp-field.is-invalid {
	border-color: var(--po-danger) !important;
	box-shadow: 0 0 0 4px rgba(220,38,38,.12) !important;
}
input.is-invalid { border-color: var(--po-danger) !important; box-shadow: 0 0 0 4px rgba(220,38,38,.12) !important; }
input.is-valid { border-color: var(--po-success) !important; box-shadow: 0 0 0 3px rgba(16,185,129,.12) !important; }
.po-field-error {
	display: block;
	margin-top: 6px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--po-danger);
	line-height: 1.4;
}

/* --- Spinner do botão pagar --- */
.po-spinner {
	width: 18px;
	height: 18px;
	border: 2.5px solid rgba(255,255,255,.35);
	border-top-color: #fff;
	border-radius: 50%;
	display: inline-block;
	animation: po-spin .7s linear infinite;
	vertical-align: middle;
}
@keyframes po-spin { to { transform: rotate(360deg); } }

/* --- Resumo de confirmação (etapa 4) --- */
.po-confirm {
	background: var(--po-bg-soft);
	border: 1px solid var(--po-border);
	border-radius: var(--po-radius);
	padding: 20px;
	margin-bottom: 26px;
	display: grid;
	gap: 16px;
}
.po-confirm__block { display: grid; gap: 4px; }
.po-confirm__title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 800;
	color: var(--po-text);
	margin: 0 0 6px;
}
.po-confirm__emoji { font-size: 16px; }
.po-confirm__edit {
	margin-left: auto;
	font-size: 12px;
	font-weight: 700;
	color: var(--po-primary);
	background: none;
	border: 1px solid var(--po-border-strong);
	border-radius: var(--po-radius-full);
	padding: 3px 10px;
	cursor: pointer;
	transition: background .2s ease, color .2s ease;
}
.po-confirm__edit:hover { background: var(--po-primary); color: #fff; border-color: var(--po-primary); }
.po-confirm__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.po-confirm__list li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-size: 14px;
	color: var(--po-text-muted);
}
.po-confirm__list li strong { color: var(--po-text); font-weight: 700; text-align: right; }
.po-confirm__list li.po-confirm__subtotal {
	border-top: 1px dashed var(--po-border-strong);
	margin-top: 6px;
	padding-top: 10px;
	font-size: 15px;
}
.po-confirm__list li.po-confirm__subtotal strong {
	font-size: 20px;
	font-weight: 900;
	color: var(--po-primary);
}
.po-confirm__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}
.po-confirm__compact { display: grid; gap: 4px; }
.po-confirm__compact p {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-size: 13px;
	margin: 0;
	color: var(--po-text-muted);
}
.po-confirm__compact p span { flex: none; }
.po-confirm__compact p strong {
	color: var(--po-text);
	font-weight: 600;
	text-align: right;
	min-width: 0;
	overflow-wrap: anywhere;
}
@media (max-width: 640px) {
	.po-confirm__grid { grid-template-columns: 1fr; }
	.po-steps__label { font-size: 11px; }
}

/* ==================================================================
   PÁGINA DE OBRIGADO (page-thanks)
   ================================================================== */
.po-thanks { text-align: center; padding: 12px 0 0; }
.po-thanks__icon { font-size: 72px; line-height: 1; margin-bottom: 8px; }
.po-thanks h1 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 12px; }
.po-thanks__lead { font-size: 17px; line-height: 1.6; color: var(--po-text-muted); max-width: 520px; margin: 0 auto 28px; }
.po-thanks__lead strong { color: var(--po-primary); }
.po-thanks__card {
	background: var(--po-surface);
	border: 1px solid var(--po-border);
	border-top: 4px solid var(--po-primary);
	border-radius: var(--po-radius-lg);
	box-shadow: var(--po-shadow-md);
	padding: 24px;
	text-align: left;
	margin-bottom: 28px;
}
.po-thanks__card h3 { margin: 0 0 14px; font-size: 18px; }
.po-thanks__list { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 10px; }
.po-thanks__list li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-size: 15px;
	color: var(--po-text-muted);
}
.po-thanks__list li strong { color: var(--po-text); font-weight: 700; }
.po-thanks__status {
	font-size: 14px;
	font-weight: 700;
	color: var(--po-success);
	background: #ecfdf5;
	border: 1px solid #bbf7d0;
	border-radius: var(--po-radius-sm);
	padding: 10px 14px;
	margin: 0;
}
.po-thanks__sub { font-size: 16px; margin: 0 0 16px; text-align: left; }
.po-thanks__steps {
	list-style: none;
	counter-reset: po-thanks-step;
	padding: 0;
	margin: 0 auto 28px;
	max-width: 480px;
	display: grid;
	gap: 12px;
	text-align: left;
}
.po-thanks__steps li {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	counter-increment: po-thanks-step;
	font-size: 15px;
	color: var(--po-text);
	line-height: 1.5;
}
.po-thanks__steps li::before {
	content: counter(po-thanks-step);
	flex: none;
	width: 26px; height: 26px;
	border-radius: 50%;
	background: var(--po-primary);
	color: #fff;
	font-size: 13px;
	font-weight: 800;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 1px;
}
.po-thanks__steps b { color: var(--po-primary); }
.po-thanks .po-btn { max-width: 440px; margin: 0 auto; }

/* --- Estado de carregamento do CEP --- */
input.is-loading {
	background-image: linear-gradient(90deg, transparent calc(50% - 10px), rgba(28,63,170,.12) 50%, transparent calc(50% + 10px));
	background-size: 200% 100%;
	animation: po-shimmer 1.1s linear infinite;
}
@keyframes po-shimmer { to { background-position: -200% 0; } }

/* --- Indicação de bandeira do cartão --- */
.po-card-brand {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 8px;
	font-size: 13px;
	color: var(--po-text-muted);
}
.po-card-brand__name {
	font-weight: 800;
	color: var(--po-primary);
	background: #eef2ff;
	border: 1px solid #c7d2fe;
	border-radius: var(--po-radius-sm);
	padding: 2px 10px;
}
.po-card-brand:not([hidden]) { animation: po-fade .25s ease; }
@keyframes po-fade { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }

/* ==================================================================
   MOBILE-FIRST PREMIUM — checkout realmente usável no celular
   (camada adicional; preserva o base, só aprimora touch/layout)
   ================================================================== */
@media (max-width: 480px) {
	.po-checkout__body { padding: 0; }
	.po-checkout__card { border-radius: 0; border-left: 0; border-right: 0; }
	.po-checkout__header-inner { padding: 12px 16px; }

	/* Blinda contra overflow horizontal (etapas "vazando" p/ a direita) */
	.po-checkout,
	.po-checkout__main,
	.po-checkout__body,
	.po-checkout__card,
	.po-checkout__grid,
	.po-checkout__step {
		max-width: 100%;
	}
	.po-checkout__main,
	.po-checkout { overflow-x: hidden; }

	/* Etapas/progresso mais compactas e legíveis */
	.po-steps {
		margin-bottom: 28px;
		width: 100%;
		max-width: 100%;
		padding: 0 4px;
	}
	.po-steps__item { padding: 0 2px; }
	.po-steps__marker { width: 26px; height: 26px; }
	.po-steps__item::before { top: 12px; left: calc(-50% + 13px); right: calc(50% + 13px); }
	.po-steps__label {
		font-size: 10px;
		letter-spacing: 0;
		padding: 0 2px;
		max-width: 100%;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	.po-steps__item.is-current .po-steps__marker,
	.po-steps__item.is-active .po-steps__marker {
		box-shadow: 0 0 0 4px rgba(28,63,170,.15);
	}

	/* Inputs touch-friendly (altura mínima 46px) */
	.po-form input,
	.po-form select,
	.po-mp-field input {
		min-height: 46px;
		font-size: 16px; /* evita zoom automático do iOS */
		padding: 12px 14px;
	}
	.po-form__row { gap: 12px; }

	/* Tipografia dos steps */
	.po-step { font-size: 16px; margin-bottom: 14px; }

	/* Cupom: campos empilhados */
	.po-coupon-row { flex-direction: column; gap: 10px; align-items: stretch; }
	.po-coupon-row .po-coupon__input { width: 100%; min-height: 46px; }
	.po-coupon-row .po-btn { width: 100%; min-height: 46px; }

	/* Resumo/confirmação em coluna única */
	.po-confirm__grid { grid-template-columns: 1fr; gap: 20px; }
	.po-summary__list li { font-size: 14px; }
	.po-summary__list li.is-total strong { font-size: 22px; }
	.po-confirm__list li { font-size: 13.5px; gap: 8px; }

	/* Botão pagar: fixo no rodapé (thumb-friendly) */
	.po-checkout__pay-wrap { padding: 10px 0 4px; }
	.po-checkout__pay-wrap .po-btn--lg {
		width: 100%;
		min-height: 52px;
		font-size: 16px;
		border-radius: 12px;
	}

	/* Mensagem de erro MP maior e clara */
	.po-mp-error { font-size: 13px; padding: 12px; }

	/* Toast: full-width no bottom */
	.po-toast { left: 12px; right: 12px; bottom: 12px; max-width: none; font-size: 14px; padding: 14px 16px; }
}

@media (min-width: 481px) and (max-width: 640px) {
	.po-steps__label { font-size: 11px; }
	.po-form input, .po-form select, .po-mp-field input { min-height: 48px; font-size: 16px; padding: 12px 14px; }
	.po-checkout__pay-wrap .po-btn--lg { min-height: 52px; }
}

/* Safe-area: respeita o notch / barra inferior do iPhone */
@supports (padding: env(safe-area-inset-bottom)) {
	@media (max-width: 640px) {
		.po-checkout__footer { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
	}
}
