/* ==========================================================================
   愛購網 前台樣式（後台共用基礎元件）
   方向 B：清爽專業電商 —— 白底、單一品牌色（愛購紅）、精緻字級
   斷點：<768 手機（底部分頁列）｜768+ 桌機頁首｜960+ 兩欄結帳｜1024+ 完整桌機
   ========================================================================== */
:root {
  --brand: #C73891;        /* 粉玫瑰（取自謝謝貼圖）：白字對比 4.77 */
  --brand-600: #B83386;
  --brand-700: #94296C;
  --brand-50: #FFF0F7;
  --brand-100: #FCDDEE;
  --ink: #221A1F;
  --ink2: #54464E;
  --ink3: #6A5A63;         /* 白底 6.4、玫瑰灰底 5.5 */
  --line: #F0E3EA;
  --line2: #E2D0DA;
  --bg: #FDF8FA;
  --surface: #FFFFFF;
  --muted: #F6ECF1;
  --focus: #1D5FBF;
  --ok: #15793A; --ok-soft: #E7F6EC;
  --info: #1D5FBF; --info-soft: #E8F0FC;
  --teal: #0E6F86; --teal-soft: #E3F4F8;
  --warn: #9A5B00; --warn-soft: #FFF4E0;
  --alert: #B84A00; --alert-soft: #FFEEDF;
  --bad: #C0262D; --bad-soft: #FDECEC;
  --r-sm: 8px; --r: 12px; --r-lg: 16px;
  --sh-1: 0 1px 2px rgba(46, 14, 34, .05);
  --sh-2: 0 1px 3px rgba(46, 14, 34, .06), 0 6px 16px rgba(46, 14, 34, .06);
  --sh-3: 0 16px 40px rgba(46, 14, 34, .16);
  --font: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "PingFang TC", "Heiti TC", "Microsoft JhengHei", sans-serif;
  --num: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --tab-h: 60px;
  --bar-h: 68px;
  --safe-b: 0px;
  --gut: 16px;
}
@supports (padding: env(safe-area-inset-bottom)) { :root { --safe-b: env(safe-area-inset-bottom); } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.35; }
p { margin: 0; }
[hidden] { display: none !important; }

/* 可見的鍵盤焦點（舊版 WebKit 不支援 :focus-visible 時，保留 :focus 外框） */
a:focus, button:focus, input:focus, select:focus, textarea:focus, [tabindex]:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
a:focus:not(:focus-visible), button:focus:not(:focus-visible), [tabindex]:focus:not(:focus-visible) { outline: none; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); text-decoration: none; }
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: 1232px; margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut); }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; }

/* ---------- 按鈕 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px; border: 1.5px solid transparent; border-radius: 12px; font-size: 16px; font-weight: 700; letter-spacing: .02em; line-height: 1.25; cursor: pointer; text-decoration: none; text-align: center; transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-main, .btn-buy { background: var(--brand); color: #fff; }
.btn-main:hover, .btn-buy:hover { background: var(--brand-600); }
.btn-soft { background: var(--brand-50); color: var(--brand-600); border-color: var(--brand-100); }
.btn-soft:hover { background: var(--brand-100); }
.btn-line { background: #fff; color: var(--ink); border-color: var(--line2); }
.btn-line:hover { border-color: var(--ink3); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-white { background: #fff; color: var(--brand-600); }
.btn-white:hover { background: var(--brand-50); }
.btn-danger { background: #fff; color: var(--bad); border-color: #F6C6DE; }
.btn-danger:hover { background: var(--bad-soft); }
.btn-sm { min-height: 40px; padding: 6px 14px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; margin-top: 16px; }
.btn-row .btn { flex: 1; }
.link { color: var(--brand-600); font-weight: 600; text-decoration: none; border: 0; background: none; padding: 0; cursor: pointer; font-size: inherit; }
.link:hover { text-decoration: underline; }

/* ---------- 共用區塊 ---------- */
.panel, .box { background: var(--surface); border-radius: var(--r-lg); border: 1px solid var(--line); padding: 18px 16px; }
.box + .box, .panel + .panel { margin-top: 12px; }
.panel h2, .panel h3, .box h2, .box h3 { margin: 0 0 12px; font-size: 17px; font-weight: 700; }
.hint { font-size: 13.5px; color: var(--ink3); line-height: 1.55; }
.empty { text-align: center; padding: 48px 16px; color: var(--ink2); }
.empty svg { width: 64px; height: 64px; margin: 0 auto 12px; color: var(--line2); }
.empty b { display: block; font-size: 18px; color: var(--ink); margin-bottom: 4px; }
.empty .btn { margin-top: 18px; }
.page-title { font-size: 22px; font-weight: 700; margin: 4px 0 16px; letter-spacing: .01em; }
.page-title small { font-size: 15px; font-weight: 500; color: var(--ink3); margin-left: 6px; }

.price { color: var(--brand); font-family: var(--num); font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; }
.price small { font-size: .68em; margin-right: 1px; font-weight: 600; }

/* 表單 */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 15px; font-weight: 600; color: var(--ink); }
.field input, .field textarea, .field select, .inp, select { width: 100%; min-height: 48px; padding: 11px 14px; border: 1.5px solid var(--line2); border-radius: 12px; background: #fff; font-size: 16px; -webkit-appearance: none; appearance: none; transition: border-color .15s, box-shadow .15s; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%234B5261' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 20px; padding-right: 40px; }
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus, .field textarea:focus, .inp:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(199, 56, 145, .16); }
.field input::placeholder, .inp::placeholder, textarea::placeholder { color: #978891; }

/* 狀態徽章 */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 99px; line-height: 1.5; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.wait { background: var(--warn-soft); color: var(--warn); }
.pill.work { background: var(--info-soft); color: var(--info); }
.pill.move { background: var(--teal-soft); color: var(--teal); }
.pill.alert { background: var(--alert-soft); color: var(--alert); }
.pill.done { background: var(--ok-soft); color: var(--ok); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.mute { background: var(--muted); color: var(--ink2); }

.alert-box { display: flex; gap: 10px; align-items: flex-start; background: var(--alert-soft); color: #7A3300; border-radius: 12px; padding: 12px 14px; font-size: 15px; margin-bottom: 16px; }
.alert-box svg { width: 20px; height: 20px; flex: none; margin-top: 2px; }

/* 鍵值表 */
.kv { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px 12px; font-size: 15px; margin: 0; }
.kv dt { color: var(--ink3); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* 小計 */
.sum { display: grid; gap: 8px; font-size: 15px; }
.sum > div { display: flex; justify-content: space-between; gap: 12px; }
.sum > div > span:first-child { color: var(--ink2); }
.sum .total { font-size: 17px; font-weight: 700; padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--line); align-items: baseline; }
.sum .total > span:first-child { color: var(--ink); }
.sum .total .price { font-size: 22px; }

/* 商品明細列（訂單內） */
.line-item { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line-item:last-of-type { border-bottom: 0; }
.line-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; background: var(--muted); }
.line-item .nm { font-size: 15px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-item .sp { font-size: 13.5px; color: var(--ink3); }
.line-item .price { font-size: 16px; }

/* 物流時間軸 */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { position: relative; padding: 0 0 20px 34px; min-height: 44px; }
.tl li::before { content: ""; position: absolute; left: 10px; top: 24px; bottom: 0; width: 2px; background: var(--line); }
.tl li:last-child { padding-bottom: 0; }
.tl li:last-child::before { display: none; }
.tl li::after { content: ""; position: absolute; left: 3px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid var(--line2); }
.tl li.done::after { background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4.5 8.2 2.3 2.3 4.7-5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; border-color: var(--ok); }
.tl li.done::before { background: var(--ok); }
.tl li.current::after { background: var(--ok); border: 4px solid #fff; box-shadow: 0 0 0 2px var(--ok), 0 0 0 7px rgba(21, 121, 58, .16); }
.tl li.bad::after { background: var(--bad); border-color: var(--bad); }
.tl .t-l { font-weight: 700; font-size: 16px; line-height: 1.5; }
.tl li.current .t-l { color: var(--ok); }
.tl li.bad .t-l { color: var(--bad); }
.tl .t-x { font-size: 14.5px; color: var(--ink2); }
.tl li.todo .t-l { color: var(--ink3); font-weight: 500; }
.tl .t-at { font-size: 13px; color: var(--ink3); font-family: var(--num); font-variant-numeric: tabular-nums; }
.tl .t-n { font-size: 14px; color: var(--ink2); background: var(--muted); border-radius: 8px; padding: 4px 10px; display: inline-block; margin-top: 4px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 16px); z-index: 90; transform: translate(-50%, 16px); background: rgba(22, 25, 31, .94); color: #fff; padding: 12px 20px; border-radius: 12px; font-size: 15px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); text-align: center; box-shadow: var(--sh-3); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   前台
   ========================================================================== */
body.shop { padding-bottom: calc(var(--tab-h) + var(--safe-b)); }

/* 公告列 */
.utility { background: #261C22; color: #fff; font-size: 13px; }
.utility-row { display: flex; align-items: center; justify-content: center; min-height: 34px; gap: 16px; }
.notice { text-align: center; letter-spacing: .02em; padding: 6px 0; }
.utility-side { display: none; }
.utility-side a { color: #fff; text-decoration: none; font-weight: 500; }
.utility-side a:hover { text-decoration: underline; }
.utility-side span { color: #DDCDD6; }

/* 頁首 */
.top { position: -webkit-sticky; position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 12px; min-height: 60px; }
/* 店名與標語是後台可改的文字：品牌區可以縮（長店名以「…」截斷，完整名稱在連結的 aria-label），搜尋框保有最小寬度，不會被擠掉或撐出水平捲動 */
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; flex: 0 1 auto; min-width: 0; min-height: 44px; }
.logo svg { width: 36px; height: 36px; flex: none; }
.logo-t { min-width: 0; }
.logo b { display: block; font-size: 20px; font-weight: 700; letter-spacing: .06em; line-height: 1.15; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo small { display: none; font-size: 12px; color: var(--ink3); letter-spacing: .04em; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.search { flex: 1; min-width: 120px; display: flex; align-items: center; height: 42px; background: var(--muted); border: 1.5px solid transparent; border-radius: 99px; padding: 0 4px 0 12px; transition: border-color .15s, background-color .15s; }
.search:focus-within { border-color: var(--brand); background: #fff; }
.search svg { width: 20px; height: 20px; color: var(--ink3); flex: none; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; padding: 0 8px; font-size: 16px; -webkit-appearance: none; appearance: none; }
.search input:focus { outline: none; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-go { display: none; }

/* 底部分頁列（手機） */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; background: #fff; border-top: 1px solid var(--line); padding-bottom: var(--safe-b); box-shadow: 0 -2px 12px rgba(46, 14, 34, .05); }
.tabbar a { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: var(--tab-h); font-size: 12.5px; font-weight: 500; color: var(--ink3); text-decoration: none; }
.tabbar a svg { width: 25px; height: 25px; }
.tabbar a.on { color: var(--brand); font-weight: 700; }
.tabbar a.on svg path, .tabbar a.on svg rect { stroke-width: 2.1; }
#cartBadge, .cart-count { position: absolute; top: 5px; left: calc(50% + 6px); min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--brand); color: #fff; font: 700 12px/20px var(--num); text-align: center; font-style: normal; border: 2px solid #fff; box-sizing: content-box; }

.catnav { display: none; }

main#app { display: block; max-width: 1232px; margin: 0 auto; padding: 12px var(--gut) 40px; min-height: 60vh; }
main#app:focus { outline: none; }

/* 手機：有固定底部列的頁面 */
body[data-route="product"], body[data-route="checkout"] { padding-bottom: calc(var(--bar-h) + var(--safe-b)); }
body[data-route="cart"] { padding-bottom: calc(var(--tab-h) + var(--bar-h) + var(--safe-b)); }
body[data-route="product"] .tabbar, body[data-route="checkout"] .tabbar { display: none; }
body[data-route="product"] .toast, body[data-route="checkout"] .toast { bottom: calc(var(--bar-h) + var(--safe-b) + 16px); }
body[data-route="cart"] .toast { bottom: calc(var(--tab-h) + var(--bar-h) + var(--safe-b) + 16px); }

/* ---------- 首頁 ---------- */
.hero-wrap { display: grid; gap: 12px; }
.hero { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--brand); color: #fff; padding: 22px 20px; display: grid; grid-template-columns: minmax(0, 1fr); }
.hero::after { content: ""; position: absolute; right: -60px; top: -80px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255, 255, 255, .08); pointer-events: none; }
.hero-main { position: relative; z-index: 1; max-width: 30em; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; background: rgba(0, 0, 0, .16); padding: 3px 10px; border-radius: 99px; margin-bottom: 10px; }
.hero h1 { margin: 0 0 8px; font-size: 25px; font-weight: 700; letter-spacing: .03em; line-height: 1.35; }
.hero-sub { font-size: 15px; line-height: 1.65; margin-bottom: 16px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-cta .btn { min-height: 44px; padding: 8px 18px; font-size: 15px; }
.btn-ghost-w { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.btn-ghost-w:hover { background: rgba(255, 255, 255, .12); }
.hero-pics { display: none; }

.trust { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; display: grid; gap: 12px; }
.owner { display: flex; align-items: center; gap: 12px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; font: 700 18px/1 var(--num); flex: none; border: 1.5px solid var(--brand-100); }
.owner b { display: block; font-size: 16px; }
.owner span { font-size: 13.5px; color: var(--ink3); }
.owner .link { margin-left: auto; font-size: 14px; white-space: nowrap; min-height: 40px; display: inline-flex; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); padding-top: 12px; }
.stats div { text-align: center; }
.stats div + div { border-left: 1px solid var(--line); }
.stats b { display: flex; align-items: center; justify-content: center; gap: 4px; font: 700 20px/1.2 var(--num); color: var(--ink); }
.stats b svg { width: 17px; height: 17px; color: #E5A100; }
.stats span { font-size: 12.5px; color: var(--ink3); }

.promo { display: flex; gap: 12px; align-items: center; background: var(--brand-50); border: 1px solid var(--brand-100); color: var(--brand-700); border-radius: var(--r); padding: 12px 14px; font-size: 15px; font-weight: 500; }
.promo svg { width: 26px; height: 26px; flex: none; color: var(--brand); }

.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.svc { display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; min-width: 0; }
.svc svg { width: 26px; height: 26px; flex: none; color: var(--brand); }
.svc b { display: block; font-size: 14.5px; line-height: 1.35; }
.svc span { display: block; font-size: 12.5px; color: var(--ink3); line-height: 1.4; }

.listing { margin-top: 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.side-cats { display: none; }
.list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; flex-wrap: wrap; }
.list-head h2 { margin: 0; font-size: 20px; font-weight: 700; }
.list-head h2 small { font-size: 14px; font-weight: 500; color: var(--ink3); margin-left: 6px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 6px; margin: 0 calc(var(--gut) * -1); padding-left: var(--gut); padding-right: var(--gut); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; min-height: 40px; border: 1.5px solid var(--line2); background: #fff; padding: 6px 16px; border-radius: 99px; font-size: 15px; font-weight: 500; cursor: pointer; white-space: nowrap; text-decoration: none; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.sortbar { display: flex; margin: 8px 0 14px; border-bottom: 1px solid var(--line); }
.sortbar button { flex: 1; min-height: 44px; border: 0; background: none; padding: 8px 4px; font-size: 15px; color: var(--ink2); cursor: pointer; border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.sortbar button.on { color: var(--brand-600); font-weight: 700; border-bottom-color: var(--brand); }
.search-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 8px 8px 8px 14px; margin: 10px 0 12px; font-size: 15px; }
.search-note .btn { flex: none; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.card { position: relative; background: var(--surface); border-radius: var(--r); overflow: hidden; text-decoration: none; border: 1px solid var(--line); display: flex; flex-direction: column; transition: box-shadow .18s, border-color .18s, transform .18s; }
.ph { position: relative; padding-top: 100%; background: var(--muted); overflow: hidden; }
.ph img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card .bd { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card .nm { font-size: 15px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; color: var(--ink); }
.card .price { font-size: 19px; margin-top: 2px; }
.tag { display: inline-flex; align-self: flex-start; align-items: center; font-size: 12px; font-weight: 700; color: var(--brand-600); border: 1px solid var(--brand-100); background: var(--brand-50); border-radius: 6px; padding: 0 6px; line-height: 20px; }
.meta { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 13px; color: var(--ink3); margin-top: auto; padding-top: 4px; }
.rt { display: inline-flex; align-items: center; gap: 3px; color: var(--ink2); font-family: var(--num); font-weight: 600; }
.rt svg { width: 14px; height: 14px; color: #E5A100; }
@media (hover: hover) {
  .card:hover { border-color: var(--line2); box-shadow: var(--sh-2); transform: translateY(-2px); }
  .card:hover .ph img { transform: scale(1.03); }
  .chip:hover { border-color: var(--ink3); }
  .sortbar button:hover { color: var(--ink); }
}

/* 分類頁 */
.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cat-tile { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; }
.cat-tile .ph { padding-top: 62%; }
.cat-tile div:last-child { padding: 10px 12px 12px; }
.cat-tile b { display: block; font-size: 16px; line-height: 1.4; }
.cat-tile span { font-size: 13.5px; color: var(--ink3); }

/* ---------- 麵包屑 ---------- */
.crumb { display: none; font-size: 14px; color: var(--ink3); margin: 4px 0 16px; }
.crumb a { color: var(--ink2); text-decoration: none; }
.crumb a:hover { color: var(--brand-600); text-decoration: underline; }
.crumb span { margin: 0 8px; color: var(--line2); }

/* ---------- 商品頁 ---------- */
.pd { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.pd-gallery { margin: -12px calc(var(--gut) * -1) 0; background: #fff; }
.pd-img { position: relative; padding-top: 100%; background: var(--muted); }
.pd-img img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.pd-info { display: grid; gap: 12px; min-width: 0; }
.pd-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.pd-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 12px; }
.pd-price .price { font-size: 30px; }
.pd h1 { font-size: 20px; font-weight: 700; line-height: 1.5; margin: 8px 0 8px; letter-spacing: .01em; }
.pd-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--ink3); align-items: center; }
.pd-meta .rt { font-size: 15px; }
.pd-meta .rt svg { width: 16px; height: 16px; }
.tier { margin-top: 18px; }
.tier-h { display: flex; align-items: baseline; gap: 10px; font-size: 15px; margin-bottom: 10px; }
.tier-h b { font-weight: 700; }
.tier-h span { color: var(--ink3); font-size: 14px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { min-width: 56px; min-height: 44px; padding: 8px 16px; border: 1.5px solid var(--line2); background: #fff; border-radius: 10px; cursor: pointer; font-size: 16px; font-weight: 500; transition: border-color .15s, background-color .15s; }
.opt:hover:not(:disabled) { border-color: var(--ink3); }
.opt.on { border-color: var(--brand); color: var(--brand-600); background: var(--brand-50); font-weight: 700; box-shadow: inset 0 0 0 1px var(--brand); }
.opt:disabled { color: #978891; background: var(--muted); border-style: dashed; text-decoration: line-through; cursor: not-allowed; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line2); border-radius: 12px; overflow: hidden; background: #fff; }
.qty button { width: 44px; height: 44px; border: 0; background: #fff; font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink2); }
.qty button:hover { background: var(--muted); }
.qty input { width: 52px; height: 44px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; font: 600 17px var(--num); font-variant-numeric: tabular-nums; border-radius: 0; -webkit-appearance: none; appearance: none; }
.qty-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.buy-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: flex; gap: 8px; align-items: center; min-height: var(--bar-h); padding: 10px var(--gut) calc(10px + var(--safe-b)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(46, 14, 34, .07); }
.buy-bar .btn { flex: 1; min-height: 48px; padding: 8px 10px; }
.bb-cart { position: relative; flex: none; width: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 48px; font-size: 12px; color: var(--ink2); text-decoration: none; }
.bb-cart svg { width: 24px; height: 24px; }
.bb-cart .cart-count { top: -2px; left: 28px; }

.ship-info { display: grid; gap: 14px; font-size: 15px; }
.ship-info > div { display: flex; gap: 12px; align-items: flex-start; }
.ship-info svg { width: 24px; height: 24px; flex: none; margin-top: 1px; color: var(--brand); }
.ship-info b { font-weight: 700; }
.desc { white-space: pre-line; color: var(--ink2); font-size: 16px; line-height: 1.8; }
.pd-desc { margin-top: 12px; }

/* ---------- 結帳步驟 ---------- */
.steps { list-style: none; margin: 4px 0 18px; padding: 0; display: flex; align-items: center; counter-reset: s; }
.steps li { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--ink3); white-space: nowrap; flex: none; }
.steps li + li::before { content: ""; flex: none; width: 24px; height: 2px; background: var(--line2); margin: 0 8px; border-radius: 1px; }
.steps li.done + li::before, .steps li.on::before { background: var(--brand); }
.steps li:not(:first-child) { flex: 1; }
.steps li + li::before { flex: 1; min-width: 12px; }
.steps i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line2); background: #fff; font: 700 13px/1 var(--num); font-style: normal; color: var(--ink3); flex: none; }
.steps i svg { width: 14px; height: 14px; }
.steps li.on { color: var(--ink); font-weight: 700; }
.steps li.on i { background: var(--brand); border-color: var(--brand); color: #fff; }
.steps li.done { color: var(--ink2); }
.steps li.done i { background: var(--brand-50); border-color: var(--brand); color: var(--brand-600); }

/* ---------- 購物車 / 結帳版面 ---------- */
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.freebar { font-size: 14.5px; color: var(--ink2); background: var(--muted); border-radius: 10px; padding: 10px 12px; margin-bottom: 4px; }
.freebar b { color: var(--brand-600); }
.freebar.ok { background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.freebar .bar { height: 6px; background: #fff; border-radius: 3px; margin-top: 8px; overflow: hidden; }
.freebar .bar i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }

.ci { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.ci:last-child { border-bottom: 0; padding-bottom: 0; }
.ci img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; background: var(--muted); }
.ci-nm { font-size: 15.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ci-sp { display: inline-block; font-size: 13.5px; color: var(--ink2); background: var(--muted); border-radius: 6px; padding: 1px 8px; margin-top: 4px; }
.ci-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.ci-row .price { font-size: 17px; }
.ci-act { display: flex; align-items: center; gap: 6px; }
.rm { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; background: none; color: var(--ink3); border-radius: 10px; cursor: pointer; }
.rm:hover { background: var(--bad-soft); color: var(--bad); }
.rm svg { width: 20px; height: 20px; }
.ci .qty button, .ci .qty input { height: 40px; }
.ci .qty button { width: 40px; }
.ci .qty input { width: 44px; font-size: 16px; }

.summary h2 { font-size: 17px; }
.pay-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: flex; align-items: center; gap: 12px; min-height: var(--bar-h); padding: 10px var(--gut) calc(10px + var(--safe-b)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(46, 14, 34, .07); }
body[data-route="cart"] .pay-bar { bottom: calc(var(--tab-h) + var(--safe-b)); padding-bottom: 10px; }
.pb-sum { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.pb-sum span { font-size: 13px; color: var(--ink3); }
.pb-sum .price { font-size: 22px; }
.pay-bar .btn { flex: none; min-width: 148px; }
.pay-note { text-align: center; margin: 12px 0 0; }

.methods { display: grid; gap: 10px; }
.method { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; padding: 14px; border: 1.5px solid var(--line2); border-radius: 14px; cursor: pointer; background: #fff; transition: border-color .15s, background-color .15s; }
.method:hover { border-color: var(--ink3); }
.method.on { border-color: var(--brand); background: var(--brand-50); box-shadow: inset 0 0 0 1px var(--brand); }
.method input { margin: 2px 0 0; accent-color: var(--brand); width: 22px; height: 22px; }
.m-t { display: flex; align-items: center; gap: 8px; }
.m-t svg { width: 22px; height: 22px; color: var(--brand); flex: none; }
.method b { font-size: 16px; }
.method .m-s { display: block; font-size: 14px; color: var(--ink2); margin-top: 2px; }
.store-card { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--brand-100); font-size: 15px; display: grid; gap: 2px; }
.store-card b { font-size: 16px; }
.store-card .hint { color: var(--ink2); }
.store-card a { justify-self: start; margin-top: 6px; min-height: 40px; display: inline-flex; align-items: center; }
.pick-store { margin-top: 12px; }
.pick-store .hint { margin-top: 6px; }
.sec-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font: 700 13px/1 var(--num); margin-right: 8px; vertical-align: 2px; }
.sum-items .line-item { grid-template-columns: 52px minmax(0, 1fr) auto; }
.sum-items .line-item img { width: 52px; height: 52px; }
.sum-items { margin-bottom: 12px; border-bottom: 1px solid var(--line); }

/* ---------- 下單完成 / 查訂單 ---------- */
.done-hero { text-align: center; padding: 24px 16px 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 12px; }
.done-hero svg { width: 64px; height: 64px; color: var(--ok); margin: 0 auto; }
.done-hero h1 { margin: 10px 0 4px; font-size: 24px; }
.done-hero p { color: var(--ink2); }
.done-hero .no { display: inline-block; font: 700 18px var(--num); letter-spacing: .04em; color: var(--ink); background: var(--muted); border-radius: 8px; padding: 2px 12px; margin: 8px 0 2px; }
.ov { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.ov-side { display: grid; gap: 12px; align-content: start; }
.ov-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.ov-head small { display: block; font-size: 13px; color: var(--ink3); }
.ov-head h2 { margin: 0; font: 700 20px/1.3 var(--num); letter-spacing: .02em; }
.done-actions { display: flex; gap: 10px; margin-top: 16px; }
.done-actions .btn { flex: 1; }

.track-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.mine { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.mine p { font-size: 14px; color: var(--ink2); margin-bottom: 8px; }
.mine .chip { margin: 0 6px 6px 0; font-family: var(--num); font-size: 14px; }
.t-empty { text-align: center; padding: 36px 16px; color: var(--ink3); background: #fff; border: 1px dashed var(--line2); border-radius: var(--r-lg); }
.t-empty svg { width: 56px; height: 56px; margin: 0 auto 10px; color: var(--line2); }
.t-empty b { display: block; color: var(--ink2); font-size: 16px; }

/* ---------- 頁尾 ---------- */
.foot { background: #fff; border-top: 1px solid var(--line); color: var(--ink2); font-size: 14.5px; margin-top: 8px; }
.foot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; padding-top: 28px; padding-bottom: 20px; }
.foot-brand { grid-column: 1 / -1; }
.foot h2 { font-size: 15px; font-weight: 700; color: var(--ink); margin: 0 0 8px; }
.foot p { margin: 0 0 6px; }
.foot a { color: var(--ink2); text-decoration: none; display: inline-flex; min-height: 32px; align-items: center; }
.foot a:hover { color: var(--brand-600); text-decoration: underline; }
.foot-logo { display: flex; align-items: center; gap: 8px; margin-bottom: 8px !important; }
.foot-logo svg { width: 30px; height: 30px; }
.foot-logo b { font-size: 18px; color: var(--ink); letter-spacing: .06em; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding-top: 14px; padding-bottom: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink3); }
.builder { color: var(--ink3); }

/* ==========================================================================
   斷點
   ========================================================================== */
@media (min-width: 400px) {
  .logo small { display: block; }
}
@media (min-width: 600px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .services { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero { padding: 28px 28px; }
  .hero h1 { font-size: 30px; }
  .foot-grid { grid-template-columns: 1.4fr 1.4fr 1fr 1fr; }
  .foot-brand { grid-column: auto; }
}

/* 768+：桌機頁首，拿掉底部分頁列與固定底部列 */
@media (min-width: 768px) {
  :root { --gut: 24px; }
  body.shop, body[data-route] { padding-bottom: 0; }
  .toast, body[data-route] .toast { bottom: 32px; }
  .utility-row { justify-content: space-between; }
  .utility-side { display: flex; gap: 20px; align-items: center; }
  .top-row { min-height: 76px; gap: 24px; }
  .logo svg { width: 42px; height: 42px; }
  .logo b { font-size: 22px; }
  .search { max-width: 620px; min-width: 200px; height: 46px; border-radius: 12px; background: #fff; border-color: var(--line2); padding: 0 4px 0 14px; margin: 0 auto; }
  .search-go { display: inline-flex; flex: none; white-space: nowrap; align-items: center; height: 38px; padding: 0 18px; border: 0; border-radius: 9px; background: var(--brand); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; }
  .search-go:hover { background: var(--brand-600); }
  .tabbar, body[data-route] .tabbar { position: static; display: flex; gap: 4px; background: none; border: 0; box-shadow: none; padding: 0; flex: none; }
  .tabbar a[data-nav="home"], .tabbar a[data-nav="cats"] { display: none; }
  .tabbar a { flex: none; flex-direction: row; gap: 8px; min-height: 46px; padding: 0 14px; border-radius: 12px; font-size: 15px; color: var(--ink2); }
  .tabbar a:hover { background: var(--muted); color: var(--ink); }
  .tabbar a.on { background: var(--brand-50); color: var(--brand-600); }
  /* 桌機頁首的購物車是「圖示＋文字」橫排，徽章不能再疊在圖示角落（會蓋到「購」字），改成排在文字後面 */
  #cartBadge { position: static; margin-left: -2px; border: 0; }
  .catnav { display: block; border-top: 1px solid var(--line); }
  .catnav-row { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .catnav-row::-webkit-scrollbar { display: none; }
  .catnav a { flex: none; display: inline-flex; align-items: center; min-height: 46px; padding: 0 14px; font-size: 15px; color: var(--ink2); text-decoration: none; border-bottom: 2.5px solid transparent; white-space: nowrap; }
  .catnav a:first-child { padding-left: 0; }
  .catnav a:hover { color: var(--ink); }
  .catnav a.on { color: var(--brand-600); font-weight: 700; border-bottom-color: var(--brand); }
  main#app { padding-top: 24px; padding-bottom: 56px; }

  .buy-bar, .pay-bar, body[data-route="cart"] .pay-bar { position: static; box-shadow: none; border: 0; padding: 0; min-height: 0; background: none; }
  .buy-bar { margin-top: 24px; gap: 12px; }
  .buy-bar .btn { min-height: 52px; font-size: 17px; }
  .bb-cart { display: none; }
  .pay-bar { flex-direction: column; align-items: stretch; margin-top: 16px; }
  .pay-bar .pb-sum { display: none; }
  .pay-bar .btn { width: 100%; min-height: 52px; font-size: 17px; }

  .crumb { display: block; }
  .pd { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
  .pd-gallery { margin: 0; position: -webkit-sticky; position: sticky; top: 140px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); }
  .pd-card { padding: 24px; }
  .pd h1 { font-size: 24px; margin-top: 0; }
  .pd-price { background: var(--brand-50); border-radius: 12px; padding: 12px 16px; margin-top: 14px; }
  .pd-price .price { font-size: 34px; }
  .pd-desc { margin-top: 32px; }
  .pd-desc .pd-card { padding: 28px 32px; }

  .steps { max-width: 560px; margin: 0 auto 28px; }
  .steps li { font-size: 15px; }
  .panel, .box { padding: 24px; }
  .page-title { font-size: 26px; }
  .done-hero { padding: 36px 24px 30px; }
  .done-actions { max-width: 520px; margin: 24px auto 0; }
  .t-empty { padding: 64px 24px; }
}

@media (min-width: 960px) {
  .page-grid { grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; }
  .summary { position: -webkit-sticky; position: sticky; top: 140px; }
  .ov.wide { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .track-grid { grid-template-columns: 380px minmax(0, 1fr); gap: 24px; }
  .ci { grid-template-columns: 100px minmax(0, 1fr); gap: 16px; }
  .ci img { width: 100px; height: 100px; }
}

@media (min-width: 1024px) {
  .hero-wrap { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }
  .hero { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: center; padding: 40px 44px; min-height: 320px; }
  .hero h1 { font-size: 36px; }
  .hero-sub { font-size: 16px; }
  .hero-pics { display: grid; position: relative; z-index: 1; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(2, 118px); gap: 12px; }
  .hero-pics div { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 10px 24px rgba(90, 14, 60, .22); }
  .hero-pics div:first-child { grid-row: span 2; }
  .hero-pics img { width: 100%; height: 100%; object-fit: cover; }
  .trust { padding: 22px; align-content: start; gap: 16px; }
  .trust .promo { margin-top: 2px; }
  .stats b { font-size: 24px; }
  .services { margin-top: 4px; }
  .svc { padding: 14px 16px; }
  .listing { grid-template-columns: 220px minmax(0, 1fr); margin-top: 32px; gap: 28px; }
  .side-cats { display: block; position: -webkit-sticky; position: sticky; top: 140px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 10px; }
  .side-cats h2 { font-size: 15px; margin: 0 8px 8px; color: var(--ink3); font-weight: 700; letter-spacing: .04em; }
  .side-cats button { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 8px; min-height: 44px; padding: 8px 10px; border: 0; background: none; border-radius: 10px; font-size: 15px; text-align: left; cursor: pointer; color: var(--ink2); }
  .side-cats button:hover { background: var(--muted); color: var(--ink); }
  .side-cats button.on { background: var(--brand-50); color: var(--brand-600); font-weight: 700; }
  .side-cats button em { font-style: normal; font: 600 13px var(--num); color: var(--ink3); }
  .side-cats button.on em { color: var(--brand-600); }
  .listing .chips { display: none; }
  .list-head { align-items: center; margin-bottom: 16px; }
  .list-head h2 { font-size: 22px; }
  .sortbar { margin: 0; border: 1px solid var(--line2); border-radius: 10px; padding: 3px; background: #fff; }
  .sortbar button { flex: none; min-height: 40px; padding: 6px 14px; border: 0; border-radius: 8px; margin: 0; font-size: 14.5px; }
  .sortbar button.on { background: var(--ink); color: #fff; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .card .bd { padding: 12px 14px 14px; }
  .pd { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; }
  .foot-grid { padding-top: 40px; padding-bottom: 28px; }
}
@media (min-width: 1440px) {
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .card:hover, .card:hover .ph img { transform: none !important; }
}

/* 玫瑰改版收尾：主視覺玫瑰線描、眉標圖示、店主卡連結 */
.eyebrow { display: inline-flex; align-items: center; gap: 6px; }
.eyebrow svg { width: 14px; height: 14px; flex: none; }
.hero-art { position: absolute; right: -26px; bottom: -30px; width: 180px; height: 180px; z-index: 0; pointer-events: none; opacity: .16; }
.hero-art .ha-bloom, .hero-art .ha-leaf { fill: #fff; }
.hero-art .ha-spiral { fill: none; stroke: var(--brand); stroke-width: 1.3; stroke-linecap: round; }
@media (min-width: 1024px) { .hero-art { width: 240px; height: 240px; right: -30px; bottom: -44px; } }
/* 店主列：連結文字後台可改（最多 12 字）。店主名稱與說明至少保留 8em 寬，連結放不下時整個換到下一列（靠右），不會把名稱擠成窄條；
   連結單獨一列仍放不下時才在字中間換行 */
.owner { flex-wrap: wrap; row-gap: 2px; }
.owner-t { flex: 1 1 8em; min-width: 0; }
.owner-link { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; min-height: 40px; max-width: 100%; font-size: 14px; font-weight: 600; color: var(--brand-600); text-decoration: none; overflow-wrap: anywhere; }
.owner-link:hover { text-decoration: underline; }
.owner-link svg { width: 16px; height: 16px; flex: none; }
/* 主視覺按鈕：玫瑰底上主按鈕用白底，次按鈕用白框 */
.hero .btn-main { background: #fff; color: var(--brand-700); border-color: #fff; }
.hero .btn-main:hover { background: var(--brand-50); }
.hero .btn-line { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .75); }
.hero .btn-line:hover { background: rgba(255, 255, 255, .12); }

/* ===== 淡黃點綴（客戶 2026-09-28 指定：粉玫瑰主色＋淡黃）=====
   淡黃只當底色與強調，不當文字色；對比：公告列 12.36、活動卡 7.52、標籤 6.47、眉標 6.76、主視覺強調字 4.17（大字） */
:root { --sun-50: #FFF9E6; --sun-100: #FFF3C4; --sun-200: #FCE7A6; --sun-400: #F7C948; --sun-ink: #6B4A00; --sun-ink-2: #7A4E00; }
.utility { background: var(--sun-100); color: #3B2A14; border-bottom: 1px solid var(--sun-200); }
.utility-side a { color: #3B2A14; }
.utility-side span { color: #6B4F1D; }
.promo { background: var(--sun-50); border-color: var(--sun-200); color: var(--sun-ink); }
.promo svg { color: var(--brand); }
.eyebrow { background: var(--sun-100); color: var(--brand-700); }
.hero h1 em { color: #FFF0B3; }
.hero::after { background: rgba(255, 233, 150, .22); }
.tag { background: var(--sun-100); border-color: var(--sun-200); color: var(--sun-ink-2); }
.svc svg { background: var(--sun-100); color: var(--brand); border-radius: 50%; padding: 7px; box-sizing: content-box; }
.avatar { background: var(--sun-100); color: var(--brand-700); }

/* ===== 前台文字（後台「賣場設定 → 前台文字」可改）=====
   欄位留空時對應元素不顯示（見 shop.js heroHtml／applyBrand），剩下的格子依數量重新排版；長字一律可斷行，不撐出水平捲動 */
.eyebrow { max-width: 100%; }
/* 主視覺說明留空時，標題與按鈕之間補回間距 */
.hero h1 + .hero-cta { margin-top: 16px; }
.hero h1, .hero-sub, .owner-t b, .owner-t span, .svc b, .svc span, .foot p { overflow-wrap: anywhere; }
/* 店家資訊卡：只剩連結時靠左；數據格上緣的分隔線只在上面有店主列時才畫 */
.owner > .owner-link:first-child { margin-left: 0; }
.stats { border-top: 0; padding-top: 0; }
.owner + .stats { border-top: 1px solid var(--line); padding-top: 12px; }
.stats div { min-width: 0; padding: 0 4px; }
/* 大字與小字都是後台可改的文字：寬字母（如 MMMMMMMMMM）填到上限時也要在格子內換行，不壓到隔壁格 */
.stats b, .stats span { overflow-wrap: anywhere; }
.stats span { display: block; }
.stats.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats.n1 { grid-template-columns: minmax(0, 1fr); }
/* 服務說明：前兩格可隱藏，手機兩欄時剩 3 格就讓最後一格（客服電話）佔整列 */
.services.n3 .svc:last-child { grid-column: 1 / -1; }
@media (min-width: 600px) {
  .services.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .services.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services.n3 .svc:last-child { grid-column: auto; }
  /* 頁尾：購物說明或第四欄隱藏時改成 3 欄／2 欄 */
  .foot-grid.c3 { grid-template-columns: 1.4fr 1.2fr 1fr; }
  .foot-grid.c2 { grid-template-columns: 1.4fr 1fr; }
}
@media (min-width: 1024px) {
  /* 店家資訊卡整張隱藏時，主視覺與服務說明佔滿整列 */
  .hero-wrap.solo { grid-template-columns: minmax(0, 1fr); }
  .hero-wrap.solo .hero-pics { width: 100%; max-width: 440px; justify-self: end; }
  /* 主視覺圖只有 1～2 件商品時 */
  .hero-pics.n2 div { grid-row: span 2; }
  .hero-pics.n1 { grid-template-columns: minmax(0, 1fr); width: 100%; max-width: 260px; justify-self: end; }
  .hero-pics.n1 div { grid-row: span 2; }
}

/* 貨態追蹤（照物流官網那一格：灰底標題＋時鐘、直線串圓點、最新一筆橘色） */
.trk { margin-top: 22px; }
.trk-h { display: inline-flex; align-items: center; gap: 8px; background: #f2f2f2; padding: 6px 14px; font-weight: 600; color: #333; font-size: 15px; }
.trk-h svg { width: 24px; height: 24px; flex: none; }
.trk-l { list-style: none; margin: 16px 0 0; padding: 0 0 0 34px; position: relative; }
.trk-l::before { content: ""; position: absolute; left: 10px; top: 10px; bottom: 26px; width: 2px; background: #e3e3e3; }
.trk-l li { position: relative; padding: 0 0 18px; color: #555; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.trk-l li:last-child { padding-bottom: 0; }
.trk-l li::before { content: ""; position: absolute; left: -30px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: #d6d6d6; }
.trk-l li.now { color: #f07d24; }
.trk-l li.now::before { background: #f07d24; width: 16px; height: 16px; left: -31px; top: 3px; }
.trk-t { font-variant-numeric: tabular-nums; }

/* 查訂單：手機＋姓名查到的訂單清單 */
.ord-list-h { color: var(--ink2); font-size: 14px; margin: 0 0 10px; }
.ord-card { display: block; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; cursor: pointer; font: inherit; color: inherit; }
.ord-card:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.oc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.oc-sub { color: var(--ink2); font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.ord-card .price { color: var(--brand); }

/* 海外・支付寶收款碼（前台結帳頁） */
.ali-pay .ali-box { display: flex; justify-content: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 4px 0 10px; }
.ali-pay .ali-box img { width: 220px; max-width: 72%; height: auto; image-rendering: -webkit-optimize-contrast; }
.ali-pay .ali-note { background: var(--brand-soft, #FBE7F0); border-radius: 10px; padding: 10px 12px; font-size: 14px; color: var(--ink2, #55555E); margin: 0 0 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
