/* Carrinho, checkout e pedido. */

.shop { padding-top: clamp(16px, 2.4vw, 28px); padding-bottom: clamp(56px, 8vw, 96px); }
.shop > .inner-hero { margin-bottom: clamp(20px, 3vw, 32px); }
.shop__notice { margin: 0 0 24px; padding: 14px 18px; border-radius: 12px; background: var(--gold-soft); font-size: 15px; }
.shop__notice a { color: var(--gold-ink); font-weight: 600; }
.shop__empty { padding: 40px 24px; border: 1px dashed var(--line-strong); border-radius: 20px; text-align: center; }
.shop__empty p { margin: 0 0 20px; font-size: 17px; color: var(--muted); }
.shop__button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border: 0; border-radius: 12px; font-family: inherit; font-weight: 700; font-size: 16px; cursor: pointer; }
.shop__button--wide { display: flex; width: 100%; }
.shop__grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }

.cart { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 20px; background: #FFFFFF; }
.cart__item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 20px; padding: 20px 24px; border-bottom: 1px solid var(--line-soft); }
.cart__item:last-child { border-bottom: 0; }
.cart__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cart__name { font-family: var(--font-title); font-weight: 700; font-size: 17px; line-height: 1.3; color: var(--navy); text-decoration: none; overflow-wrap: anywhere; }
.cart__name:hover { text-decoration: underline; }
.cart__note { font-size: 14px; color: var(--muted); }
.cart__price { font-family: var(--font-title); font-size: 18px; white-space: nowrap; text-align: right; }
.cart__remove { grid-column: 1 / -1; }
.cart__remove-btn, .summary__link { padding: 0; border: 0; background: none; font: inherit; font-size: 14px; color: var(--muted); text-decoration: underline; cursor: pointer; }
.cart__remove-btn:hover, .summary__link:hover { color: var(--navy); }

.summary { display: flex; flex-direction: column; gap: 16px; padding: 24px; border-radius: 20px; background: var(--bg-soft); }
.summary__lines { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.summary__line { display: flex; justify-content: space-between; gap: 16px; font-size: 15px; }
.summary__line dt, .summary__line dd { margin: 0; }
.summary__line--discount { color: #16613A; }
.summary__line--total { padding-top: 12px; border-top: 1px solid var(--line-strong); font-family: var(--font-title); font-weight: 800; font-size: 20px; }
.summary__pay { margin: 0; font-size: 14px; color: var(--muted); }
.summary__coupon { display: flex; flex-direction: column; gap: 8px; }
.summary__coupon-label { font-size: 14px; font-weight: 600; }
.summary__coupon-row { display: flex; gap: 8px; }
.summary__coupon-row .field__input { flex: 1; min-width: 0; }
.summary__coupon-btn { padding: 0 18px; border-radius: 12px; font-family: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.summary__link { align-self: flex-start; }

.site-header__cart { position: relative; }
.site-header__cart-count { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; display: grid; place-items: center; border-radius: 999px; background: var(--gold); color: var(--navy); font-size: 12px; font-weight: 700; line-height: 1; }

.course__buy-form { margin: 0; }
.course__cta--button { width: 100%; border: 0; font-family: inherit; cursor: pointer; }

@media (max-width: 900px) {
  .shop__grid { grid-template-columns: minmax(0, 1fr); }
}

/* --- Checkout, consulta e pagina do pedido --- */
.shop--narrow { max-width: 620px; }
.shop__lead { margin: -8px 0 24px; font-size: 16px; color: var(--muted); }
.checkout { display: flex; flex-direction: column; gap: 20px; padding: clamp(20px, 3vw, 32px); border: 1px solid var(--line); border-radius: 20px; background: #FFFFFF; }
.checkout__alert { margin: 0; padding: 12px 16px; border-radius: 12px; background: #FBEAEA; color: #8A1F1F; font-size: 15px; font-weight: 500; }
.checkout__group { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.checkout__legend { padding: 0; margin-bottom: 14px; font-family: var(--font-title); font-weight: 700; font-size: 18px; }
.checkout__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.checkout__options { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.checkout__option { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 12px; font-weight: 600; font-size: 15px; cursor: pointer; }
.checkout__option:has(input:checked) { border-color: var(--navy); background: var(--tint); }
.checkout__option input { width: 18px; height: 18px; margin: 0; accent-color: var(--navy); }
.checkout__installments[hidden] { display: none; }
.checkout__hint { margin: 0; font-size: 13px; font-weight: 400; line-height: 1.5; color: var(--muted); }
.checkout__hint a { color: var(--navy); }
.checkout__notes { height: auto; padding: 12px 14px; resize: vertical; }

.summary__items { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.summary__item { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; line-height: 1.4; }
.summary__item span { min-width: 0; overflow-wrap: anywhere; }
.summary__item strong { white-space: nowrap; }

.order { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: clamp(20px, 3vw, 32px); border: 1px solid var(--line); border-radius: 20px; background: #FFFFFF; }
.order__status { margin: 0; }
.order__status-label { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 999px; background: var(--gold-soft); color: var(--gold-ink-hover); font-weight: 700; font-size: 14px; }
.order__status--pago .order__status-label, .order__status--liberado .order__status-label { background: #E6F4EC; color: #16613A; }
.order__status--cancelado .order__status-label { background: #FBEAEA; color: #8A1F1F; }
.order__text { margin: 0; font-size: 17px; line-height: 1.6; }
.order__text a, .order__hint a { color: var(--navy); font-weight: 600; }
.order__hint { margin: 0; font-size: 14px; color: var(--muted); }
.shop__notice code { font-size: 13px; overflow-wrap: anywhere; }

/* --- Matricula --- */
.summary__title { font-family: var(--font-title); font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.checkout__notice { margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; background: #FBEAEA; color: #8A1F1F; font-size: 14px; font-weight: 600; }
.checkout__terms { max-height: 180px; overflow-y: auto; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg-soft); font-size: 14px; line-height: 1.6; }
.checkout__accept { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.5; cursor: pointer; }
.checkout__accept input { flex-shrink: 0; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--navy); }
.checkout__accept a { color: var(--navy); }
.order__status--ativa .order__status-label, .order__status--concluida .order__status-label { background: #E6F4EC; color: #16613A; }
.order__status--inadimplente .order__status-label, .order__status--cancelada .order__status-label { background: #FBEAEA; color: #8A1F1F; }
/* Em tela estreita o contrato aparece antes do formulario: o aluno ve o que esta contratando antes de preencher. */
@media (max-width: 900px) {
  .shop__grid--summary-first .summary { order: -1; }
}

/* --- Parcelas da matricula --- */
.order__parcels { width: 100%; display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.order__subtitle { margin: 0; font-family: var(--font-title); font-weight: 700; font-size: 18px; }
.order__parcel-list { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.order__parcel { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
.order__parcel:last-child { border-bottom: 0; }
.order__parcel-name { font-weight: 600; min-width: 84px; }
.order__parcel-due { color: var(--muted); flex: 1; min-width: 150px; }
.order__parcel-status { padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--tint); }
.order__parcel-status--ok { background: #E6F4EC; color: #16613A; }
.order__parcel-status--late { background: #FBEAEA; color: #8A1F1F; }
.order__parcel-status--off { color: var(--muted); }
.order__parcel-pay { padding: 6px 16px; border-radius: 10px; background: var(--gold); color: var(--navy); font-weight: 700; font-size: 14px; text-decoration: none; }
.summary__line dd { text-align: right; }
.summary__line--total dd { white-space: nowrap; }
@media (max-width: 420px) {
  .summary__line--total { font-size: 18px; }
}

/* Carrinho: dica de cupom (Configuracoes -> Promocoes), so para quem ainda nao tem cupom aplicado. */
.summary__hint { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 12px 14px; border-radius: 12px; background: var(--gold-soft); font-size: 14px; }
.summary__hint-text strong { letter-spacing: .04em; }
.summary__hint-btn { height: 36px; padding: 0 14px; border-radius: 10px; font-family: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }

/* Matricula: cupom no resumo do contrato (M124) — o valor cheio, riscado, embaixo do valor com desconto, e o aviso de quem aplicou ou retirou. */
.summary__was { display: block; font-size: 13px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.summary__coupon-msg { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--gold-soft); font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.summary__coupon-msg--ok { background: #E6F4EC; color: #16613A; font-weight: 600; }
.summary__coupon-msg--error { background: #FBEAEA; color: #8A1F1F; font-weight: 600; }

/* Pagamento por Pix na pagina do pedido: QR Code e copia e cola. */
.order__pix { width: 100%; display: flex; flex-direction: column; gap: 12px; padding: clamp(16px, 2.4vw, 24px); border-radius: 18px; border: 1px solid var(--line); background: var(--bg-soft); }
.order__pix-value { margin: 0; font-size: 16px; }
.order__pix-body { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.order__pix-qr { width: 220px; height: 220px; max-width: 100%; padding: 8px; border-radius: 12px; background: #FFFFFF; border: 1px solid var(--line); image-rendering: pixelated; }
.order__pix-steps { flex: 1 1 240px; margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.5; }
.order__pix-label { font-size: 14px; font-weight: 600; }
.order__pix-field { display: flex; flex-wrap: wrap; gap: 8px; }
.order__pix-input { flex: 1 1 240px; min-width: 0; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: #FFFFFF; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; color: var(--navy); }
.order__pix-input:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: 2px; }
.order__pix-copy { height: 46px; padding: 0 20px; border-radius: 12px; font-family: inherit; font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap; }
.order__pix-copy[hidden] { display: none; }

/* Consulta de pedido pelo CPF: a lista dos pedidos da pessoa. */
.order-list__title { margin: 0; font-family: var(--font-title); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.order-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.order-list__item { display: flex; flex-direction: column; gap: 10px; padding: clamp(16px, 2.4vw, 22px); border-radius: 18px; border: 1px solid var(--line); background: #FFFFFF; }
.order-list__head, .order-list__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.order-list__code { font-family: var(--font-title); font-size: 17px; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.order-list__course { margin: 0; font-size: 15px; line-height: 1.5; }
.order-list__meta { font-size: 14px; color: var(--muted); }
.order-list__link { height: 40px; padding: 0 18px; border-radius: 12px; display: inline-flex; align-items: center; font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap; }
