/*
  VOICE   quick campus shop: fast to scan, one tap to add
  IDEA    a kedai runcit shelf: categories, cafés, rails of dishes
  PICTURE dish cards drawn as bowls, cups and plates on tinted tiles
  COLOUR  sambal red brand + turmeric delivery pill, white shelves, warm tints per category
  TYPE    Barlow Condensed (signboard) + Figtree (UI)
  LAYOUT  sticky header with mahallah + search + cart; rails on home; sidebar grid on category pages; cart drawer
*/
:root{
  color-scheme:light dark;
  --bg:light-dark(#ffffff,#141110);
  --ink:light-dark(#1d1a17,#f3ece2);
  --muted:light-dark(#6f665d,#b0a597);
  --line:light-dark(#ece6de,#2c2521);
  --soft:light-dark(#f7f4ef,#1d1916);
  --red:light-dark(#c0271d,#e2493d);
  --red-soft:light-dark(#fdecea,#3a1c19);
  --sun:#ffc83d;
  --ok:light-dark(#1d7a45,#4cc27d);
  --head:"Barlow Condensed","Arial Narrow",sans-serif;
  --body:"Figtree",system-ui,sans-serif;
  --t-rice:light-dark(#fdeccd,#3a2f1c);--t-noodles:light-dark(#fde3d4,#3b241b);--t-roti:light-dark(#f6ead0,#352d1f);
  --t-western:light-dark(#e4eedb,#223024);--t-arab:light-dark(#f3e2d3,#36281f);--t-snacks:light-dark(#fbeab8,#3a3119);
  --t-drinks:light-dark(#dcebf7,#1b2b38);--t-desserts:light-dark(#f8dfe8,#3a1f2a);
}
:root[data-theme=light]{color-scheme:light}
:root[data-theme=dark]{color-scheme:dark}
*{box-sizing:border-box;min-width:0}
body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.5 var(--body);overflow-x:clip}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
:focus-visible{outline:3px solid var(--sun);outline-offset:2px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.muted{color:var(--muted)}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

/* ---------- header ---------- */
.hdr{position:sticky;top:0;z-index:40;background:var(--bg);border-bottom:1px solid var(--line)}
.hdr-in{max-width:1280px;margin:0 auto;padding:10px max(3vw,14px);display:grid;grid-template-columns:auto auto minmax(0,1fr) auto;gap:10px 22px;align-items:center}
.logo{display:flex;align-items:center;gap:8px;color:var(--red);text-decoration:none;font:800 30px/1 var(--head);letter-spacing:.3px}
.logo svg{width:34px;height:34px}
.where{display:grid;text-align:left;border:0;background:none;padding:4px 6px;border-radius:10px;line-height:1.25}
.where b{font:800 21px/1.1 var(--head)}
.where>span{display:flex;align-items:center;gap:6px;font-size:14px;color:var(--muted);max-width:240px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.where svg{width:12px;height:8px;flex:none}
.search{display:flex;align-items:center;gap:10px;height:48px;padding:0 14px;border-radius:12px;background:var(--soft);border:1.5px solid var(--line)}
.search:focus-within{border-color:var(--ink)}
.search svg{width:20px;height:20px;color:var(--muted);flex:none}
.search input{flex:1;border:0;background:none;outline:none;font-size:16px;height:100%}
.cartbtn{display:flex;align-items:center;gap:8px;height:48px;padding:0 16px;border:0;border-radius:12px;background:var(--red);color:#fff;font-weight:700;white-space:nowrap}
.cartbtn svg{width:22px;height:22px}
.cartbtn .two{display:grid;line-height:1.1;text-align:left;font-size:13px}
.cartbtn .two b{font-size:14px}
.demo-note{margin:0;text-align:center;font-size:13px;color:var(--muted);background:var(--soft);padding:6px 12px;border-bottom:1px solid var(--line)}

/* ---------- page ---------- */
.view{max-width:1280px;margin:0 auto;padding:18px max(3vw,14px) 48px}
.sec{margin-top:30px}
.sec-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:12px}
.sec-head h2{font:800 28px/1.1 var(--head);margin:0}
.link{border:0;background:none;color:var(--red);font-weight:700;font-size:15px;padding:8px 4px;min-height:44px}
.empty{padding:40px 0;text-align:center;color:var(--muted)}

/* ---------- banners ---------- */
.banners{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:14px}
.banner{position:relative;overflow:hidden;border:0;border-radius:18px;padding:20px 20px 18px;min-height:168px;text-align:left;display:flex;flex-direction:column;justify-content:space-between;color:#fff}
.banner h3{margin:0;font:800 clamp(26px,3vw,36px)/1.02 var(--head);max-width:12ch;text-wrap:balance;position:relative}
.banner p{margin:6px 0 0;font-size:14px;max-width:24ch;position:relative;opacity:.95}
.banner .go{position:relative;align-self:flex-start;margin-top:12px;background:#fff;color:#1d1a17;border-radius:10px;padding:8px 14px;font-weight:700;font-size:14px}
.banner svg.art{position:absolute;right:-14px;bottom:-14px;width:150px;height:150px;opacity:.95}
.b1{background:#b3261e}.b2{background:#1f6a4a}.b3{background:#a8541a}

/* ---------- category tiles ---------- */
.cats{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:12px}
.cat{border:0;background:none;padding:0;text-align:center;font-weight:600;font-size:14px;line-height:1.2}
.cat .tile{display:grid;place-items:center;aspect-ratio:1;border-radius:18px;margin-bottom:8px}
.cat .tile svg{width:62%;height:62%}

/* ---------- outlet rail ---------- */
.rail{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;padding:2px 2px 10px;scrollbar-width:thin}
.rail>*{scroll-snap-align:start;flex:none}
.outlet{width:210px;border:1.5px solid var(--line);border-radius:16px;background:var(--bg);padding:14px;text-align:left;display:grid;gap:6px}
.outlet .who{display:inline-flex;align-self:start;justify-self:start;font-size:12px;font-weight:700;border-radius:6px;padding:2px 8px;background:var(--soft);color:var(--muted)}
.outlet b{font:800 22px/1.05 var(--head)}
.outlet small{font-size:13px;color:var(--muted)}
.outlet.mine{border-color:var(--red);background:var(--red-soft)}
.outlet.mine .who{background:var(--red);color:#fff}

/* ---------- product cards ---------- */
.card{width:180px;border:1.5px solid var(--line);border-radius:14px;padding:10px;display:flex;flex-direction:column;gap:6px;background:var(--bg)}
.grid .card{width:auto}
.pic{display:grid;place-items:center;aspect-ratio:1.15;border-radius:10px}
.pic svg{width:58%;height:58%}
.from{display:inline-block;align-self:flex-start;font-size:11.5px;font-weight:700;background:var(--soft);border-radius:6px;padding:2px 7px;color:var(--muted);max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.card h4{margin:0;font-size:15px;line-height:1.3;font-weight:700;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.6em}
.card .desc{margin:0;font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-height:1.4em}
.card .row{margin-top:auto;display:flex;align-items:center;justify-content:space-between;gap:8px}
.card .price{font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap}
.add{min-width:72px;height:38px;border-radius:9px;border:1.5px solid var(--red);background:var(--red-soft);color:var(--red);font-weight:800;font-size:14px}
.step{display:flex;align-items:center;justify-content:space-between;min-width:72px;height:38px;border-radius:9px;background:var(--red);color:#fff}
.step button{width:28px;height:38px;border:0;background:none;color:#fff;font-size:19px;font-weight:800}
.step span{font-weight:800;font-variant-numeric:tabular-nums;font-size:14px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(168px,1fr));gap:12px}

/* ---------- listing pages ---------- */
.crumb{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:14px;color:var(--muted);margin-bottom:6px}
.crumb button{border:0;background:none;padding:6px 0;color:var(--red);font-weight:600;min-height:36px}
.page-title{font:800 clamp(30px,4vw,44px)/1.05 var(--head);margin:0}
.page-sub{margin:4px 0 0;color:var(--muted)}
.listing{display:grid;grid-template-columns:200px minmax(0,1fr);gap:22px;margin-top:18px;align-items:start}
.side{position:sticky;top:96px;display:grid;gap:4px;border-right:1px solid var(--line);padding-right:12px}
.side button{display:flex;align-items:center;gap:10px;border:0;background:none;padding:8px;border-radius:10px;text-align:left;font-weight:600;font-size:14px;min-height:44px}
.side button .mini{width:34px;height:34px;border-radius:8px;display:grid;place-items:center;flex:none}
.side button .mini svg{width:70%;height:70%}
.side button[aria-current=true]{background:var(--red-soft);color:var(--red)}
.bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;margin-bottom:12px}
.chips{display:flex;flex-wrap:wrap;gap:6px}
.chip{min-height:38px;padding:0 14px;border-radius:999px;border:1.5px solid var(--line);background:var(--bg);font-weight:600;font-size:14px}
.chip[aria-pressed=true]{background:var(--ink);border-color:var(--ink);color:var(--bg)}
.sort{height:40px;border:1.5px solid var(--line);border-radius:10px;background:var(--bg);padding:0 10px;font-size:15px}
.outlet-hero{display:flex;flex-wrap:wrap;gap:14px 24px;align-items:flex-end;justify-content:space-between;background:var(--soft);border-radius:18px;padding:20px}
.facts{display:flex;flex-wrap:wrap;gap:8px}
.fact{background:var(--bg);border:1px solid var(--line);border-radius:10px;padding:6px 12px;font-size:14px}
.fact b{display:block;font-size:12px;color:var(--muted);font-weight:600}

/* ---------- cart drawer ---------- */
.drawer{position:fixed;inset:0;z-index:60;background:rgba(20,12,8,.5);display:flex;justify-content:flex-end}
.drawer[hidden],.modal[hidden]{display:none}
.drawer-panel{width:min(440px,100%);height:100%;background:var(--soft);display:flex;flex-direction:column;animation:slide .22s ease-out}
@keyframes slide{from{transform:translateX(40px);opacity:.4}}
.dr-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;background:var(--bg);border-bottom:1px solid var(--line)}
.dr-head h2{margin:0;font:800 26px/1 var(--head)}
.x{width:44px;height:44px;border:0;border-radius:10px;background:var(--soft);font-size:24px;line-height:1}
.dr-body{flex:1;overflow-y:auto;padding:12px;display:grid;gap:12px;align-content:start}
.box{background:var(--bg);border-radius:14px;padding:14px}
.box h3{margin:0 0 8px;font-size:16px}
.eta-box{display:flex;gap:12px;align-items:center}
.eta-box .clock{width:44px;height:44px;border-radius:12px;background:var(--sun);display:grid;place-items:center;flex:none;color:#1d1a17}
.eta-box b{display:block;font-size:16px}
.eta-box span{font-size:13px;color:var(--muted)}
.cl{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:10px;align-items:center;padding:8px 0;border-top:1px solid var(--line)}
.cl:first-of-type{border-top:0}
.cl .pic{aspect-ratio:1;border-radius:8px}
.cl .nm{font-size:14px;font-weight:600;line-height:1.3}
.cl .nm small{display:block;color:var(--muted);font-weight:500}
.cl .r{display:grid;justify-items:end;gap:4px}
.cl .r b{font-size:14px;font-variant-numeric:tabular-nums;white-space:nowrap}
.group-name{font-size:13px;font-weight:700;color:var(--muted);margin:6px 0 2px}
.bill{display:grid;grid-template-columns:1fr auto;gap:6px 12px;font-size:14px;margin:0}
.bill dt{color:var(--muted)}.bill dd{margin:0;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.bill .tot{font-weight:800;font-size:16px;color:var(--ink);padding-top:8px;border-top:1px dashed var(--line)}
.free{color:var(--ok);font-weight:700}
.nudge{font-size:13px;color:var(--ok);font-weight:600;margin:10px 0 0}
.meter{height:6px;border-radius:6px;background:var(--line);margin-top:6px;overflow:hidden}
.meter i{display:block;height:100%;background:var(--ok);border-radius:6px}
.form{display:grid;gap:10px}
.field label,.field legend{display:block;font-size:13px;font-weight:700;margin-bottom:4px}
.field input,.field select,.field textarea{width:100%;min-height:44px;border:1.5px solid var(--line);border-radius:10px;background:var(--bg);padding:8px 12px;font-size:16px}
.field textarea{min-height:64px;resize:vertical}
fieldset.field{border:0;padding:0;margin:0}
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.toggle{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.toggle label{position:relative;display:flex;align-items:center;justify-content:center;min-height:44px;border:1.5px solid var(--line);border-radius:10px;font-weight:600;font-size:14px;margin:0;cursor:pointer;background:var(--bg)}
.toggle input{position:absolute;inset:0;opacity:0;margin:0;cursor:pointer}
.toggle label:has(input:checked){border-color:var(--red);color:var(--red);background:var(--red-soft)}
.toggle label:has(input:focus-visible){outline:3px solid var(--sun)}
.err{color:var(--red);font-size:14px;font-weight:600;margin:0}
.dr-foot{background:var(--bg);border-top:1px solid var(--line);padding:12px 16px}
.pay{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:54px;border:0;border-radius:12px;background:var(--red);color:#fff;padding:0 18px;font-weight:800;font-size:16px;text-decoration:none}
.pay span{display:grid;text-align:left;line-height:1.15}
.pay small{font-weight:500;font-size:12px;opacity:.9}
.pay.wa{background:#1f8f4e;justify-content:center}
.ghost{width:100%;min-height:46px;border:1.5px solid var(--line);border-radius:12px;background:var(--bg);font-weight:700;margin-top:8px}
.code{font:800 40px/1 var(--head);color:var(--red);margin:6px 0 4px}
.msg{white-space:pre-wrap;font:14px/1.5 var(--body);background:var(--soft);border-radius:10px;padding:12px;max-height:240px;overflow:auto;margin:10px 0 0}
.empty-cart{text-align:center;padding:40px 16px}
.empty-cart svg{width:120px;height:120px;color:var(--red)}

/* ---------- mahallah modal ---------- */
.modal{position:fixed;inset:0;z-index:70;background:rgba(20,12,8,.5);display:grid;place-items:center;padding:16px}
.modal-box{width:min(620px,100%);max-height:90vh;overflow:auto;background:var(--bg);border-radius:18px;padding:20px}
.modal-head{display:flex;justify-content:space-between;align-items:center;gap:10px}
.modal-head h2{margin:0;font:800 30px/1.05 var(--head)}
.mgroups h3{font-size:14px;color:var(--muted);margin:16px 0 8px;font-weight:700}
.mgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:8px}
.mbtn{min-height:48px;border:1.5px solid var(--line);border-radius:12px;background:var(--bg);font-weight:600;text-align:left;padding:8px 12px}
.mbtn[aria-pressed=true]{border-color:var(--red);background:var(--red-soft);color:var(--red)}

/* ---------- mobile cart bar ---------- */
.cartbar{position:fixed;left:12px;right:12px;bottom:12px;z-index:50;display:none;align-items:center;justify-content:space-between;min-height:58px;padding:0 18px;border:0;border-radius:14px;background:var(--red);color:#fff;box-shadow:0 12px 28px -10px rgba(120,20,10,.55)}
.cb-left{display:grid;text-align:left;line-height:1.2;font-size:14px}
.cb-right{font-weight:800}

/* ---------- footer ---------- */
.foot{background:var(--soft);border-top:1px solid var(--line);padding:clamp(28px,4vw,52px) max(3vw,14px) 100px}
.foot-in{max-width:1280px;margin:0 auto;display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:28px}
.foot h2{font:800 26px/1.1 var(--head);margin:0 0 8px}
.foot ol{margin:0;padding-left:20px}
.foot p{margin:0 0 8px}
.small{font-size:13px;color:var(--muted)}

@media (max-width:1000px){
  .cats{grid-template-columns:repeat(4,minmax(0,1fr))}
  .banners{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .banners .banner:first-child{grid-column:1/-1}
}
@media (max-width:760px){
  .hdr-in{grid-template-columns:auto minmax(0,1fr);gap:8px 12px}
  .where{justify-self:end;text-align:right}
  .where>span{justify-content:flex-end}
  .search{grid-column:1/-1;order:3}
  .cartbtn{display:none}
  .cartbar:not([hidden]){display:flex}
  .listing{grid-template-columns:minmax(0,1fr)}
  .side{position:static;display:flex;overflow-x:auto;border-right:0;border-bottom:1px solid var(--line);padding:0 0 8px}
  .side button{flex:none;flex-direction:column;gap:4px;font-size:12.5px;padding:6px;min-width:76px;text-align:center}
  .banners{display:flex;overflow-x:auto;scroll-snap-type:x mandatory}
  .banners .banner{flex:none;width:82%;scroll-snap-align:start}
  .foot-in{grid-template-columns:minmax(0,1fr)}
  .two-col{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:420px){
  .logo span{display:none}
  .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .card{width:150px}
  .grid .card{width:auto}
  .cats{gap:10px}
  .cat{font-size:12.5px}
}
.banners{scrollbar-width:none}.banners::-webkit-scrollbar{display:none}
