/* ══════════════════════════════════════════════════════════
   ZeGaze ZeRox — App-style UI (แอปสั่งงาน / ตะกร้า / ติดตาม / บัญชี)
   โหลดต่อจาก style.css จึงใช้ CSS variables ของเดิมได้
   ══════════════════════════════════════════════════════════ */

/* ── แถบแบรนด์บนสุด (app bar) ───────────────────── */
.app-bar{background:var(--dark);color:#fff;position:sticky;top:0;z-index:900}
.app-bar-in{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 16px;max-width:1200px;margin:0 auto}
.app-logo{font-size:19px;font-weight:800;color:#fff;white-space:nowrap}
.app-logo em{color:var(--yellow);font-style:normal}
.app-tagline{font-size:12.5px;color:#c9c9c9;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ── หน้าหลักแอป: CTA + ทางลัด ───────────────────── */
.app-hero{background:linear-gradient(135deg,#111 0%,#2b2b23 60%,#3d3d2b 100%);color:#fff;padding:26px 16px 22px;text-align:center}
.app-hero .app-hero-quote{font-size:16px;font-weight:600;opacity:.95;margin:0 0 6px}
.app-hero .app-hero-sub{font-size:13px;color:#d8d8c8;margin:0 0 16px}
.app-hero .btn{box-shadow:0 10px 26px rgba(255,212,0,.35)}
.app-quick{display:flex;gap:10px;justify-content:center;margin-top:16px;flex-wrap:wrap}
.app-quick-item{background:rgba(255,255,255,.10);color:#fff;border:1px solid rgba(255,255,255,.18);border-radius:999px;padding:8px 16px;font-size:13.5px;font-weight:600;text-decoration:none;transition:.2s}
.app-quick-item:hover{background:var(--yellow);color:#111;border-color:var(--yellow)}

/* ── แถบเมนูล่าง (bottom tab bar) ─────────────────── */
.app-tabbar{position:fixed;left:0;right:0;bottom:0;z-index:1000;background:#fff;border-top:1px solid #e4e2da;
  display:flex;box-shadow:0 -6px 24px rgba(0,0,0,.07);padding-bottom:env(safe-area-inset-bottom)}
.app-tabbar button{flex:1 1 0;min-width:0;background:none;border:0;padding:8px 1px 7px;font-family:inherit;cursor:pointer;color:#6a6a5e;
  display:flex;flex-direction:column;align-items:center;gap:3px;font-size:9.5px;font-weight:600;line-height:1.15;text-align:center;position:relative;transition:color .15s}
.app-tabbar button .atb-ic{font-size:18px;line-height:1;position:relative}
.app-tabbar button.on{color:var(--yellow-dark)}
.app-tabbar button .cart-badge{position:absolute;top:-6px;right:-12px;background:#e02020;color:#fff;font-size:10px;
  font-weight:700;border-radius:999px;min-width:17px;height:17px;line-height:17px;padding:0 4px;text-align:center;font-style:normal}
.app-tabbar button.on .atb-ic::after{content:'';position:absolute;left:50%;bottom:-7px;transform:translateX(-50%);
  width:4px;height:4px;border-radius:50%;background:var(--yellow-dark)}

/* ── หน้าจอแอป (overlay) ─────────────────────────── */
.app-screen{position:fixed;inset:0;z-index:1100;background:#f6f5f0;display:flex;flex-direction:column}
.app-screen.hide{display:none}
.app-screen-head{background:#fff;border-bottom:1px solid #e4e2da;display:flex;align-items:center;gap:6px;padding:10px 10px;
  position:relative;box-shadow:0 2px 8px rgba(0,0,0,.04)}
.app-screen-head .ash-btn{background:none;border:0;cursor:pointer;font-size:22px;color:#333;width:40px;height:40px;display:flex;align-items:center;justify-content:center;border-radius:10px}
.app-screen-head .ash-btn:hover{background:#f2f1ea}
.app-screen-head .ash-back{font-size:26px}
.app-screen-head .ash-title{flex:1;text-align:center;font-size:16px;font-weight:800;color:#1c1c14}
.app-steps{display:flex;gap:4px;align-items:center;font-size:10.5px;color:#9a9a8a;padding:6px 14px 0}
.app-steps b{color:var(--yellow-dark)}
.app-screen-body{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:14px 14px calc(22px + env(safe-area-inset-bottom))}
.app-screen-body::-webkit-scrollbar{width:0}
.app-screen-in{max-width:520px;margin:0 auto}

/* ── เลือกบริการ (การ์ด) ──────────────────────────── */
.svc-pick{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.svc-card{background:#fff;border:1px solid #e4e2da;border-radius:16px;padding:14px 12px;cursor:pointer;transition:.18s;text-align:left;font-family:inherit}
.svc-card:hover{border-color:var(--yellow);box-shadow:var(--shadow);transform:translateY(-2px)}
.svc-card .sc-ic{width:42px;height:42px;border-radius:12px;background:var(--yellow);display:flex;align-items:center;justify-content:center;font-size:22px;margin-bottom:8px}
.svc-card h4{margin:0 0 3px;font-size:14.5px;color:#1c1c14}
.svc-card p{margin:0;font-size:12px;color:#8a8a7f;line-height:1.45}
.svc-card .sc-price{display:inline-block;margin-top:7px;font-size:11.5px;font-weight:700;color:var(--yellow-dark);background:#fff7d6;border-radius:999px;padding:3px 9px}
.svc-free-note{background:#fff7d6;border:1px dashed #e8d98a;border-radius:12px;padding:10px 12px;font-size:12.5px;color:#7a6a10;margin-top:12px}

/* ── ฟอร์มรายละเอียดงาน ──────────────────────────── */
.opt-label{font-size:13px;font-weight:700;color:#333;margin:14px 0 8px;display:flex;justify-content:space-between;align-items:baseline}
.opt-label .opt-hint{font-weight:400;color:#9a9a8a;font-size:11.5px}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{border:1.5px solid #dcdad0;background:#fff;border-radius:12px;padding:9px 12px;font-size:13px;font-family:inherit;cursor:pointer;text-align:left;line-height:1.35;transition:.15s;flex:1 1 auto;min-width:calc(50% - 6px)}
.chip small{display:block;color:#8a8a7f;font-size:11px}
.chip.on{border-color:var(--yellow-dark);background:#fff7d6;color:#1c1c14;box-shadow:0 0 0 1px var(--yellow-dark) inset}
.chip:disabled{opacity:.4;cursor:not-allowed}
.stepper{display:flex;align-items:center;gap:4px}
.stepper .st-val{width:100%;text-align:center;font-size:16px;font-weight:800;color:#1c1c14}
.stepper input.st-val{display:block;flex:1;border:1.5px solid #dcdad0;border-radius:11px;font-family:inherit;padding:10px 8px;font-size:15px;min-width:0;box-sizing:border-box}
.stepper input.st-val:focus{outline:none;border-color:var(--yellow-dark);box-shadow:0 0 0 3px rgba(255,212,0,.22)}
.stepper input.st-val::-webkit-outer-spin-button,.stepper input.st-val::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.stepper input.st-val{-moz-appearance:textfield;appearance:textfield}
.afield{margin-bottom:4px}
.afield label{display:block;font-size:13px;font-weight:700;color:#333;margin-bottom:6px}
.afield input,.afield select,.afield textarea{width:100%;box-sizing:border-box;border:1.5px solid #dcdad0;border-radius:11px;padding:10px 12px;font-family:inherit;font-size:14px;background:#fff;color:#1c1c14}
.afield input:focus,.afield select:focus,.afield textarea:focus{outline:none;border-color:var(--yellow-dark)}
.file-upload{border:1.5px dashed #c9c7ba;border-radius:12px;padding:14px;text-align:center;color:#8a8a7f;font-size:12.5px;background:#fff}
.file-upload.on{border-color:#4caf50;color:#2e7d32}
.file-upload strong{display:block;color:#1c1c14;margin-top:6px;font-size:13.5px;word-break:break-all}
.price-live{background:var(--dark);color:#fff;border-radius:14px;padding:12px 14px;margin-top:16px;display:flex;justify-content:space-between;align-items:center}
.price-live b{color:var(--yellow);font-size:19px}

/* ── สรุปคำสั่งซื้อ ───────────────────────────────── */
.sum-line{display:flex;justify-content:space-between;gap:10px;padding:9px 2px;font-size:13.5px;color:#444;border-bottom:1px dashed #e2e0d8}
.sum-line b{color:#1c1c14;text-align:right;white-space:nowrap}
.sum-line.dim{color:#8a8a7f}
.sum-total{display:flex;justify-content:space-between;align-items:center;padding:12px 2px 2px;font-size:15px;font-weight:800;color:#1c1c14}
.sum-total b{color:var(--yellow-dark);font-size:22px}
.sum-line span{text-align:left}
.sum-rm{background:none;border:0;color:#c62828;font-size:12px;cursor:pointer;padding:0 6px 0 0;vertical-align:middle;opacity:.85}
.sum-rm:hover{opacity:1}
.edit-link{color:var(--yellow-dark);font-weight:700;font-size:12px;cursor:pointer;text-decoration:none}
.deliv-toggle{display:flex;background:#eae9e1;border-radius:12px;padding:4px;gap:4px;margin:10px 0}
.deliv-toggle button{flex:1;border:0;background:transparent;padding:10px;border-radius:10px;font-family:inherit;font-size:13.5px;font-weight:700;color:#6a6a5e;cursor:pointer}
.deliv-toggle button.on{background:#fff;color:var(--yellow-dark);box-shadow:0 2px 6px rgba(0,0,0,.08)}

/* ── ชำระเงิน ─────────────────────────────────────── */
.pay-tabs{display:flex;background:#eae9e1;border-radius:12px;padding:4px;gap:4px;margin-bottom:14px}
.pay-tabs button{flex:1;border:0;background:transparent;padding:10px;border-radius:10px;font-family:inherit;font-size:13.5px;font-weight:700;color:#6a6a5e;cursor:pointer}
.pay-tabs button.on{background:#fff;color:var(--yellow-dark);box-shadow:0 2px 6px rgba(0,0,0,.08)}
.qr-box{background:#fff;border:1px solid #e4e2da;border-radius:18px;padding:18px;text-align:center;box-shadow:var(--shadow)}
.qr-box img{width:210px;height:210px;border-radius:10px;image-rendering:pixelated}
.qr-box p{margin:10px 0 0;font-size:13px;color:#333}
.qr-box p b{color:var(--yellow-dark);font-size:17px}
.copy-row{display:flex;gap:8px;align-items:center;margin-top:10px}
.copy-row input{flex:1;border:1.5px solid #dcdad0;border-radius:10px;padding:9px 11px;font-family:inherit;font-size:13px;background:#fff}
.slip-box{border:1.5px dashed #c9c7ba;border-radius:12px;padding:14px;text-align:center;color:#8a8a7f;font-size:12.5px;background:#fff}
.slip-box.on{border-color:#4caf50;color:#2e7d32}
.slip-box img{max-width:100%;max-height:200px;border-radius:10px;margin-top:8px}
.pay-note{font-size:12px;color:#8a8a7f;margin-top:8px;text-align:center}
.cash-box{width:100%;background:#fff;border:1px solid #e4e2da;border-radius:18px;padding:20px 18px;text-align:center;box-shadow:var(--shadow)}
.cash-box .cash-ic{font-size:42px;line-height:1;margin-bottom:10px}
.cash-box .pay-amount{margin-bottom:4px}

/* ── ชำระเงิน: QR กลางจอ + บัญชีธนาคาร ───────────── */
.app-screen-in.pay-screen{min-height:100%;display:flex;flex-direction:column;justify-content:center}
.pay-center{display:flex;flex-direction:column;align-items:center;text-align:center}
.qr-card{padding:24px;border-radius:24px;box-shadow:0 12px 32px rgba(0,0,0,.10)}
.qr-card img{width:232px;height:auto;border-radius:12px}
.pay-amount{font-size:14px;font-weight:600;color:#333;margin:16px 0 0}
.pay-amount b{font-size:24px;color:var(--yellow-dark)}
.pay-actions{width:100%;max-width:340px;margin:18px auto 0}
.bank-row{display:flex;align-items:center;gap:10px;width:100%;max-width:340px;background:#fff;border:1px solid #e4e2da;border-radius:14px;padding:10px 12px;margin-top:16px;box-sizing:border-box}
.bank-ic{width:40px;height:40px;border-radius:10px;background:#3f4b52;color:#fff;display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:800;flex-shrink:0}
.bank-ic.kb{background:#1d9d86;font-style:italic;font-family:Georgia,serif}
.bank-info{flex:1;min-width:0;text-align:left}
.bank-name{display:block;font-size:11px;color:#8a8a7f}
.bank-no{display:block;font-size:15px;font-weight:800;color:#1c1c14;letter-spacing:.5px}
.bank-row .btn{flex-shrink:0}

/* ── เสร็จสิ้น ─────────────────────────────────────── */
.done-box{text-align:center;padding:26px 10px 10px}
.done-box .done-ic{width:74px;height:74px;border-radius:50%;background:#e8f7ec;color:#2e7d32;font-size:38px;line-height:74px;margin:0 auto 14px}
.done-box h3{font-size:19px;color:#1c1c14;margin:0 0 6px}
.done-box p{font-size:13.5px;color:#6a6a5e;margin:4px 0}
.done-no{background:#fff7d6;border:1px dashed #e8d98a;border-radius:12px;padding:10px;font-size:18px;font-weight:800;color:#1c1c14;margin:12px auto;max-width:300px}
.done-actions{display:grid;gap:9px;margin-top:18px;max-width:320px;margin-left:auto;margin-right:auto}

/* ── บัญชี ─────────────────────────────────────────── */
.profile-card{background:#fff;border:1px solid #e4e2da;border-radius:16px;padding:16px;display:flex;align-items:center;gap:12px}
.profile-av{width:52px;height:52px;border-radius:50%;background:var(--yellow);display:flex;align-items:center;justify-content:center;font-size:22px;color:#111}
.profile-card h4{margin:0;font-size:15.5px;color:#1c1c14}
.profile-card p{margin:2px 0 0;font-size:12.5px;color:#8a8a7f}
.menu-list{margin-top:12px;background:#fff;border:1px solid #e4e2da;border-radius:16px;overflow:hidden}
.menu-item{display:flex;align-items:center;gap:12px;padding:14px 16px;border-bottom:1px solid #f0eee6;font-size:14px;font-weight:600;color:#1c1c14;cursor:pointer;background:none;width:100%;text-align:left;font-family:inherit}
.menu-item:last-child{border-bottom:0}
.menu-item .mi-ic{font-size:18px}
.menu-item .mi-arr{margin-left:auto;color:#b9b7a9}
.menu-item:hover{background:#faf9f2}
.menu-item.danger{color:#c62828}

/* ── รายการออเดอร์ ────────────────────────────────── */
.order-row{background:#fff;border:1px solid #e4e2da;border-radius:14px;padding:12px 14px;margin-bottom:10px;cursor:pointer;display:block;text-decoration:none;color:inherit;transition:.15s}
.order-row:hover{border-color:var(--yellow);box-shadow:var(--shadow)}
.order-row .or-top{display:flex;justify-content:space-between;align-items:center;gap:8px}
.order-row .or-no{font-weight:800;color:#1c1c14;font-size:14.5px}
.order-row .or-status{font-size:11px;font-weight:700;color:#fff;background:#8a8a7f;border-radius:999px;padding:3px 9px;white-space:nowrap}
.order-row .or-status.st-pending{background:#e8a20c}.order-row .or-status.st-confirmed{background:#7b5bd6}
.order-row .or-status.st-paid{background:#2e7d32}.order-row .or-status.st-printing{background:#1565c0}
.order-row .or-status.st-preparing{background:#00695c}.order-row .or-status.st-shipped{background:#4527a0}
.order-row .or-status.st-done{background:#37474f}.order-row .or-status.st-cancelled{background:#c62828}
.order-row .or-meta{font-size:12px;color:#8a8a7f;margin-top:6px;display:flex;justify-content:space-between}
.or-actions{display:flex;align-items:center;gap:6px}
.order-re{background:#f7f5ea;border:1px solid #ddd9c8;border-radius:9px;font-size:12px;padding:4px 8px;cursor:pointer;line-height:1;color:#1c1c14;flex-shrink:0}
.order-re:hover{border-color:var(--yellow-dark);background:#fffbe6}
.btn-reorder:disabled{opacity:.6;cursor:wait}

/* ── Timeline ติดตามงาน (6 ขั้น) ──────────────────── */
.tc-timeline{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-direction:column;gap:2px}
.tc-timeline li{position:relative;padding:5px 0 5px 30px;color:#9a9a8a;font-size:14px}
.tc-timeline li::before{content:'';position:absolute;left:4px;top:8px;width:11px;height:11px;border-radius:50%;background:#dcdad0;border:2px solid #fff;box-shadow:0 0 0 2px #dcdad0}
.tc-timeline li::after{content:'';position:absolute;left:9px;top:22px;bottom:-4px;width:2px;background:#e4e2da}
.tc-timeline li:last-child::after{display:none}
.tc-timeline li.done{color:#1c1c14}
.tc-timeline li.done::before{background:var(--yellow-dark);box-shadow:0 0 0 2px var(--yellow-dark)}
.tc-timeline li.now{color:var(--yellow-dark);font-weight:700}
.tc-timeline li.now::before{background:var(--yellow);box-shadow:0 0 0 2px var(--yellow),0 0 0 5px rgba(255,212,0,.25)}
.timeline{list-style:none;margin:14px 0 0;padding:0}
.timeline li{position:relative;padding:0 0 20px 44px;color:#9a9a8a}
.timeline li::before{content:'';position:absolute;left:12px;top:5px;width:10px;height:10px;border-radius:50%;background:#dcdad0;border:2px solid #fff;box-shadow:0 0 0 2px #dcdad0}
.timeline li::after{content:'';position:absolute;left:16px;top:22px;bottom:-4px;width:2px;background:#e4e2da}
.timeline li:last-child::after{display:none}
.timeline li.done{color:#1c1c14}
.timeline li.done::before{background:var(--yellow-dark);box-shadow:0 0 0 2px var(--yellow-dark)}
.timeline li.now{color:var(--yellow-dark);font-weight:700}
.timeline li.now::before{background:var(--yellow);box-shadow:0 0 0 2px var(--yellow),0 0 0 5px rgba(255,212,0,.25)}
.timeline li b{display:block}
.timeline li time,.timeline li i{font-style:normal;font-size:11.5px;color:#9a9a8a}

/* ── ตะกร้า ────────────────────────────────────────── */
.cart-item{background:#fff;border:1px solid #e4e2da;border-radius:14px;padding:12px;margin-bottom:10px;display:flex;gap:12px;align-items:flex-start}
.cart-item .ci-ic{width:40px;height:40px;border-radius:11px;background:#fff7d6;display:flex;align-items:center;justify-content:center;font-size:19px;flex-shrink:0}
.cart-item .ci-body{flex:1;min-width:0}
.cart-item .ci-body h5{margin:0 0 2px;font-size:14px;color:#1c1c14}
.cart-item .ci-body p{margin:0;font-size:11.5px;color:#8a8a7f;line-height:1.5}
.cart-item .ci-body .ci-sub{font-size:12.5px;color:var(--yellow-dark);font-weight:800;margin-top:5px}
.cart-item .ci-del{background:none;border:0;color:#c62828;font-size:16px;cursor:pointer;padding:2px 6px}

/* ── อนุมัติกว้าง ๆ ────────────────────────────────── */
.btn{border:0;cursor:pointer;font-family:inherit;font-weight:800;border-radius:12px;transition:.18s;text-decoration:none;display:inline-block}
.btn:active{transform:scale(.97)}
.btn-block{display:block;width:100%;text-align:center;padding:13px 16px;font-size:15px}
.btn-sm{padding:9px 14px;font-size:13px}
.btn-yellow{background:var(--yellow);color:#111}
.btn-yellow:hover{background:#ffdf33}
.btn-dark{background:var(--dark);color:#fff}
.btn-dark:hover{background:#26261c}
.btn-line{background:#06c755;color:#fff}
.btn-line:hover{background:#07e05f}
.btn-ghost{background:transparent;color:#666;border:1.5px solid #dcdad0}
.btn-ghost:hover{border-color:#aaa}
.app-toast{position:fixed;left:50%;bottom:86px;transform:translateX(-50%);z-index:1300;background:#1c1c14;color:#fff;padding:10px 18px;border-radius:999px;font-size:13px;font-weight:600;box-shadow:var(--shadow-lg);opacity:0;pointer-events:none;transition:.25s;max-width:86vw;text-align:center}
.app-toast.show{opacity:1}
.app-toast.err{background:#c62828}
.screen-empty{text-align:center;padding:34px 14px;color:#9a9a8a;font-size:13.5px}
.screen-empty .se-ic{font-size:40px;margin-bottom:8px}

/* ── ปรับให้เหมือนแอพบนคอม (จอกว้าง) ───────────────── */
@media (min-width: 900px) {
  .app-screen{left:50%;transform:translateX(-50%);width:420px;max-width:96vw;background:rgba(0,0,0,.4);box-shadow:0 0 60px rgba(0,0,0,.35);border-left:1px solid #e4e2da;border-right:1px solid #e4e2da}
  .app-screen-head,.app-screen-body{background:inherit}
  .app-screen-body{background:#f6f5f0;border-left:1px solid #eee;border-right:1px solid #eee}
  .app-screen-head{background:#fff}
}
@media (max-width: 640px) {
  .app-hero{padding:22px 14px 20px}
  .app-hero-quote{font-size:15px}
}
/* เว็บหลักเลื่อนขึ้นไม่ให้โดน tabbar */
body{padding-bottom:64px}
@media (min-width: 900px){ body{padding-bottom:0} }