:root{
  --ink:#17120F; --paper:#FBF8F3; --card:#FFFFFF; --line:#E8E1D6; --mut:#6F665C; --soft:#F1EBE1;
  --red:#D8341C; --red-d:#B52812; --wa:#128C4A; --wa-d:#0E7039;
  --amber:#9A5200; --amber-bg:#FFF1DC; --ok:#0E7039;
  --display:'Bricolage Grotesque','Segoe UI',system-ui,sans-serif; --sans:'DM Sans','Segoe UI',system-ui,sans-serif;
  --r:14px; --pad:16px;
}
*{box-sizing:border-box; -webkit-tap-highlight-color:transparent}
html{scroll-behavior:smooth}
body{margin:0; background:var(--paper); color:var(--ink); font-family:var(--sans); font-size:15px; line-height:1.45; -webkit-font-smoothing:antialiased; padding-bottom:env(safe-area-inset-bottom)}
button,input,select{font:inherit; color:inherit}
button{cursor:pointer}
a{color:inherit; text-decoration:none}
img{display:block; max-width:100%}
:focus-visible{outline:3px solid var(--red); outline-offset:2px}
.hide,[hidden]{display:none !important}

/* topo */
.top{position:sticky; top:0; z-index:30; display:flex; align-items:center; justify-content:space-between; padding:11px var(--pad); background:var(--ink); color:#fff}
.brand{font-family:var(--display); font-weight:800; font-size:19px; letter-spacing:.04em}
.brand b{color:#FF6A4D; font-weight:800}
.bag{display:flex; align-items:center; gap:7px; background:#fff; color:var(--ink); border:0; border-radius:22px; padding:8px 13px; font-weight:700; font-size:13.5px}
.bag__n{background:var(--red); color:#fff; border-radius:10px; min-width:20px; height:20px; display:inline-flex; align-items:center; justify-content:center; font-size:12px; padding:0 5px}

/* ferramentas */
.tools{background:var(--paper); padding:10px var(--pad) 8px; border-bottom:1px solid var(--line)}
.busca{display:flex; align-items:center; gap:9px; background:#fff; border:1.5px solid var(--line); border-radius:24px; padding:0 14px; height:44px}
.busca:focus-within{border-color:var(--ink)}
.busca input{flex:1; border:0; outline:0; background:none; height:100%; font-size:16px; min-width:0}
.busca svg{flex:none; color:var(--mut)}
.chips{display:flex; gap:7px; overflow-x:auto; scrollbar-width:none; padding:9px 0 1px; margin:0 calc(-1 * var(--pad)); padding-left:var(--pad); padding-right:var(--pad)}
.chips::-webkit-scrollbar{display:none}
.chip{flex:none; white-space:nowrap; border:1.5px solid var(--line); background:#fff; border-radius:20px; padding:7px 14px; font-weight:500; font-size:14px; min-height:36px}
.chip[aria-pressed="true"],.chip.on{background:var(--ink); border-color:var(--ink); color:#fff}
.chip--f{display:flex; align-items:center; gap:6px; font-weight:700}
.chip--x{background:var(--soft); border-color:var(--soft)}
.chip--x::after{content:" ×"; font-weight:700}

/* grade */
.res{display:flex; justify-content:space-between; align-items:center; padding:12px var(--pad) 4px; font-size:13.5px; color:var(--mut)}
.res b{color:var(--ink)}
.res select{border:0; background:none; font-weight:700; color:var(--ink); padding:4px; font-size:13.5px}
.grade{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 10px; padding:8px var(--pad) 28px}
.card{display:block; background:var(--card); border:1px solid var(--line); border-radius:var(--r); overflow:hidden; position:relative}
.ph{position:relative; aspect-ratio:4/5; background:var(--soft); overflow:hidden}
.ph img,.ph svg.sv{position:absolute; inset:0; width:100%; height:100%; object-fit:cover}
.ph svg.sv{object-fit:contain}
.selos{position:absolute; top:8px; left:8px; display:flex; flex-direction:column; gap:4px; align-items:flex-start}
.selo{font-family:var(--display); font-weight:800; font-size:10.5px; letter-spacing:.06em; text-transform:uppercase; background:var(--ink); color:#fff; padding:4px 8px; border-radius:6px}
.selo--p{background:var(--red)} .selo--u{background:var(--amber)} .selo--e{background:#5A5249} .selo--n{background:#0E7039}
.ph.esg img,.ph.esg svg.sv{opacity:.45}
.info{padding:10px 11px 12px}
.marca{font-size:11.5px; color:var(--mut); text-transform:uppercase; letter-spacing:.08em; font-weight:700}
.card h3{margin:2px 0 6px; font-family:var(--display); font-weight:600; font-size:15.5px; line-height:1.2; letter-spacing:-.01em}
.pr{display:flex; align-items:baseline; gap:7px; flex-wrap:wrap}
.pr b{font-family:var(--display); font-size:17px; font-weight:800}
.pr s{font-size:12.5px; color:var(--mut)}
.pr em{font-style:normal; font-size:11.5px; font-weight:800; color:var(--red)}
.dots{display:flex; gap:5px; margin-top:8px}
.dots i{width:13px; height:13px; border-radius:50%; border:1.5px solid rgba(0,0,0,.18); display:block}
.vazio{padding:56px var(--pad); text-align:center; color:var(--mut)}
.vazio b{display:block; font-family:var(--display); font-size:19px; color:var(--ink); margin-bottom:6px}
.vazio button{margin-top:14px}
.load{padding:60px var(--pad); text-align:center; color:var(--mut)}
.foot{padding:20px var(--pad) 90px; font-size:12.5px; color:var(--mut); text-align:center; max-width:560px; margin:0 auto}

/* botoes */
.btn{display:inline-flex; align-items:center; justify-content:center; gap:8px; border:0; border-radius:12px; padding:14px 18px; font-weight:700; font-size:16px; min-height:50px; width:100%}
.btn--ink{background:var(--ink); color:#fff}
.btn--red{background:var(--red); color:#fff}
.btn--wa{background:var(--wa); color:#fff}
.btn--amber{background:var(--amber-bg); color:var(--amber); border:2px solid var(--amber)}
.btn--line{background:#fff; border:1.5px solid var(--line)}
.btn[disabled]{opacity:.45; cursor:not-allowed}
.btn--sm{width:auto; min-height:40px; padding:9px 16px; font-size:14px}

/* overlays */
.ov{position:fixed; inset:0; z-index:50; background:rgba(23,18,15,.55); display:flex; align-items:flex-end; justify-content:center}
.sheet{background:var(--paper); width:100%; max-height:92dvh; border-radius:20px 20px 0 0; display:flex; flex-direction:column; overflow:hidden; animation:sobe .22s ease-out}
@keyframes sobe{from{transform:translateY(40px); opacity:.6}to{transform:none; opacity:1}}
@media (prefers-reduced-motion:reduce){.sheet{animation:none} html{scroll-behavior:auto}}
.sheet__h{display:flex; justify-content:space-between; align-items:center; padding:16px var(--pad) 10px}
.sheet__h h2{margin:0; font-family:var(--display); font-size:20px; letter-spacing:-.01em}
.x{border:0; background:var(--soft); width:38px; height:38px; border-radius:50%; font-size:20px; line-height:1}
.sheet__b{overflow:auto; padding:0 var(--pad) 12px; flex:1}
.sheet__f{padding:12px var(--pad) calc(14px + env(safe-area-inset-bottom)); border-top:1px solid var(--line); background:var(--paper); display:flex; gap:10px}
.sec{margin:6px 0 18px}
.sec h4{margin:0 0 9px; font-family:var(--display); font-size:13px; letter-spacing:.1em; text-transform:uppercase; color:var(--mut)}
.wrapchips{display:flex; flex-wrap:wrap; gap:8px}
.faixa{display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:10px}
.faixa label{display:flex; align-items:center; gap:8px; background:#fff; border:1.5px solid var(--line); border-radius:12px; padding:0 12px; height:46px; color:var(--mut); font-size:14px}
.faixa input{border:0; outline:0; width:100%; min-width:0; font-size:16px; background:none; color:var(--ink)}

/* produto */
.pv{background:var(--paper); width:100%; height:100dvh; overflow:auto; position:relative; animation:sobe .22s ease-out}
.pv__bar{position:sticky; top:0; z-index:5; display:flex; justify-content:space-between; align-items:center; padding:10px var(--pad); background:rgba(251,248,243,.94); backdrop-filter:blur(8px)}
.pv__bar button{border:0; background:#fff; border:1px solid var(--line); border-radius:22px; padding:8px 14px; font-weight:700; font-size:14px; min-height:40px}
.gal{display:flex; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:none; background:var(--soft)}
.gal::-webkit-scrollbar{display:none}
.gal>*{flex:none; width:100%; aspect-ratio:1/1; scroll-snap-align:center; position:relative; overflow:hidden}
.gal img{width:100%; height:100%; object-fit:cover}
.gal svg.sv{width:100%; height:100%}
.gdots{display:flex; justify-content:center; gap:6px; padding:9px 0 0}
.gdots i{width:7px; height:7px; border-radius:50%; background:var(--line)} .gdots i.on{background:var(--ink)}
.pv__c{padding:14px var(--pad) 30px; max-width:640px; margin:0 auto}
.pv__c h1{margin:2px 0 6px; font-family:var(--display); font-weight:800; font-size:25px; line-height:1.12; letter-spacing:-.02em}
.pv .pr b{font-size:26px}
.pv .pr s{font-size:15px}
.cores{display:flex; flex-wrap:wrap; gap:8px}
.cor{display:flex; align-items:center; gap:8px; background:#fff; border:2px solid var(--line); border-radius:24px; padding:5px 14px 5px 5px; font-weight:500; min-height:42px}
.cor i{width:30px; height:30px; border-radius:50%; border:1.5px solid rgba(0,0,0,.18); background-size:cover; background-position:center}
.cor[aria-pressed="true"]{border-color:var(--ink); font-weight:700}
.tams{display:grid; grid-template-columns:repeat(5,1fr); gap:8px}
.tam{border:2px solid var(--line); background:#fff; border-radius:11px; min-height:48px; font-weight:700; font-size:16px; font-variant-numeric:tabular-nums}
.tam.x{border-style:dashed; color:#9A9086; text-decoration:line-through; background:var(--soft)}
.tam[aria-pressed="true"]{background:var(--ink); border-color:var(--ink); color:#fff; text-decoration:none}
.tam.x[aria-pressed="true"]{background:var(--amber-bg); border-color:var(--amber); color:var(--amber); text-decoration:line-through}
.aviso{font-size:13.5px; color:var(--amber); background:var(--amber-bg); border-radius:10px; padding:9px 12px; margin-top:10px}
.desc{color:var(--mut); font-size:14.5px; margin-top:6px}
.sep{height:1px; background:var(--line); margin:16px 0}
.pv__acao{position:sticky; bottom:0; padding:12px var(--pad) calc(12px + env(safe-area-inset-bottom)); background:linear-gradient(to top, var(--paper) 78%, transparent); display:flex; flex-direction:column; gap:8px}
.link{background:none; border:0; text-decoration:underline; font-weight:700; padding:8px; color:var(--ink); font-size:14.5px}

/* lista */
.li{display:grid; grid-template-columns:64px 1fr auto; gap:12px; padding:12px 0; border-bottom:1px solid var(--line); align-items:center}
.li .ph{aspect-ratio:1/1; border-radius:10px; width:64px}
.li b{display:block; font-family:var(--display); font-weight:600; line-height:1.2}
.li small{color:var(--mut); font-size:13px}
.li__p{font-family:var(--display); font-weight:800; text-align:right; white-space:nowrap}
.step{display:inline-flex; align-items:center; gap:2px; margin-top:6px; background:#fff; border:1.5px solid var(--line); border-radius:20px}
.step button{border:0; background:none; width:34px; height:34px; font-size:18px; font-weight:700}
.step span{min-width:20px; text-align:center; font-weight:700}
.rm{border:0; background:none; color:var(--mut); font-size:13px; text-decoration:underline; padding:6px 0 0; display:block; margin-left:auto}
.tit{font-family:var(--display); font-size:13px; letter-spacing:.08em; text-transform:uppercase; color:var(--amber); margin:16px 0 0; font-weight:800}
.tot{display:flex; justify-content:space-between; align-items:baseline; padding:14px 0 4px; font-weight:700}
.tot b{font-family:var(--display); font-size:24px; font-weight:800}
.nota{font-size:13px; color:var(--mut); margin:4px 0 0}
.ok{text-align:center; padding:14px 0 6px}
.ok .n{font-family:var(--display); font-weight:800; font-size:40px; color:var(--wa); line-height:1}
.ok p{color:var(--mut); margin:8px 0 0}

.toast{position:fixed; left:50%; bottom:calc(20px + env(safe-area-inset-bottom)); transform:translateX(-50%); z-index:80; background:var(--ink); color:#fff; padding:12px 18px; border-radius:12px; font-weight:500; font-size:14.5px; display:flex; gap:14px; align-items:center; max-width:calc(100% - 32px); box-shadow:0 8px 24px rgba(0,0,0,.3)}
.toast button{background:none; border:0; color:#FF9C88; font-weight:700; padding:0; text-decoration:underline}

@media (min-width:700px){
  .grade{grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px 14px; max-width:1080px; margin:0 auto}
  .tools,.res{max-width:1080px; margin:0 auto}
  .tools{padding-left:var(--pad); padding-right:var(--pad)}
  .ov{align-items:center}
  .sheet{max-width:520px; max-height:88dvh; border-radius:20px}
  .pv{max-width:900px; height:min(92dvh,860px); border-radius:20px; display:block}
}
@media (min-width:1000px){ .grade{grid-template-columns:repeat(4,minmax(0,1fr))} }
