/* 🛍️ UX รอบ 1 — Boss ข้อ 260 = ก (25 พ.ย. 2026) · ทุกสไตล์ของงานรอบนี้อยู่ไฟล์นี้ไฟล์เดียว
   มือถือ 390px ก่อน · ปุ่ม ≥44px · ใช้สีตัวแปรเดิม (--accent/--card/--line/--ink) สลับธีมสว่าง/มืดตามเว็บ */

/* 🛒 ป้ายเลขบนไอคอนตะกร้า (Shopee S3) */
.site-nav a.cart-link { position: relative; }
.cart-badge { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--accent); color: #fff; border: 2px solid #fff;
  font: 800 11.5px/16px system-ui, sans-serif; text-align: center; font-style: normal; }
.cart-badge[hidden] { display: none; }

/* 🔎 ช่องค้นหาหัวเว็บ (ข้อ 20) — แถวที่ 2 ของหัวเว็บ (หัวเว็บ sticky อยู่แล้ว = ติดบนตลอด) */
.site-header { flex-wrap: wrap; }
.hdr-search { order: 9; flex: 1 0 100%; display: flex; align-items: center; gap: 8px; margin: 2px 0 0;
  border: 2px solid var(--solid); border-radius: 999px; padding: 0 12px; background: #fff; color: var(--solid); }
/* !important: style.css ตั้งสีช่อง input ทุกช่องด้วยตัวเลือก input:not()×4 (เฉพาะเจาะจงกว่า) — หัวเว็บพื้นขาวเสมอ */
.site-header .hdr-search input { flex: 1; min-width: 0; width: auto; border: 0; outline: 0;
  background: transparent !important; color: var(--solid) !important;
  font-size: 16px; padding: 8px 0; min-height: 38px; box-shadow: none; border-radius: 0; margin: 0; }
.hdr-search .search-ic { display: flex; flex: 0 0 auto; }
.hdr-search input::placeholder { color: #7a6553; }

/* 📱 แถบเมนูล่าง 4 ปุ่ม (Shopee S7) — มือถือเท่านั้น */
.bnav { display: none; }
@media (max-width: 719px) {
  .bnav { display: grid; grid-template-columns: repeat(5, 1fr); /* 5 ปุ่ม: + 📋 วางเด็ค (Boss ข้อ 448 · 29 พ.ย. 2026) */ position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
    background: var(--card); border-top: 2px solid var(--ink); padding: 4px 0 calc(4px + env(safe-area-inset-bottom)); }
  .bnav a { display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: 48px; justify-content: center;
    color: var(--ink); font-size: 11.5px; font-weight: 700; text-decoration: none; }
  .bnav a span { position: relative; font-size: 20px; line-height: 1.1; }
  .bnav a.on { color: var(--accent); }
  .bnav .cart-badge { top: -4px; right: -14px; border-color: var(--card); }
  body.has-bnav { padding-bottom: 64px; }
  body.has-bnav .buybar { bottom: 70px; }
  body.has-bnav.has-buybar { padding-bottom: 138px; }
}

/* 🛍️ แบนเนอร์โปรเลื่อน */
.promo { margin: 10px 0 4px; }
.promo-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 14px;
  border: 2px solid var(--ink); }
.promo-track::-webkit-scrollbar { display: none; }
.promo-slide { flex: 0 0 100%; scroll-snap-align: start; display: block; aspect-ratio: 16 / 9; background: var(--card); }  /* ภาพจริง Boss ข้อ 273 = 1200×675 */
.promo-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.promo-dots { display: flex; justify-content: center; gap: 6px; margin-top: 6px; }
.promo-dots { gap: 0; margin-top: 2px; }
.promo-dots button { width: 24px; height: 24px; min-width: 0; min-height: 0; padding: 8px; margin: 0; border-radius: 999px;
  border: 0; box-shadow: none; background: var(--line); background-clip: content-box; cursor: pointer; }
.promo-dots button.on { width: 36px; background-color: var(--accent); }

/* 🧭 แถวทางลัดหมวด (Shopee S5) — ไอคอน + คำ เลื่อนข้าง */
.shortcuts { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 8px 2px 6px; margin: 4px 0; }
.shortcuts::-webkit-scrollbar { display: none; }
.shortcuts a { flex: 0 0 auto; width: 74px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 700; color: var(--ink); text-decoration: none; text-align: center; line-height: 1.2; }
.shortcuts a span { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 24px;
  background: var(--card); border: 2px solid var(--line); }

/* ✓ ข้อความลอยใส่ตะกร้าแล้ว (ข้อ 4) */
.shop-toast { position: fixed; left: 50%; bottom: 150px; transform: translate(-50%, -20px); opacity: 0; pointer-events: none;
  z-index: 80; background: #17110d; color: #fff; border: 2px solid #f0c66b; border-radius: 999px; padding: 10px 16px; font-weight: 800;
  font-size: 14px; transition: .2s; white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.shop-toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.shop-toast a { color: #f0c66b; margin-left: 4px; }
.btn-buy.in { background: var(--ok); }

/* 🔎 คุณหมายถึง (ข้อ 2) */
.dym { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0; font-weight: 700; }
.dym .fchip small { opacity: .7; font-weight: 600; }

/* 🚚 ส่งฟรี (ข้อ 263) */
.fs-line { margin: 2px 0 10px; font-size: 14px; font-weight: 700; color: var(--ok); }
.fs-bar { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 4px 0 10px; background: var(--card); }
.fs-bar .fs-txt { font-weight: 800; font-size: 15px; }
.fs-bar .fs-txt small { display: block; font-weight: 600; color: var(--muted); font-size: 12.5px; }
.fs-track { height: 8px; border-radius: 99px; background: var(--line); margin-top: 8px; overflow: hidden; }
.fs-track i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.fs-bar.done .fs-txt { color: var(--ok); }
.buybar-fs { font-size: 12px; font-weight: 700; opacity: .95; }
.buybar-fs[hidden] { display: none; }

/* 🛒 ตะกร้า (ข้อ 7) */
.cart-pickup { margin: -2px 0 12px; font-size: 13.5px; color: var(--muted); }
.btn.btn-checkout { display: block; width: 100%; font-size: 17px; padding: 14px 20px; }

/* 📄 หน้าสินค้า (ข้อ 1 + 5 + S4) */
.fin-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 12px; }
.fin-opt { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 2px solid var(--line); border-radius: 12px;
  color: var(--ink); text-decoration: none; background: var(--card); min-height: 48px; }
.fin-opt span { font-size: 12.5px; color: var(--muted); }
.fin-opt.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft) inset; }
.fin-opt:hover { text-decoration: none; }
.qty-row { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-weight: 700; }
.qty-step { display: inline-flex; align-items: center; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; background: var(--card); }
.qty-step button { width: 44px; height: 42px; border: 0; background: transparent; color: var(--ink); font-size: 20px; font-weight: 800; cursor: pointer; }
.qty-step input { width: 46px; height: 42px; border: 0; text-align: center; font-size: 17px; font-weight: 800; background: transparent; color: var(--ink);
  -moz-appearance: textfield; }
.qty-step input::-webkit-inner-spin-button, .qty-step input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.buy-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.buy-btns .btn { width: 100%; min-height: 48px; }
.real-row { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
.real-row .real-photo { flex: 0 0 72%; scroll-snap-align: start; margin: 0; }
.real-row .real-photo img { width: 100%; height: auto; }
.buy-sticky { display: none; }
@media (max-width: 719px) {
  .buy-sticky { display: flex; align-items: stretch; gap: 6px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 56;
    background: var(--card); border-top: 2px solid var(--ink); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
  .buy-sticky .bs-chat { flex: 0 0 52px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: var(--ink); text-decoration: none; }
  .buy-sticky .bs-chat span { font-size: 18px; }
  .buy-sticky .bs-price { flex: 0 0 auto; align-self: center; font-weight: 900; font-size: 17px; color: var(--accent); padding: 0 4px; }
  .buy-sticky button { flex: 1 1 0; min-width: 0; min-height: 48px; border-radius: 12px; border: 2px solid var(--ink);
    font-weight: 800; font-size: 14px; cursor: pointer; }
  .buy-sticky .bs-add { background: var(--card); color: var(--ink); }
  .buy-sticky .bs-now { background: var(--accent); color: var(--on-accent); }
  body.has-buysticky { padding-bottom: 72px; }
  body.has-buysticky .buybar { display: none; }
  body.has-buysticky .shop-toast { top: auto; bottom: 86px; }
}

/* ⏰ เส้นตายโอน (ข้อ 6) */
.pay-by { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--warn); background: var(--warn-soft); text-align: center; }
.pay-by p { margin: 0; }
.pay-by .qr-note { margin-top: 4px; }

/* 🔗 ออเดอร์จากเครื่องอื่น (ข้อ 12) */
.lk-share { margin: 16px 0; padding: 12px; border: 1.5px dashed var(--line); border-radius: 12px; max-width: 480px; }
.lk-row { display: flex; gap: 8px; align-items: center; }
.lk-row input { flex: 1; min-width: 0; font-size: 16px; }

/* 🃏 เด็คเมตา (ข้อ 8) */
.mt-parts { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }
.mt-miss { margin: 6px 0 0; font-size: 13px; line-height: 1.45; color: var(--err); }
.mt-miss b { color: var(--ink); }
