/* Vitrine UV Têxtil, layout C (lista de compras). Arquivo nosso: o sincronizador não mexe. */
:root { --uv:#1246C8; --uv-deep:#0F3AA6; --ember:#F07828; --ember-deep:#D9621A; --ink:#0F1629; --wash:#EAF0FF; --paper:#F4F6FC; --rule:#D8DEF0; --slate:#4B5675; --mute:#6B7796; --ok:#1B8A5A; --bad:#C0392B; }
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: 'DM Sans', system-ui, sans-serif; background: var(--paper); color: var(--ink); min-height: 100vh; padding-bottom: 110px; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--ember); outline-offset: 2px; }
.exo { font-family: 'Exo 2', 'DM Sans', sans-serif; }
[hidden] { display: none !important; }

/* Cabeçalho */
.hdr { background: var(--uv); color: #fff; border-radius: 0 0 28px 28px; padding: 14px 16px 18px; position: sticky; top: 0; z-index: 40; box-shadow: 0 10px 28px rgba(15,22,41,.18); }
.hdr-in { max-width: 640px; margin: 0 auto; }
.row1 { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row1 img { height: 34px; width: auto; display: block; }
.who { font-size: 12px; color: #CFDBFF; text-align: right; line-height: 1.25; }
.who b { display: block; color: #fff; font: 800 13px 'Exo 2', sans-serif; }
.search { margin-top: 12px; height: 46px; border-radius: 16px; background: #fff; color: var(--mute); display: flex; align-items: center; gap: 10px; padding: 0 12px 0 14px; box-shadow: 0 10px 24px rgba(15,22,41,.22); }
.search input { flex: 1; min-width: 0; border: 0; background: none; font: 500 15px 'DM Sans', sans-serif; color: var(--ink); outline: none; }
.search input::placeholder { color: var(--mute); }
.search .clear { width: 26px; height: 26px; border-radius: 50%; background: var(--wash); color: var(--uv); font-weight: 800; line-height: 1; }

main { max-width: 640px; margin: 0 auto; padding: 0 14px; }
.tabs { display: flex; gap: 22px; padding: 4px 4px 0; margin-top: 14px; border-bottom: 1px solid var(--rule); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 8px 0 11px; font: 700 14px 'Exo 2', sans-serif; color: var(--mute); white-space: nowrap; position: relative; }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 2px; background: var(--ember); }
.chips.arrastando, .tabs.arrastando { cursor: grabbing; user-select: none; }
.chips, .tabs { cursor: grab; }
.chips { position: relative; display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 32px; padding: 0 13px; border-radius: 16px; border: 1.5px solid var(--rule); background: #fff; font: 700 12.5px 'Exo 2', sans-serif; color: var(--slate); white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.sub { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 14px 4px 10px; }
.sub h2 { font: 900 17px 'Exo 2', sans-serif; text-transform: uppercase; letter-spacing: .02em; min-width: 0; overflow-wrap: anywhere; }
.sub small { color: var(--mute); font-size: 12px; flex: none; }

/* Linhas */
.list { display: flex; flex-direction: column; gap: 10px; }
.item { background: #fff; border-radius: 18px; border: 1px solid var(--rule); padding: 10px; display: flex; gap: 12px; }
.item.in { border: 2px solid var(--uv); background: #FAFCFF; padding: 9px; }
.item .th { width: 84px; height: 92px; flex: none; border-radius: 12px; border: 1px solid var(--rule); background: #fff; padding: 0; overflow: hidden; }
.item .th img { width: 100%; height: 100%; object-fit: contain; display: block; }
.info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.info .t { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.info .ref { font: 900 15px 'Exo 2', sans-serif; overflow-wrap: anywhere; }
.info .cat { font-size: 11px; color: var(--mute); text-align: right; }
.tg { display: flex; gap: 6px; flex-wrap: wrap; }
.opt { font: 700 11.5px 'Exo 2', sans-serif; padding: 5px 10px; border-radius: 9px; border: 1.5px solid var(--rule); color: var(--slate); background: #fff; }
.opt[aria-pressed="true"] { background: var(--uv); border-color: var(--uv); color: #fff; }
.opt.med[aria-pressed="true"] { background: var(--wash); border-color: var(--uv); color: var(--uv); }
.opt.fixo { background: var(--wash); border-color: var(--wash); color: var(--uv); cursor: default; }
.hint { font-size: 11.5px; color: var(--mute); }
.bot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pk { font-size: 11.5px; color: var(--slate); }
.pk b { color: var(--ink); font-family: 'Exo 2', sans-serif; }
.stp { display: inline-flex; align-items: center; border-radius: 12px; background: var(--paper); height: 34px; }
.stp button { width: 34px; height: 34px; font: 800 18px 'Exo 2', sans-serif; color: var(--uv); }
.stp button:disabled { color: var(--rule); cursor: default; }
.stp b { min-width: 26px; text-align: center; font: 800 14px 'Exo 2', sans-serif; }
.add { background: var(--ember); color: #fff; font: 800 12.5px 'Exo 2', sans-serif; letter-spacing: .03em; height: 34px; padding: 0 14px; border-radius: 12px; }
.add:hover { background: var(--ember-deep); }
.lines { display: flex; flex-direction: column; gap: 6px; padding-top: 6px; border-top: 1px dashed var(--rule); }
.ln { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ln .d { font-size: 12px; color: var(--slate); min-width: 0; }
.ln .d b { color: var(--ink); font-family: 'Exo 2', sans-serif; }
.ln .rm { color: var(--mute); font-size: 15px; padding: 4px 6px; }
.more { text-align: center; padding: 14px; color: var(--mute); font-size: 13px; }
.empty { text-align: center; color: var(--mute); padding: 40px 10px; line-height: 1.6; }

/* Barra do pedido */
.bar { position: fixed; left: 12px; right: 12px; bottom: 14px; max-width: 616px; margin: 0 auto; height: 66px; border-radius: 22px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 18px; box-shadow: 0 16px 36px rgba(15,22,41,.4); z-index: 45; transition: transform .25s; }
.bar.off { transform: translateY(140%); }
.bar .l small { display: block; font-size: 11px; color: #A9B6D6; }
.bar .l b { font: 900 16px 'Exo 2', sans-serif; }
.go { height: 44px; border-radius: 15px; background: var(--ember); color: #fff; padding: 0 18px; font: 900 14px 'Exo 2', sans-serif; display: flex; align-items: center; gap: 8px; }
.go:hover { background: var(--ember-deep); }
.go:disabled { opacity: .55; cursor: default; }

/* Folhas e janelas */
.ov { position: fixed; inset: 0; background: rgba(15,22,41,.58); z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: #fff; width: 100%; max-width: 640px; max-height: 92vh; overflow-y: auto; border-radius: 26px 26px 0 0; padding: 12px 18px 26px; }
.grab { width: 40px; height: 4px; border-radius: 2px; background: var(--rule); margin: 0 auto 12px; }
.sheet h3 { font: 900 20px 'Exo 2', sans-serif; margin-bottom: 4px; }
.sheet .sm { color: var(--mute); font-size: 13px; margin-bottom: 12px; }
.cl { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.cl img { width: 52px; height: 56px; object-fit: contain; border: 1px solid var(--rule); border-radius: 10px; flex: none; }
.cl .m { flex: 1; min-width: 0; }
.cl .m b { font: 800 14px 'Exo 2', sans-serif; display: block; overflow-wrap: anywhere; }
.cl .m span { font-size: 12px; color: var(--mute); }
.tot { display: flex; justify-content: space-between; padding: 14px 2px 4px; font: 800 15px 'Exo 2', sans-serif; }
.btn { width: 100%; height: 50px; border-radius: 14px; background: var(--ember); color: #fff; font: 900 15px 'Exo 2', sans-serif; margin-top: 12px; }
.btn:hover { background: var(--ember-deep); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.sec { background: none; color: var(--slate); font-weight: 700; height: 40px; margin-top: 4px; }
.fld { display: block; margin-top: 12px; }
.fld span { display: block; font: 700 10.5px 'Exo 2', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin-bottom: 6px; }
.fld input { width: 100%; height: 48px; border-radius: 12px; border: 1.5px solid var(--rule); padding: 0 14px; font: 500 16px 'DM Sans', sans-serif; color: var(--ink); background: #fff; }
.fld input:focus { border-color: var(--uv); outline: none; }
.lnk { color: var(--uv); font: 700 13px 'DM Sans', sans-serif; margin-top: 12px; text-decoration: underline; }
.erro { color: var(--bad); font-size: 13px; min-height: 18px; margin-top: 8px; }
.cnpjok { margin-top: 8px; background: #EAF7F0; border: 1px solid #BFE3D0; border-radius: 10px; padding: 8px 10px; font-size: 12.5px; color: #17573D; }
.lb { background: rgba(15,22,41,.86); align-items: center; padding: 20px; }
.lb .box { position: relative; background: #fff; border-radius: 20px; max-width: 520px; width: 100%; padding: 14px; text-align: center; }
.lb img { display: block; max-width: 100%; max-height: 68vh; margin: 0 auto; object-fit: contain; }
.lb .r { font: 900 16px 'Exo 2', sans-serif; margin-top: 8px; }
.lb .x { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; }
.proc { align-items: center; }
.proc .box { background: #fff; border-radius: 22px; padding: 28px 26px; text-align: center; width: min(320px, 88vw); }
.spin { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--wash); border-top-color: var(--uv); margin: 0 auto 14px; animation: gira .9s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font: 700 13px 'Exo 2', sans-serif; z-index: 90; box-shadow: 0 10px 24px rgba(15,22,41,.3); }
.ok-card { background: #fff; border: 1px solid var(--rule); border-radius: 22px; padding: 30px 20px; text-align: center; margin-top: 22px; }
.ok-ic { width: 70px; height: 70px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 34px; display: grid; place-items: center; margin: 0 auto 14px; }
.ok-card h2 { font: 900 24px 'Exo 2', sans-serif; margin-bottom: 8px; }
.ok-card p { color: var(--slate); line-height: 1.6; }
a.btn { display: flex; align-items: center; justify-content: center; text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .bar { transition: none; } .spin { animation-duration: 2s; } }

/* Assistente UV: mesmo desenho do chat da loja (botão, janela, balões, resposta rápida) */
.fab { position: fixed; right: 16px; bottom: 24px; z-index: 46; display: flex; align-items: center; gap: 11px; padding: 7px 20px 7px 7px; border-radius: 40px; background: #fff; color: var(--ink); box-shadow: 0 10px 32px rgba(0,0,0,.28), 0 0 0 1px rgba(0,0,0,.05); transition: transform .2s, box-shadow .2s, bottom .25s; text-align: left; }
.fab.alto { bottom: 96px; }
.fab:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(0,0,0,.34); }
.fab-av { position: relative; width: 50px; height: 50px; border-radius: 50%; flex: none; }
.fab-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; background: var(--ink); }
.fab-av::after { content: ""; position: absolute; right: 0; bottom: 1px; width: 13px; height: 13px; border-radius: 50%; background: #25D366; border: 2.5px solid #fff; animation: pulsa 2s infinite; }
@keyframes pulsa { 0% { box-shadow: 0 0 0 0 rgba(37,211,102,.6); } 70% { box-shadow: 0 0 0 9px rgba(37,211,102,0); } 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); } }
.fab-aviso { position: absolute; top: -3px; left: -3px; min-width: 19px; height: 19px; border-radius: 10px; background: #ef3b3b; color: #fff; font: 700 11px/15px 'DM Sans', sans-serif; text-align: center; border: 2px solid #fff; padding: 0 3px; z-index: 1; }
.fab-t { line-height: 1.25; }
.fab-t b { display: block; font: 700 14.5px 'Exo 2', sans-serif; }
.fab-t span { font-size: 12.5px; color: #0a8f4e; font-weight: 500; }
@keyframes anel { 0% { box-shadow: 0 10px 32px rgba(0,0,0,.28), 0 0 0 0 rgba(37,211,102,.6); } 70% { box-shadow: 0 10px 32px rgba(0,0,0,.28), 0 0 0 20px rgba(37,211,102,0); } 100% { box-shadow: 0 10px 32px rgba(0,0,0,.28), 0 0 0 0 rgba(37,211,102,0); } }
.fab.pulsa { animation: anel 1.5s ease-out infinite; }

#as-win { position: fixed; right: 16px; bottom: 16px; z-index: 99999; width: 380px; max-width: calc(100vw - 24px); height: 600px; max-height: calc(100vh - 32px); background: #fff; border-radius: 20px; box-shadow: 0 18px 60px rgba(0,0,0,.35); display: none; flex-direction: column; overflow: hidden; animation: asin .25s; }
#as-win.open { display: flex; }
@keyframes asin { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.as-h { background: linear-gradient(135deg, #0a0a0a, #2a2a2a); color: #fff; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.as-av { position: relative; width: 40px; height: 40px; border-radius: 50%; background: #fff; flex: none; }
.as-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.as-av::after { content: ""; position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; border-radius: 50%; background: #25D366; border: 2px solid #0F1629; }
.as-ht { flex: 1; line-height: 1.2; min-width: 0; }
.as-ht b { display: block; font: 700 15px 'Exo 2', sans-serif; }
.as-ht span { font-size: 12px; opacity: .75; }
.as-h button { background: rgba(255,255,255,.12); border: 0; color: #fff; width: 34px; height: 34px; border-radius: 50%; font-size: 16px; }
.as-h button:hover { background: rgba(255,255,255,.25); }
.as-m { flex: 1; overflow-y: auto; padding: 16px 14px; background: #f4f4f6; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; scrollbar-width: none; }
.as-m::-webkit-scrollbar { display: none; }
.as-m > * { flex-shrink: 0; }
.as-b { max-width: 84%; padding: 10px 14px; border-radius: 18px; font-size: 14.5px; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-wrap; animation: asin .2s; }
.as-b.bot { background: #fff; color: var(--ink); border-bottom-left-radius: 5px; align-self: flex-start; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.as-b.me { background: var(--ink); color: #fff; border-bottom-right-radius: 5px; align-self: flex-end; }
.as-b.err { background: #FDECEA; color: #8A2B20; }
.as-typing { display: flex; gap: 4px; padding: 13px 16px; }
.as-typing i { width: 7px; height: 7px; border-radius: 50%; background: #999; animation: asb 1.2s infinite; }
.as-typing i:nth-child(2) { animation-delay: .15s; }
.as-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes asb { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-5px); opacity: 1; } }
.as-q { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-start; }
.as-q button { background: #fff; border: 1.5px solid var(--ink); color: var(--ink); border-radius: 20px; padding: 8px 14px; font: 500 13px 'DM Sans', sans-serif; transition: .15s; }
.as-q button:hover { background: var(--ink); color: #fff; }
.as-card { align-self: stretch; background: #fff; border-radius: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.1); padding: 12px; }
.as-card-t b { display: block; font: 800 16px 'Exo 2', sans-serif; color: var(--ink); }
.as-card-t span { font-size: 12px; color: #6b7280; }
.as-rows { max-height: 210px; overflow-y: auto; margin: 8px 0; scrollbar-width: none; }
.as-rows::-webkit-scrollbar { display: none; }
.as-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid #eee; }
.as-row:last-child { border-bottom: 0; }
.as-row img { width: 42px; height: 46px; object-fit: contain; border-radius: 8px; background: #f4f4f6; flex: none; }
.as-rm { flex: 1; min-width: 0; }
.as-rm b { display: block; font: 700 13px 'Exo 2', sans-serif; overflow-wrap: anywhere; }
.as-rm span { font-size: 11.5px; color: #6b7280; }
.as-pr { font: 800 13px 'Exo 2', sans-serif; white-space: nowrap; }
.as-aviso { font-size: 11.5px; color: var(--ember-deep); margin: 2px 0 8px; }
.as-v { display: block; width: 100%; text-align: center; background: var(--ink); color: #fff; border-radius: 10px; padding: 10px 4px; font: 700 13px 'Exo 2', sans-serif; margin-top: 6px; }
.as-v.alt { background: #fff; color: var(--ink); border: 1.5px solid var(--ink); }
.as-v:hover { opacity: .9; }
.as-f { display: flex; gap: 8px; padding: 12px; background: #fff; border-top: 1px solid #eee; }
.as-f input { flex: 1; min-width: 0; border: 1.5px solid #e0e0e3; border-radius: 22px; padding: 11px 16px; font: 400 15px 'DM Sans', sans-serif; outline: 0; }
.as-f input:focus { border-color: var(--ink); }
.as-f button { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.as-f button:disabled { opacity: .35; }
.as-f svg { width: 20px; height: 20px; }
.as-pw { text-align: center; font-size: 10.5px; color: #999; padding: 0 0 8px; background: #fff; }
@media (max-width: 520px) {
  .fab { right: 10px; bottom: 12px; gap: 0; padding: 5px; }
  .fab.alto { bottom: 88px; }
  .fab-t { display: none; }
  .fab-av { width: 46px; height: 46px; }
  .fab-av::after { width: 12px; height: 12px; border-width: 2.5px; }
  .fab-aviso { min-width: 18px; height: 18px; font-size: 10.5px; line-height: 14px; }
  #as-win { right: 10px; left: 10px; bottom: 10px; width: auto; max-width: none; height: min(560px, 76dvh); max-height: calc(100dvh - 20px); }
  .as-f input { font-size: 16px; }
  .as-h { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) { .fab, #as-win, .as-b { transition: none; animation: none; } .fab-av::after, .fab.pulsa { animation: none; } }
