/* 客戶入口網站樣式（landmarklogistic.com）— 與內部系統分離的對外門面 */
:root {
  --ll-navy: #1e293b;
  --ll-accent: #2563eb;
  --ll-bg: #f8fafc;
  --ll-card: #ffffff;
  --ll-border: #e2e8f0;
  --ll-text: #0f172a;
  --ll-muted: #64748b;
  --ll-ok: #16a34a;
  --ll-warn: #d97706;
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--ll-text);
  /* 整站底色改用首頁 Hero 同款漸層藍（2026-07-20 使用者指定） */
  background: linear-gradient(135deg, #1e293b, #2563eb) fixed;
  min-height: 100vh;
  font-family: -apple-system, "Noto Sans TC", "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}
a { color: var(--ll-accent); text-decoration: none; }

/* 頁首 */
.ll-header {
  display: flex; align-items: center; gap: 24px; padding: 12px 28px;
  background: var(--ll-navy); color: #fff; flex-wrap: wrap;
}
.ll-brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.ll-brand img { width: 40px; height: 40px; border-radius: 8px; }
.ll-brand b { display: block; font-size: 17px; }
.ll-brand small { display: block; font-size: 11px; color: #cbd5e1; }
/* flex-basis 用 auto（依內容）而非 0：空間足夠時導覽列維持原本的一列寬度、外觀不變；
   空間不足時才配合 flex-wrap 換行，而不是把整頁撐寬變成可左右滑。
   （2026-07-31：原為 flex:1＋nowrap，700px 寬的馬來文會溢出 119px。） */
.ll-nav { display: flex; gap: 18px; flex: 1 1 auto; flex-wrap: wrap; }
.ll-right { display: flex; align-items: center; gap: 14px; }
.ll-right a { color: #e2e8f0; font-size: 15px; }
.ll-chip { font-size: 13px; color: #cbd5e1; }
/* 整排功能鍵（左導覽＋我的訂單＋會員中心）統一同一套設計：同大小、同高、同亮度、同字重、同 hover 底線 */
.ll-nav a, .ll-orderslink, .ll-cartlink, .ll-memberbtn {
  display: inline-flex; align-items: center; gap: 4px;
  color: #e2e8f0; font-size: 15px; font-weight: 400; white-space: nowrap;
  padding: 6px 0; border-bottom: 2px solid transparent;
  text-decoration: none; cursor: pointer;
}
/* hover 與作用中：全部一致——白字＋藍底線 */
.ll-nav a:hover, .ll-nav a.active,
.ll-orderslink:hover, .ll-orderslink.active,
.ll-cartlink:hover, .ll-cartlink.active,
.ll-memberbtn:hover, .ll-memberwrap:hover .ll-memberbtn {
  color: #fff; border-bottom-color: var(--ll-accent);
}

/* 會員中心：滑鼠移上跳出下拉選單 */
.ll-memberwrap { position: relative; display: inline-flex; align-items: center; }
.ll-memberbtn .ll-caret { font-size: 10px; transition: transform .15s; }
.ll-memberwrap:hover .ll-caret { transform: rotate(180deg); }
.ll-dropdown {
  position: absolute; top: 100%; right: 0; margin-top: 8px; min-width: 168px;
  background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
  padding: 6px; display: none; flex-direction: column; z-index: 100;
}
/* 觸發區與選單間留 8px 視覺空隙，但用透明橋接讓滑鼠移過去不會關閉 */
.ll-dropdown::before { content: ""; position: absolute; top: -8px; left: 0; right: 0; height: 8px; }
.ll-memberwrap:hover .ll-dropdown { display: flex; }
.ll-dropdown a { color: var(--ll-text); font-size: 14px; padding: 9px 14px; border-radius: 8px; white-space: nowrap; }
.ll-dropdown a:hover { background: var(--ll-bg); }
.ll-dropdown-logout { border-top: 1px solid var(--ll-border); margin-top: 4px; padding-top: 10px !important; color: #dc2626 !important; }
.ll-lang { background: #334155; color: #fff; border: 1px solid #475569; border-radius: 6px; padding: 5px 8px; font-size: 13px; }

/* 版面 */
.ll-wrap { max-width: 960px; margin: 0 auto; padding: 28px 20px; }
/* 深色漸層背景上、卡片外的文字改亮色 */
.ll-wrap > h2 { color: #fff; }
.ll-wrap > .ll-muted, .ll-wrap > p.ll-muted { color: #cbd5e1; }
.ll-wrap > p > a { color: #dbeafe; }
/* 淺色版頁面（首頁/運費試算 index.html）：背景回白、文字回深色 */
body.ll-light { background: var(--ll-bg); }
body.ll-light .ll-wrap > h2 { color: var(--ll-text); }
body.ll-light .ll-wrap > .ll-muted, body.ll-light .ll-wrap > p.ll-muted { color: var(--ll-muted); }
body.ll-light .ll-wrap > p > a { color: var(--ll-accent); }
.ll-card { background: var(--ll-card); border: 1px solid var(--ll-border); border-radius: 14px; padding: 24px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.ll-card h2 { margin: 0 0 4px; font-size: 22px; }
.ll-card h3 { margin: 0 0 14px; font-size: 17px; }
.ll-muted { color: var(--ll-muted); font-size: 14px; }

/* Hero（首頁） */
.ll-hero { background: linear-gradient(135deg, #1e293b, #2563eb); color: #fff; padding: 64px 20px; text-align: center; }
.ll-hero h1 { font-size: 34px; margin: 0 0 12px; }
.ll-hero p { font-size: 17px; color: #dbeafe; max-width: 600px; margin: 0 auto 24px; }
.ll-hero .ll-btn { font-size: 16px; padding: 12px 28px; }
.ll-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-top: 24px; }
.ll-feature { text-align: center; padding: 20px; }
.ll-feature .ico { font-size: 34px; }

/* 表單 */
.ll-field { margin-bottom: 14px; }
.ll-field label { display: block; font-size: 13px; color: var(--ll-muted); margin-bottom: 5px; }
.ll-input, .ll-select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--ll-border); border-radius: 8px;
  font-size: 15px; background: #fff; color: var(--ll-text);
}
.ll-input:focus, .ll-select:focus { outline: none; border-color: var(--ll-accent); }
/* 合併後的「詳細地址」欄（2026-07-31）：textarea 需自行繼承字體，否則會掉回瀏覽器等寬字 */
textarea.ll-addrline { font-family: inherit; line-height: 1.6; resize: vertical; min-height: 62px; }
.ll-row { display: flex; gap: 10px; flex-wrap: wrap; }
.ll-row > * { flex: 1; }

/* 按鈕 */
.ll-btn { display: inline-block; background: var(--ll-accent); color: #fff; border: none; border-radius: 8px; padding: 10px 20px; font-size: 15px; cursor: pointer; }
.ll-btn:hover { background: #1d4ed8; }
.ll-btn.secondary { background: #fff; color: var(--ll-accent); border: 1px solid var(--ll-accent); }
.ll-btn.danger { background: #dc2626; color: #fff; border: none; }
.ll-btn.danger:hover { background: #b91c1c; }
.ll-btn.sm { padding: 6px 12px; font-size: 13px; }

/* 箱子表格 */
.ll-boxes { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.ll-boxes th, .ll-boxes td { padding: 6px; text-align: left; font-size: 13px; }
.ll-boxes input { width: 100%; padding: 7px; border: 1px solid var(--ll-border); border-radius: 6px; }
/* 窄螢幕縮排（2026-07-31）：320px 卡片內只有 230px，表格卻要 290px 而把整頁撐寬。
   泰文表頭如「กว้าง(ซม.)」詞間無空格，是不可斷的整塊，會直接把欄位頂開——
   所以除了縮小內距與字級，還要允許表頭在任意字元換行，否則縮再多也不夠。
   只在 640px 以下生效，桌面版尺寸不變。 */
@media (max-width: 640px) {
  .ll-boxes th, .ll-boxes td { padding: 3px 2px; font-size: 12px; }
  .ll-boxes th { overflow-wrap: anywhere; word-break: break-word; line-height: 1.35; }
  .ll-boxes input { padding: 6px 4px; }
}

/* 訂單表格 */
.ll-table { width: 100%; border-collapse: collapse; }
.ll-table th { text-align: left; font-size: 13px; color: var(--ll-muted); border-bottom: 1px solid var(--ll-border); padding: 10px 8px; }
.ll-table td { padding: 12px 8px; border-bottom: 1px solid var(--ll-border); font-size: 14px; }

/* 狀態徽章 */
.ll-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.ll-badge.pending_receipt, .ll-badge.received { background: #dbeafe; color: #1e40af; }
.ll-badge.weighed_unpaid { background: #fef3c7; color: #92400e; }
.ll-badge.paid { background: #dcfce7; color: #166534; }
.ll-badge.shipped, .ll-badge.delivered { background: #e0e7ff; color: #3730a3; }
.ll-badge.quote_pending { background: #f1f5f9; color: #475569; }
.ll-badge.quoted { background: #fef3c7; color: #92400e; }
.ll-badge.cancelled { background: #fee2e2; color: #991b1b; }

/* iOS 風滑動開關（改自 uiverse.io by Adir-SL，MIT）— 會員自行開/關 LINE 通知 */
.ll-switch { --sz: 2em; position: relative; display: inline-block; width: calc(var(--sz) * 2);
  height: var(--sz); background: #dedede; border-radius: var(--sz);
  box-shadow: 0 0 0 1px rgba(0,0,0,.05) inset; cursor: pointer; transition: background-color .15s ease-out; }
.ll-switch::after { content: ""; position: absolute; margin: calc(var(--sz) / 10);
  height: calc(var(--sz) - var(--sz) / 5); width: calc(var(--sz) - var(--sz) / 5);
  background: #aaa; border-radius: var(--sz);
  box-shadow: 0 0 0 1px rgba(0,0,0,.05) inset, 0 2px 4px rgba(0,0,0,.3);
  transition: transform .15s ease-out, background-color .15s ease-out; }
.ll-switch:has(input:checked)::after { transform: translateX(var(--sz)); background: #fff; }
.ll-switch:has(input:checked) { background: var(--ll-accent); }
.ll-switch input { opacity: 0; width: 0; height: 0; }
.ll-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* 試算結果框 */
.ll-result { background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 10px; padding: 16px; margin-top: 14px; }
.ll-result .big { font-size: 26px; font-weight: 700; color: var(--ll-accent); }

/* Toast（沿用內部 toast-area 樣式若已載入；此處備援） */
.toast-area { position: fixed; top: 20px; right: 20px; z-index: 999; }
.toast { background: #334155; color: #fff; padding: 12px 18px; border-radius: 8px; margin-bottom: 8px; }
.toast.err { background: #dc2626; }

@media (max-width: 640px) {
  .ll-header { gap: 12px; padding: 10px 16px; }
  /* 手機版導覽列（2026-07-31）：單列、導覽列「自己」可左右滑，頁面本身不滑。
     關鍵三點，缺一就會壞：
     1. flex-basis 明寫 100% —— 基礎樣式的 flex:1（＝flex-basis:0）會蓋掉 width:100%，
        導覽列會被品牌區與右側擠成一小條（馬來文只剩 158px）。
     2. overflow-x:auto —— 讓超出的部分在導覽列內部捲動，而不是把整頁撐寬
        （修正前 375px 螢幕下文件寬 529px，整頁連內文都能左右滑）。
     3. 連結設 flex:0 0 auto —— 否則彈性子項會被壓縮而不是溢出，就滑不動了。
     右側漸層遮罩是「後面還有」的視覺提示，否則客戶不會知道可以滑。 */
  .ll-nav {
    order: 3; flex: 1 0 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 18px;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent 100%);
            mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent 100%);
  }
  .ll-nav::-webkit-scrollbar { display: none; }
  .ll-nav a { flex: 0 0 auto; }
  /* 頁首右側（登入後含購物車＋我的訂單＋會員中心＋語言選單）同樣不能 nowrap：
     320px 時馬來文需要 353px、只有 288px 可用，會把整頁撐寬。未登入時不會發生，
     所以只在寄件／訂單等登入後的頁面才看得到。 */
  .ll-right { flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
}

/* 購物車：純白線條圖示、無底色（客戶最常用的付款入口） */
.ll-right a.ll-cartlink {
  position: relative; line-height: 1;
  padding: 4px 6px; margin-right: 8px;
  border-bottom: none !important;
  color: #fff;
  transition: transform .15s, filter .15s;
}
.ll-right a.ll-cartlink svg {
  width: 30px; height: 30px; display: block;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.35));
}
.ll-right a.ll-cartlink:hover, .ll-right a.ll-cartlink.active {
  color: #fff; border-bottom: none !important;
  transform: translateY(-1px);
  filter: drop-shadow(0 0 6px rgba(255,255,255,.55));
}
.ll-cartdot {
  position: absolute; top: -3px; right: -5px;
  background: #dc2626; color: #fff; font-size: 12px; font-weight: 700; line-height: 1;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  border: 2px solid #1e293b;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ── 頁尾（所有前台頁共用）───────────────────────────────────────────────── */
.ll-footer { background: #dbe6f5; color: #1e293b; margin-top: 56px; padding: 34px 20px 26px; }
.ll-footnav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; margin-bottom: 30px; }
.ll-footnav a { color: #334155; font-size: 15px; text-decoration: none; white-space: nowrap; }
.ll-footnav a:hover { color: var(--ll-accent); text-decoration: underline; }

.ll-foothours { display: flex; flex-wrap: wrap; justify-content: center; align-items: start;
  gap: 12px 34px; margin-bottom: 34px; font-size: 14px; color: #475569; text-align: center; }
.ll-foothours b { display: block; color: #1e293b; font-size: 15px; }
.ll-foothours small { color: #64748b; }

.ll-footbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 22px 30px; max-width: 1100px; margin: 0 auto; padding-top: 22px;
  border-top: 1px solid rgba(30,41,59,.12); }
.ll-footco { font-size: 14px; line-height: 1.9; color: #475569; }
.ll-footco b { color: #1e293b; }
.ll-footlabel { font-size: 13px; font-weight: 600; color: #1e293b; margin-bottom: 8px; text-align: center; }
.ll-payrow { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
/* 付款方式：統一尺寸方框；有官方圖檔者白底、純文字者以品牌色填滿 */
.ll-paychip {
  width: 62px; height: 34px; box-sizing: border-box;   /* 高度對齊右側 LINE／Email 圖示 */
  background: #fff; border: 1px solid #cbd5e1; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px 6px; font-size: 11px; font-weight: 700; line-height: 1.2;
  text-align: center; white-space: nowrap; color: #334155; overflow: hidden;
}
.ll-paychip img { max-width: 100%; max-height: 100%; width: auto; height: auto;
  object-fit: contain; display: block; }
/* 信用卡圖較寬、留白多，內距縮小讓圖面放大（仍不超出方框） */
.ll-paychip.pay-card { padding: 1px 2px; }
/* 純文字者：品牌色填滿＋白字（沿用最初版本的配色） */
.ll-paychip.pay-atm-txt   { color: #fff; background: #475569; border-color: #475569; }
.ll-paychip.pay-jko-txt   { color: #fff; background: #E4002B; border-color: #E4002B; }
.ll-paychip.pay-line-txt  { color: #fff; background: #06C755; border-color: #06C755; }
.ll-paychip.pay-apple-txt { color: #fff; background: #000;    border-color: #000; }
.ll-paychip.pay-card-txt  { color: #fff; background: #2563eb; border-color: #2563eb; }

.ll-footcontact { display: flex; flex-direction: column; align-items: center; }
.ll-social { display: flex; gap: 12px; }
.ll-social a { width: 34px; height: 34px; border-radius: 50%; background: #1e293b; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; transition: background .15s, transform .15s; }
.ll-social a svg { width: 19px; height: 19px; display: block; }
.ll-social a:hover { transform: translateY(-2px); }
.ll-social .so-fb   { background: #1877F2; }
.ll-social .so-ig   { background: #C13584; }
.ll-social .so-th   { background: #000; }
.ll-social .so-line { background: #06C755; }
.ll-social .so-mail { background: #475569; }
.ll-linetxt { font-size: 11px; font-weight: 800; letter-spacing: .3px; line-height: 1; }
/* 官方圖示（如 LINE）填滿圓框 */
.ll-social a:has(.ll-soimg) { background: transparent; }
.ll-soimg { width: 34px; height: 34px; border-radius: 50%; display: block; object-fit: cover; }

@media (max-width: 640px) {
  .ll-footbar { flex-direction: column; text-align: center; }
  .ll-footco { text-align: center; }
  .ll-foothours { gap: 10px 18px; }
}

/* ── 必填標示與結構化地址表單 ─────────────────────────────────────────────── */
.ll-req { color: #dc2626; font-weight: 700; margin-left: 2px; }
/* 必填星號緊跟在標籤後（i18n 會覆寫標籤內容，星號只能放標籤外）：
   讓該標籤縮成內容寬，星號與標籤同一行；不支援 :has 的舊瀏覽器維持原樣 */
.ll-field label:has(+ .ll-req), label.pl:has(+ .ll-req) { display: inline-block; }
.ll-hint { font-size: 12px; color: var(--ll-muted); line-height: 1.6; margin-top: 4px; }
.ll-invalid { border-color: #dc2626 !important; background: #fef2f2; }
.ll-phone { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 8px; }
.ll-addrgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.ll-addrgrid .ll-span2 { grid-column: 1 / -1; }
@media (max-width: 520px) {
  .ll-addrgrid { grid-template-columns: 1fr; }
  .ll-phone { grid-template-columns: 1fr; }
}

/* ── 首頁內容區塊（2026-07-30 新增）──────────────────────────────────────────
   原本首頁只有 Hero＋運費試算兩塊、全長不到兩個螢幕。補上服務／流程／航線／CTA，
   捲動動效才有作用對象。所有區塊預設「可見」，GSAP 只做 from() 入場；
   CDN 掛掉或使用者關閉動畫時，內容照常顯示。 */
.ll-sec { padding: 56px 20px; }
.ll-sec-in { max-width: 960px; margin: 0 auto; }
.ll-sec.alt { background: #fff; border-top: 1px solid var(--ll-border); border-bottom: 1px solid var(--ll-border); }
.ll-sec h2 { font-size: 26px; margin: 0 0 6px; text-align: center; color: var(--ll-text); }
.ll-sec .ll-sec-sub { text-align: center; color: var(--ll-muted); font-size: 15px; margin: 0 0 34px; }
.ll-sec-more { text-align: center; margin-top: 28px; }

/* 服務項目：沿用既有 .ll-features 網格，卡片化 */
.ll-features { margin-top: 0; }
.ll-feature {
  background: var(--ll-card); border: 1px solid var(--ll-border); border-radius: 14px;
  padding: 26px 20px; text-align: center;
  transition: transform .18s ease-out, box-shadow .18s ease-out;
}
.ll-feature:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(30, 41, 59, .10); }
.ll-feature .ico { font-size: 34px; line-height: 1.2; display: block; margin-bottom: 10px; }
.ll-feature b { display: block; font-size: 16px; margin-bottom: 8px; color: var(--ll-text); }
.ll-feature span { display: block; font-size: 14px; color: var(--ll-muted); line-height: 1.75; }

/* 服務流程：五步驟 */
.ll-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.ll-step { position: relative; padding: 22px 16px; text-align: center; }
.ll-step .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; margin-bottom: 12px;
  background: var(--ll-accent); color: #fff; font-size: 15px; font-weight: 700;
}
.ll-step p { margin: 0; font-size: 14px; color: var(--ll-text); line-height: 1.7; }
/* 步驟之間的連接線（最後一格不畫；窄螢幕收起） */
.ll-step::after {
  content: ""; position: absolute; top: 42px; right: -8px; width: 16px; height: 2px;
  background: var(--ll-border);
}
.ll-step:last-child::after { display: none; }
@media (max-width: 700px) { .ll-step::after { display: none; } }

/* 航線覆蓋：標籤列 */
.ll-lanes { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.ll-lane {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ll-card); border: 1px solid var(--ll-border); border-radius: 999px;
  padding: 9px 18px; font-size: 15px; color: var(--ll-text);
  transition: border-color .18s, transform .18s ease-out;
}
.ll-lane:hover { border-color: var(--ll-accent); transform: translateY(-2px); }
.ll-lane .flag { font-size: 18px; line-height: 1; }

/* 結尾行動呼籲 */
.ll-cta { background: linear-gradient(135deg, #1e293b, #2563eb); color: #fff; text-align: center; }
.ll-cta h2 { color: #fff; }
.ll-cta .ll-sec-sub { color: #dbeafe; }
.ll-cta .ll-btn { font-size: 16px; padding: 12px 28px; margin: 0 5px 10px; }

/* 使用者若在系統設定關閉動畫，一律直接顯示、不做位移 */
@media (prefers-reduced-motion: reduce) {
  .ll-feature, .ll-lane { transition: none; }
  .ll-feature:hover, .ll-lane:hover { transform: none; }
}
