:root{
  --accent:#fe2c55;
  --accent-bg:#fff0f3;
  --text:#161823;
  --muted:#8a8b91;
  --border:#f0f0f0;
  --bg:#f5f5f5;
  --green:#00b578;
}
*{box-sizing:border-box}
body{margin:0;font-family:'Inter',system-ui,sans-serif;background:#e5e5e7;color:var(--text)}
.app-shell{max-width:440px;margin:0 auto;min-height:100vh;background:#fff;box-shadow:0 0 40px rgba(0,0,0,.08)}
.page{background:var(--bg);min-height:100vh}

.topbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:12px;height:48px;padding:0 12px;background:#fff;border-bottom:1px solid var(--border)}
.topbar .back{display:flex;align-items:center;justify-content:center;width:32px;height:32px;background:none;border:none;cursor:pointer;color:var(--text)}
.topbar .title{font-size:15px;font-weight:700}

.section{background:#fff;margin-top:8px;padding:12px 16px}
.section-title{font-size:12px;color:var(--muted);padding:10px 16px 4px}

.addr-link{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#fff;padding:14px 16px;text-decoration:none;color:inherit}
.addr-link .icon{color:var(--muted)}
.addr-link .label{flex:1;font-size:14px;color:var(--muted)}
.addr-summary{flex:1}
.addr-summary .name{font-size:14px;font-weight:600;color:var(--text)}
.addr-summary .lines{font-size:13px;color:var(--muted);margin-top:2px;line-height:1.4}
.chev{color:var(--muted);flex-shrink:0}

.store-row{display:flex;align-items:center;gap:10px;padding:12px 16px;background:#fff;margin-top:8px}
.store-badge{display:grid;place-items:center;width:36px;height:36px;border-radius:999px;background:#000;color:#fff;font-size:11px;font-weight:800}
.store-name{font-size:14px;font-weight:600}

.product-card{display:flex;gap:12px;padding:14px 16px;background:#fff;margin-top:8px}
.product-card img{width:72px;height:72px;border-radius:8px;object-fit:cover;flex-shrink:0}
.product-info{flex:1;min-width:0}
.product-title{font-size:13px;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.badges{display:flex;gap:6px;margin:6px 0;flex-wrap:wrap}
.badge{font-size:11px;font-weight:700;padding:2px 8px;border-radius:4px}
.badge-flash{background:var(--accent-bg);color:var(--accent)}
.badge-return{background:#eefcf5;color:var(--green)}
.price-row{display:flex;align-items:baseline;gap:8px;margin-top:6px}
.price-now{font-size:18px;font-weight:800;color:var(--accent)}
.price-was{font-size:12px;color:var(--muted);text-decoration:line-through}
.discount-pct{font-size:11px;font-weight:700;color:#fff;background:var(--accent);padding:1px 5px;border-radius:3px}

.qty-stepper{display:flex;align-items:center;gap:0;border:1px solid var(--border);border-radius:6px;height:28px;width:fit-content;margin-top:8px}
.qty-stepper button{width:28px;height:26px;border:none;background:none;font-size:16px;cursor:pointer;color:var(--text)}
.qty-stepper button:disabled{color:#d0d0d2;cursor:not-allowed}
.qty-stepper span{width:28px;text-align:center;font-size:13px;font-weight:600}

.delivery-row{padding:10px 16px;font-size:13px;color:var(--muted);background:#fff;border-top:1px solid var(--border)}
.delivery-row b{color:var(--text)}

.coupon-banner{display:flex;justify-content:space-between;align-items:center;padding:10px 16px;background:#fff;margin-top:8px;font-size:13px}
.coupon-banner .left{color:var(--text);font-weight:600}
.coupon-banner .right{color:var(--green);font-weight:700}

.summary-row{display:flex;justify-content:space-between;padding:6px 0;font-size:13px}
.summary-row.total{border-top:1px solid var(--border);margin-top:6px;padding-top:10px;font-size:15px;font-weight:700}
.summary-row .muted{color:var(--muted)}
.summary-row .discount{color:var(--green)}

.pay-option{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--border);cursor:pointer}
.pay-option:last-child{border-bottom:none}
.pay-option input{width:18px;height:18px;accent-color:var(--accent)}
.pay-option.disabled{opacity:.45;cursor:not-allowed}
.pay-label{font-size:14px;font-weight:600}
.pay-sub{font-size:12px;color:var(--muted)}

.terms{font-size:11px;color:var(--muted);line-height:1.5;padding:12px 16px}
.terms b{color:var(--text);font-weight:600}
.savings-banner{margin:0 16px 12px;padding:10px 12px;background:var(--accent-bg);color:var(--accent);font-size:12px;font-weight:600;border-radius:8px}

.footer-bar{position:sticky;bottom:0;display:flex;align-items:center;gap:12px;padding:10px 16px;background:#fff;border-top:1px solid var(--border)}
.footer-total{flex:1}
.footer-total .label{font-size:11px;color:var(--muted)}
.footer-total .value{font-size:18px;font-weight:800;color:var(--text)}
.btn-primary{background:var(--accent);color:#fff;border:none;border-radius:999px;padding:13px 28px;font-size:14px;font-weight:700;cursor:pointer}
.btn-primary:disabled{background:#f4a9b8;cursor:not-allowed}

.toast{position:fixed;left:50%;bottom:90px;transform:translateX(-50%);background:#161823;color:#fff;padding:10px 18px;border-radius:999px;font-size:13px;box-shadow:0 6px 20px rgba(0,0,0,.2);opacity:0;pointer-events:none;transition:opacity .2s}
.toast.show{opacity:1}

.pending-banner{margin:12px 16px 0;padding:12px 14px;background:#fff8e6;border:1px solid #ffe4a3;border-radius:8px;font-size:12.5px;color:#7a5b00;line-height:1.5}

/* endereco form */
.field{display:flex;flex-direction:column;padding:12px 16px;background:#fff;border-bottom:1px solid var(--border)}
.field label{font-size:11px;color:var(--muted);margin-bottom:2px}
.field input,.field select{border:none;outline:none;font-size:15px;color:var(--text);font-family:inherit;background:transparent;padding:0}
.field input::placeholder{color:#c7c7cb}
.field-error{font-size:11px;color:var(--accent);margin-top:4px}
.two-col{display:flex}
.two-col .field{flex:1}
.two-col .field:first-child{border-right:1px solid var(--border)}
.phone-row{display:flex;align-items:center;gap:8px}
.phone-prefix{font-size:14px;font-weight:600;flex-shrink:0}
.toggle-row{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;background:#fff}
.toggle{position:relative;width:42px;height:24px;border-radius:999px;background:#e5e5e7;border:none;cursor:pointer}
.toggle.on{background:var(--accent)}
.toggle .knob{position:absolute;top:2px;left:2px;width:20px;height:20px;border-radius:999px;background:#fff;transition:left .15s}
.toggle.on .knob{left:20px}

/* chat */
.chat-shell{display:flex;flex-direction:column;height:100vh}
.chat-header{display:flex;align-items:center;gap:10px;padding:8px 10px;background:#fff;border-bottom:1px solid var(--border)}
.chat-avatar{width:32px;height:32px;border-radius:999px;background:#f1f1f2;display:grid;place-items:center;overflow:hidden;flex-shrink:0}
.chat-avatar img{width:20px;height:20px;object-fit:contain}
.chat-store-name{font-size:15px;font-weight:700}
.chat-log{flex:1;overflow-y:auto;padding:16px 12px;display:flex;flex-direction:column;gap:10px}
.chat-hint{margin:0 auto 4px;background:#e9e9ec;color:#5a5b60;font-size:11px;padding:4px 12px;border-radius:999px}
.chat-bubble{max-width:78%;padding:9px 13px;border-radius:16px;font-size:14px;line-height:1.45}
.chat-bubble.mine{align-self:flex-end;background:var(--accent);color:#fff;border-bottom-right-radius:4px}
.chat-bubble.theirs{align-self:flex-start;background:#f1f1f2;color:var(--text);border-bottom-left-radius:4px}
.chat-typing{align-self:flex-start;display:flex;gap:4px;background:#f1f1f2;padding:11px 14px;border-radius:16px;border-bottom-left-radius:4px}
.chat-typing span{width:6px;height:6px;border-radius:999px;background:#aeb0b6;animation:chatDot 1s infinite ease-in-out}
.chat-typing span:nth-child(2){animation-delay:.15s}
.chat-typing span:nth-child(3){animation-delay:.3s}
@keyframes chatDot{0%,60%,100%{transform:translateY(0);opacity:.5}30%{transform:translateY(-3px);opacity:1}}
.chat-quick{display:flex;gap:8px;overflow-x:auto;padding:8px 12px 4px;flex-shrink:0}
.chat-quick button{flex-shrink:0;border:1px solid var(--border);background:#fff;border-radius:999px;padding:7px 13px;font-size:12.5px;color:var(--text);cursor:pointer;white-space:nowrap}
.chat-quick button:hover{border-color:var(--accent);color:var(--accent)}
.chat-inputbar{display:flex;align-items:center;gap:8px;padding:8px 12px;background:#fff;border-top:1px solid var(--border);flex-shrink:0}
.chat-inputbar input{flex:1;background:#f1f1f2;border:none;border-radius:999px;padding:11px 16px;font-size:14px;outline:none;font-family:inherit}
.chat-send{width:40px;height:40px;border-radius:999px;background:var(--accent);color:#fff;border:none;display:grid;place-items:center;cursor:pointer;flex-shrink:0}
.chat-send:disabled{background:#f4a9b8;cursor:not-allowed}

/* pedido / order status */
.status-header{background:#fff;padding:14px 16px 10px}
.status-title{font-size:19px;font-weight:800}
.status-sub{font-size:12.5px;color:var(--muted);margin-top:2px}
.status-badge{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:700;padding:4px 10px;border-radius:999px;margin-top:8px}
.status-badge.pending{background:#fff8e6;color:#8a5a00}
.status-badge.paid{background:#eefcf5;color:#00b578}
.link-row{display:flex;align-items:center;gap:8px;background:#fff;margin-top:8px;padding:12px 16px}
.link-row input{flex:1;border:1px solid var(--border);border-radius:8px;padding:9px 12px;font-size:12.5px;color:var(--muted);background:#f9f9fa}
.copy-btn{border:1px solid var(--border);background:#fff;border-radius:8px;padding:9px 12px;font-size:12.5px;font-weight:700;color:var(--text);cursor:pointer;white-space:nowrap}
.copy-btn.copied{border-color:var(--green);color:var(--green)}
.order-product-row{display:flex;gap:12px;padding:14px 16px;background:#fff}
.order-product-row img{width:64px;height:64px;border-radius:8px;object-fit:cover;flex-shrink:0}
.not-found{padding:60px 24px;text-align:center;color:var(--muted);font-size:14px}
