
*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;background:var(--bg);color:var(--text);overflow-x:hidden;min-height:100vh}
img{max-width:100%}
:root{--hdr-h:64px;--sbar-h:58px;--green:#4CAF50;--green-dark:#388E3C;--bg:#f2f2f7;--card:#fff;--surface:#f5f5f5;--text:#1a1a1a;--text2:#666;--text3:#757575;--border:#e8e8e8}
html[data-theme="dark"]{--bg:#121212;--card:#1e1e1e;--surface:#2a2a2a;--text:#ececec;--text2:#b8b8b8;--text3:#8e8e8e;--border:#333;color-scheme:dark}

/* Header */
.hdr{background:#2E7D32;box-sizing:border-box;height:var(--hdr-h);padding:10px 16px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:100;box-shadow:0 2px 8px rgba(0,0,0,.15)}
.hdr .logo{display:flex;align-items:center;gap:8px}
.hdr .logo img{width:32px;height:32px;border-radius:50%;background:#fff}
.hdr .logo span{color:#fff;font-size:18px;font-weight:700}
.hdr .cbtn{background:rgba(255,255,255,.2);border:none;color:#fff;padding:5px 12px;border-radius:20px;font-size:12px;display:flex;align-items:center;gap:4px;cursor:pointer}
.hdr .cbtn img{width:20px;height:14px;border-radius:2px}

/* Search */
.sbar{overflow:hidden;box-sizing:border-box;padding:10px 16px;background:var(--card);position:sticky;top:var(--hdr-h);height:var(--sbar-h);z-index:99}
.sbar input{width:100%;padding:10px 14px 10px 36px;border:1px solid var(--border);border-radius:25px;font-size:14px;outline:none;color:var(--text);background:var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23999'%3E%3Cpath d='M11.7 10.3a6 6 0 10-1.4 1.4l4 4a1 1 0 001.4-1.4l-4-4zM2 7a5 5 0 1110 0A5 5 0 012 7z'/%3E%3C/svg%3E") 12px center no-repeat}
.sbar input:focus{border-color:var(--green);background-color:var(--card)}

/* Tabs */
.tabs{display:flex;background:var(--card);border-bottom:1px solid var(--border);overflow-x:auto;-webkit-overflow-scrolling:touch;position:sticky;top:calc(var(--hdr-h) + var(--sbar-h));z-index:99}
.tabs .t{flex:1;min-height:44px;box-sizing:border-box;padding:12px 8px;font-size:13px;color:var(--text2);text-align:center;border-bottom:3px solid transparent;white-space:nowrap;cursor:pointer;font-weight:500;transition:all .2s}
.tabs .t.on{color:var(--green);border-bottom-color:var(--green);font-weight:700}

/* Category chips */
.cats{display:flex;gap:8px;padding:10px 16px;overflow-x:auto;-webkit-overflow-scrolling:touch;background:var(--card);margin-bottom:6px}
.cats::-webkit-scrollbar{display:none}
.chip{display:inline-flex;align-items:center;min-height:36px;padding:6px 14px;background:var(--surface);border-radius:20px;font-size:12px;white-space:nowrap;cursor:pointer;transition:all .2s;border:1px solid transparent}
.chip.on{background:var(--green);color:#fff;border-color:var(--green-dark)}

/* Section */
.sec{padding:10px 16px 4px;font-size:15px;font-weight:700;display:flex;justify-content:space-between;align-items:center}
.sec .sectitle{min-width:0;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sec small{flex:0 0 auto;margin-inline-start:8px;white-space:nowrap;color:var(--green);font-size:12px;font-weight:500;cursor:pointer}

/* Offers Grid */
.ogrid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;padding:8px 16px 16px}

/* Retailer Grid */
.rgrid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px;padding:8px 16px 16px}
.cgrid{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:8px 16px 90px}
.rcard{background:var(--card);border-radius:14px;overflow:hidden;box-shadow:0 1px 5px rgba(0,0,0,.10);cursor:pointer;transition:transform .15s;position:relative}
.rcard:active{transform:scale(.97)}
/* Store card: a big white logo area on top, a grey strip with the name and the flyer count below */
.rcard .rlogo{position:relative;height:104px;background:#fff;display:flex;align-items:center;justify-content:center}
.rcard .rlogo img{width:100%;height:100%;object-fit:contain;padding:2px 4px;box-sizing:border-box;border-radius:0}
.rcard .rinfo{background:rgba(128,128,128,.13);padding:10px 12px 12px;text-align:start}
.rcard .nm{font-size:15px;font-weight:700;color:var(--green-dark,#2e7d32);line-height:1.3;height:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;display:block}
.rcard .rfc{font-size:13px;color:var(--text2,#777);margin-top:3px}
.rcard .rfc.none{opacity:.7}
.rcard .rnew{position:absolute;top:0;left:0;background:#e53935;color:#fff;font-size:12px;font-weight:600;padding:5px 10px;border-radius:0 0 10px 0}
html[dir="rtl"] .rcard .rnew{left:auto;right:0;border-radius:0 0 0 10px}
.rcard .rcnt{position:absolute;bottom:6px;inset-inline-end:6px;min-width:26px;height:26px;padding:0 8px;box-sizing:border-box;border-radius:13px;background:var(--green);color:#fff;font-size:13px;font-weight:700;line-height:26px;text-align:center;pointer-events:none}
.rcard .fav{position:absolute;top:6px;right:6px;font-size:22px;cursor:pointer;opacity:.35;color:#555}
.rcard .fav.liked{opacity:1;color:#e53e3e}

/* Flyer Cards */
.flist{padding:0 16px 90px}
.fcard{background:var(--card);border-radius:14px;margin-bottom:12px;overflow:hidden;box-shadow:0 1px 5px rgba(0,0,0,.07);cursor:pointer;transition:transform .15s}
.fcard:active{transform:scale(.98)}
.fcard .cover{width:100%;height:160px;object-fit:cover;background:var(--surface);display:block}
.fcard .info{padding:10px 14px;display:flex;align-items:center;gap:10px}
.fcard .info img{width:40px;height:40px;border-radius:10px;object-fit:contain;border:1px solid var(--border);background:#fff}
.fcard .info .det{flex:1}
.fcard .info .det .nm{font-size:14px;font-weight:600}
.fcard .info .det .sub{font-size:11px;color:var(--text3);margin-top:2px}
.fcard .info .fav{font-size:20px;cursor:pointer;opacity:.3}
.fcard .info .fav.liked{opacity:1;color:#e53e3e}
.fcard .fover{position:absolute;left:0;right:0;bottom:0;padding:26px 12px 8px;background:linear-gradient(rgba(0,0,0,0),rgba(0,0,0,.74));color:#fff;pointer-events:none}
.fcard .fover .ft{font-size:14px;font-weight:700;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.fcard .fover .fd{display:flex;justify-content:space-between;gap:8px;font-size:11px;margin-top:2px}
.fcard .fstores{display:block;width:calc(100% - 20px);margin:8px 10px 10px;background:var(--green);color:#fff;border:none;padding:9px;border-radius:8px;font-size:13px;font-weight:700;cursor:pointer}

/* Flyer Viewer (fullscreen): swipe pager, tappable products, page grid, more menu */
.viewer{position:fixed;top:0;left:0;right:0;bottom:0;background:#111;z-index:500;display:none;flex-direction:column}
.viewer.show{display:flex}
.viewer .vhdr{background:linear-gradient(90deg,#0b6a8a,#1f9a7a);padding:calc(8px + env(safe-area-inset-top,0px)) 8px 8px;display:flex;align-items:center;gap:6px;position:absolute;top:0;left:0;right:0;z-index:10;color:#fff}
.viewer .vbtn{background:transparent;border:none;color:#fff;font-size:21px;line-height:1;width:38px;height:40px;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;flex:none}
.viewer .vlogo{height:32px;max-width:48px;object-fit:contain;background:#fff;border-radius:4px;flex:none}
.viewer .vtitle{flex:1;font-size:15px;font-weight:700;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.vpager{position:absolute;top:0;bottom:48px;left:0;right:0;display:flex;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;direction:ltr;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;scrollbar-width:none}
.vpager::-webkit-scrollbar{display:none}
.vpager.vlocked{overflow-x:hidden;scroll-snap-type:none}
.vslide{flex:0 0 100%;width:100%;scroll-snap-align:start;scroll-snap-stop:always;overflow-y:auto;overflow-x:hidden;padding-top:calc(56px + env(safe-area-inset-top,0px));box-sizing:border-box;touch-action:pan-x pan-y;background:#f3f3f3}
.vslide.zoomed{overflow:auto}
.vwrap{position:relative;width:100%;min-height:50vh}
.vimg{display:block;width:100%;height:auto;user-select:none;-webkit-user-select:none}
.vwrap.vloading::after{content:"";position:absolute;left:50%;top:25vh;width:34px;height:34px;margin:-17px 0 0 -17px;border:3px solid rgba(11,106,138,.25);border-top-color:#0b6a8a;border-radius:50%;animation:spin .8s linear infinite;pointer-events:none}
.vspots{position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none}
.vhs{position:absolute;background:transparent;border:0;padding:0;margin:0;cursor:pointer;pointer-events:auto;border-radius:6px}
.vhs:active{background:rgba(255,235,59,.35)}
.vfoot{position:absolute;bottom:0;left:0;right:0;height:48px;background:#fff;display:flex;align-items:center;gap:12px;padding:0 16px calc(0px + env(safe-area-inset-bottom,0px));box-shadow:0 -2px 8px rgba(0,0,0,.2);z-index:10;direction:ltr}
.vfoot input[type=range]{flex:1;accent-color:#0b6a8a;min-width:0}
.vfoot #vPageLbl{font-size:15px;font-weight:700;color:#0b4a63;white-space:nowrap}
.vgrid{display:none;position:absolute;top:0;bottom:0;left:0;right:0;z-index:20;background:linear-gradient(#cfe6ec,#e8f1f3);overflow-y:auto;padding:calc(64px + env(safe-area-inset-top,0px)) 12px 16px;grid-template-columns:1fr 1fr;grid-auto-rows:max-content;gap:12px;align-content:start}
.vgrid.show{display:grid}
.vgcell{position:relative;background:#fff;border-radius:10px;overflow:hidden;box-shadow:0 1px 4px rgba(0,0,0,.18);cursor:pointer;border:3px solid transparent}
.vgcell.on{border-color:#0b6a8a}
.vgcell img{display:block;width:100%;height:auto;min-height:120px;background:#eee}
.vgnum{position:absolute;right:8px;bottom:8px;background:rgba(40,40,40,.75);color:#fff;font-weight:800;border-radius:50%;width:34px;height:34px;display:flex;align-items:center;justify-content:center;font-size:16px}
.vgcnt{position:absolute;left:8px;bottom:8px;background:#e53935;color:#fff;font-weight:700;border-radius:10px;padding:2px 8px;font-size:11px}
.viewer .vhdr{z-index:30}
.vmenu{display:none;position:absolute;top:0;bottom:0;left:0;right:0;z-index:40;background:rgba(0,0,0,.5);align-items:flex-end}
.vmenu.show{display:flex}
.vmsheet{width:100%;background:#fff;border-radius:16px 16px 0 0;padding:8px 0 calc(12px + env(safe-area-inset-bottom,0px));color:#222}
.vmitem{display:flex;align-items:center;gap:18px;padding:18px 22px;font-size:17px;cursor:pointer}
.vmitem span:first-child{width:26px;text-align:center;font-size:20px;color:#555}
.vmitem .tsw{margin-inline-start:auto}
@media (prefers-color-scheme:dark){.vmsheet{background:#1e1e1e;color:#eee}.vmitem span:first-child{color:#bbb}}
:root[data-theme="dark"] .vmsheet{background:#1e1e1e;color:#eee}

/* Retailer Detail Page */
.rdetail{display:none}
.rdetail.show{display:block}
.rdetail .rhdr{background:var(--green);padding:16px;display:flex;align-items:center;gap:12px}
.rdetail .rhdr .back{color:#fff;font-size:22px;cursor:pointer}
.rdetail .rhdr img{width:50px;height:50px;border-radius:12px;background:#fff;object-fit:contain}
.rdetail .rhdr .rname{color:#fff;font-size:18px;font-weight:700}

/* Bottom Nav */
.bnav{position:fixed;bottom:0;left:0;right:0;background:var(--card);display:flex;justify-content:space-around;padding:6px 0 env(safe-area-inset-bottom,8px);border-top:1px solid var(--border);z-index:100}
.bnav .ni{flex:1;min-height:46px;text-align:center;font-size:10px;color:var(--text3);cursor:pointer;padding:2px 0}
.bnav .ni.on{color:var(--green)}
.bnav .ni .ic{font-size:20px;margin-bottom:1px}

/* Modal */
.modal{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5);z-index:300;display:none;align-items:flex-end;justify-content:center}
.modal.show{display:flex}
.modal .sheet{background:var(--card);color:var(--text);border-radius:20px 20px 0 0;width:100%;max-height:70vh;overflow-y:auto;animation:slideUp .3s}
@keyframes slideUp{from{transform:translateY(100%)}to{transform:translateY(0)}}
.modal .sheet .mhdr{padding:16px;border-bottom:1px solid var(--border);font-size:17px;font-weight:700;display:flex;justify-content:space-between;align-items:center}
.modal .sheet .mhdr .cls{font-size:20px;color:#666;cursor:pointer}
.clist{padding:4px 0}
.citem{display:flex;align-items:center;gap:12px;padding:12px 16px;cursor:pointer;transition:background .15s}
.citem:active{background:var(--surface)}
.citem img{width:30px;height:20px;border-radius:3px}
.citem .cn{font-size:15px}
.citem .ca{font-size:12px;color:var(--text3)}

/* Loading & Empty */
.loading{text-align:center;padding:60px 20px;color:var(--text3)}
.loading .sp{width:28px;height:28px;border:3px solid var(--border);border-top-color:var(--green);border-radius:50%;animation:spin .7s linear infinite;margin:0 auto 12px}
@keyframes spin{to{transform:rotate(360deg)}}
.empty{text-align:center;padding:60px 20px;color:var(--text3)}
.empty .eicon{font-size:48px;margin-bottom:12px}

/* Search results */
.sresults{padding:0 16px 90px}
.sresult{background:var(--card);border-radius:12px;padding:12px;margin-bottom:8px;display:flex;align-items:center;gap:12px;cursor:pointer}
.sresult img{width:44px;height:44px;border-radius:10px;object-fit:contain;border:1px solid var(--border);background:#fff}
.sresult .sinfo .sn{font-size:14px;font-weight:600}
.sresult .sinfo .st{font-size:11px;color:var(--text3)}


.dritem{display:flex;align-items:center;gap:14px;padding:11px 16px;font-size:14.5px;font-weight:500;color:var(--text);cursor:pointer;border-bottom:1px solid var(--border);margin:0 8px 0 8px}
.dritem .dri{flex:none;color:var(--text)}
.dritem .dri-w{display:flex;flex:none}
.dritem:not(:has(.tsw))::after{content:"›";margin-inline-start:auto;color:var(--text3);font-size:22px;line-height:1;font-weight:400}
.dritem .dval{margin-inline-start:auto;font-size:13.5px}
.dritem:has(.dval)::after{margin-inline-start:8px}
html[dir="rtl"] .dritem::after{transform:scaleX(-1)}
/* HungerStation-style menu: four shortcuts in a card, then titled groups of thin-line rows */
.dquick{display:flex;justify-content:space-between;gap:4px;margin:10px 10px 4px;padding:12px 6px 8px;background:var(--card);border-radius:16px;box-shadow:0 1px 6px rgba(0,0,0,.10)}
.dq{flex:1;text-align:center;cursor:pointer;font-size:11.5px;font-weight:600;color:var(--text);min-width:0}
.dq span{display:block;margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dqi{width:46px;height:46px;border-radius:14px;margin:0 auto;display:flex;align-items:center;justify-content:center;background:var(--surface);color:var(--green-dark)}
.dsec{padding:14px 16px 4px;font-size:13.5px;font-weight:700;color:var(--text3)}
.dritem:hover{background:var(--surface)}

.modal#offerModal.show{display:flex !important}
/* ── RTL ── set by applyLanguage(); only the hard-coded sides need overriding,
   flex and grid mirror themselves once dir=rtl is on the root. */
html[dir="rtl"] body{direction:rtl;text-align:right}
html[dir="rtl"] .chips,html[dir="rtl"] .tabs,html[dir="rtl"] .bnav{direction:rtl}
html[dir="rtl"] .search input{padding-right:44px;padding-left:14px}
html[dir="rtl"] .search .si{right:14px;left:auto}
html[dir="rtl"] .sinfo{text-align:right}
html[dir="rtl"] .ocard .disc,html[dir="rtl"] .badge{right:auto;left:8px}
/* Prices, per-kg figures and counts stay left-to-right inside Arabic text,
   otherwise "SAR 19.99/kg" renders with the parts reversed. */
html[dir="rtl"] .price,html[dir="rtl"] .ppu,html[dir="rtl"] .num{direction:ltr;unicode-bidi:embed;display:inline-block}
/* Counts and the end-of-list line are Arabic sentences with numbers in them ("30 من 121"): forced left-to-right they read
   backwards. Each takes its direction from its own first letter, so an English fragment still reads left-to-right. */
html[dir="rtl"] .cnt,html[dir="rtl"] #offersCount,html[dir="rtl"] #searchCount,
html[dir="rtl"] #offersSentinel,html[dir="rtl"] .sc{unicode-bidi:plaintext;display:inline-block}
/* Counts read "30 of 200". Left to the RTL flow that paints as "of 200 30",
   which is exactly the kind of scrambled number the client keeps reporting. */


/* ── Dark-mode switch in the menu ── */
.tsw{margin-inline-start:auto;width:40px;height:22px;border-radius:11px;background:#bbb;position:relative;transition:background .2s;flex:none}
.tsw i{position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;background:#fff;transition:transform .2s;box-shadow:0 1px 3px rgba(0,0,0,.3)}
.tsw.on{background:var(--green)}
.tsw.on i{transform:translateX(18px)}
html[dir="rtl"] .tsw i{left:auto;right:2px}
html[dir="rtl"] .tsw.on i{transform:translateX(-18px)}

/* ── Dark theme ──
   Most of the interface paints its colours inline (cards, chips, tags), so the
   values below are matched by attribute and replaced. Product and flyer images
   are never touched; retailer logos (<img>) keep their white backing. */
html[data-theme="dark"] .hdr{background:#25492a}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{background-color:var(--surface);color:var(--text);border-color:var(--border)}
html[data-theme="dark"] ::placeholder{color:#8e8e8e}
html[data-theme="dark"] .sbar input{background-color:var(--surface)}
html[data-theme="dark"] #drawer{box-shadow:2px 0 10px rgba(0,0,0,.6)}
html[data-theme="dark"] :not(img)[style*="background:#fff;" i],
html[data-theme="dark"] :not(img)[style*="background:#fff " i],
html[data-theme="dark"] :not(img)[style*="background:#fff!" i],
html[data-theme="dark"] :not(img)[style$="background:#fff" i],
html[data-theme="dark"] :not(img)[style*="background: #fff;" i],
html[data-theme="dark"] :not(img)[style*="background: #fff " i],
html[data-theme="dark"] :not(img)[style$="background: #fff" i]{background:var(--card) !important}
html[data-theme="dark"] :not(img)[style*="background:#ffffff;" i],
html[data-theme="dark"] :not(img)[style*="background:#ffffff " i],
html[data-theme="dark"] :not(img)[style*="background:#ffffff!" i],
html[data-theme="dark"] :not(img)[style$="background:#ffffff" i],
html[data-theme="dark"] :not(img)[style*="background: #ffffff;" i],
html[data-theme="dark"] :not(img)[style*="background: #ffffff " i],
html[data-theme="dark"] :not(img)[style$="background: #ffffff" i]{background:var(--card) !important}
html[data-theme="dark"] :not(img)[style*="background:#fafafa;" i],
html[data-theme="dark"] :not(img)[style*="background:#fafafa " i],
html[data-theme="dark"] :not(img)[style*="background:#fafafa!" i],
html[data-theme="dark"] :not(img)[style$="background:#fafafa" i],
html[data-theme="dark"] :not(img)[style*="background: #fafafa;" i],
html[data-theme="dark"] :not(img)[style*="background: #fafafa " i],
html[data-theme="dark"] :not(img)[style$="background: #fafafa" i]{background:var(--card) !important}
html[data-theme="dark"] :not(img)[style*="background:#f9f9f9;" i],
html[data-theme="dark"] :not(img)[style*="background:#f9f9f9 " i],
html[data-theme="dark"] :not(img)[style*="background:#f9f9f9!" i],
html[data-theme="dark"] :not(img)[style$="background:#f9f9f9" i],
html[data-theme="dark"] :not(img)[style*="background: #f9f9f9;" i],
html[data-theme="dark"] :not(img)[style*="background: #f9f9f9 " i],
html[data-theme="dark"] :not(img)[style$="background: #f9f9f9" i]{background:var(--card) !important}
html[data-theme="dark"] :not(img)[style*="background:#f8f8f8;" i],
html[data-theme="dark"] :not(img)[style*="background:#f8f8f8 " i],
html[data-theme="dark"] :not(img)[style*="background:#f8f8f8!" i],
html[data-theme="dark"] :not(img)[style$="background:#f8f8f8" i],
html[data-theme="dark"] :not(img)[style*="background: #f8f8f8;" i],
html[data-theme="dark"] :not(img)[style*="background: #f8f8f8 " i],
html[data-theme="dark"] :not(img)[style$="background: #f8f8f8" i]{background:var(--surface) !important}
html[data-theme="dark"] :not(img)[style*="background:#f5f5f5;" i],
html[data-theme="dark"] :not(img)[style*="background:#f5f5f5 " i],
html[data-theme="dark"] :not(img)[style*="background:#f5f5f5!" i],
html[data-theme="dark"] :not(img)[style$="background:#f5f5f5" i],
html[data-theme="dark"] :not(img)[style*="background: #f5f5f5;" i],
html[data-theme="dark"] :not(img)[style*="background: #f5f5f5 " i],
html[data-theme="dark"] :not(img)[style$="background: #f5f5f5" i]{background:var(--surface) !important}
html[data-theme="dark"] :not(img)[style*="background:#f0f0f0;" i],
html[data-theme="dark"] :not(img)[style*="background:#f0f0f0 " i],
html[data-theme="dark"] :not(img)[style*="background:#f0f0f0!" i],
html[data-theme="dark"] :not(img)[style$="background:#f0f0f0" i],
html[data-theme="dark"] :not(img)[style*="background: #f0f0f0;" i],
html[data-theme="dark"] :not(img)[style*="background: #f0f0f0 " i],
html[data-theme="dark"] :not(img)[style$="background: #f0f0f0" i]{background:var(--surface) !important}
html[data-theme="dark"] :not(img)[style*="background:#f2f2f7;" i],
html[data-theme="dark"] :not(img)[style*="background:#f2f2f7 " i],
html[data-theme="dark"] :not(img)[style*="background:#f2f2f7!" i],
html[data-theme="dark"] :not(img)[style$="background:#f2f2f7" i],
html[data-theme="dark"] :not(img)[style*="background: #f2f2f7;" i],
html[data-theme="dark"] :not(img)[style*="background: #f2f2f7 " i],
html[data-theme="dark"] :not(img)[style$="background: #f2f2f7" i]{background:var(--bg) !important}
html[data-theme="dark"] :not(img)[style*="background:#eef;" i],
html[data-theme="dark"] :not(img)[style*="background:#eef " i],
html[data-theme="dark"] :not(img)[style*="background:#eef!" i],
html[data-theme="dark"] :not(img)[style$="background:#eef" i],
html[data-theme="dark"] :not(img)[style*="background: #eef;" i],
html[data-theme="dark"] :not(img)[style*="background: #eef " i],
html[data-theme="dark"] :not(img)[style$="background: #eef" i]{background:#26293d !important}
html[data-theme="dark"] :not(img)[style*="background:#e8f5e9;" i],
html[data-theme="dark"] :not(img)[style*="background:#e8f5e9 " i],
html[data-theme="dark"] :not(img)[style*="background:#e8f5e9!" i],
html[data-theme="dark"] :not(img)[style$="background:#e8f5e9" i],
html[data-theme="dark"] :not(img)[style*="background: #e8f5e9;" i],
html[data-theme="dark"] :not(img)[style*="background: #e8f5e9 " i],
html[data-theme="dark"] :not(img)[style$="background: #e8f5e9" i]{background:#1f3a23 !important}
html[data-theme="dark"] :not(img)[style*="background:#e3f2fd;" i],
html[data-theme="dark"] :not(img)[style*="background:#e3f2fd " i],
html[data-theme="dark"] :not(img)[style*="background:#e3f2fd!" i],
html[data-theme="dark"] :not(img)[style$="background:#e3f2fd" i],
html[data-theme="dark"] :not(img)[style*="background: #e3f2fd;" i],
html[data-theme="dark"] :not(img)[style*="background: #e3f2fd " i],
html[data-theme="dark"] :not(img)[style$="background: #e3f2fd" i]{background:#14304a !important}
html[data-theme="dark"] :not(img)[style*="background:#fff3e0;" i],
html[data-theme="dark"] :not(img)[style*="background:#fff3e0 " i],
html[data-theme="dark"] :not(img)[style*="background:#fff3e0!" i],
html[data-theme="dark"] :not(img)[style$="background:#fff3e0" i],
html[data-theme="dark"] :not(img)[style*="background: #fff3e0;" i],
html[data-theme="dark"] :not(img)[style*="background: #fff3e0 " i],
html[data-theme="dark"] :not(img)[style$="background: #fff3e0" i]{background:#3b2c14 !important}
html[data-theme="dark"] :not(img)[style*="background:#ffebee;" i],
html[data-theme="dark"] :not(img)[style*="background:#ffebee " i],
html[data-theme="dark"] :not(img)[style*="background:#ffebee!" i],
html[data-theme="dark"] :not(img)[style$="background:#ffebee" i],
html[data-theme="dark"] :not(img)[style*="background: #ffebee;" i],
html[data-theme="dark"] :not(img)[style*="background: #ffebee " i],
html[data-theme="dark"] :not(img)[style$="background: #ffebee" i]{background:#3d1f22 !important}
html[data-theme="dark"] :not(img)[style*="color:#333;" i],
html[data-theme="dark"] :not(img)[style*="color:#333 " i],
html[data-theme="dark"] :not(img)[style*="color:#333!" i],
html[data-theme="dark"] :not(img)[style$="color:#333" i],
html[data-theme="dark"] :not(img)[style*="color: #333;" i],
html[data-theme="dark"] :not(img)[style*="color: #333 " i],
html[data-theme="dark"] :not(img)[style$="color: #333" i]{color:#e6e6e6 !important}
html[data-theme="dark"] :not(img)[style*="color:#444;" i],
html[data-theme="dark"] :not(img)[style*="color:#444 " i],
html[data-theme="dark"] :not(img)[style*="color:#444!" i],
html[data-theme="dark"] :not(img)[style$="color:#444" i],
html[data-theme="dark"] :not(img)[style*="color: #444;" i],
html[data-theme="dark"] :not(img)[style*="color: #444 " i],
html[data-theme="dark"] :not(img)[style$="color: #444" i]{color:#d6d6d6 !important}
html[data-theme="dark"] :not(img)[style*="color:#555;" i],
html[data-theme="dark"] :not(img)[style*="color:#555 " i],
html[data-theme="dark"] :not(img)[style*="color:#555!" i],
html[data-theme="dark"] :not(img)[style$="color:#555" i],
html[data-theme="dark"] :not(img)[style*="color: #555;" i],
html[data-theme="dark"] :not(img)[style*="color: #555 " i],
html[data-theme="dark"] :not(img)[style$="color: #555" i]{color:#cfcfcf !important}
html[data-theme="dark"] :not(img)[style*="color:#666;" i],
html[data-theme="dark"] :not(img)[style*="color:#666 " i],
html[data-theme="dark"] :not(img)[style*="color:#666!" i],
html[data-theme="dark"] :not(img)[style$="color:#666" i],
html[data-theme="dark"] :not(img)[style*="color: #666;" i],
html[data-theme="dark"] :not(img)[style*="color: #666 " i],
html[data-theme="dark"] :not(img)[style$="color: #666" i]{color:#bdbdbd !important}
html[data-theme="dark"] :not(img)[style*="color:#777;" i],
html[data-theme="dark"] :not(img)[style*="color:#777 " i],
html[data-theme="dark"] :not(img)[style*="color:#777!" i],
html[data-theme="dark"] :not(img)[style$="color:#777" i],
html[data-theme="dark"] :not(img)[style*="color: #777;" i],
html[data-theme="dark"] :not(img)[style*="color: #777 " i],
html[data-theme="dark"] :not(img)[style$="color: #777" i]{color:#b0b0b0 !important}
html[data-theme="dark"] :not(img)[style*="color:#888;" i],
html[data-theme="dark"] :not(img)[style*="color:#888 " i],
html[data-theme="dark"] :not(img)[style*="color:#888!" i],
html[data-theme="dark"] :not(img)[style$="color:#888" i],
html[data-theme="dark"] :not(img)[style*="color: #888;" i],
html[data-theme="dark"] :not(img)[style*="color: #888 " i],
html[data-theme="dark"] :not(img)[style$="color: #888" i]{color:#a5a5a5 !important}
html[data-theme="dark"] :not(img)[style*="color:#111;" i],
html[data-theme="dark"] :not(img)[style*="color:#111 " i],
html[data-theme="dark"] :not(img)[style*="color:#111!" i],
html[data-theme="dark"] :not(img)[style$="color:#111" i],
html[data-theme="dark"] :not(img)[style*="color: #111;" i],
html[data-theme="dark"] :not(img)[style*="color: #111 " i],
html[data-theme="dark"] :not(img)[style$="color: #111" i]{color:#f2f2f2 !important}
html[data-theme="dark"] :not(img)[style*="color:#1a1a1a;" i],
html[data-theme="dark"] :not(img)[style*="color:#1a1a1a " i],
html[data-theme="dark"] :not(img)[style*="color:#1a1a1a!" i],
html[data-theme="dark"] :not(img)[style$="color:#1a1a1a" i],
html[data-theme="dark"] :not(img)[style*="color: #1a1a1a;" i],
html[data-theme="dark"] :not(img)[style*="color: #1a1a1a " i],
html[data-theme="dark"] :not(img)[style$="color: #1a1a1a" i]{color:#f2f2f2 !important}
html[data-theme="dark"] :not(img)[style*="color:#000;" i],
html[data-theme="dark"] :not(img)[style*="color:#000 " i],
html[data-theme="dark"] :not(img)[style*="color:#000!" i],
html[data-theme="dark"] :not(img)[style$="color:#000" i],
html[data-theme="dark"] :not(img)[style*="color: #000;" i],
html[data-theme="dark"] :not(img)[style*="color: #000 " i],
html[data-theme="dark"] :not(img)[style$="color: #000" i]{color:#f2f2f2 !important}
html[data-theme="dark"] :not(img)[style*="color:#2e7d32;" i],
html[data-theme="dark"] :not(img)[style*="color:#2e7d32 " i],
html[data-theme="dark"] :not(img)[style*="color:#2e7d32!" i],
html[data-theme="dark"] :not(img)[style$="color:#2e7d32" i],
html[data-theme="dark"] :not(img)[style*="color: #2e7d32;" i],
html[data-theme="dark"] :not(img)[style*="color: #2e7d32 " i],
html[data-theme="dark"] :not(img)[style$="color: #2e7d32" i]{color:#81c784 !important}
html[data-theme="dark"] :not(img)[style*="color:#4cb050;" i],
html[data-theme="dark"] :not(img)[style*="color:#4cb050 " i],
html[data-theme="dark"] :not(img)[style*="color:#4cb050!" i],
html[data-theme="dark"] :not(img)[style$="color:#4cb050" i],
html[data-theme="dark"] :not(img)[style*="color: #4cb050;" i],
html[data-theme="dark"] :not(img)[style*="color: #4cb050 " i],
html[data-theme="dark"] :not(img)[style$="color: #4cb050" i]{color:#81c784 !important}
html[data-theme="dark"] :not(img)[style*="color:#1565c0;" i],
html[data-theme="dark"] :not(img)[style*="color:#1565c0 " i],
html[data-theme="dark"] :not(img)[style*="color:#1565c0!" i],
html[data-theme="dark"] :not(img)[style$="color:#1565c0" i],
html[data-theme="dark"] :not(img)[style*="color: #1565c0;" i],
html[data-theme="dark"] :not(img)[style*="color: #1565c0 " i],
html[data-theme="dark"] :not(img)[style$="color: #1565c0" i]{color:#90caf9 !important}
html[data-theme="dark"] :not(img)[style*="color:#1976d2;" i],
html[data-theme="dark"] :not(img)[style*="color:#1976d2 " i],
html[data-theme="dark"] :not(img)[style*="color:#1976d2!" i],
html[data-theme="dark"] :not(img)[style$="color:#1976d2" i],
html[data-theme="dark"] :not(img)[style*="color: #1976d2;" i],
html[data-theme="dark"] :not(img)[style*="color: #1976d2 " i],
html[data-theme="dark"] :not(img)[style$="color: #1976d2" i]{color:#90caf9 !important}
html[data-theme="dark"] :not(img)[style*="color:#e53e3e;" i],
html[data-theme="dark"] :not(img)[style*="color:#e53e3e " i],
html[data-theme="dark"] :not(img)[style*="color:#e53e3e!" i],
html[data-theme="dark"] :not(img)[style$="color:#e53e3e" i],
html[data-theme="dark"] :not(img)[style*="color: #e53e3e;" i],
html[data-theme="dark"] :not(img)[style*="color: #e53e3e " i],
html[data-theme="dark"] :not(img)[style$="color: #e53e3e" i]{color:#ef9a9a !important}
html[data-theme="dark"] :not(img)[style*="color:#d32f2f;" i],
html[data-theme="dark"] :not(img)[style*="color:#d32f2f " i],
html[data-theme="dark"] :not(img)[style*="color:#d32f2f!" i],
html[data-theme="dark"] :not(img)[style$="color:#d32f2f" i],
html[data-theme="dark"] :not(img)[style*="color: #d32f2f;" i],
html[data-theme="dark"] :not(img)[style*="color: #d32f2f " i],
html[data-theme="dark"] :not(img)[style$="color: #d32f2f" i]{color:#ef9a9a !important}
html[data-theme="dark"] :not(img)[style*="color:#c62828;" i],
html[data-theme="dark"] :not(img)[style*="color:#c62828 " i],
html[data-theme="dark"] :not(img)[style*="color:#c62828!" i],
html[data-theme="dark"] :not(img)[style$="color:#c62828" i],
html[data-theme="dark"] :not(img)[style*="color: #c62828;" i],
html[data-theme="dark"] :not(img)[style*="color: #c62828 " i],
html[data-theme="dark"] :not(img)[style$="color: #c62828" i]{color:#ef9a9a !important}
html[data-theme="dark"] :not(img)[style*="color:#b26a00;" i],
html[data-theme="dark"] :not(img)[style*="color:#b26a00 " i],
html[data-theme="dark"] :not(img)[style*="color:#b26a00!" i],
html[data-theme="dark"] :not(img)[style$="color:#b26a00" i],
html[data-theme="dark"] :not(img)[style*="color: #b26a00;" i],
html[data-theme="dark"] :not(img)[style*="color: #b26a00 " i],
html[data-theme="dark"] :not(img)[style$="color: #b26a00" i]{color:#ffb74d !important}
html[data-theme="dark"] :not(img)[style*="color:#e65100;" i],
html[data-theme="dark"] :not(img)[style*="color:#e65100 " i],
html[data-theme="dark"] :not(img)[style*="color:#e65100!" i],
html[data-theme="dark"] :not(img)[style$="color:#e65100" i],
html[data-theme="dark"] :not(img)[style*="color: #e65100;" i],
html[data-theme="dark"] :not(img)[style*="color: #e65100 " i],
html[data-theme="dark"] :not(img)[style$="color: #e65100" i]{color:#ffb74d !important}
html[data-theme="dark"] :not(img)[style*="color:#f57c00;" i],
html[data-theme="dark"] :not(img)[style*="color:#f57c00 " i],
html[data-theme="dark"] :not(img)[style*="color:#f57c00!" i],
html[data-theme="dark"] :not(img)[style$="color:#f57c00" i],
html[data-theme="dark"] :not(img)[style*="color: #f57c00;" i],
html[data-theme="dark"] :not(img)[style*="color: #f57c00 " i],
html[data-theme="dark"] :not(img)[style$="color: #f57c00" i]{color:#ffb74d !important}
html[data-theme="dark"] [style*="solid #eee;" i],
html[data-theme="dark"] [style*="solid #eee " i],
html[data-theme="dark"] [style$="solid #eee" i],
html[data-theme="dark"] [style*="dashed #eee;" i],
html[data-theme="dark"] [style*="dashed #eee " i],
html[data-theme="dark"] [style$="dashed #eee" i],
html[data-theme="dark"] [style*="solid #ddd;" i],
html[data-theme="dark"] [style*="solid #ddd " i],
html[data-theme="dark"] [style$="solid #ddd" i],
html[data-theme="dark"] [style*="dashed #ddd;" i],
html[data-theme="dark"] [style*="dashed #ddd " i],
html[data-theme="dark"] [style$="dashed #ddd" i],
html[data-theme="dark"] [style*="solid #e0e0e0;" i],
html[data-theme="dark"] [style*="solid #e0e0e0 " i],
html[data-theme="dark"] [style$="solid #e0e0e0" i],
html[data-theme="dark"] [style*="dashed #e0e0e0;" i],
html[data-theme="dark"] [style*="dashed #e0e0e0 " i],
html[data-theme="dark"] [style$="dashed #e0e0e0" i],
html[data-theme="dark"] [style*="solid #f0f0f0;" i],
html[data-theme="dark"] [style*="solid #f0f0f0 " i],
html[data-theme="dark"] [style$="solid #f0f0f0" i],
html[data-theme="dark"] [style*="dashed #f0f0f0;" i],
html[data-theme="dark"] [style*="dashed #f0f0f0 " i],
html[data-theme="dark"] [style$="dashed #f0f0f0" i],
html[data-theme="dark"] [style*="solid #f5f5f5;" i],
html[data-theme="dark"] [style*="solid #f5f5f5 " i],
html[data-theme="dark"] [style$="solid #f5f5f5" i],
html[data-theme="dark"] [style*="dashed #f5f5f5;" i],
html[data-theme="dark"] [style*="dashed #f5f5f5 " i],
html[data-theme="dark"] [style$="dashed #f5f5f5" i],
html[data-theme="dark"] [style*="solid #e8e8e8;" i],
html[data-theme="dark"] [style*="solid #e8e8e8 " i],
html[data-theme="dark"] [style$="solid #e8e8e8" i],
html[data-theme="dark"] [style*="dashed #e8e8e8;" i],
html[data-theme="dark"] [style*="dashed #e8e8e8 " i],
html[data-theme="dark"] [style$="dashed #e8e8e8" i]{border-color:var(--border) !important}

#drawer{background:var(--card);color:var(--text)}
html[data-theme="dark"] :not(img)[style*="background: rgb(255, 255, 255)" i]{background:var(--card) !important}
html[data-theme="dark"] :not(img)[style*="background: rgb(250, 250, 250)" i]{background:var(--card) !important}
html[data-theme="dark"] :not(img)[style*="background: rgb(249, 249, 249)" i]{background:var(--card) !important}
html[data-theme="dark"] :not(img)[style*="background: rgb(248, 248, 248)" i]{background:var(--surface) !important}
html[data-theme="dark"] :not(img)[style*="background: rgb(245, 245, 245)" i]{background:var(--surface) !important}
html[data-theme="dark"] :not(img)[style*="background: rgb(240, 240, 240)" i]{background:var(--surface) !important}
html[data-theme="dark"] :not(img)[style*="background: rgb(242, 242, 247)" i]{background:var(--bg) !important}
html[data-theme="dark"] :not(img)[style*="background: rgb(232, 245, 233)" i]{background:#1f3a23 !important}
html[data-theme="dark"] :not(img)[style*="background: rgb(227, 242, 253)" i]{background:#14304a !important}
html[data-theme="dark"] :not(img)[style*="background: rgb(255, 243, 224)" i]{background:#3b2c14 !important}
html[data-theme="dark"] :not(img)[style*="background: rgb(255, 235, 238)" i]{background:#3d1f22 !important}
html[data-theme="dark"] :not(img)[style*="color: rgb(51, 51, 51)" i]{color:#e6e6e6 !important}
html[data-theme="dark"] :not(img)[style*="color: rgb(85, 85, 85)" i]{color:#cfcfcf !important}
html[data-theme="dark"] :not(img)[style*="color: rgb(102, 102, 102)" i]{color:#bdbdbd !important}
html[data-theme="dark"] :not(img)[style*="color: rgb(119, 119, 119)" i]{color:#b0b0b0 !important}
html[data-theme="dark"] :not(img)[style*="color: rgb(136, 136, 136)" i]{color:#a5a5a5 !important}
html[data-theme="dark"] :not(img)[style*="color: rgb(17, 17, 17)" i]{color:#f2f2f2 !important}
html[data-theme="dark"] :not(img)[style*="color: rgb(26, 26, 26)" i]{color:#f2f2f2 !important}
html[data-theme="dark"] :not(img)[style*="color: rgb(46, 125, 50)" i]{color:#81c784 !important}
html[data-theme="dark"] :not(img)[style*="color: rgb(21, 101, 192)" i]{color:#90caf9 !important}
html[data-theme="dark"] :not(img)[style*="color: rgb(25, 118, 210)" i]{color:#90caf9 !important}
html[data-theme="dark"] :not(img)[style*="color: rgb(229, 62, 62)" i]{color:#ef9a9a !important}
html[data-theme="dark"] :not(img)[style*="color: rgb(211, 47, 47)" i]{color:#ef9a9a !important}
html[data-theme="dark"] :not(img)[style*="color: rgb(198, 40, 40)" i]{color:#ef9a9a !important}
html[data-theme="dark"] :not(img)[style*="color: rgb(230, 81, 0)" i]{color:#ffb74d !important}
html[data-theme="dark"] :not(img)[style*="color: rgb(245, 124, 0)" i]{color:#ffb74d !important}

/* Category tiles: pastel in light mode, same dark card as the store tiles in dark mode */
html[data-theme="dark"] .cattile{background:var(--card) !important}

/* Touch targets: Save buttons were 25px tall, chips 30px. */
button[onclick*="toggleSaveOffer"]{min-height:34px}
/* Offline banner */
#offlineBar{position:fixed;left:0;right:0;bottom:12px;z-index:9999;display:flex;align-items:center;justify-content:center;gap:12px;padding:10px 16px;background:#b71c1c;color:#fff;font-size:13px;font-weight:600}
#offlineBar[hidden]{display:none}
#offlineBar button{background:#fff;color:#b71c1c;border:none;border-radius:14px;padding:6px 14px;font-size:12px;font-weight:700;cursor:pointer;min-height:32px}

/* Sort-in-progress loader: same look as the "Loading <country> deals..." screen. */
#sortOverlay{position:fixed;left:0;right:0;bottom:0;z-index:450;display:none;align-items:center;justify-content:center;background:var(--bg);text-align:center}

/* Header country button: no flag on the main page (the country and city lists keep theirs). */
#cflag{display:none}
/* The fixed bottom tabs covered the last row of every page, cutting off its buttons. */
#mainContent{padding-bottom:calc(84px + env(safe-area-inset-bottom,0px))}
/* search inside a flyer */
.viewer .vhdr .vtitle{font-size:13px;white-space:normal;line-height:1.15}
.vsearch{display:none;position:absolute;left:0;right:0;top:calc(56px + env(safe-area-inset-top,0px));z-index:25;background:#fff;box-shadow:0 3px 10px rgba(0,0,0,.3);padding:8px 10px;color:#222}
.vsearch.show{display:block}
.vsrow{display:flex;align-items:center;gap:4px}
.vsrow input{flex:1;min-width:0;border:1px solid #cfd8dc;border-radius:20px;padding:9px 14px;font-size:15px;outline:none}
.vsrow input:focus{border-color:#0b6a8a}
.vsnav{background:#eef3f5;border:none;border-radius:50%;width:34px;height:34px;font-size:18px;line-height:1;cursor:pointer;flex:none;color:#0b4a63}
.vsinfo{font-size:12px;color:#555;padding:5px 4px 0;min-height:16px}
.vhs.hit{outline:3px solid #ffc107;background:rgba(255,235,59,.28)}
.vhs.cur{outline:4px solid #ff5722;background:rgba(255,87,34,.22)}
@media (prefers-color-scheme:dark){.vsearch{background:#1e1e1e;color:#eee}.vsrow input{background:#2a2a2a;color:#eee;border-color:#444}.vsinfo{color:#bbb}.vsnav{background:#333;color:#ddd}}
:root[data-theme="dark"] .vsearch{background:#1e1e1e;color:#eee}
:root[data-theme="dark"] .vsrow input{background:#2a2a2a;color:#eee;border-color:#444}
/* price per kg labels and quick add buttons on flyer products */
.vdeco{position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none}
.vtag{position:absolute;margin:4px 0 0 4px;background:rgba(21,101,52,.9);color:#fff;font-size:10px;font-weight:800;padding:1px 5px;border-radius:7px;white-space:nowrap;line-height:1.3;pointer-events:none}
.vadd{position:absolute;transform:translateX(-100%);margin:4px 4px 0 0;width:26px;height:26px;border-radius:50%;background:rgba(76,175,80,.92);color:#fff;border:2px solid #fff;font-size:17px;font-weight:700;line-height:1;padding:0;cursor:pointer;pointer-events:auto;box-shadow:0 1px 3px rgba(0,0,0,.4)}
.vadd.on{background:#1b5e20}
.viewer.noshop .vtag,.viewer.noshop .vadd{display:none}
/* report a problem */
.vrsheet{padding:16px 16px calc(14px + env(safe-area-inset-bottom,0px));max-height:90%;overflow-y:auto}
.vrtitle{font-size:17px;font-weight:800;margin:4px 4px 12px}
.vropts{display:flex;flex-direction:column;gap:8px}
.vropt{text-align:start;background:#f3f6f4;border:2px solid transparent;border-radius:12px;padding:12px 14px;font-size:15px;color:inherit;cursor:pointer}
.vropt.on{border-color:#2e7d32;background:#e6f4e8;font-weight:700}
.vrnote{width:100%;margin-top:12px;border:1px solid #cfd8dc;border-radius:12px;padding:10px 12px;font-size:15px;font-family:inherit;resize:none;background:#fff;color:#222}
.vrnote-hint{font-size:11px;color:#777;margin:6px 4px 12px}
.vrbtns{display:flex;gap:10px}
.vrcancel,.vrsend{flex:1;border:none;border-radius:12px;padding:13px;font-size:16px;font-weight:700;cursor:pointer}
.vrcancel{background:#eceff1;color:#333}
.vrsend{background:#2e7d32;color:#fff}
.vrsend:disabled{opacity:.45;cursor:default}
@media (prefers-color-scheme:dark){.vropt{background:#2a2a2a}.vropt.on{background:#1f3a22}.vrnote{background:#2a2a2a;color:#eee;border-color:#444}.vrcancel{background:#333;color:#ddd}}
:root[data-theme="dark"] .vropt{background:#2a2a2a}
:root[data-theme="dark"] .vropt.on{background:#1f3a22}
:root[data-theme="dark"] .vrnote{background:#2a2a2a;color:#eee;border-color:#444}
:root[data-theme="dark"] .vrcancel{background:#333;color:#ddd}
/* Arabic: pages run right to left, arrows mirror, the slider fills from the right */
html[dir="rtl"] .vpager{direction:rtl}
.vslide{direction:ltr}
html[dir="rtl"] .vfoot{direction:rtl}
html[dir="rtl"] .viewer .vbtn.back,html[dir="rtl"] .vsarrow{transform:scaleX(-1)}
/* flyer badges: ends soon / new / selected stores */
.fbadges{position:absolute;top:8px;left:8px;display:flex;flex-direction:column;align-items:flex-start;gap:4px;z-index:2;pointer-events:none}
.fb{font-size:11px;font-weight:800;padding:3px 9px;border-radius:10px;color:#fff;line-height:1.25;box-shadow:0 1px 3px rgba(0,0,0,.3)}
.fb-end{background:#f57c00}
.fb-end.today{background:#d32f2f}
.fb-new{background:#2e7d32}
.fb-sel{background:#f57c00;font-weight:700;font-size:10px}
.fbadges.sm{top:5px;left:5px;gap:3px}
.fbadges.sm .fb{font-size:10px;padding:2px 6px;border-radius:8px}
/* shopping list page */
.slt-bar{display:flex;gap:8px;padding:12px 14px 4px;overflow-x:auto}
.slt{flex:1;white-space:nowrap;border:1px solid var(--border);background:var(--card);color:var(--text);border-radius:20px;padding:8px 12px;font-size:13px;font-weight:700;cursor:pointer}
.slt small{opacity:.7;font-weight:600}
.slt.on{background:var(--green);border-color:var(--green);color:#fff}
.sl-wrap{padding:6px 12px 190px}
.sl-top{display:flex;align-items:flex-end;justify-content:space-between;padding:10px 4px 8px}
.sl-title{font-size:22px;font-weight:800}
.sl-count{font-size:13px;color:var(--text3)}
.sl-clear{background:transparent;border:none;color:#e57373;font-size:14px;font-weight:700;cursor:pointer;padding:6px 4px}
.sl-group{background:var(--card);border-radius:14px;margin-bottom:12px;overflow:hidden;box-shadow:0 1px 5px rgba(0,0,0,.08)}
.sl-ghead{display:flex;align-items:center;gap:10px;padding:10px 12px}
.sl-ghead img{width:46px;height:46px;border-radius:50%;object-fit:contain;background:#fff;border:1px solid var(--border);flex:none}
.sl-gname{flex:1;min-width:0}
.sl-gname .a{font-size:16px;font-weight:800}
.sl-gname .b{font-size:12px;color:var(--text3)}
.sl-gsum{text-align:end;font-size:14px;color:var(--text)}
.sl-gsum s{color:var(--text3);font-size:12px;display:block}
.sl-item{position:relative;overflow:hidden;border-top:1px solid var(--border)}
.sl-del{position:absolute;top:0;bottom:0;inset-inline-end:0;width:88px;background:#d32f2f;color:#fff;border:none;font-size:20px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;cursor:pointer}
.sl-del span{font-size:12px;font-weight:700}
.sl-row{position:relative;display:flex;gap:10px;align-items:flex-start;padding:10px 12px;background:var(--card);transition:transform .2s;touch-action:pan-y}
.sl-img{width:78px;height:78px;border-radius:10px;object-fit:contain;background:#fff;flex:none;cursor:pointer}
.sl-info{flex:1;min-width:0}
.sl-badges{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:4px}
.slb{font-size:10px;font-weight:800;padding:2px 7px;border-radius:7px;background:#eceff1;color:#455a64;white-space:nowrap}
.slb.off{background:#ffebee;color:#c62828}.slb.off.hot{background:#e53935;color:#fff}
.slb.dl{background:#fff3e0;color:#e65100}.slb.exp{background:#eceff1;color:#b71c1c}
.slb.hotdeal{background:#fff8e1;color:#e65100}
.sl-name{font-size:15px;font-weight:700;line-height:1.3;cursor:pointer;overflow-wrap:anywhere}
.sl-unit{font-size:13px;color:var(--text3);margin-top:2px}
.sl-unit s{margin-inline-start:4px}
.sl-unit.nop{font-style:italic}
.sl-qrow{display:flex;align-items:center;justify-content:space-between;margin-top:6px}
.sl-step{display:flex;align-items:center;border:1px solid var(--border);border-radius:10px;overflow:hidden}
.sl-step button{width:32px;height:32px;border:none;background:var(--surface);color:var(--text);font-size:18px;cursor:pointer}
.sl-step button:disabled{opacity:.35;cursor:default}
.sl-step span{min-width:34px;text-align:center;font-weight:800}
.sl-line{font-size:17px;font-weight:800;color:var(--text)}
.sl-check{width:26px;height:26px;flex:none;border:2px solid #90a4ae;border-radius:7px;background:transparent;color:#fff;font-size:16px;font-weight:900;line-height:1;cursor:pointer;padding:0}
.sl-check.on{background:#2e7d32;border-color:#2e7d32}
.sl-item.done .sl-img,.sl-item.done .sl-info{opacity:.5}      /* dim the content only: the row must stay opaque or Delete shows through */
.sl-item.done .sl-name{text-decoration:line-through}
.sl-item.done .sl-unit,.sl-item.done .sl-line{text-decoration:line-through}
.sl-note{font-size:12px;color:#e65100;padding:2px 6px 6px}
.sl-hint{font-size:11px;color:var(--text3);padding:6px 6px 0}
.sl-foot{position:fixed;left:0;right:0;bottom:env(safe-area-inset-bottom,0px);z-index:90;display:flex;align-items:center;gap:12px;padding:10px 16px;background:var(--card);border-top:1px solid var(--border);box-shadow:0 -3px 10px rgba(0,0,0,.15)}
.sl-basket{position:relative;text-align:center;font-size:30px;line-height:1;flex:none}
.sl-basket .n{position:absolute;top:-6px;inset-inline-end:-6px;background:#555;color:#fff;font-size:11px;font-weight:800;border-radius:9px;min-width:18px;height:18px;line-height:18px;padding:0 4px}
.sl-basket .t{font-size:11px;color:var(--text3);margin-top:2px}
.sl-sum{flex:1;text-align:end}
.sl-sum .was{font-size:12px;color:var(--text3);text-decoration:line-through}
.sl-sum .tot{font-size:18px;font-weight:700}.sl-sum .tot b{font-size:22px;color:#2e7d32}
.sl-sum .saved{font-size:13px;color:#2e7d32;font-weight:700}
.sl-sum .bought{font-size:11px;color:var(--text3)}
#slUndo{position:fixed;left:50%;bottom:calc(90px + env(safe-area-inset-bottom,0px));transform:translate(-50%,20px);background:#323232;color:#fff;border-radius:24px;padding:10px 10px 10px 18px;display:flex;align-items:center;gap:14px;font-size:14px;font-weight:600;z-index:650;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s}
#slUndo.show{opacity:1;pointer-events:auto;transform:translate(-50%,0)}
#slUndo button{background:transparent;border:none;color:#81c784;font-size:14px;font-weight:800;cursor:pointer;padding:4px 8px}
.slc-cancel,.slc-go{flex:1;border:none;border-radius:12px;padding:13px;font-size:15px;font-weight:700;cursor:pointer}
.slc-cancel{background:#eceff1;color:#333}.slc-go{background:#d32f2f;color:#fff}

/* sheets: never let a drag inside them move the page behind, and keep form fields in the app's own colours (WebView force-dark otherwise paints them dark on a white sheet) */
:root{color-scheme:light}
body:has(.modal.show){overflow:hidden}
.modal .sheet,#suggestBox{overscroll-behavior:contain}
.modal input{background-color:var(--surface);color:var(--text);border-color:var(--border)}
/* spelling suggestion row and banners */
.dym{border-bottom:1px solid #f0f0f0;background:#f1f8e9;color:#222}
.dym b,.dym>span:first-child{color:#2e7d32}
.sbanner{color:#555}
.sbanner a{color:#1565c0}
html[data-theme="dark"] .dym{background:#1f2d20;color:#e6e6e6;border-bottom-color:#333}
html[data-theme="dark"] .dym b,html[data-theme="dark"] .dym>span:first-child{color:#7bd67f}
html[data-theme="dark"] .sbanner{color:#c8c8c8}
html[data-theme="dark"] .sbanner a{color:#8ab4ff}

/* Accessibility pass: readable contrast, finger-sized tap targets, page structure */
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.hdr .cbtn{min-height:40px}
.rcard .fav{top:0;right:0;min-width:40px;min-height:40px;display:flex;align-items:center;justify-content:center}
html[dir="rtl"] .rcard .fav{right:auto;left:0}
.fcard .info .fav{padding:10px;margin:-10px}
.tap{display:inline-flex;align-items:center;min-height:40px;padding:0 6px;margin:-8px -6px}
#searchFiltersBar button,.chip{min-height:36px}
/* white text on the brand green needs a darker green to reach a readable contrast */
.chip.on,[style*="background:var(--green);color:#fff"],[style*="background:#4CAF50;color:#fff"]{background:#2E7D32 !important}
html:not([data-theme="dark"]) [style*="color:var(--green)"],html:not([data-theme="dark"]) [style*="color:#4CAF50"]{color:#2E7D32 !important}

/* second accessibility pass */
html:not([data-theme="dark"]) .tabs .t.on,html:not([data-theme="dark"]) .bnav .ni.on,html:not([data-theme="dark"]) .sec small{color:#2E7D32}
.xbtn,.modal .sheet .mhdr .cls{display:inline-flex;align-items:center;justify-content:center;min-width:40px;min-height:40px;margin:-8px;color:#666 !important}
.vadd::after{content:"";position:absolute;inset:-9px;border-radius:50%}
html[data-theme="dark"] .xbtn,html[data-theme="dark"] .modal .sheet .mhdr .cls{color:#bbb !important}
.vadd{background:rgba(46,125,50,.95)}

/* third pass: inline greys, greens and reds that were just under a readable contrast on white */
html:not([data-theme="dark"]) :not(.viewer *)[style*="color:#999"],html:not([data-theme="dark"]) :not(.viewer *)[style*="color:#aaa"],html:not([data-theme="dark"]) :not(.viewer *)[style*="color:#777"]{color:#6b6b6b !important}
html:not([data-theme="dark"]) [style*="color:#4CB050"]{color:#2E7D32 !important}
html:not([data-theme="dark"]) [style*="color:#e53e3e"]{color:#d32f2f !important}
[style*="background:#ff5722"]{background:#d84315 !important}

/* keyboard open: no bottom tab bar over the keys */
body.kb .bnav{display:none}

/* header icons: 44 px tap area (look unchanged) */
.hdr>button:not(.cbtn){min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center;padding:0 !important}

/* shopping list tap targets */
.sl-clear{min-height:40px;padding:6px 8px}
.sl-name{padding:10px 0;margin:-10px 0}
.sl-check{position:relative}
.sl-check::after{content:"";position:absolute;inset:-9px}

/* flyer viewer: shown at once, with a spinner until its pages arrive */
.vload{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;color:#ccc;font-size:14px;text-align:center;padding:24px}
.vload .sp{width:34px;height:34px;border:3px solid rgba(255,255,255,.25);border-top-color:#66bb6a;border-radius:50%;animation:spin .8s linear infinite}
.vloadbtn{background:#2E7D32;color:#fff;border:none;border-radius:20px;padding:10px 26px;font-size:14px;font-weight:700;min-height:44px;cursor:pointer}
/* side menu open: the page behind must not move, and drags stay inside the menu */
body:has(#drawerBackdrop[style*="block"]){overflow:hidden}
#drawerBackdrop{touch-action:none;overscroll-behavior:contain}
#drawer{overscroll-behavior:contain}

/* Back-to-top arrow: hidden until the page is scrolled well down */
#toTopBtn{position:fixed;right:16px;bottom:24px;width:44px;height:44px;border-radius:50%;border:none;background:var(--green,#4CAF50);color:#fff;font-size:22px;font-weight:700;line-height:44px;padding:0;text-align:center;box-shadow:0 2px 8px rgba(0,0,0,.3);z-index:350;opacity:0;pointer-events:none;transform:translateY(8px);transition:opacity .2s,transform .2s;cursor:pointer}
#toTopBtn.show{opacity:1;pointer-events:auto;transform:none}
body.kb #toTopBtn{display:none}
body:has(.modal.show) #toTopBtn{display:none}          /* a sheet is open: the arrow covered its buttons (26 Nov 2026) */

/* Wide screens (tablet / desktop): more columns and a centred page. Phones (under 700px) are untouched. */
@media (min-width:700px){
  .ogrid{grid-template-columns:repeat(3,1fr)}
  .rgrid{grid-template-columns:repeat(4,1fr)}
  .cgrid{grid-template-columns:repeat(3,1fr)}
  .flist{display:grid;grid-template-columns:repeat(2,1fr);column-gap:12px;align-items:start}
  .modal .sheet{max-width:640px}
  #similarBox .ogrid{grid-template-columns:repeat(3,1fr)}
  .vgrid{grid-template-columns:repeat(3,1fr)}
}
@media (min-width:1000px){
  .ogrid{grid-template-columns:repeat(4,1fr)}
  .rgrid{grid-template-columns:repeat(6,1fr)}
  .cgrid{grid-template-columns:repeat(4,1fr)}
  .flist{grid-template-columns:repeat(3,1fr)}
  #similarBox .ogrid{grid-template-columns:repeat(3,1fr)}
  .vgrid{grid-template-columns:repeat(5,1fr)}
  /* flyer viewer: a page is not stretched across the whole screen (while zoomed it still widens as before) */
  .vslide:not(.zoomed) .vwrap{max-width:900px;margin-left:auto;margin-right:auto}
}
@media (min-width:1300px){
  .ogrid{grid-template-columns:repeat(5,1fr)}
  .rgrid{grid-template-columns:repeat(8,1fr)}
  .cgrid{grid-template-columns:repeat(5,1fr)}
  .flist{grid-template-columns:repeat(4,1fr)}
}
@media (min-width:1700px){
  .ogrid{grid-template-columns:repeat(6,1fr)}
  .rgrid{grid-template-columns:repeat(10,1fr)}
  .cgrid{grid-template-columns:repeat(6,1fr)}
  .flist{grid-template-columns:repeat(5,1fr)}
}
/* Mouse users: show a thin scrollbar under the category chips (touch screens keep it hidden) */
@media (hover:hover) and (pointer:fine){
  .cats{scrollbar-width:thin}
  .cats::-webkit-scrollbar{display:block;height:8px}
  .cats::-webkit-scrollbar-thumb{background:rgba(128,128,128,.5);border-radius:4px}
}

/* Department tiles (top row): round icon + name, sliding sideways */
.cats.dtiles{gap:4px;padding:10px 12px 8px;align-items:flex-start}
.dt{flex:0 0 auto;width:92px;text-align:center;cursor:pointer;user-select:none;-webkit-user-select:none;padding:2px 0;border-radius:12px}
.dic{position:relative;width:84px;height:84px;border-radius:18px;overflow:hidden;margin:0 auto 5px;display:flex;align-items:center;justify-content:center;border:1.5px solid var(--border);box-sizing:border-box;transition:transform .12s}
.dic img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;background:#f6f5f1;user-select:none;-webkit-user-select:none}
html[data-theme="dark"] .dic img{filter:brightness(.9)}
.dt:active .dic{transform:scale(.94)}
.dnm{font-size:13px;line-height:1.3;color:var(--text);height:34px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;padding:0 2px}
.dt.on .dic{border-color:var(--green);box-shadow:0 0 0 2px rgba(76,175,80,.25)}
.dt.on .dic img{border-radius:0}
.dt.on .dnm{color:var(--green-dark);font-weight:700}
.dc0{background:#E6F1FB;color:#0C447C}.dc1{background:#FAEEDA;color:#633806}.dc2{background:#EAF3DE;color:#27500A}.dc3{background:#E1F5EE;color:#085041}
.dc4{background:#FAECE7;color:#712B13}.dc5{background:#EEEDFE;color:#3C3489}.dc6{background:#FBEAF0;color:#72243E}.dc7{background:#F1EFE8;color:#444441}
html[data-theme="dark"] .dc0{background:#0C447C;color:#B5D4F4}html[data-theme="dark"] .dc1{background:#633806;color:#FAC775}
html[data-theme="dark"] .dc2{background:#27500A;color:#C0DD97}html[data-theme="dark"] .dc3{background:#085041;color:#9FE1CB}
html[data-theme="dark"] .dc4{background:#712B13;color:#F5C4B3}html[data-theme="dark"] .dc5{background:#3C3489;color:#CECBF6}
html[data-theme="dark"] .dc6{background:#72243E;color:#F4C0D1}html[data-theme="dark"] .dc7{background:#444441;color:#D3D1C7}
html[data-theme="dark"] .dt.on .dnm{color:#81c784}

/* Coupons section on the Trending page */
.tcoupons{display:flex;gap:10px;padding:0 16px 14px;overflow-x:auto;-webkit-overflow-scrolling:touch}
.tcoupon{flex:0 0 132px;background:var(--card);border-radius:14px;box-shadow:0 1px 5px rgba(0,0,0,.10);overflow:hidden;cursor:pointer;text-align:center}
.tcoupon .tcl{height:78px;background:#fff;display:flex;align-items:center;justify-content:center}
.tcoupon .tcl img{width:100%;height:100%;object-fit:contain;padding:12px;box-sizing:border-box}
.tcoupon .tcn{padding:8px 8px 2px;font-size:13px;font-weight:700;color:var(--green-dark);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tcoupon .tcc{padding:0 8px 10px;font-size:11.5px;color:var(--text2)}

/* Home page (HungerStation order): hero, flash deals, per-kg deals, two department rows, stores list */
.hero{position:relative;margin:10px 0 4px}
.hstrip{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;gap:10px;padding:0 16px;scrollbar-width:none}
.hstrip::-webkit-scrollbar{display:none}
.hslide{position:relative;flex:0 0 100%;scroll-snap-align:center;height:auto;aspect-ratio:1000/371;border-radius:18px;overflow:hidden;background:var(--surface);cursor:pointer}
.hslide img{width:100%;height:100%;object-fit:cover;display:block;user-select:none;-webkit-user-select:none}
.hcap{position:absolute;left:0;right:0;bottom:0;padding:28px 14px 12px;background:linear-gradient(transparent,rgba(0,0,0,.65));color:#fff;display:flex;flex-direction:column;gap:2px}
.hcap b{font-size:16px;font-weight:800;line-height:1.25}
.hcap span{font-size:12px;opacity:.9}
.hslide.hb{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:16px 20px;color:#fff;box-sizing:border-box}
.hslide.hb.red{background:linear-gradient(135deg,#d32f2f,#ff7043)}
.hslide.hb.green{background:linear-gradient(135deg,#1b5e20,#5cb85c)}
.hslide.hb.purple{background:linear-gradient(135deg,#6a1b9a,#ba68c8)}
.hslide.hb.blue{background:linear-gradient(135deg,#0d47a1,#42a5f5)}
.hslide.hb.orange{background:linear-gradient(135deg,#e65100,#ffb74d)}
.hbt{display:flex;flex-direction:column;gap:5px;min-width:0}
.hbt b{font-size:21px;font-weight:800;line-height:1.2}
.hbt span{font-size:13px;opacity:.95;line-height:1.35}
.hbt em{align-self:flex-start;margin-top:4px;font-style:normal;font-size:13px;font-weight:700;background:rgba(255,255,255,.95);color:#222;padding:6px 14px;border-radius:999px}
.hbe{font-style:normal;font-size:64px;line-height:1;flex:0 0 auto;filter:drop-shadow(0 4px 8px rgba(0,0,0,.25))}
.hdots{position:absolute;bottom:8px;right:0;left:0;display:flex;justify-content:center;gap:5px;pointer-events:none}
.hdots i{width:6px;height:6px;border-radius:50%;background:rgba(255,255,255,.55)}
.hdots i.on{width:18px;border-radius:3px;background:#fff}
.dband{margin:14px 0 6px;padding:12px 0 10px}
.dband.flash{background:linear-gradient(#ffd9dc,#ffeff0)}
.dband.wt{background:linear-gradient(#d8efdc,#eef8ef)}
html[data-theme="dark"] .dband.flash{background:linear-gradient(#4a2428,#2a1d1f)}
html[data-theme="dark"] .dband.wt{background:linear-gradient(#1f3a25,#1c2a1f)}
.dbh{display:flex;align-items:center;justify-content:space-between;padding:0 16px 10px;gap:10px}
.dbt{font-size:20px;font-weight:900;letter-spacing:.3px;color:var(--text)}
.dbs{font-size:12.5px;color:var(--text2);margin-top:2px}
.dbgo{flex:none;width:40px;height:40px;border-radius:50%;border:1px solid var(--border);background:var(--card);color:var(--text);font-size:20px;cursor:pointer}
.dstrip{display:flex;gap:10px;overflow-x:auto;padding:0 16px 4px;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.dstrip::-webkit-scrollbar{display:none}
.dcard{flex:0 0 132px;background:var(--card);border-radius:14px;padding:8px;cursor:pointer;box-shadow:0 1px 4px rgba(0,0,0,.08)}
.dimg{position:relative;height:104px;border-radius:10px;background:#fff;display:flex;align-items:center;justify-content:center;overflow:hidden}
.dimg img{max-width:100%;max-height:100%;object-fit:contain}
.dsave{position:absolute;top:4px;left:4px;z-index:1;background:#e53935;color:#fff;font-size:11px;font-weight:800;padding:3px 7px;border-radius:8px}
html[dir="rtl"] .dsave{left:auto;right:4px}
.dnm2{font-size:12.5px;line-height:1.3;height:32px;margin-top:6px;color:var(--text);overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.dpr{font-size:12px;margin-top:3px;color:var(--text3)}
.dpr b{font-size:14px;color:#e53935;font-weight:800}
.dpr s{opacity:.8}
.dcard.dall{flex:0 0 96px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;font-weight:700;font-size:13px;color:var(--green-dark);background:rgba(255,255,255,.6)}
.dcard.dall i{font-style:normal;width:36px;height:36px;border-radius:50%;background:var(--card);display:flex;align-items:center;justify-content:center;font-size:18px;box-shadow:0 1px 4px rgba(0,0,0,.12)}
.d2{display:grid;grid-auto-flow:column;grid-template-rows:repeat(1,auto);grid-auto-columns:92px;gap:10px 4px;overflow-x:auto;padding:4px 12px 12px;-webkit-overflow-scrolling:touch}
.hrlist{padding:0 16px}
.hr{display:flex;align-items:center;gap:14px;padding:12px 0;border-bottom:1px solid var(--border);cursor:pointer}
.hrl{flex:none;width:84px;height:84px;border-radius:14px;background:#fff;border:1px solid var(--border);display:flex;align-items:center;justify-content:center;overflow:hidden}
.hrl img{width:100%;height:100%;object-fit:contain;padding:3px}
.hri{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.hri b{font-size:16px;font-weight:700;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hri span{font-size:13px;color:var(--text2)}
.hrc{font-style:normal;font-size:26px;color:var(--text3)}
html[dir="rtl"] .hrc{transform:scaleX(-1)}
.wbanner{margin:12px 16px 4px;padding:22px 18px;border-radius:18px;background:linear-gradient(135deg,#2e7d32,#66bb6a);color:#fff;display:flex;align-items:center;gap:14px}
.wbi{font-size:40px}
.wbt{font-size:18px;font-weight:800;line-height:1.35}

/* grey placeholder cards while the Home deals load */
.dcard.sk{pointer-events:none;box-shadow:none}
.dcard.sk i{display:block;border-radius:8px;background:linear-gradient(90deg,rgba(128,128,128,.14),rgba(128,128,128,.26),rgba(128,128,128,.14));background-size:200% 100%;animation:skm 1.4s linear infinite}
.dcard.sk .ski{height:112px;margin-bottom:10px}
.dcard.sk .skl{height:12px;margin:6px 0}
.dcard.sk .skl.s{width:60%}
@keyframes skm{from{background-position:200% 0}to{background-position:-200% 0}}
@media (prefers-reduced-motion:reduce){.dcard.sk i{animation:none}}

/* Home strips: smooth, direction-locked sideways swiping (hero snaps one slide at a time, the rest glide and settle on a card) */
.hstrip,.dstrip,.d2,.tcoupons{overflow-y:hidden;overscroll-behavior-x:contain;-webkit-tap-highlight-color:transparent}
/* the product, department and coupon strips glide freely with the normal Android fling (no snapping, which cut the glide short); only the hero banner snaps, one slide at a time */
.dstrip,.d2,.tcoupons{scroll-snap-type:none}
.dcard,.dt,.tcoupon,.hslide{touch-action:manipulation;-webkit-user-select:none;user-select:none}
html.jspull,html.jspull body{overscroll-behavior-y:contain}
/* pull-to-refresh indicator (the page draws it; see _takeOverPull) */
#ptr{position:fixed;left:50%;top:60px;width:40px;height:40px;margin:0;border-radius:50%;background:#fff;color:var(--green,#2e7d32);box-shadow:0 2px 10px rgba(0,0,0,.28);display:flex;align-items:center;justify-content:center;z-index:120;opacity:0;pointer-events:none;transform:translate(-50%,-60px)}
#ptr:not(.drag):not(.spin){transition:transform .22s ease,opacity .22s ease}
#ptr.ready{background:var(--green,#2e7d32);color:#fff}
#ptr.spin svg{animation:ptrspin .7s linear infinite}
html[data-theme="dark"] #ptr{background:#2b2b2b}
@keyframes ptrspin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){#ptr.spin svg{animation:none}}

/* picture banners of the Home hero (HungerStation style): the picture fills the slide, the app writes the text on its calm side */
.hslide.hp img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
html[dir="rtl"] .hslide.hp:not(.bk) img{transform:scaleX(-1)}
.hpt{position:absolute;top:0;bottom:0;inset-inline-start:0;width:52%;padding:12px 16px;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;gap:4px;color:#fff;text-shadow:0 1px 6px rgba(0,0,0,.28)}
.hpt.dk{color:#16210f;text-shadow:none}
.hpt b{font-size:19px;font-weight:800;line-height:1.2}
.hpt span{font-size:12px;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.hpt em{align-self:flex-start;margin-top:5px;font-style:normal;font-size:13px;font-weight:800;background:#ffd400;color:#1b1b1b;padding:6px 15px;border-radius:999px;box-shadow:0 2px 6px rgba(0,0,0,.2)}
.hpt.dk em{background:#1b1b1b;color:#fff}
.hpt small{font-size:10px;opacity:.85}

/* SMART SEARCH PAGE (smart.js): two boxes per product, the rest as rows, and the Sort By / Stores buttons with their sheets */
.sm-bar{display:flex;align-items:center;gap:6px;padding:10px 16px 2px}
.sm-title{flex:1;font-size:13px;color:var(--text2);font-weight:600;min-width:0}
.sm-btn{display:inline-flex;align-items:center;gap:6px;background:transparent;border:none;color:var(--text);font-size:15px;font-weight:600;padding:6px 8px;min-height:44px;cursor:pointer}
.sm-btn.on{color:var(--green-dark,#2e7d32)}
.sm-note{padding:2px 16px 8px;font-size:13px}
.sm-note a{color:var(--green);font-weight:700}
.sm-note.warn{color:#c62828}
.sm-sh{display:flex;align-items:center;justify-content:space-between;padding:16px 16px 4px}
.sm-sh b{font-size:19px;font-weight:800}
.sm-sh a{color:var(--green);font-weight:700;font-size:14px;text-decoration:none}
.sm-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:8px 16px}
.sm-grid.one{grid-template-columns:1fr}
.sm-box{position:relative;background:var(--card);border:1px solid #c8e6c9;border-radius:16px;box-shadow:0 1px 5px rgba(0,0,0,.10);padding:0;overflow:hidden;display:flex;flex-direction:column;cursor:pointer;min-width:0}
.sm-badge{align-self:flex-start;display:inline-flex;align-items:center;gap:5px;background:#66bb6a;color:#fff;font-size:12px;font-weight:700;padding:5px 11px;border-radius:999px;position:relative;z-index:1}
.sm-badge.v{background:#9e9d24}
.sm-img{position:relative}
.sm-save{position:absolute;bottom:2px;left:2px;width:38px;height:38px;border:none;border-radius:12px;background:#fff;color:var(--green-dark,#2e7d32);box-shadow:0 1px 6px rgba(0,0,0,.28);font-size:24px;font-weight:700;line-height:1;display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:2;padding:0}
.sm-save.on{background:var(--green);color:#fff}
html[data-theme="dark"] .sm-save:not(.on){background:#2b2b2b;color:#9ad79d}
.sm-img{height:120px;display:flex;align-items:center;justify-content:center;margin:4px 0 8px}
.sm-img img{max-width:100%;max-height:100%;object-fit:contain}
.sm-nm{font-size:14px;line-height:1.3;font-weight:500;max-height:2.7em;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.sm-ft{min-height:26px;margin:6px 0 2px;display:flex;align-items:center}
.sm-logo{height:24px;max-width:84px;object-fit:contain}
.sm-pu{display:flex;align-items:center;justify-content:flex-start;gap:4px;flex-wrap:wrap;margin-top:auto;min-width:0}
.sm-pr{white-space:nowrap;flex:0 0 auto}
.sm-box .sm-pr b{font-size:clamp(13px,3.9vw,16px);font-weight:800}
.sm-pr s{font-size:12px;color:var(--text2);margin-inline-start:6px}
.sm-pr.none{font-size:12px;color:var(--text2)}
.sm-unit{background:rgba(128,128,128,.16);border-radius:999px;padding:4px 10px;font-size:clamp(13px,3.9vw,17px);font-weight:800;color:var(--text);white-space:nowrap;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.sm-rest{padding:8px 16px 0}
.sm-more{display:block;margin:4px 16px 16px;width:calc(100% - 32px);padding:14px;border-radius:12px;border:1px solid var(--border);background:var(--card);color:var(--green);font-weight:700;font-size:15px;cursor:pointer}
.sm-none{padding:14px 16px;color:var(--text2);font-size:14px}
.sm-wait{padding:10px 16px;text-align:center;font-size:12px;color:var(--text2)}
.sm-top{background:#e8f5e9;padding:10px 10px 4px;display:flex;flex-direction:column}
.sm-bot{padding:8px 8px 10px;display:flex;flex-direction:column;flex:1}
.sm-box.v{border-color:#ecd9a0}.sm-box.v .sm-top{background:#fbf5e1}
html[data-theme="dark"] .sm-top{background:#1f2e22}html[data-theme="dark"] .sm-box.v .sm-top{background:#2e2a1a}
.sm-cats{display:flex;gap:8px;overflow-x:auto;padding:2px 16px 8px;scrollbar-width:none;-webkit-overflow-scrolling:touch;max-width:100%}
.sm-cats::-webkit-scrollbar{display:none}
.sm-cat{flex:0 0 auto;display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:6px 12px;border:1px solid var(--border);border-radius:12px;background:var(--card);color:var(--text);font:700 13px/1.2 inherit;font-family:inherit;white-space:nowrap;cursor:pointer}
.sm-cat i{font-style:normal;display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:24px;padding:0 6px;box-sizing:border-box;border-radius:12px;background:#2E7D32;color:#fff;font-size:11px}
.sm-cat.on{background:#2E7D32;border-color:#2E7D32;color:#fff}
.sm-cat.on i{background:#fff;color:#1b5e20}
.sm-rest .ogrid{padding:0 0 8px}
.sm-box.sk{height:250px;gap:12px;box-shadow:none}
.sm-box.sk i{display:block;border-radius:8px;background:linear-gradient(90deg,rgba(128,128,128,.14),rgba(128,128,128,.26),rgba(128,128,128,.14));background-size:200% 100%;animation:skm 1.4s linear infinite}
.sm-box.sk .a{height:26px;width:40%;border-radius:999px}.sm-box.sk .b{height:120px}.sm-box.sk .c{height:18px;width:70%}
.sm-sh2{display:flex;justify-content:space-between;align-items:center;padding:18px 20px 8px;font-size:20px}
.sm-x{width:36px;height:36px;border-radius:50%;border:none;background:rgba(128,128,128,.18);font-size:16px;cursor:pointer;color:inherit}
.sm-opt{display:flex;gap:14px;padding:16px 20px;align-items:flex-start;cursor:pointer}
.sm-opt b{display:block;font-size:17px}
.sm-opt span{display:block;font-size:14px;color:var(--text2);margin-top:2px;line-height:1.35}
.sm-radio{flex:0 0 26px;height:26px;border:2px solid #777;border-radius:50%;position:relative;margin-top:2px;box-sizing:border-box}
.sm-radio.on{border-color:var(--green)}
.sm-radio.on::after{content:"";position:absolute;inset:4px;border-radius:50%;background:var(--green)}
.sm-chips{display:flex;flex-wrap:wrap;gap:10px;padding:16px 20px 22px}
.sm-chip{min-height:48px;min-width:64px;padding:6px 14px;border-radius:14px;border:1.5px solid var(--border);background:var(--card);color:var(--text);font-size:15px;font-weight:700;cursor:pointer;display:flex;align-items:center;justify-content:center}
/* hidden for now at the owner's request (see the block at the top of app.js): coupons band and department row on Home, department row of the lists */
html.hide-later #homeDeptsWrap,html.hide-later #trendCoupons,html.hide-later #catChips,html.hide-later .dq[onclick*="coupons"]{display:none!important}
.sm-chip{position:relative}
.sm-cnt{position:absolute;top:-9px;inset-inline-end:-6px;min-width:22px;height:22px;padding:0 6px;box-sizing:border-box;border-radius:11px;background:var(--green);color:#fff;font-size:12px;font-weight:700;line-height:22px;text-align:center}
.sm-chip img{height:30px;max-width:86px;object-fit:contain;background:#fff;border-radius:6px;padding:2px 4px}
.sm-chip.on{border-color:var(--green);box-shadow:0 0 0 1px var(--green) inset}
.sm-foot{border-top:1px solid var(--border);padding:14px 20px;display:flex;justify-content:flex-end}
.sm-go{background:var(--green-dark,#2e7d32);color:#fff;border:none;border-radius:10px;padding:14px 24px;font-size:16px;font-weight:700;cursor:pointer}

/* camera search (smart.js) */
.sbar{position:sticky}
.cam-btn{position:absolute;top:50%;right:24px;transform:translateY(-50%);width:36px;height:36px;border:none;border-radius:50%;background:transparent;color:var(--green-dark,#2e7d32);display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0}
.sbar.hascam input{padding-right:48px}
.cm-body{padding:8px 20px 22px;display:flex;flex-direction:column;gap:12px}
.cm-hint{font-size:14px;line-height:1.45;color:var(--text2)}
.cm-priv{font-size:12px;color:var(--text2);text-align:center}
.cm-big{border:none;border-radius:14px;background:var(--green-dark,#2e7d32);color:#fff;font-size:17px;font-weight:700;padding:16px;cursor:pointer}
.cm-big.alt{background:rgba(128,128,128,.16);color:var(--text)}
.cm-chips{display:flex;flex-direction:column;gap:10px}
.cm-chip{display:flex;justify-content:space-between;align-items:center;gap:10px;border:1.5px solid var(--green);border-radius:14px;background:var(--card);color:var(--text);padding:14px 16px;cursor:pointer;font-size:17px}
.cm-chip span{font-size:13px;color:var(--text2)}
.cm-spin{width:44px;height:44px;border:4px solid rgba(128,128,128,.25);border-top-color:var(--green);border-radius:50%;margin:14px auto 4px;animation:ptrspin .8s linear infinite}
@media (prefers-reduced-motion:reduce){.cm-spin{animation:none}}

/* the Sort By / Stores bar of the offers lists (smart.js) */
.nf-bar{background:var(--card);padding:6px 0 2px;border-bottom:1px solid var(--border)}
.nf-row{display:flex;align-items:center;flex-wrap:wrap;gap:6px;padding:0 10px 4px}
.nf-sp{flex:1}
.nf-tag{border:1px solid var(--green);border-radius:999px;background:transparent;color:var(--green-dark,#2e7d32);padding:6px 12px;font-size:12px;font-weight:700;cursor:pointer}
.nf-clearall{margin-inline-start:auto;margin-inline-end:10px;border:none;border-radius:999px;background:#ffebee;color:#c62828;padding:7px 14px;font-size:13px;font-weight:700;cursor:pointer;white-space:nowrap}

/* "A new update is available" card (Android app only): at the bottom edge, below the sheets; the back-to-top arrow rides above it */
#updCard{position:fixed;left:12px;right:12px;bottom:calc(14px + env(safe-area-inset-bottom,0px));margin:0 auto;max-width:520px;box-sizing:border-box;z-index:120;display:flex;align-items:center;gap:14px;padding:14px 16px;background:var(--card);color:var(--text);border:1px solid var(--border);border-radius:18px;box-shadow:0 6px 24px rgba(0,0,0,.22);animation:updIn .25s ease-out}
#updCard .upd-ic{flex:0 0 auto;width:clamp(40px,12vw,56px);height:auto;color:#5e35b1}
#updCard .upd-tx{min-width:0;flex:1;display:flex;flex-direction:column;gap:3px}
#updCard .upd-tx b{font-size:clamp(15px,4.2vw,17px);line-height:1.3}
#updCard .upd-tx span{font-size:clamp(12px,3.4vw,13px);color:var(--text2);line-height:1.4}
#updCard .upd-bt{display:flex;flex-wrap:wrap;gap:8px 16px;align-items:center;margin-top:6px}
#updCard button{font:inherit;font-weight:700;border:none;background:none;cursor:pointer;padding:8px 2px;min-height:40px}
#updCard .upd-go{color:#fff;background:var(--green-dark,#388E3C);border-radius:999px;padding:8px 18px}
#updCard .upd-later{color:var(--text3)}
html.has-upd #toTopBtn{bottom:calc(var(--upd-h,130px) + 28px + env(safe-area-inset-bottom,0px))}
@keyframes updIn{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}

/* NEW DESIGN (html.new-ui, owner 19 Nov 2026), built to the owner's mock-up: the header picture, the search card (mode track, input row with
   round buttons, pills) and the floating bottom bar. Old design: none of this applies. Sizes are for a 360px phone and adapt (clamp / %).
   The old header becomes the banner (not sticky), so the search bar sticks to the top (--hdr-h is 0). */
.nb-hero,.mic-btn,.go-btn,.bnav2,.qpills{display:none}
.l-en,.l-ar{display:none}
html[lang="ar"] .l-ar,html[lang="en"] .l-en{display:inline}
html.new-ui{--hdr-h:0px;--sbar-h:52px}
html.new-ui #mainTabs{display:none!important}

/* 1. header: the picture, the country button on top of it, and a green band that the card overlaps */
html.new-ui .hdr{position:relative;display:block;height:auto;padding:0;margin-bottom:-40px;overflow:hidden;box-shadow:none;z-index:1;background:#366745}
html.new-ui .hdr .logo{display:none}
html.new-ui .nb-hero{display:block;padding:calc(10px + env(safe-area-inset-top,0px)) 0 40px}
.nb-art-btn{display:block;width:100%;padding:0;border:0;background:none;cursor:pointer;line-height:0}
.nb-art{display:block;width:100%;height:auto;-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 12px);mask-image:linear-gradient(to bottom,transparent 0,#000 12px)}
html.new-ui .hdr .cbtn{position:absolute;z-index:3;top:calc(8px + env(safe-area-inset-top,0px));inset-inline-end:12px;margin:0;height:30px;padding:0 12px;font-size:12px;background:rgba(0,0,0,.28);color:#fff}

/* 2. search card, top: the search bar itself (one search for products and questions; there is no mode switch) */
/* 3. search card, middle: the input and the round buttons (go, mic, camera) beside it */
html.new-ui .sbar{display:flex;align-items:center;gap:8px;margin:0 9px;padding:12px 10px 0;height:auto;min-height:var(--sbar-h);border-radius:24px 24px 0 0;box-shadow:0 -8px 14px -8px rgba(0,0,0,.16);overflow:visible}
html.new-ui .sbar input{flex:1 1 auto;min-width:0;width:auto;height:40px;padding-block:0;padding-inline:38px 10px;border:0;border-radius:999px;background-color:#eeeeee;background-position:13px center;font-size:15px}
html[data-theme="dark"].new-ui .sbar input{background-color:var(--surface)}
html.new-ui .sbar input{text-overflow:ellipsis}
html.new-ui .sbar input::placeholder{font-size:clamp(11px,3.7vw,15px);text-overflow:ellipsis}   /* the long hint shrinks on narrow phones instead of being cut */
html[dir="rtl"].new-ui .sbar input{background-position:calc(100% - 13px) center}
html.new-ui .sbar .cam-btn,html.new-ui .sbar .mic-btn,html.new-ui .sbar .go-btn{display:flex;position:static;inset:auto;transform:none;flex:0 0 auto;width:38px;height:38px;border:0;border-radius:50%;align-items:center;justify-content:center;padding:0;cursor:pointer;background:#eeeeee;color:var(--green-dark)}
html[data-theme="dark"].new-ui .sbar .cam-btn,html[data-theme="dark"].new-ui .sbar .mic-btn{background:var(--surface)}
html.new-ui .sbar .go-btn{background:linear-gradient(135deg,#ffd24a,#f5b800);color:#1b4d2a}
html[dir="rtl"].new-ui .sbar .go-btn svg{transform:scaleX(-1)}
html.new-ui .sbar .cam-btn[style*="display: none"],html.new-ui .sbar .mic-btn[style*="display: none"]{display:none!important}
html.new-ui .sbar.hascam input{padding-inline:38px 10px}
html.new-ui .sbar .cam-btn svg,html.new-ui .sbar .mic-btn svg{width:20px;height:20px}
html.new-ui .sbar .go-btn svg{width:18px;height:18px}

/* 4. search card, bottom: quick-action pills (Home only; elsewhere the bar closes the card by itself) */
html.new-ui .qpills{display:flex;gap:8px;margin:0 9px;padding:12px 10px 12px;box-sizing:border-box;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;background:var(--card);border-radius:0 0 24px 24px;box-shadow:0 12px 20px -14px rgba(0,0,0,.35)}
html.new-ui .qpills::-webkit-scrollbar{display:none}
html.new-ui .qpills:empty{display:none}
html.new-ui[data-tab]:not([data-tab="trending"]):not([data-tab="search"]) .qpills{display:none}
html.new-ui[data-tab]:not([data-tab="trending"]):not([data-tab="search"]) .sbar{border-radius:0 0 24px 24px;padding-bottom:12px;box-shadow:0 12px 18px -12px rgba(0,0,0,.3)}
.qp{position:relative;flex:0 0 auto;min-height:32px;display:inline-flex;align-items:center;gap:6px;padding:0 14px;border:1px solid transparent;border-radius:999px;font:600 clamp(12px,3.6vw,14px)/1.2 inherit;font-family:inherit;color:#3b2d12;cursor:pointer;white-space:nowrap;max-width:75vw}
.qp span{font-size:1.2em}
.qp img{width:22px;height:22px;border-radius:50%;object-fit:contain;background:#fff;flex:0 0 auto}
.qt0{background:#FBEBCB}.qlist{background:#DDF1E3;color:#1f4a32;position:relative}
.qn{min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:#e53935;color:#fff;font:700 12px/20px inherit;font-family:inherit;text-align:center}
.toast-act{margin-inline-start:8px;border:0;border-radius:14px;padding:5px 12px;background:#F5B800;color:#1b4d2a;font:700 12px/1 inherit;font-family:inherit;cursor:pointer;white-space:nowrap}.qt1{background:#E1ECFA}.qt2{background:#EBE0FA}.qt3{background:#DFF3E5}.qt4{background:#FDE0E3}
.qp.qs{background:var(--surface);color:var(--text);border-color:var(--border)}
html[data-theme="dark"] .qp:not(.qs){color:#1a1a1a}

/* 5. the floating bottom bar */
html.new-ui .bnav2{display:flex;position:fixed;z-index:150;left:50%;transform:translateX(-50%);bottom:calc(10px + env(safe-area-inset-bottom,0px));width:calc(100% - 18px);max-width:520px;height:54px;box-sizing:border-box;padding:4px 6px;align-items:center;justify-content:space-between;gap:2px;background:linear-gradient(180deg,#2f6044,#295639);border-radius:27px;box-shadow:0 12px 26px rgba(0,0,0,.38)}
html[data-theme="dark"].new-ui .bnav2{background:linear-gradient(180deg,#234c35,#1d4029)}
html.new-ui body.kb .bnav2{display:none}
.bnav2 button{flex:1 1 0;min-width:0;height:46px;border:none;border-radius:23px;background:transparent;color:#d3dfd5;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:0;font-family:inherit;cursor:pointer}
.bnav2 button svg{width:20px;height:20px}
.bnav2 button span{font-size:clamp(9.5px,2.8vw,11px);font-weight:500;line-height:1.1;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bnav2 button.on{background:#d2e7d6;color:#1f4a32}
.bnav2 b{font-weight:inherit}
.bnav2 button.on span{font-weight:600}
.bnav2 button.ctr{position:relative;flex:0 0 64px;background:none!important;color:#f3c334;justify-content:flex-end;padding-bottom:2px}
.bnav2 .cbub{position:absolute;top:-17px;left:50%;transform:translateX(-50%);width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-style:normal;color:#5b3c00;background:radial-gradient(circle at 34% 28%,#ffe98c,#f6b800 60%,#d99700);box-shadow:0 0 0 3px #2b5a3d,0 6px 10px rgba(0,0,0,.4)}
html[data-theme="dark"] .bnav2 .cbub{box-shadow:0 0 0 3px #1f432c,0 6px 10px rgba(0,0,0,.45)}
.bnav2 .cbub svg{width:24px;height:24px}
.bnav2 .cbub::before{content:"\2726";position:absolute;left:-16px;top:12px;color:#ffd24a;font-size:12px}
.bnav2 .cbub::after{content:"\2726";position:absolute;right:-14px;top:-2px;color:#79d295;font-size:11px}
.bnav2 button.ctr span{color:#f3c334;font-weight:600}
html.new-ui #mainContent{padding-bottom:calc(92px + env(safe-area-inset-bottom,0px))}
html.new-ui #arkhasToast{bottom:calc(88px + env(safe-area-inset-bottom,0px))!important}
html.new-ui #toTopBtn{bottom:calc(80px + env(safe-area-inset-bottom,0px))}
html.new-ui #updCard{bottom:calc(80px + env(safe-area-inset-bottom,0px))}
html.new-ui #offlineBar{bottom:calc(80px + env(safe-area-inset-bottom,0px))}
html.new-ui .sl-foot{bottom:calc(76px + env(safe-area-inset-bottom,0px))}
html.new-ui #slUndo{bottom:calc(150px + env(safe-area-inset-bottom,0px))}
@media (max-width:340px){html.new-ui .bnav2{padding:4px 3px}.bnav2 button.ctr{flex-basis:56px}.bnav2 .cbub{width:40px;height:40px;top:-16px}.bnav2 .cbub svg{width:22px;height:22px}.bnav2 button svg{width:19px;height:19px}
  html.new-ui .sbar{gap:6px;padding-inline:8px}html.new-ui .sbar .cam-btn,html.new-ui .sbar .mic-btn,html.new-ui .sbar .go-btn{width:36px;height:36px}html.new-ui .sbar input{height:38px}}

/* NEW DESIGN - phase 6: the Profile screen replaces the side menu; the header keeps only the country button. */
.pf{padding:0}                                    /* edge to edge, like the other pages */
.pfpanel{background:var(--card);color:var(--text);border-radius:0;overflow:hidden;box-shadow:none;padding-bottom:6px}
.pfpanel>div:first-child{border-radius:0}
.pfpanel>div:first-child [onclick*="openCountryModal"]{min-height:44px;box-sizing:border-box}   /* the location row: a full-size tap target */
html.new-ui #menuBtn,html.new-ui .hdr>button:not(.cbtn){display:none}
html.new-ui .hdr .cbtn{margin-inline-start:auto}
html.new-ui[data-tab="profile"] .hdr,html.new-ui[data-tab="profile"] #searchBar,html.new-ui[data-tab="profile"] .qpills{display:none!important}
html.new-ui[data-tab="profile"] #mainContent{padding-top:env(safe-area-inset-top,0px)}

/* the mock's controls are compact; each gets an invisible hit area of at least 44px so it stays easy to tap */
html.new-ui .qp::after,html.new-ui .sbar .cam-btn::after,html.new-ui .sbar .mic-btn::after,html.new-ui .sbar .go-btn::after{content:"";position:absolute;left:0;right:0;top:50%;height:max(100%,44px);transform:translateY(-50%)}
html.new-ui .sbar .cam-btn,html.new-ui .sbar .mic-btn,html.new-ui .sbar .go-btn{position:relative}
html.new-ui .sbar .cam-btn::after,html.new-ui .sbar .mic-btn::after,html.new-ui .sbar .go-btn::after{left:-3px;right:-3px}

/* NEW DESIGN - slim top bar and Search tab (owner, 21 Nov 2026): inner pages show only a title and a search icon; the Search tab shows the
   search card without the banner; the country button is gone from the header (it lives in Profile); Profile has no header or boxes. */
html.new-ui .hdr .cbtn{display:none!important}
.slimbar{display:none}
html.new-ui .slimbar{display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:99;box-sizing:border-box;min-height:calc(48px + env(safe-area-inset-top,0px));padding:env(safe-area-inset-top,0px) 6px 0 16px;background:#366745;color:#fff}
.slim-t{font:700 clamp(16px,4.6vw,19px)/1.2 inherit;font-family:inherit;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.slim-s{position:relative;flex:0 0 auto;width:40px;height:40px;border:0;border-radius:50%;background:rgba(255,255,255,.14);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;margin-inline-end:6px}
.slim-s::after{content:"";position:absolute;inset:-4px}
html.new-ui[data-tab="trending"] .slimbar,html.new-ui[data-tab="search"] .slimbar,html.new-ui[data-tab="profile"] .slimbar{display:none}
html.new-ui[data-tab]:not([data-tab="trending"]):not([data-tab="search"]) .hdr,
html.new-ui[data-tab]:not([data-tab="trending"]):not([data-tab="search"]) #searchBar{display:none!important}
html.new-ui[data-tab="search"] .hdr{display:none!important}
html.new-ui[data-tab="search"] .sbar{margin-top:calc(10px + env(safe-area-inset-top,0px))}
.stab{display:flex;flex-direction:column;align-items:center;gap:8px;padding:56px 24px;text-align:center;color:var(--text2)}
.stab svg{color:var(--green-dark);opacity:.7}.stab b{font-size:17px;color:var(--text)}.stab span{font-size:14px;line-height:1.5}
/* Profile: only the list (no green header, no three boxes) */
.pfpanel>div:first-child,.pfpanel>.dq,.pfpanel>.dquick{display:none!important}
html.new-ui[data-tab="profile"] #mainContent{padding-top:calc(12px + env(safe-area-inset-top,0px))}

/* "Nearest stores" answer of the AI search (owner, 23 Nov 2026): a list of branch cards with the distance, Directions and Offers */
.nst{padding:6px 12px 24px}
.nst-h{padding:10px 4px 8px;font-size:clamp(16px,4.6vw,19px);color:var(--text)}
.nst-msg{padding:28px 12px;text-align:center;color:var(--text2);line-height:1.6;font-size:15px}
.nst-msg>div{margin-top:14px}
.nst-card{background:var(--card);border-radius:16px;box-shadow:0 2px 10px rgba(0,0,0,.08);padding:12px;margin:0 0 10px}
.nst-top{display:flex;align-items:center;gap:10px;min-width:0}
.nst-top img{flex:0 0 auto;width:44px;height:44px;object-fit:contain;border-radius:10px;background:#fff}
.nst-i{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:2px}
.nst-i b{font-size:15px;color:var(--text);overflow-wrap:anywhere}
.nst-i span{font-size:12.5px;color:var(--text2);overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.nst-d{flex:0 0 auto;font-weight:700;font-size:14px;color:var(--green-dark);background:#e7f3ea;border-radius:999px;padding:5px 11px;white-space:nowrap}
html[data-theme="dark"] .nst-d{background:#22382b;color:#9ad7ad}
.nst-act{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.nst-btn{flex:1 1 120px;min-height:44px;display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:0 14px;border:1px solid var(--border);border-radius:12px;background:var(--surface);color:var(--text);font:600 14px/1.2 inherit;font-family:inherit;text-decoration:none;cursor:pointer}
.nst-btn.go{background:var(--green-dark);border-color:var(--green-dark);color:#fff}
