/* Checkout compacto: regras restritas a esta página. */
.checkout-shell{padding-top:38px;padding-bottom:60px}
.checkout-title{margin-bottom:32px}
.checkout-title h1{font-size:clamp(38px,4.8vw,57px);line-height:1.04;letter-spacing:-1.2px;margin:0;max-width:780px;text-wrap:balance}
.checkout-title .eyebrow{margin-bottom:12px}
.checkout-grid{gap:60px}
.steps{gap:22px;margin-bottom:28px;font-size:15px;line-height:1.3}
.steps li{flex:1;display:flex;align-items:center;gap:8px;padding-bottom:15px;color:#7a7367}
.steps li span{display:inline-grid;place-items:center;width:27px;height:27px;flex:none;margin:0;border:1px solid #c9beab;border-radius:50%;font-size:11px}
.steps .current{font-weight:500}
.steps .current span{color:var(--paper);background:var(--ink);border-color:var(--ink)}
.steps .complete span{border-color:#727d5c}
.checkout-form h2:not(:where(#cardPaymentBrick_container *)){font-size:33px;line-height:1.06;margin-bottom:20px}
.checkout-form .form-grid{gap:12px 14px}
.checkout-form .form-grid label{position:relative;gap:0}
.checkout-form .form-grid input,.checkout-form .form-grid select{min-height:52px;padding:13px 15px;font-size:18px}
.checkout-form .form-grid input::placeholder{font-size:18px;color:#817869;opacity:1}
.checkout-form select:has(option:checked[value=""]){color:#817869}
.checkout-form .field-note{margin:12px 0 18px;font-size:10px}
.checkout-form .solid,.checkout-form .outlined{min-height:52px;padding:13px 21px;font-size:20px}
#calculate-shipping{margin-top:14px}
.checkout-form .shipping-result{margin-top:14px}
.checkout-form .form-actions{margin-top:16px}
@media(max-width:1050px){.checkout-grid{gap:34px}}
@media(max-width:700px){
 .checkout-shell{padding:26px 22px 42px}
 .checkout-title{margin-bottom:24px}
 .checkout-title h1{font-size:38px;max-width:470px;letter-spacing:-.7px}
 .checkout-title .eyebrow{font-size:8px}
 .steps{gap:10px;font-size:13px;margin-bottom:23px}
 .steps li{gap:6px;padding-bottom:13px}
 .steps li span{width:24px;height:24px;font-size:10px}
 .checkout-form h2:not(:where(#cardPaymentBrick_container *)){font-size:30px;margin-bottom:18px}
 .checkout-form .form-grid{gap:11px 10px}
 .checkout-form .form-grid input,.checkout-form .form-grid select{font-size:17px;min-height:50px;padding:12px}
 .checkout-form .form-grid input::placeholder{font-size:17px}
 .checkout-form .form-actions .solid{font-size:17px;padding:12px}
}
@media(max-width:360px){.steps{font-size:12px;gap:6px}.steps li{gap:4px}.steps li span{width:22px;height:22px}}

.freight-toggle{display:inline-flex;align-items:center;gap:8px;border:0;border-bottom:1px solid currentColor;background:none;padding:0 0 2px;font:inherit;color:var(--ink)}
.freight-toggle [aria-hidden]{font:18px var(--sans)}
.totals>.summary-freight{display:block;margin:8px 0 18px;padding:15px 0;border-top:1px solid #d3cabb;border-bottom:1px solid #d3cabb}
.summary-freight>dd{text-align:left}
.freight-cep-row{display:flex;gap:8px;align-items:stretch}
.freight-cep-row input{flex:1;width:0;min-height:46px;padding:10px 12px;font-size:18px}
.freight-cep-row .outlined{min-height:46px;padding:10px 14px;font-size:18px;gap:0}
.freight-note{font:10px/1.6 var(--sans);color:var(--muted);margin:12px 0 0;white-space:pre-line}
.summary-freight .shipping-options{margin:13px 0 0}
.summary-freight .shipping-options:empty{display:none}
.summary-freight .shipping-option{padding:12px 10px;gap:9px;background:#faf7f1;margin-bottom:8px;font-size:18px}
.summary-freight .shipping-option small{font:10px/1.6 var(--sans);margin-top:4px}
.summary-freight .shipping-option input{accent-color:var(--ink)}
.summary-freight .shipping-option:has(input:checked){border-color:var(--ink);background:#e5dece}
#calculate-shipping{font-size:17px;padding:9px 0;border:0;border-bottom:1px solid currentColor;background:none;min-height:44px}

.shipping-selection{display:block;font:10px/1.5 var(--sans);color:var(--muted);margin-top:6px;max-width:200px;margin-left:auto}

/* O formulário do provedor usa tipografia funcional, isolada da identidade editorial. */
#cardPaymentBrick_container{font-family:Arial,Helvetica,sans-serif;font-size:16px;line-height:1.5;letter-spacing:normal;color:#202428}
#cardPaymentBrick_container :is(input,select,button,label,h1,h2,h3,p,span){font-family:Arial,Helvetica,sans-serif!important;letter-spacing:normal}
.payment-provider{display:flex;align-items:center;gap:12px;padding:15px 17px;margin:18px 0 12px;border:1px solid #cbd9e1;background:#f3f8fb;border-radius:8px;font:12px/1.5 var(--sans);color:#234455}
.payment-provider>svg{width:22px;height:22px;flex:none}
.payment-provider strong,.payment-provider span{display:block}.payment-provider strong{font-weight:600}.payment-provider span{font-size:10px;color:#526673;margin-top:2px}
.shipping-selection{font-size:12px;font-weight:600;line-height:1.5;color:var(--ink);max-width:240px;padding:6px 0 0}
.summary-freight .shipping-option small{font-size:12px}.shipping-deadline{display:block;font:600 12px/1.5 var(--sans);color:var(--ink);margin-top:5px}
.purchase-whatsapp{position:fixed;right:22px;bottom:max(22px,env(safe-area-inset-bottom));z-index:900;display:inline-flex;align-items:center;gap:11px;max-width:260px;padding:13px 17px 13px 13px;border:1px solid #d1decf;border-radius:40px;background:#fffdf9;color:#1f482e;box-shadow:0 6px 26px #172b2026;font:500 11px/1.5 var(--sans)}
.purchase-whatsapp>svg{width:35px;height:35px;flex:none;color:#267b43}.purchase-whatsapp:hover{background:#edf5eb}.purchase-whatsapp:focus-visible{outline:2px solid #267b43;outline-offset:4px}
@media(max-width:700px){.purchase-whatsapp{right:14px;bottom:max(14px,env(safe-area-inset-bottom));font-size:10px;padding:9px 13px 9px 9px;gap:8px}.purchase-whatsapp>svg{width:32px;height:32px}.store-footer{padding-bottom:105px}.payment-provider{padding:13px;font-size:11px}.shipping-selection{font-size:12px}}

/* Navegação por etapas e resumo de entrega. */
.steps li{padding-bottom:0}
.steps li>button{display:flex;align-items:center;gap:8px;width:100%;min-height:48px;padding:0 0 15px;border:0;background:none;color:inherit;font:inherit;text-align:left}
.steps li>button:disabled{opacity:1;cursor:default}
.steps li>button:not(:disabled):hover{text-decoration:underline;text-underline-offset:5px}
.steps .complete{color:#56714e}.steps .complete span{border-color:#56714e;background:#e4ecdf;color:#36502f}
.steps .current{color:var(--ink)}
.shipping-selection,.summary-freight .shipping-deadline{color:#a84d13}
.summary-freight .shipping-deadline{margin:0 0 5px;font-size:13px}
.summary-delivery{padding:18px 0;border-bottom:1px solid #d3cabb}
.summary-delivery>div{display:flex;align-items:center;justify-content:space-between;gap:12px}
.summary-delivery h3{font:600 12px/1.5 var(--sans);margin:0}
.summary-delivery .text-button{font:12px/1.5 var(--sans);padding:4px 0}
.summary-delivery p{font:12px/1.65 var(--sans);color:#645d52;margin:8px 0 0;overflow-wrap:anywhere}
@media(max-width:700px){.steps li>button{gap:6px;padding-bottom:13px}}

/* Ação de pagamento junto ao total; aparência oficial configurada pelo SDK. */
#cardPaymentBrick_container{background:#faf7f1;margin-top:22px}
.summary-payment-action{margin-top:24px;padding-top:4px}
#summary-pay{width:100%;min-height:58px;font:500 17px/1.35 var(--sans);gap:12px}
#summary-pay:disabled{opacity:.55;cursor:default;transform:none}
.summary-payment-provider{font:11px/1.6 var(--sans);color:#645d52;text-align:center;margin:12px 0 0}
.summary-payment-status{font:12px/1.65 var(--sans);color:#645d52;margin:14px 0 0;overflow-wrap:anywhere}
.summary-payment-status:empty{display:none}
@media(max-width:700px){.checkout-grid:has([data-step="3"]:not([hidden])) .purchase-summary{order:1}#summary-pay{font-size:16px}}

.purchase-feedback{padding:26px;border:1px solid #c5bcae;background:#eee9df;margin:0 0 26px;border-left:4px solid #987b49}
.purchase-feedback[data-state=approved]{border-left-color:#416b43;background:#edf2e8}
.purchase-feedback:is([data-state=failed],[data-state=cancelled],[data-state=expired],[data-state=validation]){border-left-color:#a84d26;background:#f6eee7}
.purchase-feedback h2{font-size:32px!important;line-height:1.12!important;margin:0 0 16px!important}
.purchase-feedback>p:not(.eyebrow){font:14px/1.8 var(--sans);margin:12px 0}
.purchase-feedback>strong{display:block;font:600 13px/1.6 var(--sans);margin:15px 0;overflow-wrap:anywhere}
.feedback-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}.feedback-actions>*{font:13px/1.5 var(--sans);padding:13px 17px;min-height:46px}
.feedback-help{display:inline-block;font:12px/1.7 var(--sans);text-decoration:underline;text-underline-offset:3px;margin-top:18px}
.summary-payment-status{padding:13px;background:#faf7f1;border-left:3px solid #987b49;color:#302c25}
@media(max-width:700px){.purchase-feedback{padding:20px}.purchase-feedback h2{font-size:28px!important}.feedback-actions>*{width:100%}}

/* A etapa ativa vem antes do resumo, especialmente no celular. */
.checkout-grid>.steps{grid-column:1/-1;max-width:calc((100% - 60px)*.575);margin:0}
.checkout-grid{row-gap:26px}
#payment-status:not(:empty){font:13px/1.6 var(--sans);padding:12px;border-left:3px solid #a84d13;background:#f6eee7;color:#6b3516}
@media(max-width:1050px) and (min-width:701px){.checkout-grid>.steps{max-width:calc((100% - 34px)*.575)}}
@media(max-width:700px){
 .store-header{padding:16px 20px;min-height:0}
 .store-header .wordmark{font-size:31px}
 .checkout-shell{padding:18px 20px 110px}
 .checkout-title{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .checkout-grid{gap:24px}
 .checkout-grid>.steps{order:0;width:100%;max-width:none;gap:8px}
 .checkout-grid>.checkout-form{order:1;width:100%;min-width:0}
 .checkout-grid>.purchase-summary{order:2!important;width:100%;box-sizing:border-box;padding:18px}
 .steps li>button{flex-direction:column;align-items:center;justify-content:center;gap:6px;text-align:center;min-height:65px;padding-bottom:12px;font-size:13px}
 .steps li span{width:26px;height:26px;font-size:11px}
 .checkout-form h2:not(:where(#cardPaymentBrick_container *)){font-size:29px;margin:0 0 18px}
 [data-step="3"]>.eyebrow{display:none}
 .checkout-form .quiet-line{font-size:10px;margin-top:16px}
 #checkout-status:empty{display:none}
 .purchase-summary>.eyebrow{display:none}
 .purchase-summary .summary-book{gap:14px;padding-bottom:16px}
 .purchase-summary .summary-book img{width:64px;height:80px;object-fit:cover}
 .purchase-summary .summary-book h3{font-size:26px;margin:0 0 4px}
 .purchase-summary .summary-book p{font-size:16px;margin:0 0 5px}
 .purchase-summary .summary-book small{font-size:10px}
 .purchase-summary .summary-quantity{padding:16px 0;margin:0;font-size:21px}
 .purchase-summary .totals{font-size:20px}
 .purchase-summary .totals>div{margin:10px 0}
 .purchase-summary .totals .total{font-size:28px;padding-top:16px;margin-top:16px}
 .purchase-summary .shipping-selection{font-size:12px}
 .payment-options{gap:8px}
 .payment-options label{padding:12px 8px;gap:6px}
 .payment-options label span{font-size:21px}
 .payment-options label small{font-size:9px}
 .payment-provider{padding:10px;margin-top:14px}
 .purchase-feedback{margin-bottom:0}
}

.checkout-form:has([data-step="3"][hidden])>.quiet-line{display:none}

/* Após o envio, o resultado substitui o checkout e seu resumo. */
.checkout-grid.has-payment-result{display:block;max-width:800px;margin:0 auto}
.checkout-grid.has-payment-result>.steps,.checkout-grid.has-payment-result>.purchase-summary,.checkout-grid.has-payment-result .quiet-line,.checkout-grid.has-payment-result #checkout-status{display:none}
.checkout-shell:has(.has-payment-result)>.checkout-title{display:none}
#payment-check-status:empty{display:none}
#payment-check-status{font:13px/1.7 var(--sans);padding:12px 0;border-top:1px solid #d3cabb}

/* No celular, revisar o pedido precede a confirmação do pagamento. */
.mobile-payment-review,.mobile-order-review{display:none}
@media(max-width:700px){
 .mobile-payment-review{display:flex;width:100%;justify-content:center;margin-top:18px}
 .mobile-payment-review:disabled{opacity:.55;cursor:default}
 .review-note{display:block;font:11px/1.6 var(--sans);color:var(--muted);text-align:center;margin:10px 0 0}
 .checkout-grid:has([data-step="3"]:not([hidden])):not(.is-reviewing-order):not(.has-payment-result)>.purchase-summary{display:none}
 .checkout-grid.is-reviewing-order:not(.has-payment-result)>.checkout-form{display:none}
 .is-reviewing-order .mobile-order-review{display:block;margin-bottom:20px}
 .mobile-order-review h2{font-size:29px;line-height:1.1;margin:0 0 10px;scroll-margin-top:20px}
 .mobile-order-review p{font:12px/1.6 var(--sans);margin:0 0 12px;color:var(--muted)}
 .mobile-order-review .text-button{font:12px/1.5 var(--sans);min-height:44px}
}

/* Espera contínua: somente o indicador se move; o resultado permanece estável. */
.payment-wait{display:flex;align-items:center;gap:12px;margin:0 0 20px;font:700 16px/1.5 var(--sans);color:#52664c}
.payment-spinner{display:inline-block;width:24px;height:24px;flex:0 0 24px;border:3px solid #d4d9cb;border-top-color:#52664c;border-radius:50%;animation:payment-spin .9s linear infinite}
@keyframes payment-spin{to{transform:rotate(360deg)}}
#purchase-feedback-title:focus{outline:none}
.purchase-feedback[data-state=uncertain]{background:#fff6df;border-left-color:#996418}
.purchase-feedback .payment-check-status:empty{display:none}
@media(prefers-reduced-motion:reduce){.payment-spinner{animation:none;border-color:#52664c}}

/* O resumo completo é apresentado somente na revisão final, em todos os tamanhos. */
.checkout-grid:not(.is-reviewing-order):not(.has-payment-result){grid-template-columns:minmax(0,720px);justify-content:center}
.checkout-grid>.steps{max-width:none}
.checkout-grid:not(.is-reviewing-order)>.purchase-summary{display:none}
.checkout-grid.is-reviewing-order:not(.has-payment-result){grid-template-columns:minmax(0,720px);justify-content:center}
.checkout-grid.is-reviewing-order:not(.has-payment-result)>.checkout-form{display:none}
.mobile-payment-review{display:flex;width:100%;justify-content:center;margin-top:18px}
.mobile-payment-review.review-note{display:block}
.is-reviewing-order .mobile-order-review{display:block;margin-bottom:20px}
.delivery-options-panel{border:1px solid var(--line);padding:20px;margin:22px 0;background:#f6f1e8;border-radius:4px}
.delivery-options-panel h3{font:26px/1.2 var(--serif);margin:0 0 18px}

/* CEP primeiro, sem impedir o preenchimento manual. */
.address-lookup{margin:0 0 26px}
.address-lookup>label{display:block;font:14px var(--sans);margin-bottom:9px}
.address-lookup-row{display:flex;align-items:stretch;gap:12px}
.address-lookup-row input{min-width:0;flex:1}
.address-lookup-row .outlined{flex:none;margin:0;padding:14px 20px;font-size:18px;white-space:nowrap}
.address-lookup .field-note{margin:12px 0 0}
@media(max-width:480px){.address-lookup-row{flex-direction:column}.address-lookup-row .outlined{width:100%;justify-content:center}}

.shipping-option .shipping-price{font-weight:700;color:var(--ink)}
.shipping-option .shipping-time{color:#165da8}

#card-challenge{margin:24px 0;padding:16px;border:1px solid #b8cedc;background:#fffdf9}#card-challenge[hidden]{display:none}#card-challenge-frame{display:block;width:100%;height:600px;max-height:75vh;border:0;background:white}#card-challenge p{font:14px/1.6 Montserrat,Arial,sans-serif}#challenge-check{margin-top:16px}
