/* ===== GO+MART — ລະບົບດີໄຊນ໌ດຽວກັບ "ລະບົບສະຕັອກ" ===== */

:root{
  /* ແຖບຂ້າງສີຂຽວ */
  --side:#116b49; --side-2:#0d5a3d; --side-3:#0a4a33;
  --side-ink:#ecf6f1; --side-dim:#9ecbb7;
  /* ສີຫຼັກ */
  --brand:#1f6f54; --brand-d:#15543f; --brand-l:#2a8a69; --brand-tint:#e8f3ee;
  --gold:#f5c518; --gold-tint:#fdf6da; --gold-ink:#8a6b05;
  /* ພື້ນ ແລະ ເສັ້ນ */
  --bg:#f5f8f7; --surface:#ffffff; --surface-2:#f2f6f4; --line:#e6ecea; --line-2:#cdd8d3;
  /* ຕົວໜັງສື */
  --ink:#13211c; --ink-2:#36443e; --muted:#6b7a74;
  /* ສີແຈ້ງເຕືອນ */
  --danger:#dc2f2f; --danger-tint:#fdecea;
  --warn:#c2410c; --warn-tint:#fdeee4;
  --amber:#8f5e12;
  --mint:#e7f1ed; --peach:#fdeee4; --blush:#fdecea; --sky:#e8f0fb; --lilac:#f1ecfa;
  /* ເງົາ */
  --sh-1:0 1px 2px rgba(16,24,40,.05);
  --sh-2:0 1px 2px rgba(16,24,40,.04), 0 10px 26px -14px rgba(16,24,40,.2);
  --sh-3:0 18px 44px -20px rgba(16,24,40,.35);
  --r-lg:20px; --r-md:14px; --r-sm:10px;
}

html,body{height:100%}
body{
  margin:0; background:#0e3a29; color:var(--ink);
  font-family:'Noto Sans Lao','Inter',system-ui,sans-serif;
  font-size:15px; line-height:1.6; -webkit-text-size-adjust:100%;
}
*{word-break:keep-all; overflow-wrap:normal; -webkit-tap-highlight-color:transparent}
button,input,textarea,select{font:inherit; color:inherit}
button{cursor:pointer; border:none; background:none; padding:0}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{
  outline:2px solid var(--brand-l); outline-offset:2px; border-radius:6px
}

#frame{
  height:100%; max-width:430px; margin:0 auto; background:var(--bg);
  display:flex; flex-direction:column; overflow:hidden; position:relative;
}
@media (min-width:460px){
  #frame{height:calc(100% - 24px); margin:12px auto; border-radius:20px; box-shadow:var(--sh-3)}
}
/* ລະບົບຈັດການເທິງຈໍກວ້າງ — ກາງອອກເຕັມ ມີແຖບຂ້າງ */
@media (min-width:900px){
  #frame.admin-mode{max-width:1280px}
}
#screen{flex:1 1 auto; display:flex; flex-direction:column; min-height:0; overflow:hidden}

.scroll{flex:1 1 auto; overflow-y:auto; -webkit-overflow-scrolling:touch; min-height:0}
.pad{padding:4px 16px 24px}
.col{display:flex; flex-direction:column}
.row{display:flex; align-items:center}
.grow{flex-grow:1}

/* ---------- type ---------- */
.serif{font-family:'Noto Serif Lao','Noto Sans Lao',serif}
.mono{font-family:'JetBrains Mono',ui-monospace,monospace; font-variant-numeric:tabular-nums}
h1,h2,h3{margin:0; text-wrap:balance; font-weight:700; letter-spacing:-.015em}
.h-brand{font-size:11px; font-weight:600; letter-spacing:.14em; color:var(--muted)}
.h-page{font-size:26px; font-weight:800; letter-spacing:-.03em; line-height:1.2}
@media (min-width:900px){ #frame.admin-mode .h-page{font-size:32px} }
.h-title{font-size:21px; font-weight:800; letter-spacing:-.02em; color:var(--ink)}
.h-sec{font-size:17px; font-weight:700; letter-spacing:-.01em}
.crumb{font-size:12.5px; color:var(--muted); letter-spacing:.01em}
.note{font-size:12.5px; color:var(--muted); line-height:1.5}
.price{font-weight:700; font-variant-numeric:tabular-nums; color:var(--brand)}
.num{font-size:30px; font-weight:800; letter-spacing:-.03em; line-height:1.2;
  font-variant-numeric:tabular-nums; color:var(--brand); white-space:nowrap}
@media (min-width:900px){ #frame.admin-mode .num{font-size:34px} }
.num.bad{color:var(--danger)}

/* ---------- ກ້ອນໄອຄອນສີອ່ອນ (ເອກະລັກຂອງ GO+MART) ---------- */
.tile{width:44px; height:44px; flex-shrink:0; border-radius:12px; display:flex;
  align-items:center; justify-content:center; font-size:20px; background:var(--mint); color:var(--brand)}
.tile.sm{width:36px; height:36px; border-radius:10px; font-size:17px}
.tile.peach{background:var(--peach); color:var(--warn)}
.tile.blush{background:var(--blush); color:var(--danger)}
.tile.cream{background:var(--gold-tint); color:var(--gold-ink)}
.tile.sky{background:var(--sky); color:#2563a8}
.tile.lilac{background:var(--lilac); color:#6d4fa8}

/* ---------- ປຸ່ມ ---------- */
.press{transition:transform .12s ease, opacity .12s ease, background .12s ease}
.press:active{transform:scale(.975); opacity:.9}

.btn-green,.btn-gold,.btn-pale{display:inline-flex; align-items:center; justify-content:center; gap:8px;
  min-height:46px; padding:0 20px; border-radius:var(--r-md); font-weight:650; text-decoration:none}
.btn-green{background:var(--brand); color:#fff}
.btn-green:hover{background:var(--brand-l)}
.btn-gold{background:var(--gold); color:#2b2206}
.btn-pale{background:var(--surface); color:var(--ink); border:1px solid var(--line)}
.btn-green[disabled],.btn-gold[disabled]{background:var(--surface-2); color:#9aa8a2; cursor:not-allowed}

.icon-btn{width:42px; height:42px; border-radius:12px; display:flex; align-items:center;
  justify-content:center; position:relative; color:var(--brand);
  background:var(--surface); border:1px solid var(--line); box-shadow:var(--sh-1)}
.icon-btn[disabled]{opacity:.4; cursor:not-allowed}
.badge{position:absolute; top:-5px; right:-5px; min-width:18px; height:18px; padding:0 4px;
  border-radius:9999px; background:var(--danger); color:#fff; font-size:11px; font-weight:700;
  display:flex; align-items:center; justify-content:center; line-height:1; box-shadow:0 0 0 2px var(--bg)}

/* ບັດຂາວມຸມມົນ */
.card{background:var(--surface); border-radius:var(--r-lg); box-shadow:var(--sh-2)}
.card-pad{padding:18px}

/* ແຖບເລືອກ segmented (ມື້ນີ້ / 7 ມື້ / 30 ມື້) */
.seg{display:inline-flex; gap:2px; padding:4px; border-radius:var(--r-md);
  background:var(--surface-2); box-shadow:inset 0 0 0 1px var(--line)}
.seg button{min-height:36px; padding:0 14px; border-radius:10px; font-size:13.5px;
  font-weight:600; color:var(--muted)}
.seg button[aria-pressed="true"]{background:var(--surface); color:var(--ink); box-shadow:var(--sh-1)}
.seg.solid button[aria-pressed="true"]{background:var(--brand); color:#fff}

.chip{flex-shrink:0; min-height:38px; padding:0 15px; border-radius:9999px; font-size:13.5px;
  color:var(--ink-2); font-weight:550; background:var(--surface); border:1px solid var(--line)}
.chip[aria-pressed="true"]{color:#fff; font-weight:650; background:var(--brand); border-color:var(--brand)}

/* ປ້າຍສະຖານະແບບເມັດດຳ */
.statpill{display:inline-flex; align-items:center; gap:6px; padding:5px 12px; border-radius:9999px;
  background:var(--ink); color:#fff; font-size:12px; font-weight:650; white-space:nowrap}
.statpill::before{content:""; width:7px; height:7px; border-radius:50%; background:currentColor; opacity:.85}
.statpill.soft{background:var(--surface-2); color:var(--ink-2)}
.statpill.warn{background:var(--warn-tint); color:var(--warn)}
.statpill.ok{background:var(--mint); color:var(--brand-d)}
.statpill.bad{background:var(--danger-tint); color:var(--danger)}

.pill{align-self:flex-start; padding:3px 10px; border-radius:8px; font-size:11.5px; font-weight:650;
  letter-spacing:.04em; background:rgba(255,255,255,.18); color:#fff; border:1px solid rgba(255,255,255,.28)}
.tag18{position:absolute; top:8px; left:8px; padding:1px 6px; border-radius:6px;
  background:rgba(19,33,28,.84); color:#fff; font-size:11px; font-weight:650; line-height:18px}

/* ແຖບແຈ້ງເຕືອນ (ມີປຸ່ມຢູ່ຂວາ) */
.banner{display:flex; align-items:center; gap:14px; padding:16px 18px; border-radius:var(--r-lg);
  background:var(--brand-tint); color:var(--brand-d)}
.banner.warn{background:var(--warn-tint); color:var(--warn)}
.banner.gold{background:var(--gold-tint); color:var(--gold-ink)}

/* ແຖວລາຍການໃນບັດ */
.listrow{display:flex; align-items:center; gap:13px; width:100%; padding:12px 14px;
  border-radius:var(--r-md); background:var(--surface); border:1px solid var(--line); text-align:left}
.listrow + .listrow{margin-top:8px}
.listrow[aria-pressed="true"]{border-color:var(--brand); background:var(--brand-tint)}

/* ຕົວເລືອກກ່ອງ (ຂະໜາດ · ກາດ · ວັນສົ່ງ) */
.opt{display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
  min-height:76px; padding:12px 6px; border-radius:var(--r-md); line-height:1.45; text-align:center;
  background:var(--surface); border:1px solid var(--line); color:var(--ink); box-shadow:var(--sh-1);
  transition:border-color .12s, background .12s}
.opt[aria-pressed="true"]{border-color:var(--brand); background:var(--brand-tint); box-shadow:none}
.opt[aria-pressed="true"] .opt-name{color:var(--brand-d); font-weight:700}

.swatch{width:44px; height:44px; border-radius:50%; position:relative;
  box-shadow:inset 0 -6px 12px rgba(0,0,0,.14), inset 0 2px 4px rgba(255,255,255,.3);
  transition:box-shadow .15s}
.swatch-on{box-shadow:inset 0 -6px 12px rgba(0,0,0,.14), 0 0 0 2px var(--bg), 0 0 0 4px var(--brand)}

.field{display:flex; flex-direction:column; gap:5px; font-size:13px; font-weight:600; color:var(--ink-2)}
.field input,.field textarea,.field select{min-height:46px; box-sizing:border-box;
  border:1px solid var(--line-2); border-radius:var(--r-sm); padding:11px 12px; font-size:15px;
  font-weight:400; color:var(--ink); background:var(--surface)}
.field textarea{resize:none}
.field.bad input,.field.bad textarea{border-color:var(--danger)}
.err{font-size:12.5px; font-weight:600; color:var(--danger)}

/* header / nav */
.hdr{display:flex; align-items:center; justify-content:space-between; padding:16px 16px 10px; flex-shrink:0}
.nav{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); flex-shrink:0;
  background:var(--surface); border-top:1px solid var(--line); padding:7px 4px 8px;
  padding-bottom:calc(8px + env(safe-area-inset-bottom,0px))}
.nav a{display:flex; flex-direction:column; align-items:center; gap:3px; min-height:44px;
  font-size:11px; color:var(--muted); text-decoration:none; font-weight:500}
.nav a.on{color:var(--brand); font-weight:650}
.foot{background:var(--surface); border-top:1px solid var(--line); padding:10px 16px 12px;
  padding-bottom:calc(12px + env(safe-area-inset-bottom,0px));
  display:flex; flex-direction:column; gap:8px; flex-shrink:0}

/* ===== ໂຄງລະບົບຈັດການ: ແຖບຂ້າງ + ເນື້ອຫາ ===== */
.gm-shell{display:flex; flex:1; min-height:0; background:var(--bg)}
.gm-body{display:flex; flex-direction:column; flex:1; min-width:0; min-height:0}
.gm-side{display:none; width:258px; flex-shrink:0; background:var(--side); color:var(--side-ink);
  flex-direction:column; min-height:0}
.gm-side-top{padding:18px 16px 10px; display:flex; align-items:center; gap:12px}
/* ===== ໂລໂກ້ GO+MART ===== */
/* ປ້າຍສີ່ຫຼ່ຽມມົນ ຂອບຂາວ — Go ຂາວ · + ຄຳ · mart ຄຳ */
.gmark{width:56px; height:56px; flex-shrink:0; border-radius:16px;
  border:2px solid rgba(255,255,255,.92); display:flex; flex-direction:column;
  align-items:center; justify-content:center; line-height:1;
  font-family:'Inter',system-ui,sans-serif; letter-spacing:-.02em; background:transparent}
.gmark .a{font-size:19px; font-weight:800; color:#fff}
.gmark .a i{color:var(--gold); font-style:normal}
.gmark .b{font-size:15px; font-weight:800; color:var(--gold); font-style:italic;
  margin-top:1px; padding-left:10px; align-self:center}
/* ຂະໜາດນ້ອຍ ສຳລັບແຖບເທິງຝັ່ງລູກຄ້າ */
.gmark.sm{width:42px; height:42px; border-radius:12px; border-width:1.6px}
.gmark.sm .a{font-size:14px}
.gmark.sm .b{font-size:11px; padding-left:8px}
/* ເທິງພື້ນຂາວ (ໃບບິນ) — ປ່ຽນຂອບ ແລະ ຕົວໜັງສືເປັນສີແບຣນ */
.gmark.ink{border-color:var(--brand)}
.gmark.ink .a{color:var(--brand)}
.gm-logo{width:48px; height:48px; border-radius:14px; background:#fff; color:var(--side);
  display:flex; align-items:center; justify-content:center; font-weight:800; font-size:12px;
  line-height:1.05; text-align:center; flex-shrink:0}
.gm-side-scroll{flex:1 1 auto; overflow-y:auto; padding:6px 12px 10px; min-height:0}
.gm-group{display:flex; align-items:center; gap:8px; padding:16px 8px 8px; font-size:12px;
  color:var(--side-dim); font-weight:600}
.gm-group i{width:7px; height:7px; border-radius:50%; background:currentColor; display:block}
.gm-navitem{display:flex; align-items:center; gap:12px; width:100%; padding:9px 10px; border-radius:14px;
  color:var(--side-ink); font-size:14.5px; font-weight:550; text-align:left; margin-bottom:4px}
.gm-navitem:hover{background:rgba(255,255,255,.1)}
.gm-navitem .ni{width:36px; height:36px; border-radius:11px; background:rgba(255,255,255,.14);
  display:flex; align-items:center; justify-content:center; flex-shrink:0}
.gm-navitem.on{background:#fff; color:var(--side-3); font-weight:700}
.gm-navitem.on .ni{background:var(--brand-tint); color:var(--brand)}
.gm-side-foot{padding:12px 16px 18px; border-top:1px solid rgba(255,255,255,.14);
  display:flex; flex-direction:column; gap:10px; font-size:12.5px; color:var(--side-dim)}
.gm-admin{align-self:flex-start; padding:3px 10px; border-radius:8px; background:var(--gold);
  color:#3a2e02; font-size:12px; font-weight:700}
@media (min-width:900px){
  #frame.admin-mode .gm-side{display:flex}
  #frame.admin-mode .gm-shell > .gm-body > .nav{display:none}
  #frame.admin-mode .gm-pagepad{padding:22px 28px 28px}
}
.gm-pagepad{padding:14px 16px 18px; display:flex; flex-direction:column; gap:14px}

/* ---------- ເວທີ 3D ---------- */
.stage{position:relative; overflow:hidden; touch-action:none; cursor:grab; user-select:none;
  background:#0f2a20 url("img/textures/bokeh.webp") center/cover no-repeat}
.stage:active{cursor:grabbing}
.p3d{transform-style:preserve-3d}
.origin{position:absolute; left:0; top:0; width:0; height:0; transform-style:preserve-3d}
#fxLayer{position:absolute; inset:0; pointer-events:none; z-index:55; overflow:hidden}

.p-liquor{background:url("img/products/liquor.webp") center/100% 100% no-repeat}
.p-orchid{background:url("img/products/orchid.webp") center/100% 100% no-repeat}
.p-lotus{background:url("img/products/lotus.webp") center/100% 100% no-repeat}
.p-basil{background:url("img/products/basil.webp") center/100% 100% no-repeat}
.p-mushroom{background:url("img/products/mushroom.webp") center/100% 100% no-repeat}
.ph-liquor{background:url("img/products/liquor.webp") center/contain no-repeat}
.ph-orchid{background:url("img/products/orchid.webp") center/contain no-repeat}
.ph-lotus{background:url("img/products/lotus.webp") center/contain no-repeat}
.ph-basil{background:url("img/products/basil.webp") center/contain no-repeat}
.ph-mushroom{background:url("img/products/mushroom.webp") center/contain no-repeat}
.pk-coffee{background:url("img/packaging/pk_coffee.webp") center/100% 100% no-repeat}
.pk-tea{background:url("img/packaging/pk_tea.webp") center/100% 100% no-repeat}
.pk-juice{background:url("img/packaging/pk_juice.webp") center/100% 100% no-repeat}
.pk-cookie{background:url("img/packaging/pk_cookie.webp") center/100% 100% no-repeat}
.pk-choc{background:url("img/packaging/pk_choc.webp") center/100% 100% no-repeat}
.pk-khanom{background:url("img/packaging/pk_khanom.webp") center/100% 100% no-repeat}
.pk-honey{background:url("img/packaging/pk_honey.webp") center/100% 100% no-repeat}
.pk-candle{background:url("img/packaging/pk_candle.webp") center/100% 100% no-repeat}
.pk-fruit{background:url("img/packaging/pk_fruit.webp") center/100% 100% no-repeat}
.pk-orange{background:url("img/packaging/pk_orange.webp") center/100% 100% no-repeat}
.pk-silk{background:url("img/packaging/pk_silk.webp") center/100% 100% no-repeat}
.p-back{filter:brightness(.45) saturate(.8)}
.tx-wicker-light{background-image:url("img/textures/wicker_light.webp");background-repeat:repeat}
.tx-wicker-dark{background-image:url("img/textures/wicker_dark.webp");background-repeat:repeat}
.tx-box{background-image:url("img/textures/box_cream.webp");background-repeat:repeat}
.tx-rim-light{background-image:url("img/textures/rim_light.webp");background-repeat:repeat-x}
.tx-rim-dark{background-image:url("img/textures/rim_dark.webp");background-repeat:repeat-x}
.tx-handle-light{background:url("img/textures/handle_light.webp") center/100% 100% no-repeat}
.tx-handle-dark{background:url("img/textures/handle_dark.webp") center/100% 100% no-repeat}
.tx-shred{background-image:url("img/textures/shred.webp");background-repeat:repeat}
.tx-wood{background-image:url("img/textures/wood.webp");background-repeat:repeat}

/* ---------- keyframes ---------- */
@keyframes dropIn{0%{transform:translateY(-230px) rotateY(-90deg)}55%{transform:translateY(8px) rotateY(10deg)}
  75%{transform:translateY(-6px) rotateY(-4deg)}100%{transform:translateY(0) rotateY(0)}}
@keyframes sway{0%,100%{transform:rotateY(-7deg)}50%{transform:rotateY(7deg)}}
@keyframes bump{0%{transform:scale3d(1,1,1)}35%{transform:scale3d(1.06,.93,1.06)}
  70%{transform:scale3d(.98,1.03,.98)}100%{transform:scale3d(1,1,1)}}
@keyframes faceIn{0%{opacity:0}100%{opacity:1}}
@keyframes bowA{0%{transform:scale(.1) rotate(-30deg)}60%{transform:scale(1.2) rotate(8deg)}100%{transform:scale(1) rotate(0)}}
@keyframes toastIn{0%{opacity:0;transform:translate(-50%,-10px)}10%,80%{opacity:1;transform:translate(-50%,0)}
  100%{opacity:0;transform:translate(-50%,-8px)}}
@keyframes twinkle{0%,100%{opacity:.25}50%{opacity:.9}}
@keyframes rays{0%{transform:translate(-50%,-50%) rotate(0)}100%{transform:translate(-50%,-50%) rotate(360deg)}}
@keyframes glow{0%,100%{opacity:.5;transform:translate(-50%,-50%) scale(1)}50%{opacity:.9;transform:translate(-50%,-50%) scale(1.14)}}
@keyframes star{0%{opacity:0;transform:scale(0) rotate(0)}45%{opacity:1;transform:scale(1) rotate(90deg)}
  100%{opacity:0;transform:scale(0) rotate(180deg)}}
@keyframes fall{0%{opacity:0;transform:translateY(-20px) rotate(0)}12%{opacity:1}
  100%{opacity:0;transform:translateY(340px) rotate(540deg)}}
@keyframes ring{0%{opacity:.9;transform:translate(-50%,-50%) scale(.3)}100%{opacity:0;transform:translate(-50%,-50%) scale(2.3)}}
@keyframes flash{0%{opacity:.85}100%{opacity:0}}
@keyframes sheen{0%{transform:translateX(-160%) skewX(-20deg)}55%,100%{transform:translateX(320%) skewX(-20deg)}}
@keyframes spinOnce{0%{transform:rotateY(0)}100%{transform:rotateY(360deg)}}
@keyframes spinPhoto{0%{transform:scale(1)}35%{transform:scale(1.06)}100%{transform:scale(1)}}
.bv-item{transition:left .28s ease, top .28s ease}
.bv-item:active{filter:brightness(1.08)}
@keyframes pulseSoft{0%,100%{box-shadow:0 0 0 0 rgba(245,197,24,.5)}70%{box-shadow:0 0 0 12px rgba(245,197,24,0)}}
@keyframes miniSpin{0%{transform:rotateX(-22deg) rotateY(-30deg)}50%{transform:rotateX(-22deg) rotateY(30deg)}
  100%{transform:rotateX(-22deg) rotateY(-30deg)}}
@keyframes spin360{0%{transform:rotateX(-22deg) rotateY(0deg)}100%{transform:rotateX(-22deg) rotateY(360deg)}}
@keyframes rock{0%,100%{transform:rotateX(-20deg) rotateY(-34deg)}50%{transform:rotateX(-20deg) rotateY(-14deg)}}
@keyframes hoverY{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
@keyframes tilt3d{0%,100%{transform:rotateY(-18deg) translateY(0)}50%{transform:rotateY(18deg) translateY(-5px)}}
@keyframes shadowPulse{0%,100%{transform:translateX(-50%) scale(1);opacity:.4}50%{transform:translateX(-50%) scale(.85);opacity:.26}}
@keyframes sheetUp{0%{transform:translateY(100%)}100%{transform:translateY(0)}}
@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}
@keyframes popIn{0%{opacity:0;transform:translate(-50%,-50%) scale(.82)}
  60%{opacity:1;transform:translate(-50%,-50%) scale(1.03)}100%{opacity:1;transform:translate(-50%,-50%) scale(1)}}
@keyframes popOut{0%{opacity:1;transform:translate(-50%,-50%) scale(1)}100%{opacity:0;transform:translate(-50%,-50%) scale(.94)}}
@keyframes sweep{0%{opacity:0;transform:translateY(60%) scale(.6)}35%{opacity:1}
  100%{opacity:0;transform:translateY(-30%) scale(1.5)}}
.bump-a{animation:bump .4s ease-out}
.bump-b{animation:bump .4s ease-out}

@keyframes c0{to{opacity:0;transform:translate(-150px,-240px) rotate(320deg)}}
@keyframes c1{to{opacity:0;transform:translate(-80px,-330px) rotate(-280deg)}}
@keyframes c2{to{opacity:0;transform:translate(8px,-360px) rotate(400deg)}}
@keyframes c3{to{opacity:0;transform:translate(88px,-320px) rotate(-360deg)}}
@keyframes c4{to{opacity:0;transform:translate(155px,-230px) rotate(300deg)}}
@keyframes c5{to{opacity:0;transform:translate(-210px,-60px) rotate(-240deg)}}
@keyframes c6{to{opacity:0;transform:translate(210px,-70px) rotate(260deg)}}
@keyframes c7{to{opacity:0;transform:translate(-150px,150px) rotate(380deg)}}
@keyframes c8{to{opacity:0;transform:translate(150px,160px) rotate(-340deg)}}
@keyframes c9{to{opacity:0;transform:translate(-30px,230px) rotate(220deg)}}

/* ---------- sheet ---------- */
#sheetHost{position:absolute; inset:0; z-index:60; display:none}
#sheetHost.open{display:block}
.sheet-bg{position:absolute; inset:0; background:rgba(13,30,24,.48); animation:fadeIn .18s ease}
.sheet{position:absolute; left:0; right:0; bottom:0; max-height:88%; display:flex; flex-direction:column;
  background:var(--bg); border-radius:22px 22px 0 0; animation:sheetUp .26s cubic-bezier(.2,.9,.3,1);
  box-shadow:0 -8px 28px rgba(0,0,0,.3); overflow:hidden}
@media (min-width:900px){
  #frame.admin-mode .sheet{left:50%; right:auto; bottom:auto; top:50%; width:480px;
    transform:translate(-50%,-50%); border-radius:20px; max-height:84%; animation:popIn .24s ease both}
}
.sheet-hd{display:flex; align-items:center; justify-content:space-between; padding:16px 18px 8px; flex-shrink:0}
.sheet-bd{overflow-y:auto; padding:4px 18px 20px;
  padding-bottom:calc(20px + env(safe-area-inset-bottom,0px)); display:flex; flex-direction:column; gap:12px}

/* ---------- ຕາຕະລາງສິນຄ້າໃນລະບົບຈັດການ ---------- */
/* ຈຳນວນຖັນອີງຕາມຄວາມກວ້າງຂອງກອບ ບໍ່ແມ່ນຂອງໜ້າຈໍ */
.pgrid{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px}
@media (min-width:900px){ #frame.admin-mode .pgrid{grid-template-columns:repeat(3,minmax(0,1fr))} }
@media (min-width:1150px){ #frame.admin-mode .pgrid{grid-template-columns:repeat(4,minmax(0,1fr))} }
.pcell{background:var(--surface); border-radius:var(--r-md); padding:12px; box-shadow:var(--sh-2);
  display:flex; flex-direction:column; gap:6px; text-align:left}
.pthumb{height:96px; border-radius:var(--r-sm); background:var(--surface-2); position:relative;
  display:flex; align-items:center; justify-content:center; overflow:hidden}
.pthumb img{max-height:88px; max-width:100%; object-fit:contain}
.pflag{position:absolute; top:6px; right:6px; font-size:10px; font-weight:700; padding:2px 7px;
  border-radius:6px; background:var(--gold); color:#3a2e02}

/* ---------- ຕາຕະລາງ KPI ---------- */
.kpis{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px}
@media (min-width:900px){ #frame.admin-mode .kpis{grid-template-columns:repeat(4,minmax(0,1fr))} }
.kpi{background:var(--surface); border-radius:var(--r-lg); padding:16px; box-shadow:var(--sh-2);
  display:flex; flex-direction:column; gap:8px}
.kpi-top{display:flex; align-items:center; gap:10px}
.kpi-label{font-size:12.5px; color:var(--muted); font-weight:600}

@media (prefers-reduced-motion:reduce){
  [style*="twinkle"],[style*="rays"],[style*="glow"],[style*="fall"],[style*="star "],
  [style*="sway"],[style*="spin360"],[style*="rock"],[style*="hoverY"],[style*="tilt3d"],
  [style*="shadowPulse"],[style*="miniSpin"],[style*="sheen"]{animation:none!important}
  .press:active{transform:none}
}

/* ກ່ອງຕິກ */
.chk{width:24px; height:24px; flex-shrink:0; border-radius:7px; display:flex; align-items:center;
  justify-content:center; color:#fff; border:2px solid var(--line-2); background:var(--surface)}
.chk.on{border-color:var(--brand); background:var(--brand)}

/* ===== ຮູບສິນຄ້າ: ຕັດພື້ນຫຼັງອອກແລ້ວ ວາງເທິງພື້ນຂຽວແບຣນ ===== */
.bphoto{
  position:relative; display:block; overflow:hidden; border-radius:12px;
  container-type:inline-size;
  background:radial-gradient(ellipse 86% 78% at 50% 38%, #2f9172 0%, #1f6f54 52%, #15503c 100%);
}
/* ລາຍນ້ຳໂລໂກ້ GO+MART ຢູ່ພື້ນຂຽວ — ຢູ່ຫຼັງສິນຄ້າ */
.bphoto::before{
  content:"GO+MART"; position:absolute; left:50%; top:50%;
  transform:translate(-50%,-50%) rotate(-16deg);
  font-family:'Inter','Noto Sans Lao',sans-serif; font-weight:800; letter-spacing:.14em;
  font-size:30px; font-size:19cqw; line-height:1; white-space:nowrap;
  color:rgba(255,255,255,.13); pointer-events:none; z-index:0;
}
.bphoto::after{                      /* ເງົາຂອບ ໃຫ້ກະຕ່າເດັ່ນຂຶ້ນ */
  content:""; position:absolute; inset:0; pointer-events:none; border-radius:inherit;
  box-shadow:inset 0 0 40px rgba(8,40,29,.4);
}
/* ຕາປະທັບແບຣນມຸມລຸ່ມ — ໃສ່ສະເພາະຮູບໃຫຍ່ */
.bphoto .wm{
  position:absolute; left:10px; bottom:9px; z-index:3; display:flex; align-items:center; gap:5px;
  font-size:10.5px; font-weight:800; letter-spacing:.1em; color:rgba(255,255,255,.72);
  pointer-events:none; text-shadow:0 1px 3px rgba(0,0,0,.35);
}
.bphoto .wm i{ width:5px; height:5px; border-radius:50%; background:#f5c518; display:block }
/* ຮູບນ້ອຍ ບໍ່ຕ້ອງມີລາຍນ້ຳໃຫຍ່ */
.bphoto.tight::before{ display:none }
.bphoto > img{
  position:relative; z-index:1; width:100%; height:100%; object-fit:contain; display:block;
  padding:8px; box-sizing:border-box;
  filter:drop-shadow(0 10px 14px rgba(0,0,0,.38)) saturate(1.06) contrast(1.03);
}
.bphoto.tight > img{ padding:4px; }
.bphoto.thumb{ border-radius:10px; }
/* ແຕະເພື່ອເບິ່ງຮູບໃຫຍ່ */
.bphoto.zoomable{ cursor:zoom-in; }
.bphoto .zoomhint{
  position:absolute; right:8px; bottom:8px; z-index:2; width:28px; height:28px;
  border-radius:8px; background:rgba(8,40,29,.55); color:#fff;
  display:flex; align-items:center; justify-content:center; pointer-events:none;
}
/* ກ່ອງເບິ່ງຮູບໃຫຍ່ */
#lightbox{position:absolute; inset:0; z-index:80; display:none;
  background:radial-gradient(ellipse 80% 70% at 50% 42%, #2f9172 0%, #17543f 55%, #0c2f23 100%);
  animation:fadeIn .2s ease}
#lightbox.open{display:flex; flex-direction:column}
#lightbox .lb-bar{display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:14px 16px; padding-top:calc(14px + env(safe-area-inset-top,0px)); color:#fff; flex-shrink:0}
#lightbox .lb-img{position:relative; flex:1 1 auto; min-height:0; display:flex; align-items:center;
  justify-content:center; padding:0 16px}
#lightbox .lb-img::before{
  content:"GO+MART"; position:absolute; left:50%; top:50%;
  transform:translate(-50%,-50%) rotate(-16deg);
  font-family:'Inter','Noto Sans Lao',sans-serif; font-weight:800; letter-spacing:.14em;
  font-size:13vw; line-height:1; white-space:nowrap; color:rgba(255,255,255,.12); pointer-events:none}
#lightbox .lb-img img{position:relative; z-index:1}
#lightbox .lb-img img{max-width:100%; max-height:100%; object-fit:contain;
  filter:drop-shadow(0 18px 26px rgba(0,0,0,.5))}
#lightbox .lb-foot{padding:14px 16px; padding-bottom:calc(16px + env(safe-area-inset-bottom,0px));
  color:#fff; display:flex; flex-direction:column; gap:4px; flex-shrink:0}

/* ===== ຈໍກວ້າງ ຝັ່ງລູກຄ້າ — ພຣີວິວໃຫຍ່ + ແຜງຄວບຄຸມຂ້າງ ===== */
@media (min-width:1000px){
  #frame.shop-wide{ max-width:1180px }

  /* ໜ້າຮ້ານ: ບັດກະຕ່າຫຼາຍຖັນ */
  #frame.shop-wide #screen[data-screen="home"] .pad{ padding:8px 28px 28px }
  #frame.shop-wide #screen[data-screen="home"] section[style*="grid-template-columns:repeat(2"]{
    grid-template-columns:repeat(auto-fill,minmax(215px,1fr))!important }
  #frame.shop-wide #screen[data-screen="home"] .h-title{ font-size:26px }

  /* ຈັດກະຕ່າເອງ: ພຣີວິວຊ້າຍເຕັມສູງ · ແຜງເລືອກ ແລະ ສະຫຼຸບຂວາ */
  #frame.shop-wide #screen[data-screen="builder"]{
    display:grid;
    grid-template-columns:minmax(0,1fr) 430px;
    grid-template-rows:auto minmax(0,1fr) auto;
    grid-template-areas:"hdr hdr" "stage panel" "stage foot";
    column-gap:20px; padding:0 20px 18px; box-sizing:border-box;
  }
  #frame.shop-wide #screen[data-screen="builder"] > header{ grid-area:hdr; padding-left:0 }
  #frame.shop-wide #screen[data-screen="builder"] > .stage{
    grid-area:stage; margin:0; max-height:none; min-height:0; align-self:stretch; border-radius:18px }
  #frame.shop-wide #screen[data-screen="builder"] > .scroll{ grid-area:panel; min-height:0 }
  #frame.shop-wide #screen[data-screen="builder"] > .foot{
    grid-area:foot; border-radius:14px; border:1px solid var(--line); margin-top:12px;
    box-shadow:var(--sh-2); padding-bottom:12px }
  /* ຕາຕະລາງສິນຄ້າ ກວ້າງຂຶ້ນ */
  #frame.shop-wide #screen[data-screen="builder"] #bPanel > div[style*="repeat(3,minmax"]{
    grid-template-columns:repeat(3,minmax(0,1fr))!important }

  /* ຈ່າຍເງິນ: 2 ຖັນ */
  #frame.shop-wide #screen[data-screen="checkout"] .pad{
    display:grid; grid-template-columns:1fr 1fr; gap:18px 24px; align-items:start; padding:8px 28px 28px }
  #frame.shop-wide #screen[data-screen="checkout"] .pad > section:first-of-type{ grid-column:1 / -1 }

  /* ອໍເດີ ແລະ ບັນຊີ: ກວ້າງພໍດີອ່ານ */
  #frame.shop-wide #screen[data-screen="myorders"] .pad,
  #frame.shop-wide #screen[data-screen="account"] .pad,
  #frame.shop-wide #screen[data-screen="success"] .pad{ max-width:720px; margin:0 auto }

  /* ແຖບເມນູ: ເປັນແຖວກາງ ບໍ່ແມ່ນແຖບລຸ່ມເຕັມກວ້າງ */
  #frame.shop-wide .nav{
    grid-template-columns:repeat(4,minmax(0,140px)); justify-content:center; gap:8px;
    border-top:1px solid var(--line) }
  #frame.shop-wide .nav a{ flex-direction:row; gap:8px; font-size:13px; border-radius:10px }
}

/* ===== ປ້າຍ ແລະ ແທ່ນໝຸນ 360° ===== */
.spin360{position:absolute; left:8px; bottom:8px; z-index:3; display:inline-flex; align-items:center; gap:4px;
  padding:3px 8px; border-radius:8px; background:rgba(10,28,21,.62); color:#eaf3ee;
  font-size:11px; font-weight:700; letter-spacing:.01em; backdrop-filter:blur(3px)}
.spin360 svg{opacity:.9}

#lightbox .lb-deg{position:absolute; left:50%; top:10px; z-index:3; transform:translateX(-50%);
  padding:4px 12px; border-radius:9px; background:rgba(0,0,0,.45); color:#fff;
  font-size:12px; font-weight:650; font-variant-numeric:tabular-nums}
#lightbox .lb-hint{position:absolute; left:50%; bottom:12px; z-index:3; transform:translateX(-50%);
  display:inline-flex; align-items:center; gap:5px; padding:5px 12px; border-radius:9px;
  background:rgba(0,0,0,.42); color:#dfeae4; font-size:12px; font-weight:600;
  transition:opacity .4s ease; pointer-events:none; white-space:nowrap}

/* ຕົວຢ່າງຂໍ້ຄວາມ WhatsApp ກ່ອນສົ່ງ */
.wa-prev{margin:0; padding:12px 14px; border-radius:var(--r-md); border:1px solid var(--line);
  background:var(--surface-2); color:var(--ink); font-family:inherit; font-size:12.5px;
  line-height:1.6; white-space:pre-wrap; word-break:break-word;
  max-height:240px; overflow:auto}

/* ຮູບນ້ອຍຂອງສິນຄ້າໃນລາຍການກະຕ່າ */
.goodthumb{flex:0 0 40px; width:40px; height:40px; border-radius:10px; overflow:hidden;
  background:var(--brand); display:flex; align-items:center; justify-content:center}
.goodthumb img{width:100%; height:100%; object-fit:contain}

/* ===== ໜ້າລູກຄ້າ — ຊຸດດຽວກັບ Go+Delivery ===== */
:root{
  --gp-bar:#0d6b5c;        /* ແຖບເທິງສີຂຽວນ້ຳທະເລ */
  --gp-bar-d:#0a4f44;
  --gp-page:#f5f5fa;       /* ພື້ນສີມ່ວງອ່ອນ */
  --gp-ring:#e8b84b;       /* ວົງແຫວນຄຳຮອບໄອຄອນໝວດ */
}

/* --- ແຖບເທິງ --- */
.gp-bar{flex-shrink:0; background:var(--gp-bar); color:#fff; padding:10px 12px;
  display:flex; align-items:center; gap:10px}
.gp-logo{font-family:'Inter',system-ui,sans-serif; font-size:21px; font-weight:800;
  letter-spacing:-.03em; color:#fff; flex-shrink:0; line-height:1}
.gp-search{flex:1 1 auto; min-width:0; display:flex; align-items:center; gap:8px;
  background:#fff; border-radius:9999px; padding:0 14px; height:40px; color:var(--muted)}
.gp-search input{flex:1; min-width:0; border:none; outline:none; background:transparent;
  font-size:14px; color:var(--ink)}
.gp-ico{width:38px; height:38px; flex-shrink:0; border-radius:50%; display:flex;
  align-items:center; justify-content:center; color:#fff; position:relative}
.gp-ico:hover{background:rgba(255,255,255,.14)}
.gp-avatar{width:36px; height:36px; flex-shrink:0; border-radius:50%; background:#fff;
  color:var(--gp-bar); display:flex; align-items:center; justify-content:center;
  font-weight:800; font-size:15px}

/* --- ແຖວທີ່ຢູ່ຈັດສົ່ງ --- */
.gp-loc{flex-shrink:0; display:flex; align-items:center; gap:12px; padding:10px 14px;
  background:var(--surface); border-bottom:1px solid var(--line)}
.gp-loc .pin{width:38px; height:38px; flex-shrink:0; border-radius:50%;
  background:var(--brand-tint); color:var(--brand);
  display:flex; align-items:center; justify-content:center}
.gp-loc b{font-size:14px; font-weight:700; display:block; line-height:1.35}
.gp-pill{flex-shrink:0; min-height:34px; padding:0 16px; border-radius:9999px;
  background:var(--brand); color:#fff; font-size:13px; font-weight:650;
  display:inline-flex; align-items:center; gap:5px}

/* --- ຫົວຂໍ້ພາກ: ແຜ່ນໄອຄອນສີ + ຊື່ --- */
.sec-head{display:flex; align-items:center; gap:10px}
.sec-head .ic{width:34px; height:34px; flex-shrink:0; border-radius:11px; display:flex;
  align-items:center; justify-content:center; background:var(--brand-tint); color:var(--brand)}
.sec-head .ic.lilac{background:var(--lilac); color:#6d4fa8}
.sec-head .ic.gold{background:var(--gold-tint); color:var(--gold-ink)}
.sec-head h2{margin:0; font-size:16px; font-weight:800; letter-spacing:-.01em}

/* --- ແຜ່ນພາບໃຫຍ່ເລື່ອນໄດ້ --- */
.gp-hero{position:relative}
.gp-hero .track{display:flex; gap:12px; overflow-x:auto; scroll-snap-type:x mandatory;
  scrollbar-width:none; border-radius:var(--r-lg)}
.gp-hero .track::-webkit-scrollbar{display:none}
.gp-hero .slide{flex:0 0 100%; scroll-snap-align:center; border-radius:var(--r-lg); overflow:hidden}
.gp-hero .arw{position:absolute; top:50%; transform:translateY(-50%); width:34px; height:34px;
  border-radius:50%; background:rgba(255,255,255,.92); color:var(--ink);
  display:none; align-items:center; justify-content:center; box-shadow:var(--sh-2); z-index:2}
.gp-hero:hover .arw{display:flex}
.gp-hero .arw.l{left:8px} .gp-hero .arw.r{right:8px}
.gp-dots{display:flex; gap:6px; justify-content:center; padding-top:10px}
.gp-dots i{width:7px; height:7px; border-radius:9999px; background:var(--line-2); transition:width .25s}
.gp-dots i.on{width:20px; background:var(--brand)}

/* --- ບັດສິນຄ້າ --- */
.gp-card{background:var(--surface); border-radius:16px; box-shadow:var(--sh-2);
  display:flex; flex-direction:column; overflow:hidden}
.gp-card .top{position:relative; padding:10px 10px 0}
.gp-card .tagn{position:absolute; top:16px; left:16px; z-index:2; padding:2px 10px;
  border-radius:9999px; background:var(--brand); color:#fff; font-size:11px; font-weight:700}
.gp-card .fav{position:absolute; top:14px; right:14px; z-index:2; width:30px; height:30px;
  border-radius:50%; background:#fff; box-shadow:var(--sh-1); color:var(--muted);
  display:flex; align-items:center; justify-content:center}
.gp-card .fav.on{color:var(--danger)}
.gp-card .bd{padding:10px 12px 12px; display:flex; flex-direction:column; gap:6px; flex-grow:1}
.gp-card .shop{display:flex; align-items:center; gap:5px; font-size:11.5px;
  font-weight:600; color:var(--brand)}
.gp-card .nm{font-size:13px; font-weight:600; line-height:1.45; display:-webkit-box;
  -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:2.9em}
.gp-card .pr{font-size:16px; font-weight:800; color:var(--brand); text-align:right;
  font-variant-numeric:tabular-nums; margin-top:auto}
.gp-card .act{min-height:38px; border-radius:10px; background:var(--brand); color:#fff;
  font-size:13px; font-weight:650; display:flex; align-items:center; justify-content:center; gap:6px}
.gp-card .act.soft{background:var(--gold-tint); color:var(--gold-ink)}

/* --- ໄອຄອນໝວດ ວົງກົມຂອບຄຳ --- */
.gp-cats{display:flex; gap:12px; overflow-x:auto; scrollbar-width:none; padding:2px 0 4px}
.gp-cats::-webkit-scrollbar{display:none}
.gp-cat{flex:0 0 auto; width:68px; display:flex; flex-direction:column; align-items:center; gap:6px}
.gp-cat .ring{width:54px; height:54px; border-radius:50%; background:var(--surface);
  border:2px solid var(--gp-ring); display:flex; align-items:center; justify-content:center;
  font-size:23px; box-shadow:var(--sh-1)}
.gp-cat span{font-size:11px; font-weight:600; color:var(--ink-2); text-align:center; line-height:1.3}
.gp-cat[aria-pressed="true"] .ring{border-color:var(--brand); background:var(--brand-tint)}
.gp-cat[aria-pressed="true"] span{color:var(--brand); font-weight:700}

/* ພື້ນໜ້າລູກຄ້າເປັນສີມ່ວງອ່ອນຄືກັບ Go+Delivery */
#frame.shop-wide{background:var(--gp-page)}

/* ===== ໃບບິນ — ຮູບແບບດຽວກັບໃບບິນທີ່ຮ້ານປິ້ນ ===== */
.rcpt-wrap{background:#5b6b64; padding:16px 12px 28px; display:flex; justify-content:center}
.rcpt{width:100%; max-width:380px; background:#fff; color:#111;
  padding:22px 20px 18px; border-radius:4px; box-shadow:0 10px 30px rgba(0,0,0,.28);
  font-size:13.5px; line-height:1.6}
.rcpt .mid{text-align:center}
.rcpt .logo{font-family:'Inter',system-ui,sans-serif; font-size:27px; font-weight:800;
  letter-spacing:-.03em; text-align:center; line-height:1.1}
.rcpt .legal{text-align:center; font-size:15px; font-weight:800; margin-top:10px}
.rcpt .sub{text-align:center; font-size:12.5px; color:#333}
.rcpt hr{border:none; border-top:1px dashed #9a9a9a; margin:12px 0}
.rcpt .kv{display:flex; justify-content:space-between; gap:12px}
.rcpt .kv .k{color:#444; flex-shrink:0}
.rcpt .kv .v{text-align:right; font-weight:600; min-width:0; word-break:break-word}
.rcpt .li{margin:10px 0}
.rcpt .li .top{display:flex; justify-content:space-between; gap:10px; font-weight:700}
.rcpt .li .top .nm{min-width:0}
.rcpt .li .top .am{white-space:nowrap; font-variant-numeric:tabular-nums}
.rcpt .li .sub2{font-size:12.5px; color:#444; padding-left:2px}
.rcpt .li .parts{font-size:12px; color:#555; padding-left:10px; margin-top:3px; line-height:1.55}
.rcpt .sum{display:flex; justify-content:space-between; gap:10px;
  font-size:19px; font-weight:800; margin:4px 0}
.rcpt .sum .n{font-variant-numeric:tabular-nums}
.rcpt .foot{text-align:center; font-size:13px; margin-top:4px}
.rcpt .stamp{display:flex; justify-content:space-between; gap:10px;
  font-size:12px; color:#333; margin-top:8px}
.rcpt .note2{font-size:12.5px; color:#444; line-height:1.6}
.rcpt-acts{display:flex; gap:10px; padding:0 16px 16px; flex-wrap:wrap}
.rcpt-acts > *{flex:1 1 150px}

@media print{
  body{background:#fff}
  #frame{max-width:none; height:auto; margin:0; box-shadow:none; border-radius:0}
  .nav, .foot, .rcpt-acts, .hdr, .gp-bar, .gp-loc{display:none !important}
  .rcpt-wrap{background:#fff; padding:0}
  .rcpt{box-shadow:none; max-width:none; padding:0}
  .scroll{overflow:visible !important}
}
