/* =========================================================
   style.css — ຮວມ CSS ທັງໝົດຂອງໜ້າເວັບ NEXUS STORE
   ແບ່ງເປັນສ່ວນຕາມ comment header ຂ້າງລຸ່ມ:
   - ໂຕນສີ/ຕົວແປ (:root)
   - Ticker / Header / Hero / Promo banner
   - Stats / Why cards / Section heading
   - Category rail / Product card
   - Chat FAB / Footer
   ========================================================= */
:root{
    --bg:#000000;
    --bg-raise:#0a0a0a;
    --card:#0a0a0a;
    --card-border:#1e1e1e;
    --red:#ff0001;
    --red-deep:#990001;
    --red-glow:#ff0001;
    --gold:#e8b34a;
    --green:#2ecc71;
    --text:#ffffff;
    --text-dim:#999999;
    --text-faint:#777777;
    --radius:16px;
  }
  *{box-sizing:border-box; margin:0; padding:0;}
  html{ background:#000; }
  body{
    background:var(--bg);
    color:var(--text);
    font-family:'Noto Sans Lao','Rajdhani',sans-serif;
    -webkit-font-smoothing:antialiased;
    overflow-x:hidden;
  }
  .en{ font-family:'Rajdhani','Noto Sans Lao',sans-serif; }
  .display-lo{ font-family:'Noto Sans Lao Looped','Noto Sans Lao',sans-serif; }
  .display-en{ font-family:'Orbitron','Rajdhani',sans-serif; }

  a{color:inherit; text-decoration:none;}
  button{font-family:inherit; cursor:pointer;}

  .shell{ max-width:480px; margin:0 auto; min-height:100vh; position:relative; background:var(--bg); overflow:hidden; overflow:clip; padding-top:96px; /* เว้นที่ให้แถบ header ที่ลอยติดจอ (แถบพอดีโลโก้) */ }

  /* ---------- Top glow removed per request ---------- */

  /* ---------- Header ---------- */
  header{
    display:flex; align-items:center; justify-content:space-between;
    padding:4px 8px 4px 4px;
    /* fixed แทน sticky: sticky ค้างบน iOS Safari เพราะมี overflow ครอบอยู่ — fixed ติดจอแน่นอนทุกเบราว์เซอร์ */
    position:fixed; top:10px; left:0; right:0; z-index:40;
    width:calc(min(100%, 480px) - 24px); margin:0 auto;
    /* แถบกระจกใส + เบลอ: เลื่อนหน้าแล้วเห็นเนื้อหาด้านหลังฟุ้งๆ ผ่านแถบ */
    background:rgba(12,12,12,.55);
    -webkit-backdrop-filter:blur(18px) saturate(160%);
            backdrop-filter:blur(18px) saturate(160%);
    border:1px solid rgba(255,255,255,.09);
    border-radius:22px;
    box-shadow:0 8px 28px -10px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.06);
  }
  /* โลโก้ในแถบใหญ่ขึ้น (โลโก้ท้ายหน้า .footer-logo ไม่กระทบ) */
  header .logo{ width:70px; height:70px; border-radius:18px; }
  /* แสดงชื่อเว็บในแถบ (ย่อเป็น ... ถ้ายาวเกิน เพื่อไม่ชนปุ่มลงชื่อเข้าใช้) */
  header .brand{ min-width:0; flex:1 1 auto; gap:2px; }
  header .brand-name{
    display:block; min-width:0;
    font-family:'Lilita One','Noto Sans Lao',sans-serif; /* ฟอนต์อ้วนๆ */
    color:#fff; font-size:24px; font-weight:400; letter-spacing:.5px; line-height:1.2;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  }
  .brand{ display:flex; align-items:center; gap:10px; }
  .logo{
    width:46px; height:46px; border-radius:13px;
    background:var(--red);
    display:flex; align-items:center; justify-content:center;
    box-shadow:none;
    flex-shrink:0;
    overflow:hidden;
  }
  .logo svg{ width:24px; height:24px; }
  header .logo svg{ width:32px; height:32px; }
  /* ໂລໂກ້ທີ່ແອດມິນອັບໂຫລດເອງ — ພື້ນຫຼັງແດງເລີ່ມຕົ້ນອອກ, ໃຫ້ຮູບເຕັມກ່ອງແທນ */
  .logo.has-custom-logo{ background:none; box-shadow:none; }
  .logo img{ width:100%; height:100%; object-fit:contain; display:block; }
  .brand-name{ font-size:17px; font-weight:800; letter-spacing:.3px; }
  .brand-name .accent{ color:var(--red-glow); }
  .avatar{
    width:38px; height:38px; border-radius:50%;
    background:var(--card);
    border:2px solid var(--red-deep);
    flex-shrink:0;
  }

  /* ---------- Login button (header) ---------- */
  .login-btn{
    display:inline-flex; align-items:center; gap:7px;
    padding:8px 14px;
    border-radius:999px;
    background:var(--red);
    color:#fff;
    font-size:13px;
    font-weight:700;
    letter-spacing:.2px;
    box-shadow:none;
    border:none;
    flex-shrink:0;
    transition:transform .15s ease, box-shadow .15s ease;
    white-space:nowrap;
  }
  .login-btn:hover{
    transform:translateY(-1px);
    box-shadow:none;
  }
  .login-btn:active{ transform:translateY(0); }
  .login-btn svg{ width:17px; height:17px; flex-shrink:0; }

  /* signed-in state: shows avatar + name instead of the login button */
  .login-btn.is-authed{
    background:var(--card);
    box-shadow:none;
    border:1px solid var(--card-border);
    padding:5px 12px 5px 5px;
  }
  .login-btn.is-authed img{
    width:26px; height:26px; border-radius:50%; display:block;
  }

  /* ---------- Hero ---------- */
  .hero{ padding:30px 20px 8px; position:relative; z-index:1; }
  .eyebrow{
    display:inline-flex; align-items:center; gap:6px;
    border:1px solid #4d0000;
    background:#170000;
    color:var(--red-glow);
    font-size:12.5px; font-weight:700;
    padding:7px 14px; border-radius:999px;
    margin-bottom:20px;
    box-shadow:none;
  }
  .eyebrow-icon{ width:13px; height:13px; vertical-align:-2px; }
  h1.headline{
    font-size:34px; line-height:1.22; font-weight:800;
    letter-spacing:.2px;
    margin-bottom:14px;
  }
  h1.headline .hl{ color:var(--red-glow); }
  .sub{
    color:var(--text-dim); font-size:14.5px; line-height:1.7;
    max-width:38ch; margin-bottom:26px;
  }
  .cta-row{ display:flex; gap:12px; margin-bottom:8px; flex-wrap:wrap; }
  .btn{
    display:inline-flex; align-items:center; gap:8px;
    padding:13px 22px; border-radius:12px;
    font-size:14.5px; font-weight:700; border:none;
    transition:transform .15s ease, box-shadow .15s ease;
  }
  .btn:active{ transform:scale(.97); }
  .btn-primary{
    background:var(--red);
    color:#fff;
    box-shadow:none;
  }
  .btn-ghost{
    background:#0f0f0f;
    color:var(--text);
    border:1px solid #2f2f2f;
    box-shadow:none;
  }

  /* ---------- Promo banner (placeholder for user's own image) ---------- */
  .promo{
    margin:28px 20px 0;
    border-radius:var(--radius);
    border:1.5px dashed #333;
    background:#0a0a0a;
    box-shadow:none;
    min-height:150px;
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    gap:6px; text-align:center; padding:20px;
    position:relative; z-index:1;
  }
  .promo svg{ width:26px; height:26px; opacity:.5; }
  .promo span{ font-size:12.5px; color:var(--text-faint); }
  .promo strong{ font-size:13px; color:var(--text-dim); font-weight:700; }
  /* ---------- Promo banner: ມີຮູບແທນ placeholder ແລ້ວ (ຮູບ Hero ຈາກຫ້ອງແອດມິນ) ---------- */
  .promo.has-image{
    border:none; background:transparent; min-height:0; padding:0; display:block;
  }
  .promo.has-image img{
    width:100%; height:auto; display:block; border-radius:var(--radius);
  }

  /* ---------- Stats ---------- */
  .stats{
    display:grid; grid-template-columns:1fr 1fr; gap:12px;
    padding:20px 20px 8px;
    position:relative; z-index:1;
  }
  .stat-card{
    background:#0a0a0a;
    border:1px solid #1e1e1e;
    border-radius:14px; padding:16px;
    display:flex; align-items:center; gap:12px;
    box-shadow:none;
  }
  .stat-icon{
    width:38px; height:38px; border-radius:10px;
    background:#240000;
    color:var(--red-glow);
    display:flex; align-items:center; justify-content:center; flex-shrink:0;
    box-shadow:none;
  }
  .stat-icon svg{ width:18px; height:18px; }
  .stat-label{ font-size:11.5px; color:var(--text-faint); margin-bottom:2px; }
  .stat-value{ font-size:18px; font-weight:800; color:var(--red-glow); }
  .stat-value .unit{ font-size:11px; color:var(--text-dim); font-weight:500; margin-left:3px;}

  /* ---------- Section heading ---------- */
  .section{ padding:34px 20px 6px; position:relative; z-index:1; }
  .section-head{ display:flex; align-items:center; justify-content:between; gap:10px; margin-bottom:16px;}
  .section-title{ font-size:20px; font-weight:800; display:flex; align-items:center; gap:9px; }
  .section-title svg{ width:19px; height:19px; color:var(--red-glow); }
  .section-title .cat{ color:var(--red-glow); }
  .see-all{
    margin-left:auto; font-size:12.5px; color:var(--text-dim);
    display:flex; align-items:center; gap:4px; white-space:nowrap;
  }
  .seeall-icon{ width:14px; height:14px; }

  /* ---------- Recent purchases: infinite auto-scroll carousel ----------
     ໝາຍເຫດ perf: ໄຫຼດ້ວຍ CSS @keyframes ລ້ວນໆ (ບໍ່ໃຊ້ requestAnimationFrame
     ຂອງ JS ອີກຕໍ່ໄປ) — browser ຮັນ animation ນີ້ຢູ່ compositor thread ແຍກຕ່າງຫາກ
     ຈາກ main thread ຈຶ່ງບໍ່ກະໂດດ/ກະຕຸກເມື່ອໜ້າຈໍມີວຽກອື່ນ. ແລະ ບໍ່ມີ touchmove
     preventDefault ອີກຕໍ່ໄປ ('touch-action:pan-y' ຢູ່ລຸ່ມນີ້ພຽງພໍແລ້ວທີ່ຈະກັນ
     ການລາກລວງແຖວນອນ) — ນັ້ນແມ່ນຕົ້ນເຫດທີ່ເຮັດໃຫ້ໜ້າຈໍ "ຄ້າງ" ຕອນຜູ້ໃຊ້ເລື່ອນຜ່ານແຖບນີ້ */
  .rp-carousel{
    position:relative;
    overflow:hidden;
    margin:14px -20px 0;
    padding:4px 20px 10px;
    touch-action:pan-y;
    -webkit-mask-image:linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
    mask-image:linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  }
  .rp-track{
    display:flex;
    gap:12px;
    width:max-content;
    animation:rp-scroll var(--rp-duration, 26s) linear infinite;
  }
  .rp-carousel:active .rp-track{ animation-play-state:paused; }
  @keyframes rp-scroll{
    from{ transform:translate3d(0,0,0); }
    to{ transform:translate3d(calc(-100% / var(--rp-cycles, 2)),0,0); }
  }
  @media (prefers-reduced-motion: reduce){
    .rp-track{ animation:none; }
  }
  .rp-card{
    flex:0 0 auto;
    width:196px;
    display:flex;
    align-items:center;
    gap:10px;
    background:linear-gradient(155deg, rgba(255,255,255,.05), rgba(255,255,255,.008) 55%), var(--card);
    border:1px solid var(--card-border);
    border-radius:14px;
    padding:9px 11px;
    user-select:none;
    -webkit-user-drag:none;
    position:relative;
    box-shadow:0 8px 18px -12px rgba(0,0,0,.8);
    overflow:hidden;
  }
  .rp-card::after{
    /* เส้นขอบไล่สีแดงจางๆ มุมบนซ้าย ให้การ์ดดูมีมิติขึ้น ไม่แบน */
    content:'';
    position:absolute; inset:0;
    border-radius:inherit;
    background:radial-gradient(120px 60px at -10% -20%, rgba(255,0,1,.16), transparent 70%);
    pointer-events:none;
  }
  .rp-thumb{ position:relative; flex-shrink:0; }
  .rp-card img{
    width:42px; height:42px; border-radius:10px; object-fit:cover; display:block;
    background:#151515; pointer-events:none;
  }
  .rp-card .rp-icon-fallback{
    width:42px; height:42px; border-radius:10px;
    background:#151515; display:flex; align-items:center; justify-content:center;
  }
  .rp-card .rp-icon-fallback svg{ width:17px; height:17px; color:var(--text-faint); }
  .rp-card .rp-badge{
    position:absolute; bottom:-3px; right:-3px;
    width:16px; height:16px; border-radius:50%;
    background:var(--red);
    display:flex; align-items:center; justify-content:center;
    box-shadow:0 0 0 2.5px var(--card);
  }
  .rp-card .rp-badge svg{ width:9px; height:9px; color:#fff; }
  .rp-card .rp-info{ min-width:0; position:relative; }
  .rp-card .rp-name{
    font-size:12px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  }
  .rp-card .rp-buyer{
    font-size:10.5px; color:var(--text-dim); margin-top:3px;
    display:flex; align-items:center; gap:4px; white-space:nowrap;
  }
  .rp-card .rp-buyer svg{ width:10px; height:10px; opacity:.7; flex-shrink:0; }
  .rp-card .rp-time{
    font-size:9.5px; color:var(--red-glow); margin-top:3px; white-space:nowrap;
    display:flex; align-items:center; gap:4px;
  }
  .rp-card .rp-time::before{
    content:''; width:4px; height:4px; border-radius:50%; background:var(--red-glow);
    box-shadow:0 0 4px var(--red-glow); flex-shrink:0;
  }

  /* ---------- Weekly best sellers: 2 ການ໌ດ ເລື່ອນໄປຊ້າຍແບບວົນ (weekly-best.js) ---------- */
  .wb-viewport{
    position:relative;
    overflow:hidden;
    margin:14px -20px 0;
    padding:4px 20px 6px;
    touch-action:pan-y;
  }
  .wb-track{
    display:flex;
    gap:12px;
    will-change:transform;
  }
  .wb-card{
    flex:0 0 calc((100% - 12px) / 2);
    min-width:0;
    display:flex; flex-direction:column;
    background:linear-gradient(155deg, rgba(255,255,255,.05), rgba(255,255,255,.008) 55%), var(--card);
    border:1px solid var(--card-border);
    border-radius:16px;
    overflow:hidden;
    color:inherit; text-decoration:none;
    position:relative;
    box-shadow:0 10px 20px -14px rgba(0,0,0,.85);
    -webkit-user-drag:none; user-select:none;
  }
  .wb-card.is-top{ border-color:rgba(255,0,1,.45); box-shadow:0 10px 24px -14px rgba(255,0,1,.55); }
  .wb-media{ position:relative; aspect-ratio:16/11; background:#151515; overflow:hidden; }
  .wb-media img{ width:100%; height:100%; object-fit:cover; display:block; pointer-events:none; }
  .wb-img-fallback{ width:100%; height:100%; display:flex; align-items:center; justify-content:center; }
  .wb-img-fallback svg{ width:30px; height:30px; color:var(--text-faint); }
  .wb-body{ padding:10px 12px 12px; min-width:0; }
  .wb-name{ font-size:13px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .wb-price{ margin-top:4px; font-size:13px; font-weight:800; color:var(--red-glow); white-space:nowrap; }
  .wb-from{ font-size:10px; font-weight:600; color:var(--text-dim); }
  .wb-sold{
    margin-top:6px; font-size:10.5px; color:var(--text-dim);
    display:flex; align-items:center; gap:4px; white-space:nowrap;
  }
  .wb-sold svg{ width:11px; height:11px; color:var(--red-glow); flex-shrink:0; }
  .wb-track > .prod-card.wb-pc{ flex:0 0 calc((100% - 12px) / 2); min-width:0; width:auto; }
  .wb-wrap{ position:relative; }
  .wb-nav{
    position:absolute; z-index:2;
    top:calc(var(--wb-img-h, 120px) - 42px);
    width:42px; height:42px; padding:0; border-radius:50%;
    display:none; align-items:center; justify-content:center;
    background:rgba(0,0,0,.55); color:#fff;
    border:1px solid rgba(255,255,255,.22);
    -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
    cursor:pointer; -webkit-tap-highlight-color:transparent;
    transition:background .2s, transform .15s;
  }
  .wb-nav svg{ width:22px; height:22px; }
  .wb-nav:active{ background:var(--red); transform:scale(.92); }
  .wb-prev{ left:-4px; }
  .wb-next{ right:-4px; }
  .wb-wrap.has-nav .wb-nav{ display:flex; }
  @media (prefers-reduced-motion: reduce){
    .wb-track{ transition:none !important; }
  }

  /* ---------- Placeholder fields (for you to fill in with real data) ---------- */
  .todo{
    opacity:.5;
    font-style:italic;
  }

  /* ---------- Why cards ---------- */
  .why-card{
    background:#0a0a0a;
    border:1px solid #1e1e1e;
    border-radius:14px; padding:18px; display:flex; gap:14px;
    margin-bottom:12px;
    box-shadow:none;
  }
  .why-icon{
    width:42px; height:42px; border-radius:11px; flex-shrink:0;
    background:#240000;
    color:var(--red-glow);
    display:flex; align-items:center; justify-content:center;
    box-shadow:none;
  }
  .why-icon svg{ width:20px; height:20px; }
  .why-title{ font-weight:700; font-size:15px; margin-bottom:5px; }
  .why-text{ font-size:13px; color:var(--text-dim); line-height:1.65; }

  /* ---------- Category rail (legacy, still used by product rails) ---------- */
  .rail{
    display:flex; gap:9px; overflow-x:auto; overflow-y:visible; padding:20px 20px 26px;
    scroll-snap-type:x mandatory;
    position:relative;
  }
  .rail::-webkit-scrollbar{ display:none; }

  /* ---------- Category stack (full-width banner cards) ----------
     v2 — premium redesign: whole card is now ONE clickable <a> (was
     <a class="cat-banner"> + separate <div class="cat-meta"> sibling
     before — one focus ring / one hit-area now, easier to tap), with
     proper Default / Hover / Pressed / Focus states, real depth
     (layered box-shadow, not a flat box), and a pointer-follow glare
     on desktop. The old always-on pulsing glow/dot animations were
     removed — a flashing accent reads as cheap; the glow now only
     intensifies on hover/focus, which also servers as the "selected"
     cue since each card is a plain navigation link, not a toggle. */
  .cat-stack{ display:flex; flex-direction:column; gap:16px; padding:2px 20px 6px; }

  .cat-item{
    display:flex; flex-direction:column;
    border-radius:16px;
    position:relative;
    isolation:isolate;
    border:1px solid #1e1e1e;
    background:#0a0a0a;
    outline:none;
    /* layered shadow = ambient (soft, wide) + contact (tight, dark) so the
       card reads as sitting slightly above the page, not just a flat box */
    box-shadow:
      0 1px 0 0 rgba(255,255,255,.03) inset,
      0 14px 28px -18px rgba(0,0,0,.7);
    transition:
      opacity .6s cubic-bezier(.22,1,.36,1),
      transform .45s cubic-bezier(.22,1,.36,1),
      border-color .35s ease,
      box-shadow .45s cubic-bezier(.22,1,.36,1);
    /* scroll-reveal starting state — script.js/storefront.js flip .cat-in-view on */
    opacity:0; transform:translateY(22px);
  }
  .cat-item.cat-in-view{ opacity:1; transform:translateY(0); }

  /* hover — desktop/mouse only, guarded so taps on touch screens never get
     stuck "hovered" after the finger lifts (a common mobile-web bug) */
  @media (hover:hover) and (pointer:fine){
    .cat-item:hover{
      transform:translateY(-5px);
      border-color:#3a1414;
      box-shadow:
        0 1px 0 0 rgba(255,255,255,.05) inset,
        0 26px 38px -20px rgba(255,0,1,.16),
        0 18px 32px -20px rgba(0,0,0,.8);
    }
    .cat-item:hover .cat-banner-media img,
    .cat-item:hover .cat-img-placeholder{ transform:scale(1.05); }
    .cat-item:hover .cat-glare{ opacity:1; }
    .cat-item:hover .cat-tag-row .accent-bar{ box-shadow:0 0 12px rgba(255,0,1,.85); }
    .cat-item:hover .cat-big-title{ text-shadow:0 0 30px rgba(255,0,1,.6), 0 0 10px rgba(255,0,1,.4); }
    .cat-item:hover .cat-click{ color:#fff; transform:translateX(2px); }
    .cat-item:hover .cat-click .dot{ background:var(--red-glow); }
    .cat-item:hover .cat-meta-arrow{ background:var(--red-glow); border-color:var(--red-glow); transform:rotate(-45deg); }
    .cat-item:hover .cat-meta-arrow svg{ color:#fff; }
  }

  /* pressed — quick, snappy settle so a tap always feels acknowledged
     (works on touch too, since :active fires on tap-down there as well) */
  .cat-item:active{
    transform:translateY(-2px) scale(.984);
    transition:transform .12s ease, border-color .2s ease, box-shadow .2s ease;
  }

  /* keyboard focus (Tab key) — same visual language as hover, but must show
     up even with no mouse/hover support, so it's kept outside the media query */
  .cat-item:focus-visible{
    border-color:#3a1414;
    box-shadow:
      0 0 0 2px #000, 0 0 0 4px var(--red-glow),
      0 18px 32px -20px rgba(0,0,0,.8);
  }
  .cat-item:focus-visible .cat-tag-row .accent-bar{ box-shadow:0 0 12px rgba(255,0,1,.85); }
  .cat-item:focus-visible .cat-big-title{ text-shadow:0 0 30px rgba(255,0,1,.6), 0 0 10px rgba(255,0,1,.4); }

  .cat-banner{
    position:relative;
    display:block;
    overflow:hidden;
    border-radius:16px 16px 0 0;
    /* Sized to the exact ratio of your real banner image (757×265px ≈ 2.86:1)
       — height scales with card width automatically, so a real photo at this
       ratio always fills the box exactly: no crop, no stretch, no empty gap. */
    aspect-ratio: 757 / 265;
  }
  .cat-banner-bg{
    position:absolute; inset:0;
    background:#141414;
  }

  /* image / media area — full-bleed across the whole banner, matching
     the exact size of the real graphic you'll drop in (logo + title + art
     + "Click Here!" all baked into one image, same as the reference).
     mask-image on "has-image" fades the photo's own bottom edge into the
     card so it blends with the meta text below even before ::after adds
     its own fade on top. */
  .cat-banner-media{
    position:absolute; inset:0;
  }
  .cat-banner-media.has-image{
    -webkit-mask-image:linear-gradient(to bottom, #000 55%, transparent 100%);
    mask-image:linear-gradient(to bottom, #000 55%, transparent 100%);
  }
  .cat-banner-media img{
    width:100%; height:100%; object-fit:cover; object-position:center; display:block;
    transition:transform .6s cubic-bezier(.22,1,.36,1);
  }
  /* placeholder shown until a real image is dropped in — sized to the exact
     ratio/box the real photo will fill (recommended export: 1600×560px,
     same 2.86:1 ratio as 757×265 — just higher-res for crisp retina screens) */
  .cat-banner-media .cat-img-placeholder{
    position:absolute; inset:10px;
    border-radius:12px;
    border:1.5px dashed rgba(255,255,255,.24);
    background:linear-gradient(160deg, rgba(255,0,1,.10), rgba(15,15,15,.5));
    display:flex; align-items:center; justify-content:center; flex-direction:column; gap:8px;
    color:var(--text-dim); text-align:center; padding:0 14px;
    transition:transform .6s cubic-bezier(.22,1,.36,1);
  }
  .cat-img-placeholder svg{
    width:30px; height:30px; opacity:.6; color:var(--red-glow);
    animation:cat-float 3s ease-in-out infinite;
  }
  @keyframes cat-float{
    0%,100%{ transform:translateY(0); }
    50%{ transform:translateY(-5px); }
  }
  .cat-img-placeholder span{ font-size:10.5px; line-height:1.5; }

  /* subtle top surface highlight — reads as glass/depth without a visible border */
  .cat-banner::before{
    content:"";
    position:absolute; inset:0;
    background:linear-gradient(180deg, rgba(255,255,255,.05), transparent 30%);
    z-index:1; pointer-events:none;
  }
  /* soft dark fade along the bottom so the banner blends smoothly into the
     meta text beneath it — always shown, so title/tag text stays readable
     on top of any uploaded image, not just the placeholder */
  .cat-banner::after{
    content:"";
    position:absolute; inset:0;
    background:linear-gradient(to top, #0a0a0a 0%, rgba(10,10,10,.5) 22%, transparent 55%);
    pointer-events:none;
    z-index:1;
  }

  /* pointer-follow soft glow — desktop only (set live by storefront.js on
     pointermove), pure decoration so it's inert/invisible until hovered */
  .cat-glare{
    position:absolute; inset:0; z-index:1; pointer-events:none;
    opacity:0; transition:opacity .4s ease;
    background:radial-gradient(220px circle at var(--mx,50%) var(--my,50%), rgba(255,255,255,.08), transparent 60%);
  }

  .cat-banner-content{
    position:relative; z-index:2;
    padding:16px 20px 0;
    max-width:64%;
  }
  .cat-tag-row{
    display:flex; align-items:center; gap:6px;
    font-size:11.5px; font-weight:600; color:var(--text);
    margin-bottom:5px;
  }
  .cat-tag-row .accent-bar{
    width:4px; height:13px; border-radius:2px;
    background:var(--red-glow);
    flex-shrink:0;
    box-shadow:0 0 8px rgba(255,0,1,.55);
    transition:box-shadow .4s ease;
  }
  .cat-tag-row svg{ width:14px; height:14px; color:var(--text); flex-shrink:0; }
  .cat-big-title{
    font-size:30px; font-weight:900; line-height:1;
    color:var(--red-glow);
    letter-spacing:.5px;
    margin-bottom:8px;
    word-break:break-word;
    text-shadow:0 0 20px rgba(255,0,1,.35);
    transition:text-shadow .5s ease;
  }
  .cat-url-pill{
    display:inline-block;
    font-size:9.5px; font-weight:600; letter-spacing:.3px;
    color:var(--text-dim);
    background:rgba(0,0,0,.45);
    border:1px solid rgba(255,255,255,.12);
    padding:4px 10px; border-radius:999px;
  }
  .cat-click{
    position:absolute; right:14px; bottom:12px; z-index:2;
    font-size:10.5px; color:rgba(255,255,255,.6); font-weight:500;
    display:flex; align-items:center; gap:4px;
    transition:color .3s ease, transform .3s cubic-bezier(.22,1,.36,1);
  }
  .cat-click .dot{
    width:6px; height:6px; background:rgba(255,255,255,.6); border-radius:50%;
    transition:background .3s ease;
  }

  .cat-meta{
    padding:12px 18px 14px; position:relative; z-index:2; min-height:86px;
    display:flex; align-items:center; justify-content:space-between; gap:10px;
    border-top:1px solid var(--card-border);
  }
  .cat-meta-text{ min-width:0; flex:1; }
  .cat-meta-name{ font-size:16.5px; font-weight:800; margin-bottom:2px; }
  .cat-meta-count{ font-size:11px; color:var(--text-faint); margin-top:2px; font-weight:600; }
  .cat-meta-arrow{
    width:32px; height:32px; border-radius:50%; flex-shrink:0;
    background:#141414; border:1px solid #232323;
    display:flex; align-items:center; justify-content:center;
    transition:background .3s ease, border-color .3s ease, transform .35s cubic-bezier(.22,1,.36,1);
  }
  .cat-meta-arrow svg{ width:14px; height:14px; color:var(--text-dim); transition:color .3s ease; }
  .empty-note{ font-size:12.5px; color:var(--text-faint); padding:14px 4px; text-align:center; }


  /* ---------- Product rail — v6: dark glass body + traveling light-beam
     border (signature effect). The beam is a thin conic-gradient comet
     masked down to a 1px ring (mask-composite:exclude) so only a ring
     path is ever painted, never the card face. --angle is driven every
     frame by prod-card-beam.js (eased rAF loop, not a CSS @keyframes)
     so hover/touch speed changes ease smoothly with no jump or reset. ---------- */
  @property --angle{
    syntax:'<angle>';
    inherits:false;
    initial-value:0deg;
  }
  @keyframes beam-spin{ to{ --angle:360deg; } }
  .prod-card{
    --angle:0deg;
    flex:0 0 auto; width:222px; scroll-snap-align:start;
    background:linear-gradient(175deg, rgba(26,23,23,.96), rgba(8,7,7,.98) 70%);
    border:1px solid rgba(255,255,255,.07);
    border-radius:16px; overflow:hidden; display:flex; flex-direction:column;
    box-shadow:
      0 10px 28px -12px rgba(0,0,0,.8),
      inset 0 1px 0 rgba(255,255,255,.05),
      inset 0 -20px 26px -22px rgba(0,0,0,.5),
      0 0 20px -10px rgba(255,0,1,.16);
    position:relative;
    transform:translateY(0) scale(1);
    transform-origin:center 70%;
    transition:transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s cubic-bezier(.22,1,.36,1), border-color .3s ease;
    contain:layout style;
  }
  .prod-card > .prod-media{ border-radius:15px 15px 0 0; overflow:hidden; }

  .prod-card::before{
    content:"";
    position:absolute; inset:0;
    border-radius:inherit;
    padding:1.6px;
    background:conic-gradient(from var(--angle),
      rgba(255,255,255,.06) 0deg,
      rgba(255,60,40,.08) 26deg,
      rgba(255,80,45,.7) 48deg,
      #fff 58deg,
      rgba(255,100,55,.8) 68deg,
      rgba(255,60,40,.08) 92deg,
      rgba(255,255,255,.06) 360deg);
    -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite:xor;
            mask-composite:exclude;
    pointer-events:none;
    z-index:1;
    animation:beam-spin 3.6s linear infinite;
    animation-delay:calc(var(--beam-i, 0) * -.6s);
    animation-play-state:paused;
  }
  .prod-card.in-view::before{ animation-play-state:running; }

  .prod-card:hover,
  .prod-card.is-hot{
    transform:translateY(-4px) scale(1.02);
    border-color:rgba(255,255,255,.13);
    box-shadow:
      0 18px 38px -14px rgba(0,0,0,.85),
      inset 0 1px 0 rgba(255,255,255,.07),
      inset 0 -20px 26px -22px rgba(0,0,0,.5),
      0 0 32px -8px rgba(255,0,1,.32);
  }
  .prod-card:active{ transform:translateY(-1px) scale(.995); }
  @media (prefers-reduced-motion: reduce){
    .prod-card{ transition:none; }
    .prod-card:hover, .prod-card:active, .prod-card.is-hot{ transform:none; }
  }

  /* image area — awaiting real product photos: quiet dot-grid + soft
     red ambient glow rather than a busy placeholder pattern */
  .prod-media{
    aspect-ratio:6/5; position:relative; overflow:hidden;
    background:
      radial-gradient(circle at 50% 38%, rgba(255,0,1,.16), transparent 60%),
      radial-gradient(circle, rgba(255,255,255,.05) 1px, transparent 1.4px),
      linear-gradient(165deg,#141414,#0a0a0a);
    background-size:auto, 13px 13px, auto;
    background-position:center, 0 0, center;
    display:flex; align-items:center; justify-content:center;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);
  }
  .prod-media svg{
    width:34px; height:34px; opacity:.28; position:relative; z-index:1;
    color:var(--red-glow);
    animation:media-idle 2.6s ease-in-out infinite;
  }
  /* ຮູບສິນຄ້າຈິງ (image_url ຈາກ Supabase) — ເຕັມກ່ອງ ບໍ່ຢືດ ບໍ່ຕັດຫຼາຍໂພດ */
  .prod-media img.prod-img{
    position:relative; z-index:1; width:100%; height:100%; object-fit:cover;
    border:1px solid rgba(255,255,255,.08); box-sizing:border-box;
  }
  @keyframes media-idle{
    0%,100%{ opacity:.22; transform:scale(1); }
    50%{ opacity:.4; transform:scale(1.05); }
  }
  .prod-card:active .prod-media svg{ animation-play-state:paused; transform:scale(1.08); opacity:.5; }
  /* slow scanning sweep — quiet nod to the "scan/aimbot HUD" subject matter */
  .prod-media::before{
    content:"";
    position:absolute; left:0; right:0; top:0; height:46%;
    background:linear-gradient(to bottom, transparent, rgba(255,0,1,.09), transparent);
    animation:media-scan 4.5s ease-in-out infinite;
    animation-play-state:paused;
    pointer-events:none;
  }
  .prod-card.in-view .prod-media::before{ animation-play-state:running; }
  @keyframes media-scan{
    0%{ transform:translate3d(0,-100%,0); }
    60%,100%{ transform:translate3d(0,218%,0); }
  }
  @media (prefers-reduced-motion: reduce){
    .prod-media svg, .prod-media::before{ animation:none; }
  }
  .prod-media::after{
    content:"";
    position:absolute; left:0; right:0; bottom:0; height:58%;
    background:linear-gradient(to bottom, transparent 0%, rgba(10,10,10,.55) 45%, #0a0a0a 100%);
    pointer-events:none;
  }

  /* HUD targeting-bracket corners — small scope-style marks that frame
     the media area, echoing the aim/ESP tools this store actually sells */
  .hud-corner{
    position:absolute; width:13px; height:13px; z-index:2; pointer-events:none;
    opacity:.75;
  }
  .hud-corner.tl{
    top:9px; left:9px;
    border-top:2px solid var(--red-glow); border-left:2px solid var(--red-glow);
    border-radius:3px 0 0 0;
    filter:drop-shadow(0 0 3px rgba(255,0,1,.5));
  }
  .hud-corner.br{
    bottom:9px; right:9px;
    border-bottom:2px solid var(--red-glow); border-right:2px solid var(--red-glow);
    border-radius:0 0 3px 0;
    filter:drop-shadow(0 0 3px rgba(255,0,1,.5));
  }

  .sold-badge{
    position:absolute; top:9px; right:9px; z-index:2;
    background:rgba(10,7,7,.9);
    border:1px solid rgba(255,255,255,.08);
    font-size:10.5px; padding:4px 9px; border-radius:999px;
    display:flex; align-items:center; gap:5px; color:var(--text-dim); font-weight:600;
  }
  .sold-badge svg{
    width:11px; height:11px; opacity:1; color:var(--red-glow); flex-shrink:0;
    animation:flame-pulse 1.8s ease-in-out infinite;
  }
  @keyframes flame-pulse{
    0%,100%{ transform:scale(1); opacity:.85; }
    50%{ transform:scale(1.18); opacity:1; }
  }
  @media (prefers-reduced-motion: reduce){ .sold-badge svg{ animation:none; } }

  .prod-body{
    padding:11px 13px 12px; display:flex; flex-direction:column; gap:6px; flex:1;
    margin-top:-1px;
  }
  .prod-name{
    font-size:14px; font-weight:800; line-height:1.3;
    background:linear-gradient(90deg,#fff,#ffd9b8 65%,var(--gold));
    -webkit-background-clip:text; background-clip:text; color:transparent;
    display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden;
  }
  .prod-name.todo{ -webkit-text-fill-color:var(--text-faint); background:none; }
  .prod-price{
    font-size:15.5px; font-weight:800;
    background:linear-gradient(90deg,#ff3030,var(--red));
    -webkit-background-clip:text; background-clip:text; color:transparent;
    filter:drop-shadow(0 0 5px rgba(255,0,1,.4));
  }
  .prod-price .from{ font-size:11px; color:var(--text-faint); font-weight:500; -webkit-text-fill-color:var(--text-faint); }
  .prod-price-reseller-tag{
    display:inline-block; margin-left:6px; font-size:10px; font-weight:700;
    color:var(--red-glow); -webkit-text-fill-color:var(--red-glow);
    border:1px solid var(--red-glow); border-radius:5px; padding:1px 5px; vertical-align:middle;
    text-shadow:0 0 6px rgba(255,0,1,.5);
  }

  /* thin divider so price/name and stock/button read as two distinct groups */
  .prod-body::after{
    content:""; order:2; height:1px; margin:1px 0 2px;
    background:linear-gradient(90deg, rgba(232,80,68,.22), rgba(232,80,68,.02));
  }
  .prod-name{ order:0; } .prod-price{ order:1; }
  .prod-status{ order:3; } .buy-btn{ order:4; }

  .prod-status{ font-size:11.5px; display:flex; align-items:center; gap:5px; font-weight:600; color:var(--text-dim); }
  .prod-status .stock{ color:var(--text-faint); font-weight:500; }
  .prod-status.out{ color:var(--text-faint); }
  .prod-status.out .dot{ background:var(--text-faint); box-shadow:none; }
  .dot{ width:7px; height:7px; border-radius:50%; background:var(--red-glow); display:inline-block; box-shadow:0 0 6px rgba(255,0,1,.7); }
  /* "ພ້ອມຂາຍ" (in-stock) status uses a green dot, not red — matches the
     reference video; paused/soldout keep the neutral gray dot above */
  .prod-status:not(.out) .dot{ background:var(--green); box-shadow:0 0 6px rgba(46,204,113,.65); }

  /* ============ ຕາປັ໊ມ "ຂາຍດີ!" ເທິງຮູບສິນຄ້າ (ສະເພາະສິນຄ້າທີ່ soldCount ສູງສຸດໃນ grid) ============ */
  .prod-stamp{
    position:absolute; top:10px; right:10px; z-index:3;
    padding:4px 11px;
    border-radius:6px;
    background:linear-gradient(135deg, #ff5a4d, var(--red-deep));
    color:#fff;
    font-weight:800;
    font-size:11.5px;
    letter-spacing:.02em;
    transform:rotate(-9deg);
    box-shadow:0 3px 10px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.15);
    pointer-events:none;
  }
  .prod-card.is-top-seller{
    border-color:rgba(232,179,74,.35);
    box-shadow:0 10px 28px -12px rgba(0,0,0,.75), 0 0 0 1px rgba(232,179,74,.1), 0 0 22px -6px rgba(232,179,74,.25), inset 0 1px 0 rgba(255,255,255,.05);
  }

  /* ============ ປ້າຍ "ຂາຍແລ້ວ X ອັນ" (ໂຊວ໌ໃນທຸກສິນຄ້າທີ່ soldCount > 0) ============ */
  .prod-sold-tag{
    order:3;
    display:inline-flex; align-items:center; gap:5px;
    align-self:flex-start;
    padding:3.5px 9px;
    border-radius:6px;
    background:rgba(232,179,74,.12);
    border:1px solid rgba(232,179,74,.3);
    color:var(--gold);
    font-size:11px;
    font-weight:600;
  }
  .prod-sold-tag svg{ width:11px; height:11px; flex-shrink:0; }

  .buy-btn{
    margin-top:auto; width:100%; padding:11px; border-radius:13px;
    background:linear-gradient(180deg,#ff4a3a,var(--red) 60%);
    color:#0a0000;
    font-size:13px; font-weight:800; border:none;
    display:flex; align-items:center; justify-content:center; gap:6px;
    box-shadow:0 8px 18px -6px rgba(255,0,1,.55), inset 0 1px 0 rgba(255,255,255,.32);
    transition:transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  }
  .buy-btn svg{ width:15px; height:15px; flex-shrink:0; }
  .buy-btn:active{ transform:scale(.96); box-shadow:0 4px 12px -6px rgba(255,0,1,.5), inset 0 1px 0 rgba(255,255,255,.18); }
  .buy-btn:disabled{ background:rgba(255,255,255,.08); color:var(--text-faint); opacity:1; box-shadow:none; }

  /* =========================================================
     ໂໝດ "ຕົວແທນ" (Reseller Active Glow) — ໃຊ້ glow ສີແດງດຽວກັນກັບຕອນ hover
     ກາຕູນທີ່ມີຢູ່ແລ້ວທົ່ວເວັບ ແຕ່ໃຫ້ "ຄ້າງໄວ້" ຕະຫຼອດເມື່ອຄົນນັ້ນ login ເປັນຕົວແທນ —
     ບໍ່ໃຊ້ສີໃໝ່ໃດໆ ນອກເໜືອຈາກໂຕນສີເດີມຂອງເວັບ (--red / --red-glow / --red-deep)
     ໃສ່ໂດຍ JS: header.is-reseller / .logo.is-reseller / .login-btn.is-reseller /
     .acct-dd-badge.is-reseller / .prod-card.is-reseller / .prod-price.is-reseller-glow
     ========================================================= */
  header.is-reseller{
    border-color:rgba(255,0,1,.4);
    box-shadow:0 10px 24px -14px rgba(255,0,1,.5);
  }
  /* โลโก้ตัวแทน: เอากรอบ/เส้นขอบแดงรอบโลโก้ออก (ไม่มีเส้นขอบ ไม่มีวงเรืองแสง) */
  .logo.is-reseller{
    box-shadow:none;
    border:0;
    outline:0;
  }
  .login-btn.is-reseller{
    box-shadow:0 0 16px rgba(255,0,1,.6), inset 0 1px 0 rgba(255,255,255,.25);
  }

  .prod-card.is-reseller{
    border-color:rgba(255,0,1,.55);
    box-shadow:0 0 0 1px rgba(255,0,1,.3), 0 14px 32px -13px rgba(255,0,1,.7);
  }
  @keyframes reseller-pulse{
    0%,100%{ box-shadow:0 0 0 1px rgba(255,0,1,.2), 0 14px 30px -14px rgba(255,0,1,.55); }
    50%{ box-shadow:0 0 0 1px rgba(255,0,1,.4), 0 14px 34px -12px rgba(255,0,1,.8); }
  }
  @media (prefers-reduced-motion: reduce){
    .prod-card.is-reseller{ animation:none; }
  }
  .prod-price.is-reseller-glow{
    filter:drop-shadow(0 0 8px rgba(255,0,1,.65));
  }

  /* ---------- Product card v5: ສະຖານະ "ປັບປຸງ / ລໍຖ້າອັບເດດ" (admin ປິດຂາຍເອງ)
     ໂຕນອຳພັນ (gold) = ບໍ່ແມ່ນຂາຍໝົດ ແຕ່ແອດມິນປິດໄວ້ຊົ່ວຄາວ, ຟັນເຟືອງ+ປະແຈ ໝູນ
     ພ້ອມແຖບໂຫລດຄືບໜ້າ ໃຫ້ຮູ້ສຶກວ່າ "ກຳລັງເຮັດວຽກຢູ່" ບໍ່ແມ່ນຄ້າງ ---------- */
  .prod-media.is-paused{
    background:linear-gradient(165deg,#131313,#090909);
    flex-direction:column; gap:8px; padding:18px 12px;
  }
  .prod-media.is-paused::before,
  .prod-media.is-paused::after{ content:none; }
  .paused-icon{
    position:relative; width:46px; height:40px; color:var(--gold);
    filter:drop-shadow(0 0 8px rgba(232,179,74,.45));
  }
  .paused-icon .gear{
    position:absolute; left:0; top:0; width:26px; height:26px;
    animation:gear-spin 6s linear infinite; transform-origin:50% 50%;
  }
  .paused-icon .gear svg{ width:100%; height:100%; }
  .paused-icon .wrench{
    position:absolute; right:0; bottom:0; width:24px; height:24px;
    transform-origin:70% 30%; animation:wrench-turn 1.7s ease-in-out infinite;
  }
  .paused-icon .wrench svg{ width:100%; height:100%; }
  @keyframes gear-spin{ to{ transform:rotate(360deg); } }
  @keyframes wrench-turn{
    0%,100%{ transform:rotate(-16deg); }
    50%{ transform:rotate(12deg); }
  }
  .paused-title{ font-size:13px; font-weight:800; color:var(--gold); text-align:center; }
  .paused-sub{ font-size:11px; color:var(--text-faint); font-weight:500; text-align:center; }
  .paused-bar{
    width:70%; height:3px; border-radius:99px; overflow:hidden;
    background:rgba(255,255,255,.08); margin-top:2px;
  }
  .paused-bar i{
    display:block; height:100%; width:40%; border-radius:99px;
    background:linear-gradient(90deg,var(--gold),#fff3d0);
    animation:paused-bar-fill 2.4s ease-in-out infinite;
  }
  @keyframes paused-bar-fill{
    0%{ transform:translateX(-100%); }
    100%{ transform:translateX(250%); }
  }
  @media (prefers-reduced-motion: reduce){
    .paused-icon .gear, .paused-icon .wrench, .paused-bar i{ animation:none; }
  }

  /* ---------- Product card v5: ສະຖານະ "ສິນຄ້າໝົດ" (ຂາຍໝົດຈິງໆ) —
     "ນິລະໄພປິດຜະນຶກ": ໂບ hazard-tape ສີແດງພາດມຸມ + ໄອຄອນລັອກ, ອ່ານໄວ ຊັດເຈນ,
     ບໍ່ຈໍ້າຈີ້ເທົ່າ glitch/hologram ຮູບແບບເກົ່າ ---------- */
  .prod-media.is-soldout{
    background:linear-gradient(165deg,#120909,#070404);
    position:relative; overflow:hidden;
  }
  .prod-media.is-soldout::before,
  .prod-media.is-soldout::after{ content:none; }
  .soldout-ribbon{
    position:absolute; top:14px; left:-34px; width:150px; padding:3px 0; z-index:3;
    background:repeating-linear-gradient(-45deg, var(--red-deep) 0 8px, #1a0a0a 8px 16px);
    transform:rotate(-38deg); text-align:center;
    box-shadow:0 2px 8px rgba(0,0,0,.5);
  }
  .soldout-ribbon span{
    font-size:9.5px; font-weight:700; letter-spacing:.12em; color:#fff;
    text-shadow:0 1px 2px rgba(0,0,0,.6);
  }
  .soldout-wrap{
    position:relative; z-index:2; display:flex; flex-direction:column;
    align-items:center; gap:6px; width:100%; height:100%;
    justify-content:center; padding:14px;
  }
  .soldout-lock{
    width:34px; height:34px; color:var(--text-dim);
    animation:soldout-lock-shake 5s linear infinite;
  }
  @keyframes soldout-lock-shake{
    0%,88%{ transform:rotate(0deg); }
    92%{ transform:rotate(-14deg); }
    96%{ transform:rotate(10deg); }
    100%{ transform:rotate(0deg); }
  }
  .soldout-title{
    font-size:12.5px; font-weight:800; color:var(--text-dim); margin-top:2px;
  }
  .soldout-sub{ font-size:10.5px; color:var(--text-faint); font-weight:500; text-align:center; }
  @media (prefers-reduced-motion: reduce){
    .soldout-lock{ animation:none; }
  }

  .cat-block{ margin-bottom:6px; }

  /* ---------- Back button + Breadcrumb nav (category.html / product.html) ----------
     Minimal Premium: บ่มีพื้นหลัง/ไม่ใช่สี่เหลี่ยม, ลูกศร+ข้อความสีเทา,
     hover/แตะ -> ลูกศรเลื่อนซ้าย 4px + สีขาว, กด -> ยุบลงเล็กน้อย + แสงแดงจางฟุ้งรอบปุ่ม */
  .page-nav{
    display:flex; align-items:center; gap:12px;
    padding:16px 20px 0;
    white-space:nowrap; overflow-x:auto;
    -ms-overflow-style:none; scrollbar-width:none;
  }
  .page-nav::-webkit-scrollbar{ display:none; }

  .page-back{
    flex:0 0 auto;
    display:inline-flex; align-items:center; gap:6px;
    background:transparent; border:none;
    padding:5px 3px; border-radius:8px;
    font-size:13.5px; color:var(--text-dim); font-weight:600;
    -webkit-tap-highlight-color:transparent;
    transition:color .2s ease, transform .12s ease, box-shadow .25s ease;
  }
  .page-back .pb-arrow{
    display:inline-flex;
    transition:transform .2s cubic-bezier(.4,0,.2,1);
  }
  .page-back svg{ width:16px; height:16px; display:block; }
  .page-back:hover{ color:var(--text); }
  .page-back:hover .pb-arrow{ transform:translateX(-4px); }
  .page-back:active{
    transform:scale(.94);
    box-shadow:0 0 0 8px rgba(255,0,1,.10), 0 0 18px rgba(255,0,1,.25);
  }
  .page-back:focus-visible{ outline:none; box-shadow:0 0 0 3px rgba(255,0,1,.25); }

  .page-nav-divider{ flex:0 0 auto; width:1px; height:15px; background:var(--card-border); }

  .breadcrumb{
    flex:1 1 auto; min-width:0;
    display:inline-flex; align-items:center; gap:6px;
    font-size:12.5px; color:var(--text-faint);
  }
  .breadcrumb a{
    color:var(--text-faint); text-decoration:none;
    display:inline-flex; align-items:center; gap:5px; white-space:nowrap;
    transition:color .2s ease;
  }
  .breadcrumb a:hover{ color:var(--text-dim); }
  .breadcrumb a svg{ width:12.5px; height:12.5px; flex-shrink:0; }
  .breadcrumb .bc-sep{ color:var(--card-border); font-size:11px; flex-shrink:0; }
  .breadcrumb .bc-current{
    color:var(--text); font-weight:600;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  }

  /* (ตัด page transition ซ้ำซ้อนออก — ใช้ page-transition.css / page-transition.js ตัวเดียว) */

  .cat-page-head{ padding:14px 20px 4px; position:relative; z-index:1; }
  .cat-page-title{
    font-size:26px; font-weight:800; line-height:1.25; margin-bottom:8px;
  }
  .cat-page-desc{ font-size:13.5px; color:var(--text-dim); line-height:1.65; max-width:42ch; }

  /* ---------- Loading skeleton (ກັນບໍ່ໃຫ້ຂໍ້ຄວາມ default ເກົ່າໂຊວ໌ຄ້າງໄວ້ຕອນ
     ຍັງດຶງຂໍ້ມູນຈິງບໍ່ສຳເລັດ — ໂຊວ໌ແຖບ pulse ແທນ ຈົນກວ່າຈະໄດ້ຂໍ້ມູນຈິງ) ---------- */
  .is-loading{
    color:transparent !important; border-radius:6px; user-select:none;
    background:linear-gradient(90deg, var(--card-border) 25%, rgba(255,255,255,.08) 50%, var(--card-border) 75%);
    background-size:200% 100%; animation:skeleton-pulse 1.3s ease-in-out infinite;
  }
  @keyframes skeleton-pulse{ 0%{background-position:200% 0;} 100%{background-position:-200% 0;} }

  .search-box{
    margin:20px 20px 4px;
    display:flex; align-items:center; gap:10px;
    background:linear-gradient(155deg,#101010,#0a0a0a);
    border:1px solid #222;
    border-radius:14px; padding:13px 16px;
  }
  .search-box svg{ width:17px; height:17px; color:var(--text-faint); flex-shrink:0; }
  .search-box input{
    flex:1; background:none; border:none; outline:none;
    color:var(--text); font-size:14px; font-family:inherit;
  }
  .search-box input::placeholder{ color:var(--text-faint); }

  .prod-grid{
    display:grid; grid-template-columns:1fr 1fr; gap:14px;
    padding:22px 20px 30px; position:relative; z-index:1;
  }
  .prod-card.grid-card{ width:auto; }

  .empty-state{
    display:none; flex-direction:column; align-items:center; justify-content:center;
    gap:10px; text-align:center; padding:60px 30px; color:var(--text-faint);
  }
  .empty-state svg{ width:34px; height:34px; opacity:.4; color:var(--red-glow); }
  .empty-state p{ font-size:13.5px; line-height:1.6; max-width:32ch; }

  /* ---------- Footer / chat ---------- */
  .chat-fab{
    position:fixed; right:20px; bottom:24px;
    width:56px; height:56px; border-radius:50%;
    background:radial-gradient(circle at 30% 30%, var(--red-glow), var(--red-deep));
    box-shadow:0 8px 18px rgba(0,0,0,.5);
    display:flex; align-items:center; justify-content:center;
    z-index:50; border:none;
  }
  .chat-fab svg{ width:24px; height:24px; color:#fff; }

  footer{
    margin-top:40px; padding:28px 20px 100px;
    border-top:1px solid var(--card-border);
    text-align:center;
    position:relative; z-index:1;
  }
  .footer-logo.logo{
    width:80px; height:80px; border-radius:50%;
    margin:0 auto 14px; overflow:visible;
  }
  /* รูปโลโก้ที่อัปโหลดมักมีขอบโปร่งใสรอบตัว ทำให้ดูเล็ก — ขยายเนื้อในอีกนิดให้พอดีตา */
  .footer-logo.logo img{ transform:scale(1.2); transform-origin:center; }
  .footer-logo.logo svg{ width:34px; height:34px; }
  footer .fname{ font-weight:800; font-size:15px; margin-bottom:6px; }
  .fsocial{
    display:flex; align-items:center; justify-content:center; gap:10px;
    margin:14px 0 16px; flex-wrap:wrap;
  }
  .footer-social-link{
    width:44px; height:44px; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    color:#fff; flex-shrink:0;
    box-shadow:0 6px 14px -4px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.25);
    border:1px solid rgba(255,255,255,.14);
    transition:transform .15s ease, filter .15s ease, box-shadow .15s ease;
  }
  .footer-social-link svg{ width:19px; height:19px; }
  .footer-social-link:hover{ transform:translateY(-3px) scale(1.05); filter:brightness(1.15); box-shadow:0 10px 18px -4px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.3); }
  .footer-social-link:active{ transform:translateY(-1px) scale(.97); }
  footer .fcopy{ font-size:11px; color:var(--text-faint); line-height:1.7; }

  ::selection{ background:var(--red); color:#fff; }

  /* =========================================================
     Bottom tab bar — โผล่ตอนกดโปรไฟล์ (avatar ในหัวเว็บ ตอนล็อกอินแล้ว)
     สร้างโดย script.js (renderAccountMenu)
     ========================================================= */
  .login-btn.is-authed{ cursor:pointer; }

  .tabbar{
    position:fixed; left:50%; bottom:calc(14px + env(safe-area-inset-bottom, 0px)); z-index:1100;
    width:calc(min(100%, 480px) - 24px);
    display:flex; align-items:center; justify-content:space-between; gap:2px;
    padding:6px; border-radius:30px;
    background:rgba(18,18,18,.78);
    -webkit-backdrop-filter:blur(20px) saturate(170%); backdrop-filter:blur(20px) saturate(170%);
    border:1px solid rgba(255,255,255,.1);
    box-shadow:0 12px 34px -8px rgba(0,0,0,.8), 0 0 26px -12px rgba(255,0,1,.55), inset 0 1px 0 rgba(255,255,255,.07);
    /* ปิดอยู่: ซ่อนลงล่าง ย่อเล็ก */
    opacity:0; visibility:hidden; pointer-events:none;
    transform:translateX(-50%) translateY(90px) scale(.7);
    transform-origin:50% 100%;
    transition:transform .35s cubic-bezier(.4,0,1,1), opacity .25s ease, visibility 0s linear .35s;
  }
  .tabbar.show{
    opacity:1; visibility:visible; pointer-events:auto;
    transform:translateX(-50%) translateY(0) scale(1);
    transition:transform .65s cubic-bezier(.2,1.5,.35,1), opacity .2s ease, visibility 0s;  /* เด้งสะดุ้งขึ้น (overshoot) */
  }

  .tabbar-item{
    flex:1; height:48px; border-radius:24px; position:relative; z-index:1;
    display:flex; align-items:center; justify-content:center;
    color:var(--text-dim); background:none; border:none; padding:0; cursor:pointer;
    text-decoration:none;
    transition:color .3s ease, transform .2s cubic-bezier(.3,1.6,.5,1);
    opacity:0; transform:translateY(22px) scale(.5);
  }
  .tabbar.show .tabbar-item{
    opacity:1; transform:none;
    transition:opacity .3s ease, transform .6s cubic-bezier(.2,1.7,.35,1), color .3s ease;
    transition-delay:calc(.08s + var(--i,0) * 45ms), calc(.08s + var(--i,0) * 45ms), 0s;
  }
  .tabbar-item svg{ width:25px; height:25px; stroke:currentColor; transition:transform .4s cubic-bezier(.3,1.7,.5,1); }
  .tabbar.show .tabbar-item:active{ transform:scale(.86); transition-delay:0s; }
  .tabbar-item.active{ color:var(--red-glow); }
  .tabbar-item.active svg{ transform:scale(1.12); filter:drop-shadow(0 0 8px rgba(255,0,1,.65)); }
  .tabbar-item.danger{ color:var(--red-glow); opacity:.9; }

  /* แถบสีแดงที่เลื่อนซ้าย-ขวาตามไอคอนที่กด */
  .tabbar-pill{
    position:absolute; top:6px; left:0; height:48px; width:0; border-radius:24px; z-index:0;
    background:linear-gradient(180deg, rgba(255,0,1,.26), rgba(255,0,1,.12));
    border:1px solid rgba(255,0,1,.35);
    box-shadow:0 0 18px -4px rgba(255,0,1,.55);
    opacity:0; pointer-events:none;
    transition:transform .5s cubic-bezier(.34,1.45,.4,1), width .5s cubic-bezier(.34,1.45,.4,1), opacity .2s ease;
  }

  /* ปุ่มแชทลอยหนีขึ้นเมื่อแถบเปิด ไม่ให้ซ้อนกัน */
  .chat-fab{ transition:bottom .4s cubic-bezier(.2,1.3,.4,1); }
  body.tabbar-open .chat-fab{ bottom:calc(94px + env(safe-area-inset-bottom, 0px)); }

  @media (prefers-reduced-motion: reduce){
    .tabbar, .tabbar.show, .tabbar-item, .tabbar.show .tabbar-item, .tabbar-pill, .chat-fab{ transition-duration:.01s; transition-delay:0s; }
  }

  /* =========================================================
     Top-up page (topup.html)
     ========================================================= */
  .topup-main{
    padding:18px 20px 40px; position:relative; z-index:1;
    --tu-red:var(--red-glow);
    --tu-red-soft:rgba(255,0,1,.14);
    --tu-amber:#ffb020;
    --tu-font-display:'Orbitron', sans-serif;
    --tu-font-num:'Rajdhani', sans-serif;
  }
  .topup-main::before{
    content:''; position:absolute; inset:0 0 auto 0; height:520px; pointer-events:none; z-index:-1;
    background:
      radial-gradient(ellipse 520px 260px at 50% -10%, rgba(255,0,1,.14), transparent 60%);
  }

  .topup-title-row{ display:flex; align-items:center; gap:12px; margin:6px 0 22px; }
  .topup-back-btn{
    width:36px; height:36px; border-radius:11px; flex-shrink:0;
    display:flex; align-items:center; justify-content:center;
    background:var(--card); border:1px solid var(--card-border); color:var(--red-glow);
  }
  .topup-back-btn svg{ width:18px; height:18px; }
  .topup-title-row h1{ font-family:var(--tu-font-display); font-size:18px; font-weight:800; letter-spacing:.02em; }

  .topup-label{ font-size:12.5px; font-weight:700; color:var(--text-dim); margin:0 0 12px; letter-spacing:.01em; text-transform:uppercase; }

  .topup-methods{ display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:18px; }
  .topup-method{
    position:relative; text-align:left; padding:13px; border-radius:14px;
    background:rgba(255,255,255,.02); border:1px solid var(--card-border);
    display:flex; align-items:center; gap:10px;
  }
  .topup-method.active{
    border-color:var(--tu-red);
    background:linear-gradient(160deg,#141414,#0a0a0a);
    box-shadow:0 0 0 1px rgba(255,0,1,.2), 0 10px 26px -12px rgba(255,0,1,.45);
  }
  .topup-method-icon{
    width:36px; height:36px; border-radius:10px; flex-shrink:0;
    background:var(--bg-raise); color:var(--tu-red);
    display:flex; align-items:center; justify-content:center;
  }
  .topup-method-icon svg{ width:16px; height:16px; }
  .topup-method-icon.has-logo{ background:#fff; overflow:hidden; }
  .topup-method-icon.has-logo img{ width:100%; height:100%; object-fit:cover; }
  .topup-method-name{ font-size:13px; font-weight:700; line-height:1.3; }
  .topup-method-sub{ font-size:10px; color:var(--green); margin-top:2px; }
  .topup-method-check{
    position:absolute; top:10px; right:10px; width:18px; height:18px; border-radius:6px;
    background:var(--tu-red); color:#fff; display:none; align-items:center; justify-content:center;
  }
  .topup-method-check svg{ width:11px; height:11px; }
  .topup-method.active .topup-method-check{ display:flex; }

  .topup-card{
    background:linear-gradient(165deg,#101010,#000); border:1px solid var(--card-border);
    border-radius:18px; padding:18px; position:relative; overflow:hidden;
  }
  .topup-card::before{
    content:''; position:absolute; top:0; left:0; right:0; height:1px;
    background:linear-gradient(90deg, transparent, rgba(255,0,1,.6), transparent);
  }
  .topup-card-head{ display:flex; gap:12px; margin-bottom:18px; align-items:center; }
  .topup-card-icon{
    width:38px; height:38px; border-radius:10px; flex-shrink:0;
    background:var(--bg-raise); color:var(--green);
    display:flex; align-items:center; justify-content:center;
  }
  .topup-card-icon svg{ width:19px; height:19px; }
  .topup-card-icon.has-logo{ background:#fff; overflow:hidden; }
  .topup-card-icon.has-logo img{ width:100%; height:100%; object-fit:cover; }
  .topup-card-head-text b{ font-size:13.5px; display:block; margin-bottom:4px; }
  .topup-card-head-text p{ font-size:11.5px; color:var(--text-faint); line-height:1.6; }

  /* ---- selected amount summary ---- */
  .topup-amount-summary{
    text-align:center; padding:14px 0 18px; margin-bottom:4px;
    border-bottom:1px dashed var(--card-border);
  }
  .topup-amount-summary .sum-label{
    font-size:11px; color:var(--text-faint); margin-bottom:8px; letter-spacing:.05em; text-transform:uppercase;
  }
  .topup-amount-summary .sum-value{
    font-family:var(--tu-font-display); font-size:28px; font-weight:800; color:var(--text-faint);
    transition:all .25s ease; letter-spacing:.02em;
  }
  .topup-amount-summary .sum-value.picked{ color:var(--tu-red); text-shadow:0 0 24px rgba(255,0,1,.5); }

  /* ---- animated reveal amount picker ---- */
  .topup-picker-wrap{ margin:16px 0 20px; position:relative; }
  .topup-picker-hint{
    text-align:center; font-size:11px; color:var(--text-faint); margin-bottom:12px;
    display:flex; align-items:center; justify-content:center; gap:6px;
    opacity:1; transition:opacity .35s ease, height .35s ease; height:16px; overflow:hidden;
  }
  .topup-picker-hint.gone{ opacity:0; height:0; margin-bottom:0; }
  .topup-picker-hint .arrow{ display:inline-flex; animation:tuNudge 1.4s ease-in-out infinite; }
  .topup-picker-hint .arrow svg{ width:11px; height:11px; }
  @keyframes tuNudge{ 0%,100%{ transform:translateX(0);} 50%{ transform:translateX(4px);} }

  .topup-presets{
    display:flex; gap:10px; padding:6px 2px 12px; overflow-x:hidden;
    scroll-snap-type:x mandatory; -webkit-overflow-scrolling:touch;
  }
  .topup-presets.expanded{ overflow-x:auto; }
  .topup-presets::-webkit-scrollbar{ display:none; }

  .topup-preset{
    flex:0 0 auto; scroll-snap-align:center;
    width:100px; height:64px; border-radius:13px;
    background:rgba(255,255,255,.02); border:1px solid var(--card-border);
    display:flex; align-items:center; justify-content:center; gap:3px;
    font-family:var(--tu-font-num); font-size:16px; font-weight:700; color:var(--text);
    transition:
      width .5s cubic-bezier(.34,1.56,.64,1),
      opacity .42s ease,
      transform .5s cubic-bezier(.34,1.56,.64,1),
      margin-right .5s cubic-bezier(.34,1.56,.64,1),
      border-color .2s ease, background .2s ease, box-shadow .2s ease;
    clip-path:polygon(9px 0,100% 0,100% calc(100% - 9px),calc(100% - 9px) 100%,0 100%,0 9px);
  }
  .topup-preset .cur{ color:var(--text-faint); font-weight:700; font-size:12px; }
  .topup-preset.wide{ width:136px; }
  .topup-preset:not(.first):not(.shown){
    width:0; opacity:0; transform:scale(.4) translateX(-20px);
    margin-right:-12px; pointer-events:none; border-width:0;
  }
  .topup-preset.first{
    box-shadow:0 0 0 3px rgba(255,0,1,.1), 0 0 22px -4px rgba(255,0,1,.4);
    animation:tuPulseChip 2.2s ease-in-out infinite;
  }
  .topup-presets.expanded .topup-preset.first{ animation:none; box-shadow:none; }
  @keyframes tuPulseChip{
    0%,100%{ box-shadow:0 0 0 3px rgba(255,0,1,.1), 0 0 22px -4px rgba(255,0,1,.4); }
    50%{ box-shadow:0 0 0 6px rgba(255,0,1,.03), 0 0 28px 0px rgba(255,0,1,.6); }
  }
  .topup-preset.active{
    border-color:var(--tu-red); background:var(--tu-red-soft);
    box-shadow:0 0 18px -4px rgba(255,0,1,.6) inset; color:var(--tu-red);
  }
  .topup-preset.active .cur{ color:var(--tu-red); }
  .topup-preset:active{ transform:scale(.95); }

  /* ---- custom amount input ---- */
  .topup-custom-divider{
    display:flex; align-items:center; gap:10px; margin:14px 0 12px; color:var(--text-faint);
    font-size:11px; letter-spacing:.05em;
  }
  .topup-custom-divider::before, .topup-custom-divider::after{
    content:''; flex:1; height:1px; background:var(--card-border);
  }
  .topup-custom-wrap{
    display:flex; align-items:center; gap:8px;
    border:1px solid var(--card-border); border-radius:13px; background:rgba(255,255,255,.02);
    padding:0 16px; height:56px; transition:border-color .2s ease, box-shadow .2s ease;
  }
  .topup-custom-wrap:focus-within{
    border-color:var(--tu-red); box-shadow:0 0 0 3px rgba(255,0,1,.12);
  }
  .topup-custom-cur{ font-family:var(--tu-font-num); font-size:16px; font-weight:700; color:var(--text-faint); }
  .topup-custom-input{
    flex:1; min-width:0; border:none; outline:none; background:transparent;
    font-family:var(--tu-font-num); font-size:18px; font-weight:800; color:var(--text);
    letter-spacing:.02em;
  }
  .topup-custom-input::placeholder{ color:var(--text-faint); font-weight:700; }
  .topup-custom-suffix{
    font-family:var(--tu-font-num); font-size:18px; font-weight:800; color:var(--text-faint);
    pointer-events:none; user-select:none;
  }
  .topup-custom-hint{
    font-size:10.5px; color:var(--text-faint); margin:8px 2px 0; line-height:1.5;
  }

  .topup-submit{
    width:100%; padding:15px; border-radius:13px; border:none; font-family:inherit;
    font-size:14.5px; font-weight:800; color:#fff;
    background:linear-gradient(135deg, var(--tu-red), #b8000e);
    box-shadow:0 10px 26px -6px rgba(255,0,1,.5);
    display:flex; align-items:center; justify-content:center; gap:8px;
    transition:opacity .15s ease, transform .1s ease;
  }
  .topup-submit:active{ transform:scale(.985); }
  .topup-submit:disabled{ background:var(--bg-raise); color:var(--text-faint); box-shadow:none; opacity:.7; }
  .topup-submit svg{ width:16px; height:16px; }
  .topup-note{ font-size:11px; text-align:center; color:var(--text-faint); margin-top:12px; }

  .topup-guide{ margin-top:26px; }
  .topup-guide ol{ list-style:none; display:flex; flex-direction:column; gap:12px; }
  .topup-guide li{ display:flex; align-items:flex-start; gap:12px; font-size:13px; color:var(--text-dim); line-height:1.6; }
  .topup-guide .num{
    width:20px; height:20px; border-radius:50%; flex-shrink:0; margin-top:1px;
    background:var(--card); border:1px solid var(--card-border); color:var(--red-glow);
    font-size:11px; font-weight:800; display:flex; align-items:center; justify-content:center;
  }

  /* ---- Step 2: amount-to-pay card ---- */
  .topup-pay-amount-card{ text-align:center; padding:22px 18px 24px; }
  .topup-pay-amount-card .lbl{ font-size:11px; color:var(--text-faint); letter-spacing:.06em; text-transform:uppercase; margin-bottom:10px; }
  .topup-pay-amount-card .val{
    font-family:var(--tu-font-display); font-size:30px; font-weight:800; color:var(--tu-red);
    text-shadow:0 0 26px rgba(255,0,1,.5); letter-spacing:.02em;
  }

  /* ---- Step 2: QR reticle frame ---- */
  .topup-qr-frame{ position:relative; width:206px; height:206px; margin:6px auto 14px; display:flex; align-items:center; justify-content:center; }
  .topup-qr-box{
    width:186px; height:186px; border-radius:10px;
    border:none; background:#fff;
    display:flex; align-items:center; justify-content:center; text-align:center;
    font-size:11.5px; color:#888; padding:12px; overflow:hidden;
  }
  .topup-qr-box img{ width:100%; height:100%; object-fit:contain; border-radius:6px; }
  .topup-qr-frame .corner{ position:absolute; width:22px; height:22px; }
  .topup-qr-frame .corner.tl{ top:0; left:0; border-top:3px solid var(--tu-red); border-left:3px solid var(--tu-red); border-top-left-radius:8px; }
  .topup-qr-frame .corner.tr{ top:0; right:0; border-top:3px solid var(--tu-red); border-right:3px solid var(--tu-red); border-top-right-radius:8px; }
  .topup-qr-frame .corner.bl{ bottom:0; left:0; border-bottom:3px solid var(--tu-red); border-left:3px solid var(--tu-red); border-bottom-left-radius:8px; }
  .topup-qr-frame .corner.br{ bottom:0; right:0; border-bottom:3px solid var(--tu-red); border-right:3px solid var(--tu-red); border-bottom-right-radius:8px; }
  .topup-qr-frame .scanline{
    position:absolute; left:16px; right:16px; height:2px; top:16px;
    background:linear-gradient(90deg, transparent, var(--tu-red), transparent);
    box-shadow:0 0 10px 1px rgba(255,0,1,.8);
    animation:tuScan 2.6s ease-in-out infinite;
  }
  @keyframes tuScan{
    0%,100%{ top:16px; opacity:.9; }
    50%{ top:calc(100% - 18px); opacity:.5; }
  }
  .topup-qr-hint{ text-align:center; font-size:11.5px; color:var(--text-faint); line-height:1.6; }

  .topup-upload{
    display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px;
    border:1.5px dashed #333; border-radius:16px;
    padding:24px 16px; text-align:center; background:var(--card); margin-bottom:16px; cursor:pointer;
  }
  .topup-upload.has-file{ border-color:var(--green); border-style:solid; }
  .topup-upload svg{ width:22px; height:22px; color:var(--red-glow); margin-bottom:2px; }
  .topup-upload.has-file svg{ color:var(--green); }
  .topup-upload .fname{ font-size:13px; font-weight:600; }
  .topup-upload .fhint{ font-size:11px; color:var(--text-faint); margin-top:2px; }
  .topup-upload-preview{
    display:none; width:100%; max-width:180px; max-height:130px; border-radius:10px;
    object-fit:cover; margin-bottom:2px;
  }
  .topup-upload-preview.show{ display:block; }

  .topup-waiting{ text-align:center; padding:8px 4px 4px; }
  .topup-waiting-icon{
    width:60px; height:60px; margin:0 auto 16px; border-radius:16px;
    background:rgba(255,176,32,.12); border:1px solid rgba(255,176,32,.4); color:var(--tu-amber);
    display:flex; align-items:center; justify-content:center;
    animation:tuPulseWait 1.8s ease-in-out infinite;
  }
  @keyframes tuPulseWait{ 0%,100%{ box-shadow:0 0 0 0 rgba(255,176,32,.3);} 50%{ box-shadow:0 0 0 10px rgba(255,176,32,0);} }
  .topup-waiting-icon svg{ width:26px; height:26px; }
  .topup-waiting h2{ font-family:var(--tu-font-display); font-size:15.5px; font-weight:800; color:var(--tu-amber); margin-bottom:8px; letter-spacing:.02em; }
  .topup-waiting p{ font-size:12px; color:var(--text-faint); line-height:1.7; margin-bottom:20px; }
  .topup-waiting-info{
    text-align:left; background:var(--bg-raise); border-radius:13px; padding:14px 16px;
    display:flex; flex-direction:column; gap:8px; font-size:13px;
  }
  .topup-waiting-info .row{ display:flex; justify-content:space-between; color:var(--text-faint); }
  .topup-waiting-info .row b{ color:var(--text); font-weight:700; }
  .topup-waiting-info .row.status b{ color:var(--tu-amber); }



  /* ---------- Contact modal (popup ຕອນກົດ chat FAB) ---------- */
  body.contact-modal-open{ overflow:hidden; }
  .contact-modal-overlay{
    position:fixed; inset:0; z-index:300;
    background:rgba(0,0,0,.65);
    display:flex; align-items:center; justify-content:center;
    padding:22px;
    opacity:0; pointer-events:none;
    transition:opacity .2s ease;
  }
  .contact-modal-overlay.show{ opacity:1; pointer-events:auto; }
  .contact-modal{
    position:relative; width:100%; max-width:360px;
    background:var(--card); border:1px solid var(--card-border);
    border-radius:22px; padding:34px 22px 24px; text-align:center;
    transform:translateY(14px) scale(.97); opacity:0;
    transition:transform .22s ease, opacity .22s ease;
    box-shadow:0 20px 50px rgba(0,0,0,.55);
  }
  .contact-modal-overlay.show .contact-modal{ transform:translateY(0) scale(1); opacity:1; }
  .contact-modal-close{
    position:absolute; top:14px; right:14px;
    width:30px; height:30px; border-radius:50%;
    background:var(--bg-raise); border:1px solid var(--card-border);
    display:flex; align-items:center; justify-content:center;
    color:var(--text-dim); cursor:pointer;
  }
  .contact-modal-close svg{ width:15px; height:15px; }
  .contact-modal-logo{
    width:56px; height:56px; margin:0 auto 14px; border-radius:50%;
    background:radial-gradient(circle at 30% 30%, var(--red-glow), var(--red-deep));
    display:flex; align-items:center; justify-content:center; overflow:hidden;
  }
  .contact-modal-logo img{ width:100%; height:100%; object-fit:cover; }
  .contact-modal-logo svg{ width:26px; height:26px; }
  .contact-modal-title{ font-size:17px; font-weight:800; margin-bottom:3px; }
  .contact-modal-sub{ font-size:12.5px; color:var(--text-faint); margin-bottom:20px; }
  .contact-modal-links{ display:flex; flex-direction:column; gap:10px; }
  .contact-link{
    display:flex; align-items:center; gap:12px;
    padding:12px 14px; border-radius:14px;
    background:var(--bg-raise); border:1px solid var(--card-border);
    text-decoration:none; color:var(--text);
    transition:transform .15s ease;
  }
  .contact-link:active{ transform:scale(.98); }
  .contact-link-icon{
    width:38px; height:38px; border-radius:12px; flex:none;
    display:flex; align-items:center; justify-content:center;
    box-shadow:0 6px 14px -4px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.25);
  }
  .contact-link-icon svg{ width:19px; height:19px; color:#fff; }
  .contact-link-name{ flex:1; text-align:left; font-size:14px; font-weight:700; }
  .contact-link-arrow{ width:15px; height:15px; color:var(--text-faint); flex:none; }
  .contact-link:hover .contact-link-icon{ transform:scale(1.06); }
  .contact-link-icon{ transition:transform .15s ease; }
  .contact-modal-empty{ font-size:13px; color:var(--text-faint); line-height:1.7; padding:8px 4px 2px; }


  /* ---------- Promo popup (ໂຊວ໌ຕອນເປີດໜ້າຫຼັກ, ຮູບຕັ້ງຄ່າຈາກຫ້ອງແອດມິນ) ---------- */
  body.promo-popup-open{ overflow:hidden; }
  .promo-popup-overlay{
    position:fixed; inset:0; z-index:400;
    background:rgba(0,0,0,.72); backdrop-filter:blur(3px);
    display:flex; align-items:center; justify-content:center;
    padding:24px 18px;
    opacity:0; pointer-events:none;
    transition:opacity .22s ease;
  }
  .promo-popup-overlay.show{ opacity:1; pointer-events:auto; }
  .promo-popup{
    position:relative; width:100%; max-width:380px;
    transform:translateY(14px) scale(.97); opacity:0;
    transition:transform .24s ease, opacity .24s ease;
  }
  .promo-popup-overlay.show .promo-popup{ transform:translateY(0) scale(1); opacity:1; }
  .promo-popup-close{ display:none !important; } /* ລຶບປຸ່ມ X ອອກ */
  .promo-popup-img-wrap{
    border-radius:20px; overflow:hidden; border:1px solid var(--card-border);
    box-shadow:0 20px 50px rgba(0,0,0,.55);
    line-height:0;
  }
  .promo-popup-img-wrap img{ display:block; width:100%; height:auto; }
  .promo-popup-footer{
    position:relative; z-index:1; margin-top:12px;
    display:flex; align-items:center; justify-content:space-between; gap:10px;
    background:none; border:none; padding:0;
  }
  .promo-popup-close-all{
    flex:none; padding:10px 18px; border-radius:12px; border:none;
    background:#fff; color:#111; font-weight:700; font-size:13px;
    cursor:pointer; font-family:inherit;
  }
  .promo-popup-switch-row{
    position:relative; display:flex; align-items:center; gap:10px;
    font-size:12px; color:#e8e8e8; cursor:pointer; min-width:0;
    background:#0a0a0a; /* ພື້ນທຶບ */
    border:1.5px solid rgba(255,255,255,.4);
    border-radius:999px; padding:6px 8px 6px 16px;
    box-shadow:0 8px 24px rgba(0,0,0,.5);
  }
  .promo-popup-switch-text{ line-height:1.3; text-align:right; }
  .promo-popup-switch-input{ position:absolute; opacity:0; width:0; height:0; pointer-events:none; }
  .promo-popup-switch{
    position:relative; flex:none; width:44px; height:26px; border-radius:999px;
    background:#3a3a3c; transition:background .2s ease;
  }
  .promo-popup-switch::after{
    content:""; position:absolute; top:3px; left:3px; width:20px; height:20px;
    border-radius:50%; background:#fff; box-shadow:0 2px 5px rgba(0,0,0,.4);
    transition:transform .2s ease;
  }
  .promo-popup-switch-input:checked + .promo-popup-switch{ background:#34c759; }
  .promo-popup-switch-input:checked + .promo-popup-switch::after{ transform:translateX(18px); }
  .promo-popup-switch-input:focus-visible + .promo-popup-switch{ outline:2px solid #fff; outline-offset:2px; }
  .promo-popup-close-all:active{ transform:scale(.98); }

/* ===== Utility classes (migrated from inline style= attributes for CSP compliance) ===== */
.u-hidden { display: none; }
.u-mb-10 { margin-bottom: 10px; }
.u-mb-16 { margin-bottom: 16px; }
.u-mb-20 { margin-bottom: 20px; }
.u-mb-22 { margin-bottom: 22px; }
.u-fs-20 { font-size: 20px; }
.u-uppercase { text-transform: uppercase; }
.u-flex-start { justify-content: flex-start; }
.u-ml-4 { margin-left: 4px; }
.u-caption-faint { font-size: 12px; color: var(--text-faint); margin-top: -8px; }
.u-fine-print { margin-top: 14px; font-size: 10.5px; color: var(--text-faint); opacity: .6; }
.u-inline-link { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.topup-submit-alt {
  margin-top: 16px;
  background: var(--card);
  color: var(--text);
  box-shadow: none;
  border: 1px solid var(--card-border);
}


/* ---------- Lite mode: เครื่องสเปกต่ำ / ผู้ใช้เปิดโหมดประหยัดข้อมูล ----------
   page-transition.js เติม class perf-lite บน <html> ให้อัตโนมัติ
   ปิดแอนิเมชั่นตกแต่งที่วนไม่รู้จบ (ไม่กระทบการใช้งาน) */
html.perf-lite .prod-card::before,
html.perf-lite .prod-media::before,
html.perf-lite .prod-media svg,
html.perf-lite .sold-badge svg,
html.perf-lite .cat-img-placeholder svg{ animation:none !important; }
html.perf-lite .prod-card{ transition:none; }


/* ---------- กันเว็บซูมเอง (ทุกหน้า) ---------- */
html{ -webkit-text-size-adjust:100%; text-size-adjust:100%; touch-action:manipulation; }
/* iOS จะซูมหน้าเองตอนแตะช่องกรอกที่ตัวอักษร < 16px — บังคับ 16px กันซูม */
input, select, textarea{ font-size:16px !important; }

  /* =========================================================
     เมนูบัญชี: ป้ายชื่อใต้ไอคอน + การ์ดโปรไฟล์ (ยอดเงิน/สถิติ) ที่ไหลลงจากปุ่มโปรไฟล์
     ========================================================= */
  .tabbar-item{ flex-direction:column; gap:3px; height:56px; border-radius:22px; min-width:0; }
  .tabbar-item svg{ width:22px; height:22px; }
  .tabbar-label{
    max-width:100%; padding:0 2px; box-sizing:border-box;
    font:600 9px/1.1 'Noto Sans Lao','Rajdhani',sans-serif; letter-spacing:0;
    white-space:nowrap; overflow:visible; text-align:center;
  }
  .tabbar-pill{ height:56px; border-radius:22px; }
  body.tabbar-open .chat-fab{ bottom:calc(102px + env(safe-area-inset-bottom, 0px)); }

  @property --ang{ syntax:'<angle>'; inherits:false; initial-value:0deg; }
  @keyframes acctSpin{ to{ transform:rotate(360deg); } }
  @keyframes acctAng{ to{ --ang:360deg; } }
  @keyframes acctSweep{ 0%,55%{ transform:translateX(-130%) skewX(-20deg); } 100%{ transform:translateX(330%) skewX(-20deg); } }
  @keyframes acctPulse{ 0%,100%{ box-shadow:0 6px 18px -6px rgba(255,0,1,.7), 0 0 0 0 rgba(255,0,1,.45); } 50%{ box-shadow:0 6px 22px -4px rgba(255,0,1,.9), 0 0 0 8px rgba(255,0,1,0); } }
  @keyframes acctDot{ 0%,100%{ opacity:1; transform:scale(1); } 50%{ opacity:.35; transform:scale(.6); } }

  .acct-card{
    position:fixed; z-index:1090; width:min(300px, calc(100vw - 24px)); box-sizing:border-box;
    padding:16px; border-radius:24px; color:var(--text, #fff);
    background:
      radial-gradient(120% 70% at 100% 0%, rgba(255,0,1,.22), transparent 60%),
      linear-gradient(180deg, rgba(26,26,26,.94), rgba(14,14,14,.94));
    -webkit-backdrop-filter:blur(22px) saturate(170%); backdrop-filter:blur(22px) saturate(170%);
    box-shadow:0 22px 50px -12px rgba(0,0,0,.9), 0 0 36px -10px rgba(255,0,1,.6), inset 0 1px 0 rgba(255,255,255,.08);
    opacity:0; visibility:hidden; pointer-events:none;
    transform:translateY(-18px) scale(.6) rotateX(-25deg);
    transition:transform .3s cubic-bezier(.4,0,1,1), opacity .2s ease, visibility 0s linear .3s;
  }
  /* ขอบไล่สีแดงหมุนวน */
  .acct-card::before{
    content:''; position:absolute; inset:0; border-radius:inherit; padding:1.5px; pointer-events:none;
    background:conic-gradient(from var(--ang), rgba(255,0,1,.9), rgba(255,255,255,.08) 30%, rgba(255,0,1,.15) 55%, rgba(255,90,90,.9) 80%, rgba(255,0,1,.9));
    -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite:xor;
    mask:linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    animation:acctAng 4s linear infinite;
  }
  /* หัวลูกศรชี้ไปที่ปุ่มโปรไฟล์ */
  .acct-card::after{
    content:''; position:absolute; top:-6px; left:calc(var(--ax, 250px) - 6px); width:12px; height:12px;
    background:rgba(34,14,14,.97); transform:rotate(45deg); border-radius:3px 0 0 0;
    border-top:1.5px solid rgba(255,60,60,.8); border-left:1.5px solid rgba(255,60,60,.8);
  }
  .acct-card.show{
    opacity:1; visibility:visible; pointer-events:auto; transform:none;
    transition:transform .65s cubic-bezier(.2,1.5,.35,1), opacity .2s ease, visibility 0s;
  }
  /* ของข้างในเด้งเข้ามาทีละชิ้น */
  .acct-card > div{ opacity:0; transform:translateY(14px) scale(.96); }
  .acct-card.show > div{ opacity:1; transform:none; transition:opacity .35s ease, transform .6s cubic-bezier(.2,1.6,.35,1); }
  .acct-card.show > div:nth-child(1){ transition-delay:.12s; }
  .acct-card.show > div:nth-child(2){ transition-delay:.2s; }
  .acct-card.show > div:nth-child(3){ transition-delay:.28s; }
  .acct-card.show > div:nth-child(4){ transition-delay:.36s; }

  .acct-card-top{ display:flex; align-items:center; gap:12px; }
  .acct-ava{ position:relative; width:52px; height:52px; flex-shrink:0; }
  .acct-ava::before{
    content:''; position:absolute; inset:0; border-radius:50%;
    background:conic-gradient(#ff0001, #ffb3b3, transparent 55%, #ff0001); animation:acctSpin 2.8s linear infinite;
    filter:drop-shadow(0 0 6px rgba(255,0,1,.7));
  }
  .acct-ava img, .acct-card-ph{ position:absolute; inset:3px; width:46px; height:46px; border-radius:50%; object-fit:cover; border:2px solid #111; box-sizing:border-box; }
  .acct-card-ph{ display:flex; align-items:center; justify-content:center; font:800 19px 'Orbitron',sans-serif; background:#2a0a0a; }
  .acct-card-id{ min-width:0; display:flex; flex-direction:column; gap:4px; }
  .acct-card-id b{ font-size:16px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .acct-role{ align-self:flex-start; font:700 10px 'Rajdhani','Noto Sans Lao',sans-serif; letter-spacing:.08em; padding:2px 9px; border-radius:20px; color:rgba(255,255,255,.8); background:rgba(255,255,255,.09); }
  .acct-role.is-admin{ color:#fff; background:linear-gradient(90deg, #ff0001, #b80000); box-shadow:0 0 12px -2px rgba(255,0,1,.7); }

  .acct-balance{
    position:relative; overflow:hidden; margin-top:14px; padding:12px 14px; border-radius:16px;
    display:flex; align-items:center; justify-content:space-between; gap:8px;
    background:linear-gradient(135deg, rgba(255,0,1,.34), rgba(120,0,0,.2)); border:1px solid rgba(255,70,70,.4);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.12), 0 8px 22px -12px rgba(255,0,1,.8);
  }
  .acct-balance::after{
    content:''; position:absolute; top:0; bottom:0; left:0; width:36%; pointer-events:none;
    background:linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent); animation:acctSweep 3.4s ease-in-out infinite;
  }
  .acct-balance span{ display:flex; align-items:center; gap:7px; font-size:12px; opacity:.85; }
  .acct-dot{ width:7px; height:7px; border-radius:50%; background:#3dff8a; box-shadow:0 0 8px #3dff8a; animation:acctDot 1.6s ease-in-out infinite; }
  .acct-balance b{ font:700 22px 'Rajdhani',sans-serif; letter-spacing:.02em; text-shadow:0 0 14px rgba(255,0,1,.7); font-variant-numeric:tabular-nums; }

  .acct-stats{ margin-top:8px; display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  .acct-stats div{ padding:9px 11px; border-radius:14px; background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.06); display:flex; flex-direction:column; gap:2px; }
  .acct-stats b{ font:700 17px 'Rajdhani',sans-serif; }
  .acct-stats span{ font-size:10.5px; opacity:.6; }

  .acct-actions{ margin-top:10px; }
  .acct-btn{
    position:relative; overflow:hidden; display:flex; align-items:center; justify-content:center; gap:8px;
    text-decoration:none; padding:12px 0; border-radius:14px; font:700 14px 'Noto Sans Lao',sans-serif; color:#fff;
    transition:transform .2s cubic-bezier(.3,1.6,.5,1);
  }
  .acct-btn:active{ transform:scale(.95); }
  .acct-btn svg{ width:17px; height:17px; }
  .acct-btn.primary{ background:linear-gradient(180deg, #ff2a2b, #d40000); animation:acctPulse 2.2s ease-in-out infinite; }
  .acct-btn.primary::after{
    content:''; position:absolute; top:0; bottom:0; left:0; width:30%; pointer-events:none;
    background:linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent); animation:acctSweep 2.8s ease-in-out infinite .6s;
  }
  @media (prefers-reduced-motion: reduce){
    .acct-card::before, .acct-ava::before, .acct-balance::after, .acct-btn.primary, .acct-btn.primary::after, .acct-dot{ animation:none; }
  }

  /* ===== v3: แอนิเมชั่นเด่นขึ้น + ทำงานแม้ยอดเงินเป็น 0 ===== */
  @keyframes acctRise{ 0%{ transform:translateY(0) scale(.5); opacity:0; } 15%{ opacity:1; } 100%{ transform:translateY(-210px) scale(1.2); opacity:0; } }
  @keyframes acctScan{ 0%{ top:-14%; opacity:0; } 15%,85%{ opacity:1; } 100%{ top:104%; opacity:0; } }
  @keyframes acctBreathe{
    0%,100%{ box-shadow:0 22px 50px -12px rgba(0,0,0,.9), 0 0 26px -8px rgba(255,0,1,.55), inset 0 1px 0 rgba(255,255,255,.08); }
    50%{ box-shadow:0 22px 50px -12px rgba(0,0,0,.9), 0 0 56px -2px rgba(255,0,1,.95), inset 0 1px 0 rgba(255,255,255,.08); } }
  @keyframes acctRing{ 0%{ transform:translate(-50%,-50%) scale(.3); opacity:1; } 100%{ transform:translate(-50%,-50%) scale(3.6); opacity:0; } }

  .acct-card{ transform:translateY(-36px) scale(.35) rotateX(-45deg); filter:blur(10px);
    transition:transform .3s cubic-bezier(.4,0,1,1), opacity .2s ease, filter .25s ease, visibility 0s linear .3s; }
  .acct-card.show{ filter:none; animation:acctBreathe 2.4s ease-in-out .9s infinite;
    transition:transform .95s cubic-bezier(.2,1.7,.3,1), opacity .25s ease, filter .5s ease, visibility 0s; }
  .acct-card::before{ padding:2px; animation-duration:2.4s;
    background:conic-gradient(from var(--ang), transparent 0deg, rgba(255,0,1,.2) 100deg, #ff0001 230deg, #fff 300deg, #ff3b3b 335deg, transparent 360deg); }

  .acct-card > div{ opacity:0; transform:translateX(36px) scale(.92); filter:blur(6px); position:relative; z-index:1; }
  .acct-card.show > div{ opacity:1; transform:none; filter:none;
    transition:opacity .4s ease, transform .8s cubic-bezier(.2,1.7,.3,1), filter .4s ease; }
  .acct-card.show > div:nth-child(1){ transition-delay:.22s; }
  .acct-card.show > div:nth-child(2){ transition-delay:.34s; }
  .acct-card.show > div:nth-child(3){ transition-delay:.46s; }
  .acct-card.show > div:nth-child(4){ transition-delay:.58s; }

  .acct-card > .acct-embers{ position:absolute; inset:0; border-radius:inherit; overflow:hidden; pointer-events:none; opacity:1; transform:none; filter:none; z-index:0; transition:none; }
  .acct-embers i{ position:absolute; bottom:-8px; width:4px; height:4px; border-radius:50%; background:#ff4040; box-shadow:0 0 8px 2px rgba(255,0,1,.85); opacity:0; animation:acctRise 3.4s ease-in infinite; }
  .acct-embers i:nth-child(1){ left:10%; animation-delay:0s; }
  .acct-embers i:nth-child(2){ left:24%; animation-delay:1.1s; animation-duration:4.1s; }
  .acct-embers i:nth-child(3){ left:38%; animation-delay:.5s; }
  .acct-embers i:nth-child(4){ left:55%; animation-delay:1.7s; animation-duration:3.8s; }
  .acct-embers i:nth-child(5){ left:68%; animation-delay:.9s; }
  .acct-embers i:nth-child(6){ left:81%; animation-delay:2.2s; animation-duration:4.4s; }
  .acct-embers i:nth-child(7){ left:93%; animation-delay:1.4s; }
  .acct-embers::after{ content:''; position:absolute; left:0; right:0; height:48px; top:-14%;
    background:linear-gradient(180deg, transparent, rgba(255,60,60,.2), transparent); animation:acctScan 3s linear infinite; }

  .acct-ripple{ position:fixed; width:56px; height:56px; border-radius:50%; pointer-events:none; z-index:1089;
    border:2px solid rgba(255,50,50,.95); box-shadow:0 0 18px rgba(255,0,1,.85), inset 0 0 14px rgba(255,0,1,.5);
    animation:acctRing .95s cubic-bezier(.2,.7,.3,1) both; }
  .acct-ripple.r2{ animation-delay:.16s; }
  @media (prefers-reduced-motion: reduce){ .acct-embers, .acct-ripple{ display:none; } .acct-card.show{ animation:none; } }


  /* =========================================================
     ปุ่ม "จัดอันดับยอดเติม" ในการ์ดบัญชี + แอนิเมชั่นเปิดหน้าอันดับ
     ========================================================= */
  .acct-btn.rank{
    margin-top:8px; background:rgba(255,255,255,.05);
    border:1px solid rgba(255,0,1,.45);
    box-shadow:inset 0 0 14px rgba(255,0,1,.12);
  }
  .acct-btn.rank svg{ color:#ffd36b; filter:drop-shadow(0 0 5px rgba(255,190,60,.55)); }
  .acct-btn.rank::after{
    content:''; position:absolute; top:0; bottom:0; left:0; width:30%; pointer-events:none;
    background:linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent); animation:acctSweep 3.6s ease-in-out infinite 1.4s;
  }

  .rk-warp{
    position:fixed; inset:0; z-index:2000; overflow:hidden; pointer-events:all;
    background:radial-gradient(circle at var(--x) var(--y), #ff2a2b 0%, #990001 28%, #1a0204 62%, #000 100%);
    clip-path:circle(0px at var(--x) var(--y));
    animation:rkWarpOpen .62s cubic-bezier(.7,0,.25,1) forwards;
  }
  @keyframes rkWarpOpen{ to{ clip-path:circle(150vmax at var(--x) var(--y)); } }
  .rk-slash{
    position:absolute; left:-20%; width:140%; height:3px; top:50%;
    background:linear-gradient(90deg, transparent, #fff, transparent);
    box-shadow:0 0 18px 3px rgba(255,60,60,.9);
    opacity:0; transform:translateX(-100%) rotate(-24deg);
    animation:rkSlash .55s cubic-bezier(.2,.8,.2,1) forwards;
  }
  .rk-slash.s1{ top:34%; animation-delay:.18s; }
  .rk-slash.s2{ top:52%; animation-delay:.28s; height:5px; }
  .rk-slash.s3{ top:70%; animation-delay:.38s; }
  @keyframes rkSlash{
    0%{ opacity:0; transform:translateX(-100%) rotate(-24deg); }
    30%{ opacity:1; }
    100%{ opacity:0; transform:translateX(100%) rotate(-24deg); }
  }
  .rk-warp-txt{
    position:absolute; left:0; right:0; top:50%; transform:translateY(-50%); text-align:center;
    font-family:'Orbitron','Rajdhani',sans-serif; color:#fff; opacity:0;
    animation:rkTxt .6s cubic-bezier(.2,1.2,.3,1) .22s forwards;
  }
  .rk-warp-txt span{ display:block; font-size:13px; letter-spacing:.7em; margin-right:-.7em; opacity:.85; }
  .rk-warp-txt b{ display:block; font-size:30px; font-weight:800; letter-spacing:.16em; margin-right:-.16em; text-shadow:0 0 22px rgba(255,255,255,.7), 0 0 40px rgba(255,0,1,.9); }
  @keyframes rkTxt{ 0%{ opacity:0; transform:translateY(-50%) scale(1.7); filter:blur(8px); } 100%{ opacity:1; transform:translateY(-50%) scale(1); filter:blur(0); } }
  .rk-flash{ position:absolute; inset:0; background:#fff; opacity:0; animation:rkFlash .22s ease-out .6s forwards; }
  @keyframes rkFlash{ 0%{ opacity:0; } 60%{ opacity:.55; } 100%{ opacity:0; } }
  @media (prefers-reduced-motion: reduce){ .acct-btn.rank::after{ animation:none; } }

  /* ลิงก์ไปหน้าโปรไฟล์จากหัวการ์ดบัญชี */
  a.acct-card-top{ color:inherit; text-decoration:none; position:relative; }
  .acct-edit{ margin-left:auto; width:26px; height:26px; border-radius:50%; background:rgba(255,255,255,.07); display:grid; place-items:center; flex-shrink:0; }
  .acct-edit svg{ width:14px; height:14px; color:#fff; }

/* ===== การ์ดสินค้า v3 (กะทัดรัด): รูป > ชื่อ > ราคา+คงเหลือ > ปุ่มซื้อ > ขายไปแล้ว · ป้ายส้ม "ขายดี" มุมขวาบน ===== */
.prod-grid{gap:10px;padding:16px 12px 26px}
.prod-card.grid-card{border-radius:16px;overflow:hidden;background:var(--pc-bg,linear-gradient(175deg,#1b1818,#0b0909));border:1px solid var(--pc-bd,rgba(255,255,255,.09));box-shadow:0 8px 20px -12px rgba(0,0,0,.8)}
.prod-card.grid-card .prod-media{aspect-ratio:1/.86;border-radius:0}
.prod-card.grid-card .prod-media::before,.prod-card.grid-card .prod-media::after{display:none}
.prod-card.grid-card .prod-media img.prod-img{border:0}
.prod-card.grid-card .prod-body{padding:9px 10px 10px;gap:7px;margin-top:0}
.prod-card.grid-card .prod-body::after{display:none}
.prod-card.grid-card .prod-name{order:0;font-size:13px;font-weight:800;line-height:1.3;background:none;filter:none;-webkit-text-fill-color:var(--pc-name,#fff);color:var(--pc-name,#fff);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.prod-row{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:2px 6px}
.prod-card.grid-card .prod-price{font-size:17px;font-weight:800;line-height:1.15;white-space:nowrap;background:none;filter:none;-webkit-text-fill-color:var(--pc-price,#ff2a2a);color:var(--pc-price,#ff2a2a)}
.prod-card.grid-card .prod-price-reseller-tag{font-size:9px;padding:1px 5px;vertical-align:middle}
.prod-card.grid-card .prod-status{order:0;font-size:11px;font-weight:500;white-space:nowrap;color:var(--pc-dim,#9a9a9a)}
.prod-card.grid-card .prod-status.out{white-space:normal}
.prod-card.grid-card .buy-btn{margin-top:0;padding:9px 10px;border-radius:12px;color:#fff;font-size:13.5px;background:linear-gradient(180deg,#ff2a1c,#c80000);box-shadow:0 6px 14px -6px rgba(255,0,1,.7),inset 0 1px 0 rgba(255,255,255,.28)}
.prod-card.grid-card .buy-btn:disabled{background:rgba(255,255,255,.08);color:var(--text-faint,#777);box-shadow:none}
.prod-card.grid-card .prod-sold-tag{order:0;align-self:center;background:none;border:0;padding:0;margin-top:1px;font-size:11px;color:var(--pc-dim,#9a9a9a);gap:5px}
.prod-card.grid-card .prod-sold-tag svg{width:13px;height:13px;color:#ff7a1a}
.prod-card.grid-card .prod-stamp{top:8px;right:8px;display:flex;align-items:center;gap:4px;padding:4px 10px 4px 7px;border-radius:99px;font-size:11px;font-weight:800;color:#fff;background:linear-gradient(135deg,#ffb020,#ff5a00);box-shadow:0 4px 12px -3px rgba(255,90,0,.7)}
.prod-card.grid-card .prod-stamp svg{width:12px;height:12px}
.prod-card.grid-card .prod-stamp.is-hot{top:3px;right:2px;padding:0;gap:0;border-radius:0;background:none;box-shadow:none;width:62px;transform:rotate(-5deg);transform-origin:100% 0;opacity:1;filter:drop-shadow(0 4px 8px rgba(255,90,0,.55));animation:hotGlow 1.3s ease-in-out infinite}
.prod-card.grid-card .prod-stamp.is-hot .hot-badge{width:100%;height:auto;display:block}
/* .prod-media svg (placeholder icon: opacity .28 + media-idle fade/scale) must not touch the HOT badge */
.prod-card .prod-media .prod-stamp.is-hot .hot-badge,
.prod-card:active .prod-media .prod-stamp.is-hot .hot-badge{opacity:1 !important;animation:none !important;transform:none !important;position:static !important;z-index:auto !important;color:inherit;width:100% !important;height:auto !important}
html.perf-lite .prod-media .prod-stamp.is-hot .hot-badge .hb-t{animation:hbFlick .8s ease-in-out infinite alternate !important}
@keyframes hotGlow{0%,100%{filter:drop-shadow(0 3px 6px rgba(255,90,0,.45))}50%{filter:drop-shadow(0 4px 12px rgba(255,150,20,.85))}}
.hot-badge .hb-t{transform-box:fill-box;transform-origin:0% 60%;animation:hbFlick .8s ease-in-out infinite alternate;will-change:transform}
.hot-badge .hb-t1{animation-duration:.62s}
.hot-badge .hb-t2{animation-duration:.78s;animation-delay:-.3s}
.hot-badge .hb-t3{animation-duration:.55s;animation-delay:-.15s}
.hot-badge .hb-t4{animation-duration:.9s;animation-delay:-.5s}
@keyframes hbFlick{0%{transform:scale(1,1) skewY(0)}35%{transform:scale(1.14,.88) skewY(-7deg)}70%{transform:scale(.9,1.12) skewY(6deg)}100%{transform:scale(1.08,1) skewY(-3deg)}}
@media (prefers-reduced-motion:reduce){.prod-card.grid-card .prod-stamp.is-hot,.hot-badge .hb-t{animation:none}}
.prod-card.grid-card .prod-sold-tag svg{fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.prod-card.grid-card .prod-price{order:0}
.prod-card.grid-card .prod-status{order:1}
.prod-card.grid-card .buy-btn{margin-top:auto}
.prod-card.grid-card .prod-row{margin-bottom:1px}
.prod-card.grid-card .buy-btn{order:2}
.prod-card.grid-card .prod-sold-tag{order:3}

/* ---------- ป้าย HOT ของสินค้าขายดีอันดับ 1: วางคร่อมขอบการ์ดมุมขวาบน เอียงซ้ายเล็กน้อย ---------- */
.wb-viewport{ margin-top:-4px; padding-top:22px; }
.prod-card.grid-card.wb-pc.is-top-seller{ overflow:visible; }
.prod-card.grid-card.wb-pc.is-top-seller > .prod-media{ border-radius:15px 15px 0 0; }
.prod-card.grid-card.wb-pc > .prod-stamp.is-hot{ top:-13px; right:-9px; z-index:5; transform:rotate(-12deg); transform-origin:50% 50%; }
.prod-card.grid-card.wb-pc > .prod-stamp.is-hot .hot-badge{ width:100%; height:auto; display:block; }
html.perf-lite .prod-card > .prod-stamp.is-hot .hot-badge .hb-t{ animation:hbFlick .8s ease-in-out infinite alternate !important; }


/* =========================================================
   ການ໌ດໝວດໝູ່ v5 — ຮູບແບນເນີ່ເຕັມຄວາມກວ້າງ + ແຖບລຸ່ມ (ຊື່ໝວດ / ຈຳນວນ / ປຸ່ມ)
   ແສງແດງວິ່ງວົນຮອບຂອບການ໌ດ, ຮອຍຕໍ່ລະຫວ່າງຮູບກັບແຖບລຸ່ມຈາງລົງແບບນຸ້ມໆ ບໍ່ມີເສັ້ນຕັດ
   ========================================================= */
@property --cat-a{ syntax:'<angle>'; inherits:false; initial-value:0deg; }

.cat-item{ border-color:#000; background:linear-gradient(105deg,#0a0a0a 0%,#090909 55%,#140506 100%); }
.cat-item::before{
  content:""; position:absolute; inset:-1px; border-radius:inherit; padding:1.5px;
  z-index:4; pointer-events:none;
  background:conic-gradient(from var(--cat-a),#4a0509 0deg,#4a0509 250deg,#ff2a2a 310deg,#fff2f2 335deg,#ff2a2a 350deg,#4a0509 360deg);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor; mask-composite:exclude;
  animation:cat-spin 4s linear infinite;
}
@keyframes cat-spin{ to{ --cat-a:360deg; } }
/* ໝາຍເຫດ: page-transition.js ໃສ່ perf-lite ໃຫ້ມືຖືສ່ວນໃຫຍ່ — ແສງນີ້ເປັນ CSS ລ້ວນ ແລະ ມີພຽງ 4 ການ໌ດ ຈຶ່ງເປີດໃຫ້ວິ່ງທຸກເຄື່ອງ
   (ຄົນທີ່ຕັ້ງ "ລົດການເຄື່ອນໄຫວ" ໃນລະບົບຍັງນິ່ງຕາມເດີມ ດ້ານລຸ່ມ) */
.cat-item:nth-child(2)::before{ animation-delay:-1s; }
.cat-item:nth-child(3)::before{ animation-delay:-2s; }
.cat-item:nth-child(4)::before{ animation-delay:-3s; }
@media (prefers-reduced-motion:reduce){ .cat-item::before{ animation:none; } }

/* ຮູບຈາງລົງເຂົ້າແຖບລຸ່ມ */
.cat-banner-media.has-image{
  -webkit-mask-image:linear-gradient(to bottom,#000 78%,transparent 100%);
  mask-image:linear-gradient(to bottom,#000 78%,transparent 100%);
}
.cat-banner::after{ background:linear-gradient(to top,#0a0a0a 0%,rgba(10,10,10,.35) 18%,transparent 42%); }

/* ແຖບລຸ່ມ */
.cat-meta{
  position:relative; z-index:2; min-height:0; border-top:0;
  padding:4px 14px 14px; margin-top:-6px;
  display:flex; align-items:center; gap:10px;
  background:linear-gradient(180deg,transparent,#0b0505 45%,#060303);
  border-radius:0 0 16px 16px;
}
.cat-meta::before{
  content:""; position:absolute; left:0; right:0; top:-14px; height:28px; pointer-events:none;
  background:radial-gradient(55% 100% at 50% 50%,rgba(255,40,50,.18),transparent 75%);
}
.cat-meta-name{
  flex:1 1 0; min-width:0; margin:0;
  font-size:15px; font-weight:800; line-height:1.15; text-transform:uppercase;
  color:#e0001a; text-shadow:0 0 10px rgba(200,0,20,.35);
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; word-break:break-word;
}
.cat-stats{ flex:0 0 auto; display:flex; flex-direction:column; gap:5px; }
.cat-st{ display:flex; align-items:center; gap:6px; font-size:10.5px; font-weight:500; color:#bdb1b1; white-space:nowrap; }
.cat-st b{ color:#fff; font-weight:700; font-size:11.5px; }
.cat-st i{ width:6px; height:6px; border-radius:50%; background:#ff1427; box-shadow:0 0 6px #ff1427; flex-shrink:0; }
.cat-st-stock i{ background:#2ee66b; box-shadow:0 0 6px #2ee66b; }
.cat-cta{
  flex:0 0 auto; height:32px; padding:0 14px; border-radius:999px;
  display:flex; align-items:center; justify-content:center; gap:7px;
  font-size:12.5px; font-weight:700; color:#fff; white-space:nowrap;
  background:linear-gradient(180deg,#ff1a1a 0%,#d00000 55%,#a30000 100%);
  border:1px solid rgba(255,120,120,.55);
  box-shadow:inset 0 2px 3px rgba(255,255,255,.28),inset 0 -3px 4px rgba(0,0,0,.25),0 4px 12px rgba(255,0,0,.4);
  transition:filter .2s ease, transform .2s ease;
}
.cat-cta svg{ width:16px; height:16px; flex-shrink:0; }
@media (hover:hover) and (pointer:fine){
  .cat-item:hover .cat-cta{ filter:brightness(1.12); transform:scale(1.03); }
}
@media (max-width:360px){
  .cat-meta{ padding:4px 10px 12px; gap:8px; }
  .cat-cta{ padding:0 10px; font-size:11.5px; }
  .cat-cta svg{ display:none; }
}


/* =========================================================
   ສິນຄ້າທີ່ແນະນຳ + ປຸ່ມຫົວໃຈປັກໝຸດ (category.html)
   ========================================================= */
.rec-head{ display:flex; align-items:center; gap:8px; padding:6px 20px 0; scroll-margin-top:96px; }
.rec-head svg{ width:18px; height:18px; fill:#ff1427; stroke:#ff1427; stroke-width:1.5; stroke-linejoin:round; filter:drop-shadow(0 0 6px rgba(255,20,39,.6)); flex-shrink:0; }
.rec-head span{ font-size:16px; font-weight:800; color:#fff; }
.rec-head::after{ content:""; flex:1; height:1px; background:linear-gradient(90deg,rgba(255,0,1,.5),transparent); }

.fav-btn{
  position:absolute; top:8px; left:8px; z-index:6;
  width:32px; height:32px; padding:0; border-radius:50%;
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  color:#fff; background:rgba(0,0,0,.5); border:1px solid rgba(255,255,255,.2);
  -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
  -webkit-tap-highlight-color:transparent;
  transition:background .25s ease, border-color .25s ease, color .25s ease, transform .15s ease;
}
.fav-btn:active{ transform:scale(.9); }
.fav-btn svg{ width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.fav-btn.is-on{ color:#ff2a3c; background:rgba(255,0,1,.18); border-color:rgba(255,60,70,.75); }
.fav-btn.is-on svg{ fill:currentColor; animation:fav-pop .38s cubic-bezier(.22,1,.36,1); }
@keyframes fav-pop{ 0%{ transform:scale(.55); } 60%{ transform:scale(1.3); } 100%{ transform:scale(1); } }
.prod-card.is-fav{ border-color:rgba(255,50,60,.4); }
html.perf-lite .fav-btn.is-on svg{ animation:none; }

/* ການ໌ດໝວດໝູ່ປັບຂະໜາດຕາມຮູບເອງ — ກວ້າງ = ເຕັມກອບໜ້າຈໍ (ບໍ່ເກີນຂອບ), ສູງ = ຕາມສັດສ່ວນຮູບຈິງ (ຂະຫຍາຍຂຶ້ນ/ລົງໄດ້)
   ຕອນຍັງໂຫຼດຮູບບໍ່ແລ້ວ ຈະຈອງພື້ນທີ່ຕາມສັດສ່ວນ 757:265 ກ່ອນ ເພື່ອບໍ່ໃຫ້ໜ້າກະຕຸກ */
.cat-item{ min-width:0; max-width:100%; }
.cat-banner.fit-img{ aspect-ratio:auto; }
.cat-banner.fit-img .cat-banner-media{ position:relative; inset:auto; }
.cat-banner.fit-img .cat-banner-media img{ width:100%; max-width:100%; height:auto; aspect-ratio:auto 757/265; object-fit:contain; display:block; }

/* ປ້າຍ "ສິນຄ້າທີ່ແນະນຳ" + ຫົວໃຈ (ແບບ pill) ສຳລັບສິນຄ້າທີ່ຊື້ເກີນ 2 ຄັ້ງ */
.fav-btn{ width:auto; height:28px; padding:0 10px 0 8px; border-radius:999px; gap:5px; font:700 10.5px/1 inherit; font-family:inherit; white-space:nowrap; }
.fav-btn svg{ width:14px; height:14px; }
.fav-btn span{ font-size:10.5px; font-weight:700; letter-spacing:0; }

/* ===== ການ໌ດສິນຄ້າ: ຄວາມສູງປັບອັດຕະໂນມັດຕາມເນື້ອຫາ, ຄວາມກວ້າງຄົງທີ່ (ຍືດໄດ້ແຕ່ຂຶ້ນ-ລົງ) ===== */
.prod-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); align-items:start; }
.prod-card.grid-card{ min-width:0; max-width:100%; height:auto; align-self:start; }
.prod-card.grid-card .prod-body{ min-width:0; }
.prod-card.grid-card .prod-name{
  white-space:normal; overflow:visible; text-overflow:clip;
  overflow-wrap:anywhere; word-break:break-word; min-width:0;
}
.prod-card.grid-card .prod-status{ white-space:normal; overflow-wrap:anywhere; min-width:0; }
.prod-card.grid-card .prod-row{ min-width:0; }

/* ===== ການ໌ດສິນຄ້າ: ເສັ້ນຕັດລະຫວ່າງຮູບກັບເນື້ອຫາ -> ຈາງ/ເບລີ ແບບການ໌ດໝວດໝູ່ ===== */
.prod-card.grid-card .prod-media{ box-shadow:none; }
.prod-card.grid-card .prod-media img.prod-img{
  border:0;
  -webkit-mask-image:linear-gradient(to bottom, #000 55%, transparent 100%);
  mask-image:linear-gradient(to bottom, #000 55%, transparent 100%);
}

/* ===== v2: ຮູບສິນຄ້າສູງອັດຕະໂນມັດຕາມສັດສ່ວນຮູບ (ກວ້າງຄົງທີ່) + ລຶບເສັ້ນຕັດລະຫວ່າງຮູບກັບເນື້ອຫາ ===== */
.prod-card.grid-card .prod-media{
  min-height:110px;
  -webkit-mask-image:linear-gradient(to bottom, #000 70%, transparent 100%);
  mask-image:linear-gradient(to bottom, #000 70%, transparent 100%);
}
.prod-card.grid-card .prod-media:has(> img.prod-img){
  aspect-ratio:auto; display:block; background:none; box-shadow:none;
}
.prod-card.grid-card .prod-media img.prod-img{
  display:block; width:100%; height:auto; max-width:100%;
  -webkit-mask-image:none; mask-image:none;
}
.prod-card.grid-card .prod-body{ margin-top:0; }


/* ປ້າຍຫົວໃຈ — ສິນຄ້າທີ່ແອດມິນປັກໝຸດ (ບໍ່ກົດໄດ້) */
.admin-pin-badge{
  position:absolute; top:8px; left:8px; z-index:6; height:28px; padding:0 10px 0 8px; border-radius:999px;
  display:flex; align-items:center; gap:5px; color:#ff2a3c; background:rgba(255,0,1,.18);
  border:1px solid rgba(255,60,70,.75); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
  font-size:10.5px; font-weight:700; line-height:1; white-space:nowrap; pointer-events:none;
}
.admin-pin-badge svg{ width:14px; height:14px; fill:currentColor; }
