/* ══════════════════════════════════════════════════════════════════════
   orderflow.css — ทางเข้า "วิธีสั่งซื้อ / ขอใบเสนอราคา / ตะกร้า" ทั้งเว็บ (2569-10-01)
   โหลดต่อจาก cart.css ทุกหน้า HTML (สคริปต์ notes\order-flow\patch_order_ui.py ใส่ให้)
   และโหลดจาก cart.php / checkout.php / quotation.php ผ่านอาร์กิวเมนต์ css ของ bk_head
   ทุกคลาสขึ้นต้นด้วย of- (ขั้นตอน/ตะกร้า) หรือ tb- (แถบบน) ไม่ชนกับไฟล์อื่น
   ══════════════════════════════════════════════════════════════════════ */

/* ── ทางเข้าบนแถบบน: ตะกร้า · ขอใบเสนอราคา · วิธีสั่งซื้อ ───────────────── */
.top-right{display:flex;align-items:center;gap:8px}
.tb-br{display:none}
.tb-quote{
  display:inline-flex;align-items:center;gap:7px;padding:7px 14px;border-radius:999px;
  font-size:14px;font-weight:700;white-space:nowrap;line-height:1.35;
  background:#fff;color:var(--sh-blue,#1d4ed8);border:1.5px solid var(--sh-blue,#1d4ed8);
}
.tb-quote svg{width:16px;height:16px;flex:0 0 auto}
.tb-quote:hover{background:#eaf0ff;text-decoration:none}
.tb-how{
  display:inline-flex;align-items:center;gap:6px;padding:7px 6px;border-radius:8px;
  font-size:14px;font-weight:600;white-space:nowrap;color:var(--ink-2);line-height:1.35;
}
.tb-how svg{width:16px;height:16px;flex:0 0 auto;color:var(--sh-blue,#1d4ed8)}
.tb-how:hover{color:var(--sh-blue,#1d4ed8);text-decoration:underline}
.tb-quote:focus-visible,.tb-how:focus-visible{outline:3px solid var(--sh-blue,#1d4ed8);outline-offset:2px}

/* "เช็กสถานะออเดอร์" ไม่ถูกซ่อน (2569-10-01 เจ้าของสั่งตรวจรอบสุดท้าย):
   ≥900px เต็มข้อความเหมือนเดิม · 760–899px เหลือไอคอน (ข้อความยังอยู่ให้โปรแกรมอ่านจอ + title) ให้แถบบนพอดีแถวเดียวพร้อมปุ่มใหม่
   ≤759px แถบบนเป็น 2 แถวสำหรับปุ่มตะกร้า/ขอใบเสนอราคา/วิธีสั่งซื้อ → ลิงก์นี้ย้ายไปเมนูหลักบนมือถือ (รายการ "เช็กสถานะ" ในแถวเมนู ทุกหน้า) */
@media (min-width:760px) and (max-width:899px){
  .topbar .order-track-link{font-size:0;gap:0;padding:8px 10px}
  .topbar .order-track-link svg{width:17px;height:17px}
}
/* หน้าแรก (แถบบนมีโทร + LINE ด้วย): จอ 760–1099px ปุ่ม LINE เหลือไอคอนเขียว (แบบเดียวกับที่ home.css ทำที่ ≤560px) ให้พอดีแถวเดียวพร้อมปุ่มใหม่ ไม่ซ่อนลิงก์ใด */
@media (min-width:760px) and (max-width:1099px){
  .h-topcta .h-top-line{font-size:0;gap:0;padding:8px 11px}
  .h-topcta .h-top-line svg{width:17px;height:17px}
}
.mainnav .nv-mob{display:none}

/* มือถือ (≤759px): แถบบนเป็น 2 แถว · แถวแรกชื่อร้าน+ปุ่มกลับ แถวสองปุ่ม ตะกร้า / ขอใบเสนอราคา / วิธีสั่งซื้อ
   🔴 เมนูหลักยัง "ค้างใต้แถบบน" เหมือนเดิม (เจ้าของสั่ง 18 ก.ย. 2569): แถบบนมีความสูงตายตัว --of-tbh และเมนูตั้ง top เท่าค่าเดียวกัน
      (คอมเมนต์ใน style.css บอกไว้ว่า top ของเมนูต้องเท่าความสูงจริงของแถบบน) · ถ้าแก้ความสูงแถบบนต้องแก้ --of-tbh ที่เดียว
   ตัวเลือก .tb-new = หัวเว็บใหม่ (ตัวแก้ patch_order_ui.py ใส่ให้) กันไม่ให้กระทบหน้า PHP ที่ใช้แถบบนเก่าจาก theme.php */
@media (max-width:759px){
  :root{--of-tbh:104px}
  .tb-new{height:var(--of-tbh)}
  .tb-new ~ .mainnav{top:var(--of-tbh)}
  .tb-new .wrap{flex-wrap:wrap;align-content:center;row-gap:0;height:100%;min-height:0;padding-top:0;padding-bottom:0}
  .tb-new .top-right,.tb-new .h-topcta{display:contents}
  .tb-new .brand{order:1;margin-right:auto}
  .tb-new .btn-back,.tb-new .h-top-phone,.tb-new .h-top-line{order:2}
  .tb-new .tb-br{display:block;order:3;flex:0 0 100%;height:0;margin:0}
  .tb-new .ck-cartlink,.tb-new .h-topcta .ck-cartlink,.tb-new .tb-quote,.tb-new .tb-how{
    order:4;flex:1 1 auto;min-width:0;justify-content:center;gap:5px;margin-top:7px;
    padding:10px 6px;border-radius:12px;font-size:13px;line-height:1.3;
  }
  .tb-new .h-topcta .ck-cartlink{font-size:13px;gap:6px}
  .tb-new .tb-quote{border-width:1.5px}
  .tb-new .tb-how{background:#fff;border:1px solid var(--line);padding:10px 6px}
  .tb-new .tb-how:hover{text-decoration:none}
  .tb-new .order-track-link{display:none}
  .mainnav .nv-mob{display:flex}
  /* 2026-10-14 เมนู "หน้าแรก" (ตัวแรกใน HTML): จอเล็กให้แถวโปรแกรม/อุปกรณ์ขึ้นก่อน หน้าแรกไปอยู่แถวเมนูย่อย ไม่เพิ่มความสูงเมนูค้าง */
  .mainnav .nv-drop{order:-1}
  /* ปุ่มกลับ: ชื่อหมวดยาวได้ ("กระดาษใบเสร็จ & สติกเกอร์") → ตัดด้วย … ให้อยู่แถวเดียวกับชื่อร้าน ไม่ดันแถบบนเป็น 3 แถว */
  .tb-new .btn-back{display:block;flex:0 1 auto;min-width:0;max-width:calc(100% - 172px);overflow:hidden;
    text-overflow:ellipsis;white-space:nowrap;line-height:1.5}
  .tb-new .btn-back svg{display:inline-block;vertical-align:-3px;margin-right:6px}
}
@media (max-width:359px){
  .tb-new .ck-cartlink svg,.tb-new .tb-quote svg,.tb-new .tb-how svg{display:none}
}
/* แท็บเล็ตแนวตั้ง: บีบระยะนิดหน่อยให้หน้าแรก (ที่มีโทร+ไลน์ด้วย) ไม่ล้น */
@media (min-width:760px) and (max-width:900px){
  .tb-quote{padding:7px 10px;font-size:13px}
  .tb-how{padding:7px 4px;font-size:13px}
  .top-right,.h-topcta{gap:6px}
}

/* ── แถบขั้นตอนบนหน้าตะกร้า / ใบเสนอราคา / สั่งซื้อ ───────────────────── */
.of-steps{
  list-style:none;margin:0 0 6px;padding:0;display:grid;gap:6px;
  grid-template-columns:repeat(4,minmax(0,1fr));
}
.of-steps li{
  display:flex;align-items:center;gap:8px;min-width:0;padding:9px 10px;border-radius:12px;
  background:#fff;border:1px solid var(--sh-ring,#dbe4f2);font-size:13.5px;line-height:1.3;color:var(--mut);
}
.of-n{
  flex:0 0 auto;width:24px;height:24px;border-radius:50%;display:inline-flex;align-items:center;
  justify-content:center;font-size:12.5px;font-weight:700;background:#e9eef7;color:#51607a;
}
.of-steps b{font-weight:600;min-width:0}
.of-steps li.of-on{border-color:var(--sh-blue,#1d4ed8);background:#eef3ff;color:#1b2f6b}
.of-steps li.of-on .of-n{background:var(--sh-blue,#1d4ed8);color:#fff}
.of-steps li.of-on b{font-weight:700}
.of-steps li.of-done{color:#14663a}
.of-steps li.of-done .of-n{background:#16a34a;color:#fff;font-size:0}
.of-steps li.of-done .of-n::before{content:"\2713";font-size:13px}
@media (max-width:560px){
  .of-steps{gap:4px}
  .of-steps li{flex-direction:column;gap:4px;padding:8px 3px;text-align:center;font-size:12px}
}
.of-stepnote{margin:8px 0 18px;font-size:14px;line-height:1.7;color:var(--mut)}
.of-stepnote a{font-weight:700}

/* ── ตะกร้า ──────────────────────────────────────────────────────────── */
/* ปุ่มส่งเริ่มต้นของฟอร์ม: ซ่อนจากสายตาแต่ยังเป็น "ปุ่มแรก" ที่เบราว์เซอร์ใช้ตอนกด Enter */
.of-defsubmit{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden;opacity:0}
.ck-qty label{display:flex;align-items:center;gap:8px}
.ck-qty label::before{content:"จำนวน";font-size:13.5px;color:var(--mut)}
.of-recalc{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin:14px 0 0;font-size:14px;color:var(--mut)}
.of-recalc .sh-btn{padding:8px 14px;font-size:14px;cursor:pointer;font-family:inherit}
@media (max-width:560px){.of-recalc{justify-content:space-between}}

.of-next{margin-top:18px}
.of-next-h{margin:0 0 4px;font-size:18px;line-height:1.4}
.of-next-sub{margin:0 0 12px;font-size:14px;line-height:1.7;color:var(--mut)}
.of-opts{display:grid;gap:12px}
@media (min-width:760px){.of-opts{grid-template-columns:1fr 1fr;align-items:stretch}}
.of-opt{display:flex;flex-direction:column;gap:6px;background:#fff;border:1px solid var(--sh-ring,#dbe4f2);border-radius:16px;padding:16px 18px}
.of-opt-buy{border:2px solid #06c755;background:#f3fbf6}
.of-opt-quote{border:1.5px solid var(--sh-blue,#1d4ed8);background:#f6f9ff}
.of-opt-t{margin:0;font-size:16.5px;font-weight:700;line-height:1.4;color:var(--ink)}
.of-opt-d{margin:0 0 8px;flex:1 1 auto;font-size:14px;line-height:1.72;color:var(--ink-2)}
.of-opt .of-btn{width:100%;min-height:48px;cursor:pointer;font-family:inherit}
.of-btn-q{background:#fff;color:var(--sh-blue,#1d4ed8);border-color:var(--sh-blue,#1d4ed8)}
.of-btn-q:hover{background:#eaf0ff;color:var(--sh-blue,#1d4ed8);text-decoration:none}
.of-more{margin:22px 0 0;font-size:14.5px;color:var(--mut);text-align:center}
.of-links{margin:10px 0 0;font-size:14px;color:var(--mut);text-align:center}
.of-links a,.of-more a{font-weight:600}

/* ── ใบเสนอราคาว่าง: ขั้นตอนสั้น ๆ ─────────────────────────────────────── */
.of-howmini{max-width:520px;margin:12px auto 0;padding:0 0 0 22px;text-align:left;font-size:14.5px;line-height:1.8;color:var(--ink-2)}
.of-howmini b{color:var(--ink)}

/* ── ปุ่มบนหน้าสินค้า: ขอใบเสนอราคา + ลิงก์ดูวิธีสั่งซื้อ ───────────────── */
.ck-buy .of-quoteform{margin-left:0}
.of-quotebtn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 20px;border-radius:11px;
  border:1.5px solid var(--sh-blue,#1d4ed8);background:#fff;color:var(--sh-blue,#1d4ed8);
  font:inherit;font-size:15px;font-weight:700;line-height:1.3;cursor:pointer;
}
.of-quotebtn svg{width:18px;height:18px;flex:0 0 auto}
.of-quotebtn:hover{background:#eaf0ff}
@media (max-width:560px){ .ck-buy .of-quoteform{width:100%} .of-quotebtn{width:100%} }
.of-howto{margin:8px 0 0;font-size:13.5px;line-height:1.6;color:var(--mut)}
.of-howto a{font-weight:700}
.ck-buy .of-howto{flex-basis:100%;margin:0}
/* หน้ารายรุ่น: กล่องราคา (sp-pricebox) · ปุ่มขอใบเสนอราคาเต็มความกว้างใต้ปุ่มใส่ตะกร้า (ไม่พึ่ง printer.css) */
.sp-pricebox .pr-quote{margin-top:10px}
.sp-pricebox .pr-quote .of-quoteform,.sp-pricebox .pr-quote form{margin:0}
.sp-pricebox .pr-quote button,.of-q-full{width:100%;cursor:pointer;font-family:inherit}
.sp-pricebox .pr-quote .of-howto{margin:8px 0 0;text-align:center}
/* BK Label: ปุ่มซื้อ 2 ปุ่มเรียงข้างกัน */
form.bl-cart{display:inline-block;vertical-align:top;margin:0 8px 12px 0}
.bl-cart.of-quoteform{margin-right:0}
.bl-cart~.of-howto{margin:0 0 12px}
.bl-hero .of-howto,.bl-hero .of-howto a{color:#dbe7ff}
@media (max-width:560px){form.bl-cart{display:block;margin:0 0 10px}form.bl-cart .ck-add,form.bl-cart .of-quotebtn{width:100%}}
/* จอ 10.1": ปุ่มในกลุ่ม sh-btns */
.of-q-sh{cursor:pointer;font-family:inherit}
.sh-btns+.of-howto{margin-top:10px}
/* ชุด POS ใน quote.html */
.p-set-foot .of-quoteform{margin:0}
.p-sbtn.of-q-set{width:100%;cursor:pointer;font-family:inherit;background:#fff;color:var(--sh-blue,#1d4ed8);border:1.5px solid var(--sh-blue,#1d4ed8)}
.p-sbtn.of-q-set:hover{background:#eaf0ff}
.p-set-foot .ck-add{width:100%}

/* ── หน้าแรก: แถบ "สั่งซื้อเองได้ง่าย ๆ" ─────────────────────────────── */
.of-hband{padding:18px 0;background:#f4f8ff;border-top:1px solid var(--sh-ring,#dbe4f2);border-bottom:1px solid var(--sh-ring,#dbe4f2)}
.of-hband-in{display:flex;align-items:center;justify-content:space-between;gap:14px 28px;flex-wrap:wrap}
.of-hband-txt{flex:1 1 420px;min-width:0}
.of-hband h2{margin:0 0 4px;font-size:19px;line-height:1.4;color:var(--ink,#0b1b36)}
.of-hband p{margin:0;font-size:14.5px;line-height:1.75;color:var(--ink-2,#31415f)}
.of-hband-btns{display:flex;gap:10px;flex-wrap:wrap}
.of-hb{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 18px;border-radius:12px;font-weight:700;font-size:15px;line-height:1.3;border:1.5px solid var(--sh-blue,#1d4ed8);white-space:nowrap}
.of-hb svg{width:18px;height:18px;flex:0 0 auto}
.of-hb-main{background:var(--sh-blue,#1d4ed8);color:#fff}
.of-hb-main:hover{background:#1a43bd;color:#fff;text-decoration:none}
.of-hb-q{background:#fff;color:var(--sh-blue,#1d4ed8)}
.of-hb-q:hover{background:#eaf0ff;text-decoration:none}
@media (max-width:560px){.of-hband-btns{width:100%}.of-hb{flex:1 1 100%}}
.of-terms-how{margin:10px 0 0}
/* สีประจำโปรแกรม BK Construction POS สำหรับการ์ดในเมนูหลัก (nav) ทุกหน้า · 2026-10-17 */
.t-construction{--accent:#9a4a04;--accent-soft:#fff3d6}
