/* Catálogo 3D · loja: carrinho, conta, checkout e pedidos (complementa app.css) */
:root {
  --ok: #11813F; --ok-bg: #E4F4EA; --bad: #B42F2F; --bad-bg: #FCEAEA; --info-bg: #E8EFFE; --warn-bg: #FFF3D6; --warn: #7A5200;
}

/* Cabeçalho: conta e carrinho */
.top-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.tn { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 10px; border-radius: 12px; text-decoration: none; font-weight: 600; font-size: 15px; justify-content: center; }
.tn:hover { background: var(--layer); }
.tn span { max-width: 9ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tn-badge { position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font: 700 12px/20px var(--f-body); text-align: center; }
@media (max-width: 560px) { .tn span { display: none; } .top .btn-wa span { display: none; } .top .btn-wa { padding: 0 12px; } }
.top-in { gap: 6px; }
.top-nav + .btn-wa { margin-left: 0; }

/* Mensagens */
.sh-flash { padding-top: 14px; }
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 14px; font-weight: 500; }
.alert-success { background: var(--ok-bg); color: #0C5A2B; }
.alert-error { background: var(--bad-bg); color: #7A1F1F; }
.alert-info { background: var(--info-bg); color: #1B3A8A; }
.error { color: var(--bad); font-size: 14px; margin-top: 4px; font-weight: 500; }

/* Estrutura */
.sh { padding-top: 22px; padding-bottom: 56px; }
.sh-title { font: 700 clamp(26px, 5vw, 34px)/1.1 var(--f-display); letter-spacing: -.01em; margin-bottom: 4px; }
.sh-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.sh-head-actions { display: flex; gap: 8px; }
.sh-back { margin-bottom: 10px; font-size: 14px; }
.sh-back a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.sh-cols { display: grid; gap: 18px; margin-top: 16px; align-items: start; }
@media (min-width: 900px) { .sh-cols { grid-template-columns: minmax(0, 1fr) 360px; } .sh-cols-even { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sh-steps { display: grid; gap: 14px; min-width: 0; }
.sh-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; min-width: 0; }
.sh-panel h2 { font: 600 19px var(--f-display); margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.sh-panel h2 small { font: 400 14px var(--f-body); color: var(--ink-2); }
.sh-panel h3 { font: 600 16px var(--f-display); margin: 16px 0 10px; }
.sh-panel .n { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 700 14px/26px var(--f-body); text-align: center; flex: none; }
.sh-who { line-height: 1.6; }
.sh-who a { margin-left: 8px; font-weight: 600; color: var(--accent); }
.muted { color: var(--ink-2); }

/* Campos */
.field { margin-bottom: 14px; min-width: 0; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.input { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid #C3CBD2; border-radius: 12px; background: #fff; font: inherit; color: var(--ink); }
textarea.input { min-height: 0; resize: vertical; }
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.input:disabled { background: var(--surface-2); color: var(--ink-2); }
.has-error .input { border-color: var(--bad); }
.hint { display: block; color: var(--ink-2); font-size: 13px; margin-top: 4px; }
.grid2 { display: grid; gap: 0 12px; grid-template-columns: 1fr; }
@media (min-width: 520px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid2-city { grid-template-columns: 1fr 90px; } }
.link-btn { background: none; border: 0; padding: 6px 0; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn.danger { color: var(--bad); }
.qty { width: 76px; min-height: 44px; padding: 6px 10px; border: 1px solid #C3CBD2; border-radius: 10px; font: inherit; text-align: center; background: #fff; }

/* Entrar / cadastrar */
.sh-auth { max-width: 440px; margin: 12px auto 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: var(--shadow-sm); }
.sh-auth h1 { font: 700 28px var(--f-display); margin-bottom: 4px; }
.sh-auth .muted { margin-bottom: 18px; }
.sh-auth .btn-lg { width: 100%; }
.sh-alt { margin-top: 16px; text-align: center; font-size: 15px; }
.sh-alt a { color: var(--accent); font-weight: 600; }

/* Carrinho */
.sh-list { display: grid; gap: 12px; min-width: 0; }
.sh-line { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; align-items: start; }
.sh-thumb { width: 84px; height: 84px; border-radius: 12px; overflow: hidden; background: var(--surface-2); display: block; }
.sh-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sh-line-name { font-weight: 700; text-decoration: none; display: block; overflow-wrap: anywhere; }
.sh-line-opt { font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.sh-line-unit { font-size: 13px; color: var(--ink-2); }
.sh-line-ctl { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.sh-line-total { font: 700 17px var(--f-display); white-space: nowrap; }
.sh-sum { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 12px; position: sticky; top: 76px; }
.sh-sum h2 { font: 600 19px var(--f-display); }
.sh-sum dl, .sh-totals { display: grid; gap: 8px; margin: 0; }
.sh-sum dl div, .sh-totals div { display: flex; justify-content: space-between; gap: 12px; }
.sh-sum dt, .sh-totals dt { color: var(--ink-2); }
.sh-sum dd, .sh-totals dd { margin: 0; font-weight: 600; text-align: right; }
.sh-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; border-top: 1px solid var(--line); }
.sh-total strong { font: 700 26px var(--f-display); }
.sh-more { text-align: center; font-weight: 600; color: var(--ink-2); font-size: 15px; }
.sh-note { font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.sh-totals .t { padding-top: 10px; border-top: 1px solid var(--line); }
.sh-totals .t dt, .sh-totals .t dd { color: var(--ink); font: 700 18px var(--f-display); }
.sh-empty { text-align: center; background: var(--surface); border: 1px dashed #C3CBD2; border-radius: 20px; padding: 44px 20px; display: grid; justify-items: center; gap: 10px; }
.sh-empty svg { width: 44px; height: 44px; fill: none; stroke: var(--ink-2); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sh-empty h2 { font: 600 20px var(--f-display); }
.sh-empty p { color: var(--ink-2); max-width: 38ch; }

/* Formas de entrega */
.opts { display: grid; gap: 10px; }
.opt { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; cursor: pointer; }
.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.opt input { margin-top: 4px; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.opt-body { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; flex: 1; min-width: 0; }
.opt-cost { font-weight: 700; }
.opt-body small { grid-column: 1 / -1; color: var(--ink-2); }
.sh-mini { display: grid; gap: 10px; }
.sh-mini li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; font-size: 15px; }
.sh-mini li span { min-width: 0; overflow-wrap: anywhere; }
.sh-mini small { display: block; color: var(--ink-2); font-size: 13px; }
.sh-mini-lg li { align-items: center; }
.sh-mini-lg img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; }
.sh-mini-lg li span { flex: 1; }
.sh-addr { margin-top: 14px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.sh-addr strong { color: var(--ink); }

/* Pedidos */
.sh-orders { display: grid; gap: 10px; }
.sh-order { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; text-decoration: none; flex-wrap: wrap; }
.sh-order:hover { border-color: var(--accent); }
.sh-order small { display: block; color: var(--ink-2); }
.sh-order-r { display: flex; align-items: center; gap: 12px; }
.st { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.st-awaiting_payment { background: var(--warn-bg); color: var(--warn); }
.st-confirmed { background: var(--info-bg); color: #1B3A8A; }
.st-production { background: #EFE7FB; color: #4B2A93; }
.st-ready, .st-shipped { background: #DDF3F3; color: #0B5A5A; }
.st-delivered { background: var(--ok-bg); color: #0C5A2B; }
.st-cancelled { background: var(--bad-bg); color: #7A1F1F; }
.sh-pay { display: grid; gap: 16px; margin-bottom: 4px; border-color: var(--accent); }
.sh-pay h2 { margin-bottom: 4px; }
.sh-pay-actions { display: grid; gap: 10px; justify-items: start; }
.sh-pay-actions form { display: contents; }
.sh-pay-actions .btn-lg { width: 100%; }
@media (min-width: 720px) { .sh-pay { grid-template-columns: 1fr 320px; align-items: center; } }

/* Barra de andamento */
.prog { display: flex; gap: 0; margin: 4px 0 18px; padding: 0; counter-reset: s; overflow-x: auto; }
.prog li { flex: 1 0 74px; display: grid; justify-items: center; gap: 6px; text-align: center; font-size: 12.5px; color: var(--ink-2); position: relative; }
.prog li::before { content: ""; position: absolute; top: 14px; left: -50%; width: 100%; height: 3px; background: var(--line); }
.prog li:first-child::before { display: none; }
.prog .dotp { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); display: grid; place-items: center; font: 700 13px var(--f-body); }
.prog li.done::before, .prog li.now::before { background: var(--accent); }
.prog li.done .dotp { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.prog li.now .dotp { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.prog li.now, .prog li.done { color: var(--ink); font-weight: 600; }
.tl, .prog { list-style: none; margin: 0; padding: 0; }
.tl { display: grid; gap: 0; margin-bottom: 14px; }
.tl li { position: relative; padding: 0 0 16px 20px; border-left: 2px solid var(--line); margin-left: 6px; }
.tl li::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.tl li:last-child { border-left-color: transparent; padding-bottom: 0; }
.tl time { font-size: 12.5px; color: var(--ink-2); display: block; }

/* Página do produto: comprar */
.buy { display: grid; grid-template-columns: 84px 1fr; gap: 10px; align-items: end; }
.buy-qty { display: grid; gap: 4px; }
.buy-qty .qty { width: 100%; min-height: 54px; }
.buy .btn-lg { width: 100%; }
@media (max-width: 400px) { .buy { grid-template-columns: 70px 1fr; } .buy .btn-lg { font-size: 15px; padding: 0 12px; } }
.buybar .btn-primary { flex: 1; }

.sh-mini-lg { margin-bottom: 14px; }
.prog { margin: 4px 0 18px; }

/* Avaliação do pedido (discreta: um painel na página do pedido) */
.rate { margin-top: 16px; }
.rate h2 small { font-weight: 400; }
.rate-row { border: 0; padding: 0; margin: 0 0 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rate-row legend { float: left; padding: 0; font-weight: 600; width: 100px; }
.rate-stars { display: inline-flex; flex-direction: row-reverse; margin-left: auto; }
.rate-stars input { position: absolute; opacity: 0; pointer-events: none; }
.rate-stars label { font-size: 34px; line-height: 1; padding: 4px 3px; cursor: pointer; color: #C3CBD2; min-width: 40px; text-align: center; }
.rate-stars label:hover, .rate-stars label:hover ~ label, .rate-stars input:checked ~ label { color: #F2A900; }
.rate-stars input:focus-visible + label { outline: 2px solid var(--accent); border-radius: 8px; }
.rate-done { display: grid; gap: 6px; margin-bottom: 8px; }
.rate-done li { display: flex; justify-content: space-between; }
.stars { color: #F2A900; letter-spacing: 2px; }
.rate-chip { font-size: 12.5px; font-weight: 700; color: var(--accent); border: 1px solid var(--accent); padding: 3px 10px; border-radius: 999px; }

/* Login com Google */
.btn-google { background: #fff; color: #1F1F1F; border: 1px solid #C3CBD2; width: 100%; }
.btn-google:hover { background: #F8F9FA; }
.sh-or { display: flex; align-items: center; gap: 12px; color: var(--ink-2); font-size: 13px; margin: 14px 0; }
.sh-or::before, .sh-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* Cupom */
.sh-disc dt, .sh-disc dd { color: var(--ok); font-weight: 700; }
.sh-coupon-form { display: flex; gap: 8px; }
.sh-coupon-form .input { min-width: 0; text-transform: uppercase; }
.sh-coupon-on { background: var(--ok-bg); color: #0C5A2B; border-radius: 12px; padding: 10px 14px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.sh-coupon-on .link-btn { color: #0C5A2B; padding: 0; }
#coupon-off { display: none; }
.cp-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1.5px dashed var(--accent); background: var(--accent-soft); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; flex-wrap: wrap; }
.cp-card strong { font: 700 17px var(--f-display); letter-spacing: .04em; }
.cp-card small { display: block; color: var(--ink-2); }
