*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  --bg:#f3f4f6;--card:#fff;--fg:#1a1a2e;--fg80:rgba(26,26,46,.8);
  --muted:#6b7280;--muted-bg:#f9fafb;--border:#e5e7eb;
  --brand:#10b981;--brand-light:rgba(16,185,129,.08);--brand-fg:#fff;
  --brand10:rgba(16,185,129,.1);--brand20:rgba(16,185,129,.2);
  --danger:#ef4444;
}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;background:var(--bg);color:var(--fg);line-height:1.5}
a{color:var(--brand);text-decoration:none}
button{cursor:pointer;font-family:inherit}
input{font-family:inherit}

.header{background:var(--card);border-bottom:1px solid var(--border);padding:.75rem 1rem;position:sticky;top:0;z-index:50}
.header-inner{max-width:72rem;margin:0 auto;display:flex;align-items:center;justify-content:space-between}
.header-logo{display:flex;align-items:center;gap:.5rem}
.header-logo img{height:1.75rem}
.header-logo span{font-size:.875rem;font-weight:700;color:var(--fg)}
.header-secure{display:flex;align-items:center;gap:.375rem;color:var(--muted);font-size:.75rem;font-weight:500}
.header-secure svg{width:1rem;height:1rem;color:var(--brand)}

.steps{background:var(--card);border-bottom:1px solid rgba(229,231,235,.5);padding:.75rem 1rem}
.steps-inner{max-width:72rem;margin:0 auto;display:flex;align-items:center;justify-content:center;gap:.75rem;font-size:.75rem}
.step{display:flex;align-items:center;gap:.375rem}
.step-circle{width:1.5rem;height:1.5rem;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:.75rem;font-weight:700}
.step-circle.active{background:var(--brand);color:#fff}
.step-circle.inactive{background:var(--muted-bg);color:var(--muted)}
.step-label{font-weight:500;color:var(--muted)}
.step-label.active{font-weight:600;color:var(--fg)}
.step-line{width:2rem;height:1px}
.step-line.active{background:var(--brand)}
.step-line.inactive{background:var(--border)}

.main{max-width:72rem;margin:0 auto;padding:1.5rem 1rem}
@media(min-width:1024px){.main{display:grid;grid-template-columns:2fr 1fr;gap:1.5rem}}
.left{display:flex;flex-direction:column;gap:1rem}
.right{margin-top:1rem}
@media(min-width:1024px){.right{margin-top:0;position:sticky;top:5rem;align-self:start}}

.card{background:var(--card);border-radius:.75rem;border:1px solid var(--border);padding:1.25rem}
.card-title{font-size:1rem;font-weight:700;color:var(--fg);margin-bottom:1rem;display:flex;align-items:center;gap:.5rem}
.card-title svg{width:1.25rem;height:1.25rem;color:var(--brand)}

.form-group{margin-bottom:.75rem}
.form-label{font-size:.875rem;font-weight:500;color:var(--fg80);margin-bottom:.25rem;display:block}
.form-input{width:100%;border:1px solid var(--border);border-radius:.5rem;padding:.625rem .75rem;font-size:.875rem;background:var(--card);color:var(--fg);outline:none;transition:border .2s,box-shadow .2s}
.form-input:focus{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand20)}
.form-input.uppercase{text-transform:uppercase}
.form-row{display:grid;gap:.75rem}
.form-row-2{grid-template-columns:1fr 1fr}
.form-row-3{grid-template-columns:1fr 1fr 1fr}
.form-row-3-2{grid-template-columns:2fr 1fr}

.cep-row{display:flex;gap:.75rem;align-items:flex-end}
.cep-row .form-group{flex:1}
.cep-row img{height:2rem;opacity:.6}

.frete-box{background:var(--brand-light);border:1px solid var(--brand20);border-radius:.5rem;padding:.75rem;margin-top:.75rem}
.frete-box .frete-inner{display:flex;align-items:center;gap:.5rem;font-size:.875rem}
.frete-box svg{width:1rem;height:1rem;color:var(--brand)}
.frete-box .frete-label{color:var(--brand);font-weight:600}
.frete-box .frete-time{color:var(--muted)}

.pix-box{border:2px solid var(--brand);background:var(--brand-light);border-radius:.5rem;padding:1rem;margin-bottom:.75rem}
.pix-header{display:flex;align-items:center;gap:.75rem}
.pix-radio{width:1.25rem;height:1.25rem;border-radius:50%;border:2px solid var(--brand);display:flex;align-items:center;justify-content:center}
.pix-radio-inner{width:.625rem;height:.625rem;border-radius:50%;background:var(--brand)}
.pix-label{font-weight:700;color:var(--fg)}
.pix-badge{font-size:.75rem;background:var(--brand10);color:var(--brand);font-weight:600;padding:.125rem .5rem;border-radius:9999px}
.pix-desc{margin-top:.5rem;margin-left:2rem;font-size:.875rem;color:var(--muted)}
.pix-desc .highlight{color:var(--brand);font-weight:600}

.product-row{display:flex;gap:.75rem;margin-bottom:1rem;padding-bottom:1rem;border-bottom:1px solid var(--border)}
.product-img{width:4rem;height:4rem;border-radius:.5rem;object-fit:cover;border:1px solid var(--border)}
.product-info{flex:1}
.product-name{font-size:.875rem;font-weight:600;color:var(--fg)}
.product-price{font-size:.75rem;color:var(--muted);margin-top:.125rem}

.qty-section{margin-bottom:1rem}
.qty-label{font-size:.875rem;font-weight:700;color:var(--fg);margin-bottom:.75rem}
.qty-controls{display:flex;align-items:center;gap:.75rem}
.qty-btn{width:2.25rem;height:2.25rem;border-radius:.5rem;border:1px solid var(--border);display:flex;align-items:center;justify-content:center;font-size:1.125rem;color:var(--fg);background:transparent;transition:background .2s}
.qty-btn:hover:not(:disabled){background:var(--muted-bg)}
.qty-btn:disabled{opacity:.4;cursor:not-allowed}
.qty-value{font-size:1.125rem;font-weight:700;color:var(--fg);width:2rem;text-align:center}
.qty-promo{font-size:.75rem;color:var(--brand);font-weight:600;margin-top:.5rem}

.price-lines{margin-bottom:1rem;padding-bottom:1rem;border-bottom:1px solid var(--border)}
.price-line{display:flex;justify-content:space-between;font-size:.875rem;margin-bottom:.5rem}
.price-line.green{color:var(--brand)}
.price-line .label{color:var(--muted)}
.price-line .value{color:var(--fg)}
.price-line.green .label,.price-line.green .value{color:var(--brand)}
.frete-gratis{color:var(--brand);font-weight:600}

.total-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}
.total-label{font-size:1rem;font-weight:700;color:var(--fg)}
.total-values{text-align:right}
.total-pix{font-size:1.125rem;font-weight:700;color:var(--brand)}
.total-old{font-size:.75rem;color:var(--muted);text-decoration:line-through}

.btn-pix{width:100%;padding:.875rem;border-radius:.75rem;border:none;font-weight:700;font-size:.875rem;color:#fff;background:var(--brand);transition:background .2s}
.btn-pix:hover:not(:disabled){background:#059669}
.btn-pix:disabled{opacity:.5}

.secure-text{display:flex;align-items:center;justify-content:center;gap:.5rem;margin-top:.75rem;font-size:.75rem;color:var(--muted)}
.secure-text svg{width:.875rem;height:.875rem}

.modal-overlay{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.5);padding:1rem}
.modal{background:var(--card);border-radius:.75rem;border:1px solid var(--border);padding:1.5rem;max-width:28rem;width:100%;max-height:90vh;overflow-y:auto}
.modal-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}
.modal-header h3{font-size:1.125rem;font-weight:700;color:var(--fg)}
.modal-close{background:none;border:none;color:var(--muted);padding:.25rem}
.modal-close:hover{color:var(--fg)}
.modal-close svg{width:1.25rem;height:1.25rem}
.qr-container{display:flex;justify-content:center;margin-bottom:1rem}
.qr-container img{width:12rem;height:12rem}
.pix-code-box{background:var(--muted-bg);border-radius:.5rem;padding:.75rem;font-size:.75rem;color:var(--fg);word-break:break-all;font-family:monospace;margin-bottom:1rem}
.btn-copy{width:100%;padding:.75rem;border-radius:.5rem;border:none;font-weight:700;font-size:.875rem;color:#fff;background:var(--brand);transition:background .2s}
.btn-copy:hover{background:#059669}
.modal-note{font-size:.75rem;color:var(--muted);text-align:center;margin-top:.75rem}
.hidden{display:none}

/* Toast */
.toast-notif{position:fixed;top:1rem;left:50%;transform:translateX(-50%) translateY(-120%);z-index:9999;min-width:300px;max-width:90vw;padding:.875rem 1rem;border-radius:.75rem;display:flex;align-items:flex-start;gap:.75rem;box-shadow:0 10px 40px rgba(0,0,0,.15);transition:transform .3s ease,opacity .3s ease;opacity:0}
.toast-notif.toast-show{transform:translateX(-50%) translateY(0);opacity:1}
.toast-error{background:#fef2f2;border:1px solid #fca5a5;color:#991b1b}
.toast-success{background:#f0fdf4;border:1px solid #86efac;color:#166534}
.toast-content{flex:1}
.toast-content strong{display:block;font-size:.875rem;font-weight:700;margin-bottom:.125rem}
.toast-content p{font-size:.8125rem;opacity:.85;margin:0}
.toast-close{background:none;border:none;font-size:1rem;cursor:pointer;color:inherit;opacity:.5;padding:0;line-height:1}
.toast-close:hover{opacity:1}

/* Promo box */
.qty-promo-box{margin-top:.75rem;background:rgba(16,185,129,.08);border:1px solid rgba(16,185,129,.2);border-radius:.5rem;padding:.75rem}
.qty-promo-hint{font-size:.75rem;color:var(--brand);opacity:.8;margin-top:.25rem}
