/* ---------- tokens ---------- */
:root {
  --brand: #1F9D55;
  --brand-strong: #17803F;
  --brand-soft: #E7F6EE;
  --ink: #172033;
  --ink-2: #5F6B7A;
  --ink-3: #8A94A6;
  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --surface-2: #F1F3F6;
  --line: #E6E9EF;
  --warn: #B45309;
  --warn-soft: #FEF3C7;
  --danger: #C2410C;
  --shadow: 0 1px 2px rgba(23, 32, 51, .06), 0 8px 24px rgba(23, 32, 51, .06);
  --radius: 18px;
  --radius-sm: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #34C26F; --brand-strong: #4ADE80; --brand-soft: #12301F;
    --ink: #EEF1F6; --ink-2: #AAB3C2; --ink-3: #7C8698;
    --bg: #0E131B; --surface: #161D28; --surface-2: #1E2734; --line: #273142;
    --warn: #FBBF24; --warn-soft: #3A2C0B; --danger: #FB923C;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #34C26F; --brand-strong: #4ADE80; --brand-soft: #12301F;
  --ink: #EEF1F6; --ink-2: #AAB3C2; --ink-3: #7C8698;
  --bg: #0E131B; --surface: #161D28; --surface-2: #1E2734; --line: #273142;
  --warn: #FBBF24; --warn-soft: #3A2C0B; --danger: #FB923C;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
html[lang="bn"] body, html[lang="hi"] body { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
h1, h2, h3, p { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.ico { flex: none; }
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }
.rot { transform: rotate(180deg); }
[dir="rtl"] .rot { transform: none; }
.muted { color: var(--ink-2); font-size: 13px; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.app { max-width: 640px; margin: 0 auto; min-height: 100dvh; }
.page { padding: 0 16px calc(140px + env(safe-area-inset-bottom)); }
.page-title { font-size: 22px; font-weight: 800; text-align: center; margin: 20px 0 6px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 10px 16px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
}
.topbar-start, .topbar-end { display: flex; align-items: center; gap: 8px; }
.brand-logo { width: 40px; height: 40px; border-radius: 12px; background: #fff; object-fit: contain; }
.brand-logo.lg { width: 88px; height: 88px; border-radius: 24px; margin: 0 auto 16px; box-shadow: var(--shadow); }
.icon-btn, .pill-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px;
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px; color: var(--ink);
}
.icon-btn { width: 40px; }
.pill-btn { padding: 0 14px; font-size: 13px; font-weight: 600; }

/* ---------- chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.chip-ok { background: var(--brand-soft); color: var(--brand-strong); }
.chip-soft { background: var(--surface-2); color: var(--ink-2); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }

/* ---------- hero ---------- */
.hero { margin: 4px 0 16px; border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.hero-cover {
  height: 150px; background: linear-gradient(135deg, var(--brand) 0%, #0F6B3A 100%) center / cover no-repeat;
  position: relative;
}
.hero-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .35), transparent 60%); }
.hero-compact .hero-cover { height: 96px; }
.hero-body { display: flex; align-items: flex-end; gap: 14px; padding: 0 16px 16px; margin-top: -36px; position: relative; }
.hero-logo {
  width: 76px; height: 76px; border-radius: 20px; background: var(--surface); border: 3px solid var(--surface);
  box-shadow: var(--shadow); display: grid; place-items: center; overflow: hidden; color: var(--brand); flex: none;
}
.hero-logo img { width: 100%; height: 100%; object-fit: cover; }
.hero-text { min-width: 0; padding-top: 44px; }
.hero-text h1 { font-size: 21px; font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card-title { font-size: 15px; font-weight: 800; margin-bottom: 12px; }
.incentives { display: grid; gap: 12px; margin-bottom: 16px; background: linear-gradient(180deg, var(--brand-soft), var(--surface)); border-color: transparent; }
.incentives .card-title { margin-bottom: 0; }
.incentive { display: flex; align-items: center; gap: 12px; }
.incentive-ico { width: 44px; height: 44px; border-radius: 14px; background: var(--brand); color: #fff; display: grid; place-items: center; flex: none; }
.incentive-value { font-size: 20px; font-weight: 800; line-height: 1.2; }
.incentive-value small { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.note { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--warn); background: var(--warn-soft); padding: 10px 12px; border-radius: var(--radius-sm); margin-bottom: 16px; }

/* ---------- choices ---------- */
.choices { display: grid; gap: 12px; margin-top: 16px; }
.choice {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; text-align: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .12s, border-color .12s;
}
.choice:active { transform: scale(.985); }
.choice:hover:not(:disabled) { border-color: var(--brand); }
.choice:disabled { opacity: .6; cursor: default; }
.choice-primary { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.choice-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-strong); flex: none; }
.choice-text { display: grid; flex: 1; min-width: 0; }
.choice-text strong { font-size: 16px; font-weight: 800; }
.choice-text small { color: var(--ink-2); font-size: 13px; }

/* ---------- marketer pick ---------- */
.pick-list { display: grid; gap: 10px; margin: 18px 0; }
.pick {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: start;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
}
.pick-on { border-color: var(--brand); background: var(--brand-soft); }
.pick-avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--brand-strong); font-weight: 800; flex: none; }
.pick-text { display: grid; flex: 1; min-width: 0; }
.pick-text strong { font-weight: 700; overflow-wrap: anywhere; }
.pick-text small { color: var(--ink-2); font-size: 12px; }
.pick-radio { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; }
.pick-on .pick-radio { background: var(--brand); border-color: var(--brand); color: #fff; }
.error-text { display: flex; gap: 6px; align-items: center; color: var(--danger); font-size: 13px; font-weight: 600; }

/* ---------- menu ---------- */
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--ink); margin-bottom: 12px; }
.banner .ico { color: var(--warn); margin-top: 2px; }
.banner p { font-size: 13px; color: var(--ink-2); }
.banner-ok { background: var(--brand-soft); }
.banner-ok .ico { color: var(--brand-strong); }
.menu-tools { position: sticky; top: 60px; z-index: 20; background: var(--bg); padding: 8px 0 6px; margin: 0 -16px; padding-inline: 16px; }
.search { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; color: var(--ink-3); }
.search input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); min-width: 0; }
.search:focus-within { border-color: var(--brand); }
.cats { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 10px 0 2px; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: none; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.cat-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.cat-section { scroll-margin-top: 150px; margin-top: 18px; }
.cat-title { font-size: 18px; font-weight: 800; margin-bottom: 10px; display: flex; align-items: baseline; gap: 8px; }
.items { display: grid; gap: 10px; }
.item { display: flex; gap: 12px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.item-text h3 { font-size: 15px; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
.item-desc { font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); }
.tag-green { background: var(--brand-soft); color: var(--brand-strong); }
.price { margin-top: auto; display: flex; align-items: baseline; gap: 8px; }
.price strong { font-size: 16px; font-weight: 800; color: var(--brand-strong); }
.price small { font-size: 11px; }
.price s { color: var(--ink-3); font-size: 13px; }
.item-img { width: 104px; height: 104px; border-radius: 14px; overflow: hidden; flex: none; background: var(--surface-2); }
.item-img img { width: 100%; height: 100%; object-fit: cover; }
.img-ph { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--surface-2), var(--line)); }
.empty { display: grid; justify-items: center; gap: 8px; padding: 40px 0; color: var(--ink-3); }

/* ---------- staff ---------- */
.lang-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 16px 0; }
.lang { padding: 12px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; }
.lang-on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-strong); }
.steps { list-style: none; padding: 0; margin: 8px 0 16px; display: grid; gap: 10px; }
.steps li { display: flex; gap: 12px; align-items: center; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); font-weight: 600; }
.step-n { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.earn { display: flex; gap: 10px; align-items: center; background: var(--brand-soft); border-color: transparent; font-weight: 700; }
.earn .ico { color: var(--brand-strong); }

/* ---------- buttons / sticky CTA ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 18px; border-radius: 14px; font-weight: 800; border: 1px solid transparent; text-align: center; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-strong); }
.btn-primary:disabled { opacity: .6; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-block { width: 100%; }
.sticky-cta {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 40; max-width: 640px; margin: 0 auto;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.cta-hint { font-size: 12px; color: var(--ink-2); text-align: center; margin-bottom: 8px; }
.cta-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.cta-row .btn { font-size: 14px; padding: 0 10px; }
@media (max-width: 380px) { .cta-row { grid-template-columns: 1fr; } }
.foot { text-align: center; color: var(--ink-3); font-size: 12px; padding: 28px 0 8px; }

/* ---------- loading / error ---------- */
.center-page { min-height: 100dvh; display: grid; align-content: center; justify-items: center; gap: 10px; text-align: center; padding-bottom: 0; }
.center-page h1 { font-size: 20px; font-weight: 800; }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius); }
.hero-sk { height: 220px; margin: 16px 0; }
.line { height: 18px; margin: 10px 0; border-radius: 8px; }
.line.short { width: 60%; }
.card-sk { height: 90px; margin: 12px 0; }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } .choice { transition: none; } }

/* ---------- 3D menu: choice + showcase grid ---------- */
.choice-3d { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.choice-ico-3d { background: linear-gradient(135deg, var(--brand), #0F6B3A); color: #fff; }
.item[data-act="view"] { cursor: pointer; transition: transform .15s, box-shadow .15s; }
.item[data-act="view"]:active { transform: scale(.985); }
.item-img { position: relative; }
.item-3d { position: absolute; inset-inline-end: 6px; bottom: 6px; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: rgba(0, 0, 0, .5); color: #fff; backdrop-filter: blur(6px); }
.shows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 560px) { .shows { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.show {
  display: flex; flex-direction: column; padding: 0; text-align: start; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .18s cubic-bezier(.2, .8, .2, 1);
}
.show:active { transform: perspective(600px) rotateX(6deg) scale(.97); }
.show-img { position: relative; display: block; aspect-ratio: 1; background: var(--surface-2); overflow: hidden; }
.show-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.show:hover .show-img img { transform: scale(1.06); }
.show-badge { position: absolute; top: 8px; inset-inline-start: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; background: rgba(0, 0, 0, .55); color: #fff; backdrop-filter: blur(6px); }
.show-body { display: grid; gap: 4px; padding: 10px 12px 12px; }
.show-name { font-size: 14px; font-weight: 700; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- 3D viewer ---------- */
body.no-scroll { overflow: hidden; }
.v3d {
  --v-ink: #fff; --v-ink-2: rgba(255, 255, 255, .72);
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; overflow: hidden;
  background: #070A0F; color: var(--v-ink); animation: v3d-in .22s ease-out;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.v3d-out { animation: v3d-out .18s ease-in forwards; }
@keyframes v3d-in { from { opacity: 0; transform: scale(1.03); } }
@keyframes v3d-out { to { opacity: 0; transform: scale(1.02); } }
.v3d-bg { position: absolute; inset: -10%; background: radial-gradient(circle at 50% 35%, #1F9D55 0, #070A0F 70%) center / cover no-repeat; filter: blur(48px) saturate(1.5) brightness(.55); will-change: transform; }
.v3d-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, transparent 0, rgba(7, 10, 15, .55) 55%, #070A0F 100%); }
.v3d-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top)) 16px 0; }
.v3d-btn { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .18); color: #fff; backdrop-filter: blur(10px); }
.v3d-btn-ph { width: 40px; }
.v3d-on { background: var(--brand); border-color: var(--brand); }
.v3d-count { font-size: 13px; font-weight: 700; color: var(--v-ink-2); }
.v3d-stage { position: relative; z-index: 1; flex: 1; min-height: 0; display: grid; place-items: center; perspective: 900px; cursor: grab; }
.v3d-grab .v3d-stage { cursor: grabbing; }
.v3d-obj { width: min(74vw, 46vh, 360px); aspect-ratio: 1; transform-style: preserve-3d; }
.v3d-card {
  position: relative; display: block; width: 100%; height: 100%; border-radius: 28px; overflow: hidden;
  transform-style: preserve-3d; will-change: transform; background: #111;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .08) inset;
}
.v3d-img { display: block; width: 100%; height: 100%; object-fit: cover; will-change: transform; pointer-events: none; }
.v3d-glare {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light; opacity: .3;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .95) 0, rgba(255, 255, 255, .25) 22%, transparent 55%);
}
.v3d-rim { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -18px 40px rgba(0, 0, 0, .35); }
.v3d-shadow { position: absolute; bottom: 7%; width: min(60vw, 36vh, 290px); height: 28px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .75), transparent); filter: blur(6px); z-index: -1; will-change: transform; }
.v3d-model { width: 100%; height: 100%; --poster-color: transparent; background: transparent; }
.v3d-hint { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--v-ink-2); margin-bottom: 8px; transition: opacity .4s; }
.v3d-hint-off { opacity: 0; }
.v3d-info {
  position: relative; z-index: 2; display: grid; gap: 8px; padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
  background: var(--surface); color: var(--ink); border-radius: 26px 26px 0 0; max-width: 640px; width: 100%; margin: 0 auto;
  max-height: 44vh; overflow-y: auto; touch-action: pan-y; user-select: text; -webkit-user-select: text;
}
.v3d-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.v3d-title h2 { font-size: 19px; font-weight: 800; line-height: 1.4; overflow-wrap: anywhere; }
.v3d-title .price { margin: 0; flex: none; flex-direction: column; align-items: flex-end; gap: 0; }
.v3d-title .price strong { font-size: 19px; }
.v3d-desc { font-size: 14px; color: var(--ink-2); }
.v3d-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.v3d-nav .btn { min-height: 44px; font-size: 14px; }
.v3d-nav .btn:disabled { opacity: .4; }
@media (prefers-reduced-motion: reduce) { .v3d, .v3d-out { animation: none; } .show, .show-img img { transition: none; } }

/* ---------- 3D viewer: floating product (background removed) ---------- */
.v3d-float { background: transparent; box-shadow: none; border-radius: 0; overflow: visible; display: grid; place-items: center; animation: v3d-pop .35s cubic-bezier(.2, .9, .3, 1.2); }
.v3d-cut { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 26px 22px rgba(0, 0, 0, .55)) drop-shadow(0 4px 6px rgba(0, 0, 0, .35)) saturate(1.08) contrast(1.04); }
.v3d-float .v3d-glare { -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; mix-blend-mode: overlay; }
.v3d-floating .v3d-obj { width: min(86vw, 52vh, 420px); }
.v3d-floating .v3d-shadow { width: min(56vw, 32vh, 260px); }
@keyframes v3d-pop { from { opacity: 0; transform: scale(.9); } }
@media (prefers-reduced-motion: reduce) { .v3d-float { animation: none; } }
