/* Gollachut — red group-buying theme */
:root {
  --red: #e02e24; --red-d: #c21d14; --red-l: #fdeceb; --red-soft: #f2857f;
  --gold: #fff4cf; --gold-d: #8a5a00; --amber: #ffcf3f;
  --green: #18a34a; --green-l: #e7f6ec;
  --bg: #f4f4f4; --card: #fff; --ink: #1a1a1a; --mute: #8a8a8a; --line: #ececec;
  --r: 10px; --tabs: 58px;
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans Bengali", "Hind Siliguri", sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { padding-bottom: calc(var(--tabs) + env(safe-area-inset-bottom)); }
body.no-tabs { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
body.no-tabs .tabs { display: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }
main { max-width: 760px; margin: 0 auto; outline: none; }
.pad { padding: 0 10px; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; gap: 10px; align-items: center; padding: 8px 10px; background: #fff; }
.brand { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 17px; color: var(--red); }
.logo { width: 32px; height: 32px; border-radius: 9px; background: var(--red); color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 700; line-height: 1; }
.search { flex: 1; }
.search { position: relative; }
.search input { width: 100%; border: 0; border-radius: 999px; padding: 9px 40px 9px 14px; background: #f1f1f1; }
.search .cam { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; font-size: 18px; padding: 4px; }
.lang { background: #f1f1f1; color: var(--ink); border: 0; border-radius: 8px; padding: 7px 9px; font-size: 13px; }
.back { border: 0; background: none; font-size: 24px; line-height: 1; padding: 0 4px; color: var(--ink); }

.ticker { max-width: 760px; margin: 0 auto; height: 28px; overflow: hidden; font-size: 12px; color: var(--red-d);
  background: var(--red-l); display: flex; align-items: center; padding: 0 10px; }
.ticker:empty { display: none; }
.ticker span { animation: tick .5s ease; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes tick { from { transform: translateY(100%); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- bottom tabs ---------- */
.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex; background: #fff;
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs a { flex: 1; height: var(--tabs); display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 11px; color: #555; gap: 2px; filter: grayscale(1); opacity: .75; }
.tabs a span { font-size: 21px; }
.tabs a.on { color: var(--red); filter: none; opacity: 1; }
.tabs b { font-weight: 600; }
.cart-ico { position: relative; }
.cart-ico i { position: absolute; top: -4px; right: -10px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--red); color: #fff; font: 700 10px/17px system-ui; font-style: normal; text-align: center; }

/* ---------- home ---------- */
.cat-tabs { display: flex; gap: 18px; overflow-x: auto; padding: 4px 12px 0; background: #fff; scrollbar-width: none; position: sticky; top: 46px; z-index: 15; }
.cat-tabs button { flex: none; border: 0; background: none; font-size: 15px; padding: 6px 0 8px; color: #333; position: relative; }
.cat-tabs button.on { color: var(--red); font-weight: 700; font-size: 16px; }
.cat-tabs button.on::after { content: ''; position: absolute; left: 20%; right: 20%; bottom: 2px; height: 3px; border-radius: 2px; background: var(--red); }
.icon-row { display: grid; grid-template-columns: repeat(5, 1fr); background: #fff; padding: 10px 4px 12px; margin-bottom: 8px; }
.icon-row a { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 12px; color: #333; text-align: center; }
.icon-row .ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: var(--red-l); }
.sortbar { display: flex; background: #fff; border-top: 1px solid var(--line); }
.sortbar button { flex: 1; border: 0; background: none; padding: 10px 0; font-size: 14px; color: #444; }
.sortbar button.on { color: var(--red); font-weight: 700; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--card); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; }
.thumb { aspect-ratio: 1; display: grid; place-items: center; font-size: 60px; position: relative; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; left: 0; top: 0; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 0 0 8px 0; }
.card .body { padding: 6px 8px 9px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.card h3 { font-size: 14px; font-weight: 500; margin: 0; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hot { font-size: 12px; color: var(--red); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price .g, .g { color: var(--red); font-weight: 800; font-size: 18px; }
.price .g small { font-size: 12px; font-weight: 700; }
.price s, s { color: var(--mute); font-size: 12px; font-weight: 400; }
.meta { font-size: 12px; color: var(--mute); }
.tag { display: inline-block; font-size: 11px; border: 1px solid #f5b6b2; color: var(--red); border-radius: 3px; padding: 0 4px; margin-right: 4px; line-height: 17px; }
.tag.green { border-color: #9edbb3; color: var(--green); }
.tag.solid { background: var(--red); color: #fff; border-color: var(--red); }

/* ---------- flash strip ---------- */
.flash { background: #fff; padding: 10px; margin-bottom: 8px; }
.flash-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.flash-head h2 { margin: 0; font-size: 16px; color: var(--red); font-style: italic; font-weight: 900; }
.flash-head .count { color: #fff; background: var(--red); padding: 1px 6px; border-radius: 4px; font-size: 12px; }
.flash-head a { margin-left: auto; color: var(--mute); font-size: 13px; }
.flash-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.fcard { flex: none; width: 104px; }
.fcard .thumb { font-size: 40px; border-radius: 8px; }
.fcard .body { padding: 4px 2px; }
.fcard .g { font-size: 15px; }
.fcard s { margin-left: 3px; }
.claim { height: 14px; border-radius: 7px; background: var(--red-l); overflow: hidden; position: relative; margin-top: 4px; }
.claim i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #ff7a5c, var(--red)); }
.claim span { position: relative; display: block; font-size: 10px; line-height: 14px; text-align: center; color: #7a0f09; font-weight: 700; }

/* ---------- product page ---------- */
.gallery { position: relative; background: #fff; }
.gallery .thumb { aspect-ratio: 1; font-size: 130px; }
.gallery .pager { position: absolute; right: 12px; bottom: 12px; background: rgba(0,0,0,.35); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 10px; }
.price-band { display: flex; background: linear-gradient(90deg, #ff4b2b, var(--red)); color: #fff; }
.price-band .l { flex: 1; padding: 8px 12px; }
.price-band .big { font-size: 30px; font-weight: 800; line-height: 1.1; }
.price-band .big small { font-size: 15px; }
.price-band .r { background: var(--amber); color: var(--red-d); width: 112px; display: flex; flex-direction: column; justify-content: center; align-items: center; font-weight: 700; font-size: 13px; clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%); }
.price-band .r .count { color: var(--red-d); }
.price-row { background: #fff; padding: 10px 12px 4px; display: flex; align-items: baseline; gap: 8px; }
.price-row .big { color: var(--red); font-size: 28px; font-weight: 800; }
.price-row .right { margin-left: auto; color: var(--mute); font-size: 13px; }
.sec { background: #fff; padding: 10px 12px; margin-bottom: 8px; }
.sec h1 { font-size: 16px; font-weight: 600; line-height: 1.45; margin: 6px 0; }
.tags-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tags-row span { font-size: 12px; color: #6d4b1f; background: #fff7e8; border: 1px solid #f4dfb8; padding: 2px 6px; border-radius: 4px; }
.promise { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--green); }
.deliv { background: var(--green-l); color: var(--green); font-size: 13px; font-weight: 600; padding: 7px 10px; border-radius: 6px; margin-top: 8px; }

.grp-head { display: flex; align-items: center; padding: 4px 0 6px; font-size: 15px; }
.grp-head b { color: var(--red); }
.grp-head a, .grp-head button { margin-left: auto; color: var(--mute); font-size: 13px; border: 0; background: none; }
.grp { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.stack { display: flex; flex: none; }
.stack .avatar { margin-left: -10px; border: 2px solid #fff; }
.stack .avatar:first-child { margin-left: 0; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; flex: none; color: #fff; font-size: 14px; }
.avatar.empty { background: #fff !important; border: 2px dashed #ccc; color: #bbb; }
.grp .who { flex: 1; min-width: 0; }
.grp .who b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grp .left { text-align: right; font-size: 12px; color: var(--red); line-height: 1.35; }
.grp .left .count { font-size: 13px; color: #333; font-weight: 500; }
.join { border: 0; background: var(--red); color: #fff; font-weight: 700; border-radius: 6px; padding: 9px 12px; position: relative; white-space: nowrap; }
.join em { position: absolute; top: -10px; right: -4px; background: var(--amber); color: var(--red-d); font-style: normal; font-size: 10px; padding: 0 5px; border-radius: 6px 6px 6px 0; line-height: 16px; }

.buybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; background: #fff; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom); max-width: 760px; margin: 0 auto; height: calc(58px + env(safe-area-inset-bottom)); }
.buybar .icons { display: flex; }
.buybar .icons a, .buybar .icons button { width: 44px; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; color: #555; gap: 1px; position: relative; }
.buybar .icons span { font-size: 20px; }
.buybar .icons .on { color: var(--red); }
.buybar .act { flex: 1; border: 0; color: #fff; display: flex; flex-direction: column; justify-content: center; align-items: center; line-height: 1.2; font-size: 15px; font-weight: 700; }
.buybar .act small { font-size: 13px; font-weight: 600; }
.buybar .act.solo { background: var(--red-soft); }
.buybar .act.grp { background: var(--red); flex: 1.25; }

/* ---------- sheets / popups ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; }
.sheet > div { background: #fff; width: 100%; max-width: 560px; max-height: 88vh; overflow: auto; border-radius: 14px 14px 0 0;
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); animation: up .2s ease; position: relative; }
.sheet.center { align-items: center; padding: 20px; }
.sheet.center > div { border-radius: 14px; max-height: 70vh; padding-top: 6px; }
@keyframes up { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet h2 { margin: 6px 0; font-size: 17px; text-align: center; }
.x { position: absolute; right: 10px; top: 8px; border: 0; background: none; font-size: 26px; line-height: 1; color: #aaa; z-index: 2; }
.sku-top { display: flex; gap: 12px; align-items: flex-end; margin-top: -40px; margin-bottom: 8px; }
.sku-top .thumb { width: 110px; height: 110px; border-radius: 8px; font-size: 54px; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.12); flex: none; }
.sku-top .g { font-size: 22px; }
.sku-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); }
.sku-opts { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 0 12px; }
.sku-opts button { border: 0; background: #f3f3f3; border-radius: 6px; padding: 8px 14px; font-size: 14px; }
.sku-opts button.on { background: var(--red-l); color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.sku-opts button:disabled { color: #c8c8c8; background: #f7f7f7; cursor: default; }
.nudge { display: flex; align-items: center; gap: 10px; background: var(--gold); margin: 8px -14px 0; padding: 10px 14px; font-size: 14px; }
.nudge b { color: var(--red); }
.nudge button { margin-left: auto; border: 0; background: var(--red); color: #fff; border-radius: 6px; padding: 7px 14px; font-weight: 700; }
.confirm { display: block; width: calc(100% + 28px); margin: 0 -14px calc(-14px - env(safe-area-inset-bottom)); border: 0; background: var(--red); color: #fff;
  font-size: 17px; font-weight: 700; padding: 15px 0 calc(15px + env(safe-area-inset-bottom)); }
.confirm:disabled { opacity: .5; }

/* ---------- checkout page ---------- */
.addr { display: flex; align-items: center; gap: 10px; background: #fff; padding: 12px; }
.addr .pin { font-size: 22px; color: var(--mute); }
.addr .grow b { font-size: 17px; margin-right: 8px; }
.addr .empty { color: var(--red); font-weight: 600; }
.addr .chev { color: #bbb; font-size: 22px; }
.co-line { display: flex; gap: 10px; padding: 10px 0; }
.co-line .thumb { width: 84px; height: 84px; border-radius: 6px; font-size: 40px; flex: none; }
.co-line .grow { min-width: 0; }
.co-line .t { font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kv { display: flex; align-items: center; justify-content: space-between; background: #fff; padding: 14px 12px; font-size: 15px; border-top: 1px solid var(--line); }
.kv .red { color: var(--red); }
.pm { display: flex; align-items: center; gap: 12px; padding: 14px 12px; background: #fff; border-top: 1px solid var(--line); cursor: pointer; }
.pm .logo-pm { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px; flex: none; }
.pm .grow small { color: var(--mute); margin-left: 4px; }
.pm .tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #ccc; flex: none; }
.pm.on .tick { border-color: var(--red); background: var(--red); box-shadow: inset 0 0 0 4px #fff; }
.paybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; background: #fff; border-top: 1px solid var(--line);
  max-width: 760px; margin: 0 auto; padding-bottom: env(safe-area-inset-bottom); }
.paybar .sum { flex: 1; text-align: right; padding: 8px 14px; font-size: 14px; line-height: 1.3; }
.paybar .sum b { color: var(--red); font-size: 24px; }
.paybar .sum div { color: var(--red); font-size: 13px; }
.paybar button { border: 0; background: var(--red); color: #fff; font-size: 18px; font-weight: 700; width: 42%; }
.paybar button:disabled { opacity: .55; }
.trust { text-align: center; font-size: 12px; color: var(--mute); padding: 16px; }

/* ---------- generic ---------- */
.btn { border: 0; border-radius: 8px; padding: 11px 14px; font-weight: 700; background: var(--red); color: #fff; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.acc { background: var(--red); }
.btn.ghost { background: #fff; color: var(--red); border: 1px solid var(--red); }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 6px; }
.btn.block { width: 100%; }
.row { display: flex; gap: 10px; align-items: center; }
.row > .grow, .grow { flex: 1; }
.panel { background: #fff; border-radius: var(--r); padding: 12px; margin: 8px 10px; }
.panel h2 { font-size: 16px; margin: 0 0 10px; }
.count { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.mute { color: var(--mute); font-size: 13px; }
.ok { color: var(--green); } .err { color: var(--red); } .warn { color: var(--gold-d); }
.slots { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 14px 0; }
.slots .avatar { width: 54px; height: 54px; font-size: 19px; }
.lead-tag { font-size: 10px; display: block; text-align: center; color: #fff; background: var(--red); border-radius: 8px; margin-top: -8px; position: relative; padding: 0 4px; }
.progress { height: 12px; background: var(--red-l); border-radius: 99px; overflow: hidden; margin: 10px 0; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, #ff7a5c, var(--red)); transition: width .6s; }
.order { display: flex; gap: 10px; }
.order .thumb { width: 72px; height: 72px; border-radius: 8px; font-size: 32px; flex: none; }
.status { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 4px; background: var(--green-l); color: var(--green); }
.status.pending_payment, .status.pending_group { background: var(--red-l); color: var(--red); }
.status.cancelled { background: #eee; color: #777; }
label { display: block; font-size: 13px; color: var(--mute); margin: 10px 0 4px; }
.field { width: 100%; padding: 11px 12px; border: 1px solid #ddd; border-radius: 8px; background: #fff; }
.toast { position: fixed; left: 50%; top: 45%; transform: translate(-50%, -50%); z-index: 60; background: rgba(0,0,0,.78); color: #fff;
  padding: 12px 18px; border-radius: 10px; font-size: 14px; max-width: 80vw; text-align: center; }
.toast.error { background: rgba(160,20,12,.92); }
.coins { font-size: 30px; font-weight: 800; color: var(--red); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 10px 0; }
.week div { background: var(--bg); border-radius: 8px; padding: 6px 0; text-align: center; font-size: 12px; }
.week div.done { background: var(--red-l); color: var(--red); font-weight: 700; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
td, th { text-align: left; padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: top; }
th { color: var(--mute); font-weight: 600; font-size: 12px; }
.empty-state { text-align: center; padding: 50px 10px; color: var(--mute); }
.empty-state div { font-size: 48px; }
.paybox { max-width: 420px; margin: 20px auto; text-align: center; }
.paybox .amt { font-size: 32px; font-weight: 800; margin: 10px 0; }
.sandbox { background: var(--gold); color: var(--gold-d); padding: 8px; border-radius: 8px; font-size: 13px; }
.hero { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 10px; }
.hero div { background: #fff; border-radius: var(--r); padding: 10px; text-align: center; font-size: 12px; color: var(--mute); }
.hero b { display: block; font-size: 15px; color: var(--ink); margin-bottom: 2px; }
.pay-opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pay-opts label { margin: 0; border: 2px solid var(--line); border-radius: 8px; padding: 10px 6px; text-align: center; color: var(--ink); font-weight: 600; cursor: pointer; }
.pay-opts input { display: none; }
.pay-opts label:has(input:checked) { border-color: var(--red); background: var(--red-l); color: var(--red); }

/* chat */
.chat-head { position: sticky; top: 46px; z-index: 10; display: flex; align-items: center; justify-content: space-between; background: #fff; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.chat { padding: 10px 10px 140px; display: flex; flex-direction: column; gap: 10px; min-height: 60vh; }
.msg { display: flex; flex-direction: column; max-width: 82%; }
.msg.me { align-self: flex-end; align-items: flex-end; }
.msg .bubble { background: #fff; border-radius: 4px 14px 14px 14px; padding: 9px 12px; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.msg.me .bubble { background: #ffe3e1; border-radius: 14px 4px 14px 14px; }
.msg .time { font-size: 11px; color: var(--mute); margin: 2px 4px; }
.botnote { font-size: 11px; color: var(--mute); border-top: 1px solid var(--line); margin-top: 6px; padding-top: 4px; }
.quick { display: flex; flex-direction: column; margin: 6px -12px 0; border-top: 1px solid var(--line); }
.quick button { border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; padding: 9px 12px; color: #2563eb; font-size: 15px; }
.mcard { display: flex; gap: 10px; align-items: center; min-width: 200px; }
.mcard .thumb { width: 56px; height: 56px; border-radius: 6px; font-size: 26px; flex: none; }
.mcard .t { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.offer { position: fixed; right: 10px; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 25; display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 12px; padding: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.15); max-width: 300px; }
.offer .thumb { width: 48px; height: 48px; border-radius: 6px; font-size: 24px; flex: none; }
.chat-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; gap: 8px; background: #f7f7f7; border-top: 1px solid var(--line);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); max-width: 760px; margin: 0 auto; }
.chat-bar .field { border-radius: 20px; }
.unread { display: inline-block; min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.tabs a span[data-dot="1"] { position: relative; }
.tabs a span[data-dot="1"]::after { content: ''; position: absolute; top: 0; right: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }

/* order hub + detail */
.me-head { display: flex; align-items: center; gap: 12px; background: linear-gradient(120deg, #ff5a3c, var(--red)); color: #fff; padding: 18px 14px; }
.me-stat { color: #fff; text-align: center; display: flex; flex-direction: column; font-size: 12px; }
.me-stat b { font-size: 16px; }
.hub { display: grid; grid-template-columns: repeat(6, 1fr); text-align: center; }
.hub a { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: #444; }
.hub .ic { font-size: 22px; position: relative; }
.hub .ic i { position: absolute; top: -6px; right: -12px; background: var(--red); color: #fff; font: 700 10px/16px system-ui; font-style: normal; min-width: 16px; padding: 0 4px; border-radius: 8px; }
.order-hero { background: linear-gradient(120deg, #ff5a3c, var(--red)); color: #fff; padding: 16px 14px; }
.order-hero b { font-size: 18px; display: block; margin-bottom: 4px; }
.order-hero .count { color: #fff; }
.timeline { position: relative; padding-left: 4px; }
.tl { display: flex; gap: 10px; padding: 6px 0; position: relative; }
.tl > span { width: 26px; height: 26px; border-radius: 50%; background: var(--red-l); display: grid; place-items: center; font-size: 13px; flex: none; z-index: 1; }
.tl:not(:last-child)::before { content: ''; position: absolute; left: 12px; top: 30px; bottom: -6px; width: 2px; background: var(--line); }
.tl:last-child > span { background: var(--red); color: #fff; }
.sum-row { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.sku-opts .low { color: var(--red); font-size: 11px; margin-left: 4px; }

/* seller desk */
.desk-row { margin: 6px 10px; }
.earn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 10px; }
.hero-card { background: #fff; border-radius: var(--r); padding: 12px; }
.hero-card b { font-size: 20px; display: block; margin: 2px 0; }

/* reviews */
.stars { color: #f59e0b; letter-spacing: 1px; }
.stars i { color: #ddd; font-style: normal; }
.review { padding: 10px 0; border-top: 1px solid var(--line); }
.review:first-of-type { border-top: 0; }
.reply { background: #f6f6f6; border-radius: 6px; padding: 7px 9px; font-size: 13px; color: #555; margin-top: 4px; }

/* shop page */
.shop-head { background: #fff; padding: 12px; }
.shop-head .row { align-items: flex-start; }
.shop-logo { width: 60px; height: 60px; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; font-size: 28px; font-weight: 800; color: var(--red); background: var(--red-l); }
.shop-head h1 { margin: 0 0 4px; font-size: 19px; }
.qual { display: flex; justify-content: space-between; background: #f6f6f6; border-radius: 6px; padding: 9px 10px; margin-top: 10px; font-size: 13px; }
.qual b { font-weight: 700; }

/* cart */
.shop-h { font-size: 14px; font-weight: 700; margin: 0 0 6px; }
.cline { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.cline:first-of-type { border-top: 0; }
.cline .thumb { width: 72px; height: 72px; border-radius: 8px; font-size: 30px; flex: none; }
.stepper { display: inline-flex; align-items: center; gap: 3px; }
.stepper button { border: 0; background: #f1f1f1; width: 34px; height: 30px; font-size: 18px; color: #333; border-radius: 3px; }
.stepper button:disabled { color: #ccc; }
.stepper span { min-width: 34px; text-align: center; font-weight: 600; font-size: 16px; }
.linkbtn { border: 0; background: none; color: var(--mute); font-size: 13px; padding: 4px; }
.cartbar { position: sticky; bottom: calc(var(--tabs) + env(safe-area-inset-bottom)); background: #fff; padding: 8px 12px; display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); }
.flist .order { align-items: center; }

/* Address form: area list, chosen area, suggestion, map pin */
.arealist { max-height: 210px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; -webkit-overflow-scrolling: touch; }
.arearow { display: flex; justify-content: space-between; gap: 10px; padding: 12px; border-top: 1px solid var(--line); cursor: pointer; }
.arearow:first-child { border-top: 0; }
.arearow:active, .arearow:hover { background: #fff3f2; }
.areapicked { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 12px; border: 1.5px solid var(--red); border-radius: 8px; background: #fff5f4; }
.areasug { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; padding: 9px 12px; border-radius: 8px; background: #fff7e6; color: #8a5a00; font-size: 14px; }
button.link { background: none; border: 0; padding: 0; color: var(--red); font: inherit; font-weight: 600; cursor: pointer; }
.geo { display: flex; gap: 8px; flex-wrap: wrap; }
.geo .ghost { flex: 1; min-width: 140px; }
.geoinfo { font-size: 13px; margin: 6px 0; }
.pinmap { height: 240px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); margin-top: 4px; }
a.maplink { white-space: nowrap; color: var(--red); font-weight: 600; text-decoration: none; margin-left: 4px; }

/* Options: colour dot; "dim" = in stock only with other picks (tap switches) */
.sku-opts button .sw, i.sw { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid #0002; margin-right: 6px; vertical-align: -1px; }
.sku-opts button.dim { opacity: .55; border-style: dashed; }

/* Product photos: swipe through all of them */
.gallery .slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery .slides::-webkit-scrollbar { display: none; }
.gallery .slides .thumb { flex: 0 0 100%; scroll-snap-align: center; }

/* Address label quick choices */
.lblchips { display: flex; gap: 8px; margin-bottom: 6px; }
.lblchips button { flex: 1; padding: 9px 6px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; cursor: pointer; }
.lblchips button.on { border-color: var(--red); color: var(--red); background: #fff5f4; font-weight: 700; }

/* ---------- admin panel ---------- */
.admin { max-width: 1200px; margin: 0 auto; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; background: #1f2937; color: #fff; }
.admin-head .mute { color: #cbd5e1; }
.admin-tabs { top: 46px; background: #fff; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.kpi { background: #f8f8f8; border-radius: 10px; padding: 10px 12px; }
.kpi b { display: block; font-size: 20px; margin: 2px 0; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: 6px; }
.bars > div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.bars i { display: block; width: 100%; background: var(--red); border-radius: 3px 3px 0 0; opacity: .85; }
.bars span { font-size: 10px; color: #888; margin-top: 2px; }
.problem { border-top: 1px solid var(--line); padding: 10px 0; }
.problem:first-of-type { border-top: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters .field { width: auto; flex: 1; min-width: 140px; margin: 0; }
.tablewrap { overflow-x: auto; }
.admin table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin th { text-align: left; color: #666; font-weight: 600; border-bottom: 1px solid var(--line); padding: 8px 6px; white-space: nowrap; }
.admin td { border-bottom: 1px solid var(--line); padding: 8px 6px; vertical-align: top; }
.admin tr.click { cursor: pointer; }
.admin tr.click:hover { background: #fff7f6; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 10px; }
.warnbox { margin: 8px 0; padding: 9px 12px; border-radius: 8px; background: #fdecea; color: #a1281e; }

/* ---------- picture search: full-screen camera (Daraz-style) ---------- */
#camview { position: fixed; inset: 0; z-index: 1000; background: #000; color: #fff; display: flex; flex-direction: column; }
#camview .cam-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; font-weight: 700; }
#camview .cam-x { background: rgba(255,255,255,.15); border: 0; color: #fff; width: 38px; height: 38px; border-radius: 50%; font-size: 18px; cursor: pointer; }
#camview .cam-stage { position: relative; flex: 1; overflow: hidden; display: grid; place-items: center; }
#camview video { width: 100%; height: 100%; object-fit: cover; }
#camview .cam-frame { position: absolute; inset: 14% 12%; border: 2px solid rgba(255,255,255,.75); border-radius: 18px; box-shadow: 0 0 0 9999px rgba(0,0,0,.25); pointer-events: none; }
#camview .cam-hint { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; font-weight: 600; text-shadow: 0 1px 3px #000; }
#camview .cam-nocam { position: absolute; inset: 0; display: grid; place-content: center; gap: 10px; text-align: center; padding: 30px; background: #111; }
#camview .cam-stage.flash::after { content: ''; position: absolute; inset: 0; background: #fff; animation: camflash .35s ease-out forwards; }
@keyframes camflash { from { opacity: .9 } to { opacity: 0 } }
#camview .cam-bar { display: flex; justify-content: space-around; align-items: center; padding: 14px 10px; background: #000; }
#camview .cam-shutter { width: 74px; height: 74px; border-radius: 50%; border: 5px solid #fff; background: var(--red); cursor: pointer; box-shadow: 0 0 0 3px rgba(224,46,36,.5); }
#camview .cam-shutter:disabled { opacity: .35; }
#camview .cam-side { background: none; border: 0; color: #fff; font-size: 26px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; min-width: 64px; }
#camview .cam-side small { font-size: 12px; }
#camview .cam-side:disabled { opacity: .35; }
#camview .cam-hist { background: #fff; color: var(--ink); padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); border-radius: 16px 16px 0 0; }
#camview .cam-hist-h { display: flex; justify-content: space-between; align-items: center; }
#camview .cam-hist-row { display: flex; gap: 10px; overflow-x: auto; padding: 8px 0 2px; }
#camview .cam-h { flex: 0 0 76px; background: none; border: 0; padding: 0; text-align: center; font-size: 11px; color: var(--ink); cursor: pointer; }
#camview .cam-h img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; display: block; margin-bottom: 3px; }
#camview .cam-h span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* results */
.photo-head { display: flex; gap: 12px; align-items: center; padding: 12px; background: #fff; }
.photo-head img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; }
.photo-head .attrs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.photo-head .attrs span { background: #f3f3f3; border-radius: 12px; padding: 2px 9px; font-size: 13px; }
.scanbar { height: 4px; margin-top: 8px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--red), transparent); background-size: 200% 100%; animation: scan 1.1s linear infinite; }
@keyframes scan { from { background-position: 200% 0 } to { background-position: -200% 0 } }
.chips-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 6px 12px; background: #fff; }
.chip.alt { background: #fff7e6; border-color: #f3d38a; }
.pm-card .why { font-size: 12px; color: #2e9d57; padding: 3px 6px 6px; }
.card.skel { min-height: 220px; background: linear-gradient(90deg, #f2f2f2, #fafafa, #f2f2f2); background-size: 200% 100%; animation: scan 1.2s linear infinite; border-radius: 10px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 5px 11px; font: inherit; font-size: 13px; cursor: pointer; }
.chip:hover { border-color: var(--red); color: var(--red); }
#camsearch svg { width: 22px; height: 22px; display: block; }
