/* ===== 商店樣式（沿用 style.css 的顏色和字體） ===== */

/* 頂部：購物車按鈕 */
.cart-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--ink);
  cursor: pointer;
}
.cart-btn:hover { background: var(--accent-soft); }
.cart-count {
  position: absolute; top: -2px; right: -4px;
  min-width: 20px; height: 20px; padding: 0 5px;
  border: 1.5px solid var(--ink); border-radius: 999px;
  background: var(--accent); color: var(--on-accent); border-color: var(--paper);
  font-size: .72rem; font-weight: 700; line-height: 17px; text-align: center;
}
.topbar { gap: 14px; }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }

/* 通用 */
.page { max-width: 1040px; margin: 0 auto; padding: 32px 20px 0; }
.page-head { padding: 24px 0 8px; }
.page-head h1, .co-title { font-size: clamp(1.8rem, 5vw, 2.4rem); font-weight: 700; line-height: 1.3; }
.page-head p { margin-top: 6px; }
.small { font-size: .88rem; }
.pre { white-space: pre-line; }
.label { font-size: .9rem; color: var(--muted); margin-bottom: 6px; }
.back { display: inline-block; color: var(--muted); text-decoration: none; margin-bottom: 20px; }
.back:hover { color: var(--ink); }
.btn { font: inherit; color: var(--on-accent); cursor: pointer; text-align: center; }
.btn-block { display: block; width: 100%; margin-top: 0; }
.btn:disabled, .btn[disabled] {
  background: var(--line); color: var(--muted); box-shadow: none; border-color: var(--muted);
  cursor: not-allowed; transform: none;
}
.link-btn { font: inherit; font-size: .85rem; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
.link-btn:hover { color: var(--ink); }

/* 分類按鈕 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 24px; }
.chip {
  font: inherit; font-size: .95rem; color: var(--ink);
  padding: 4px 14px; border: 1.5px solid var(--ink); border-radius: 999px;
  background: transparent; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip:hover:not([aria-pressed="true"]) { background: var(--accent-soft); }

/* 商品格子 */
.pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 20px; }
.pcard { display: flex; flex-direction: column; text-decoration: none; min-width: 0; }
.pcard-img { position: relative; display: block; }
.pcard img {
  width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover;
  border: 1.5px solid var(--ink); border-radius: var(--radius);
  background: var(--card);
  transition: transform .2s ease, box-shadow .2s ease;
}
.pcard:hover img, .pcard:focus-visible img { transform: rotate(-1deg) translateY(-3px); box-shadow: 4px 4px 0 var(--ink); }
.pcard:focus-visible { outline: none; }
.pcard-name { margin-top: 10px; font-weight: 700; line-height: 1.4; }
.pcard-price { color: var(--muted); font-size: .95rem; }
.badge {
  position: absolute; top: 10px; left: 10px;
  padding: 0 10px; border-radius: 999px;
  background: var(--ink); color: var(--card); font-size: .8rem;
}
.see-all { display: inline-block; margin-top: 20px; font-weight: 700; }

/* 商品頁 */
.pd { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.pd-main img {
  width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain;
  border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--card);
}
.pd-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.thumb { flex: 0 0 auto; padding: 0; border: 1.5px solid var(--line); border-radius: 8px; background: var(--card); cursor: pointer; overflow: hidden; }
.thumb img { width: 68px; height: 68px; object-fit: cover; }
.thumb[aria-pressed="true"] { border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.pd-info { display: flex; flex-direction: column; gap: 16px; }
.pd-cat { color: var(--muted); text-decoration: none; font-size: .95rem; }
.pd-info h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); line-height: 1.3; margin-top: -10px; }
.pd-price { font-size: 1.5rem; font-weight: 700; }
.vchips { display: flex; flex-wrap: wrap; gap: 8px; }
.vchip {
  font: inherit; color: var(--ink);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px; border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--card); cursor: pointer;
}
.vchip img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.vchip small { color: var(--muted); }
.vchip[aria-pressed="true"] { border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.vchip[data-out] span { text-decoration: line-through; color: var(--muted); }
.stock { font-size: .95rem; color: var(--muted); }
.stock.is-low { color: var(--accent); font-weight: 700; }
.stock.is-out { color: var(--ink); font-weight: 700; }
.pd-text h2 { font-size: 1.05rem; margin-bottom: 4px; }

/* 數量 */
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; }
.qty button { font: inherit; font-size: 1.1rem; width: 36px; height: 34px; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.qty button:hover:not(:disabled) { background: var(--accent-soft); }
.qty button:disabled { color: var(--line); cursor: default; }
.qty-n {
  width: 44px; height: 34px; padding: 0; border: 0; background: transparent;
  font: inherit; font-weight: 700; text-align: center; color: var(--ink);
  -moz-appearance: textfield;
}
.qty-n::-webkit-outer-spin-button, .qty-n::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-n:focus { outline: 2px solid var(--accent-soft); border-radius: 6px; }
.lines .qty button { width: 30px; height: 28px; }

/* 購物車抽屜 */
.drawer {
  /* 用 top/bottom 貼齊畫面（不用 100dvh）：手機 Safari 底部工具列不會再蓋住「去結帳」 */
  position: fixed; inset: 0 0 0 auto;
  margin: 0; padding: 0;
  width: min(420px, 100vw); max-width: 100vw; height: auto; max-height: none;
  border: 0; border-left: 2px solid var(--ink);
  background: var(--paper); color: var(--ink);
  display: none; flex-direction: column;
}
.drawer[open] { display: flex; animation: slideIn .22s ease; }
.drawer::backdrop { background: rgba(20, 18, 15, .45); }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .drawer[open] { animation: none; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 1.25rem; }
.icon-btn { font: inherit; font-size: 1.4rem; line-height: 1; width: 36px; height: 36px; border: 1.5px solid var(--ink); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--accent-soft); }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 20px; }
.drawer-foot { padding: 16px 20px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.drawer-foot .btn { margin-top: 6px; }
.empty { padding: 24px 0; }
.drawer .empty { text-align: center; }
.empty-art { width: 34%; max-width: 120px; height: auto; margin: 8px auto 12px; } /* 空購物車插圖：小一點 */
.drawer-title { display: flex; align-items: center; gap: 8px; }
.drawer-icon { display: inline-grid; place-items: center; }
.done-art { width: 150px; height: auto; margin: -8px auto 8px; }

/* 明細列 */
.lines { list-style: none; margin: 0; padding: 0; }
.line { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line img { width: 64px; height: 64px; object-fit: cover; border: 1.5px solid var(--line); border-radius: 8px; background: var(--card); }
.line-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.line-name { font-weight: 700; text-decoration: none; line-height: 1.4; }
.line-variant { color: var(--muted); font-size: .9rem; }
.line-actions { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.line-total { font-weight: 700; white-space: nowrap; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.sum-total { border-top: 1.5px solid var(--ink); margin-top: 6px; padding-top: 10px; font-size: 1.15rem; }

/* 結帳 */
.co-title { margin: 8px 0 20px; }
.co { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.co-sec { padding: 0 0 28px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.co-sec:last-of-type { border-bottom: 0; }
.co-sec h2 { font-size: 1.2rem; margin-bottom: 14px; }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.f { display: flex; flex-direction: column; gap: 4px; font-size: .95rem; }
.f-full { grid-column: 1 / -1; }
.f input, .f textarea {
  font: inherit; color: var(--ink);
  padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--card); width: 100%;
}
.f input:focus, .f textarea:focus { outline: none; border-color: var(--ink); box-shadow: 2px 2px 0 var(--accent-soft); }
.f input:user-invalid, .f textarea:user-invalid { border-color: var(--accent); }
.regions { display: flex; flex-direction: column; gap: 10px; }
.region {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer;
}
.region:has(input:checked) { border-color: var(--accent); box-shadow: 3px 3px 0 var(--accent); }
.region input { accent-color: var(--accent); width: 18px; height: 18px; }
.region-fee { font-weight: 700; }
.pay { display: flex; gap: 20px; align-items: flex-start; margin: 14px 0 18px; padding: 16px; border: 1.5px dashed var(--ink); border-radius: 14px; background: var(--card); }
.pay img { width: 160px; height: 160px; object-fit: contain; flex-shrink: 0; border-radius: 8px; }
.pay-info { min-width: 0; }
.pay-amount { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.pay-amount.muted { font-size: 1rem; font-weight: 400; }
.bank { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; margin: 0 0 8px; font-size: .95rem; }
.bank dt { color: var(--muted); }
.bank dd { margin: 0; font-weight: 700; word-break: break-all; }
.receipt input[type="file"] { padding: 10px; border-style: dashed; cursor: pointer; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.co-side { position: sticky; top: 20px; }
.co-card { padding: 20px; border: 2px solid var(--ink); border-radius: 16px; background: var(--card); }
.co-card h2 { font-size: 1.2rem; margin-bottom: 6px; }
.co-card .btn { margin-top: 16px; }
.co-error { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: #8E2A26; font-size: .95rem; }
.demo-note { display: inline-block; margin-bottom: 20px; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); font-size: .9rem; }
.co-empty { padding: 24px 0; }
.co-empty .btn { margin-top: 16px; }
.done { max-width: 520px; margin: 24px auto 0; padding: 32px 24px; text-align: center; border: 2px solid var(--ink); border-radius: 16px; background: var(--card); box-shadow: 5px 5px 0 var(--ink); }
.done h2 { font-size: 1.6rem; margin-bottom: 16px; }
.done-id { font-size: 1.5rem; font-weight: 700; letter-spacing: .04em; margin-bottom: 12px; }
.done-total { max-width: 240px; margin: 0 auto 16px; }
.done-email { font-weight: 700; margin-bottom: 8px; word-break: break-all; }

/* 手機 */
@media (max-width: 860px) {
  .pd, .co { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .co-side { position: static; }
}
@media (max-width: 640px) {
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
  .fgrid { grid-template-columns: minmax(0, 1fr); }
  .pay { flex-direction: column; align-items: center; text-align: center; }
  .bank { text-align: left; }
  .page { padding-top: 20px; }
}

/* 商店頁面用比較寬的版面 */
body:not([data-page="home"]) .topbar,
body:not([data-page="home"]) .footer { max-width: 1040px; }

/* ===== 手機選單 ===== */
.topbar { position: relative; }
.menu-btn {
  display: none;
  align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--ink); cursor: pointer;
}
.menu-btn:hover { background: var(--accent-soft); }
@media (max-width: 640px) {
  .menu-btn { display: inline-flex; }
  .topbar .nav {
    display: none;
    position: absolute; top: calc(100% + 8px); left: 12px; right: 12px; z-index: 20;
    flex-direction: column; gap: 0;
    padding: 8px; border: 2px solid var(--ink); border-radius: 14px;
    background: var(--card); box-shadow: 4px 4px 0 var(--ink);
  }
  .topbar .nav.is-open { display: flex; }
  .topbar .nav a, .topbar .nav a:not(.nav-shop) { display: block; padding: 12px 14px; border-radius: 10px; font-size: 1.05rem; color: var(--ink); }
  .topbar .nav a:hover, .topbar .nav a[aria-current="page"] { background: var(--accent-soft); }
  .topbar .nav a[hidden] { display: none; }
}

/* ===== 頁尾、條款 ===== */
.foot-links { margin-top: 6px; }
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--accent); }
.terms { margin-top: 10px; text-align: center; }
.terms a { color: var(--ink); }

/* ===== 政策頁 ===== */
.policy { max-width: 760px; }
.policy h1 { font-size: clamp(1.7rem, 5vw, 2.2rem); line-height: 1.3; margin: 8px 0 4px; }
.policy section { margin-top: 36px; scroll-margin-top: 20px; }
.policy h2 { font-size: 1.3rem; display: inline-block; border-bottom: 3px solid var(--accent); margin-bottom: 12px; line-height: 1.4; }
.policy ul { margin: 0; padding-left: 1.2em; }
.policy li + li { margin-top: 8px; }
.policy b { color: var(--accent); }

/* QR 圖片和保存連結 */
.qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; max-width: 180px; text-align: center; }
.qr-save { color: var(--accent); font-weight: 700; line-height: 1.4; }

/* 庫存數量 */
.pcard-stock { font-size: .88rem; color: var(--muted); }
.pcard-stock.is-low { color: var(--accent); font-weight: 700; }
.pcard-stock.is-out { color: var(--ink); font-weight: 700; }
.vchip small { font-size: .8rem; }

/* 載入中的灰色格子 */
.skeleton .pcard-img { display: block; aspect-ratio: 1 / 1; border-radius: var(--radius); background: var(--line); animation: pulse 1.2s ease-in-out infinite; }
.sk-line { display: block; height: 14px; margin-top: 12px; border-radius: 6px; background: var(--line); width: 70%; animation: pulse 1.2s ease-in-out infinite; }
.sk-line.short { width: 35%; }
@keyframes pulse { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .skeleton .pcard-img, .sk-line { animation: none; } }

/* 州屬下拉、記住資料 */
.f select {
  font: inherit; color: var(--ink); width: 100%;
  padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card);
}
.f select:focus { outline: none; border-color: var(--ink); box-shadow: 2px 2px 0 var(--accent-soft); }
.check { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; font-size: .92rem; color: var(--muted); cursor: pointer; }
.check input { accent-color: var(--accent); width: 18px; height: 18px; margin-top: 3px; flex-shrink: 0; }
.region-hint { margin: -6px 0 12px; }
.region { cursor: default; }
.region:not(:has(input:checked)) { opacity: .6; }

/* 複製按鈕 */
.copy-btn {
  font: inherit; font-size: .78rem; font-weight: 700; vertical-align: middle;
  padding: 2px 10px; margin-left: 6px; border: 1.5px solid var(--accent); border-radius: 999px;
  background: var(--card); color: var(--accent); cursor: pointer; white-space: nowrap;
}
.copy-btn:hover { background: var(--accent-soft); }
.copy-btn.is-done { background: var(--accent); color: var(--on-accent); }
.pay-amount .copy-btn { font-size: .78rem; }

/* 手機底部固定的總額 + 送出 */
.co-bar { display: none; }
@media (max-width: 860px) {
  .co-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--card); border-top: 2px solid var(--ink);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, .06);
  }
  .co-bar-total { display: flex; flex-direction: column; line-height: 1.2; }
  .co-bar-total strong { font-size: 1.2rem; }
  .co-bar .btn { margin: 0; padding: 10px 22px; }
  body[data-page="checkout"] .footer { padding-bottom: 110px; }
}

/* 你可能也喜歡 */
.related { margin-top: 64px; }
.related h2 { font-size: 1.4rem; display: inline-block; border-bottom: 3px solid var(--accent); margin-bottom: 20px; line-height: 1.4; }
.related-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) { .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===== 結帳頁優化（2026-11-20）===== */
/* 州屬旁邊直接顯示運費 */
.ship-note { justify-content: flex-end; padding-bottom: 12px; font-size: .92rem; color: var(--muted); }
.ship-note.is-set { color: var(--ink); font-weight: 700; }
/* 應付金額 */
.pay-total { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; padding: 14px 18px; margin-bottom: 18px; border-radius: 14px; background: var(--accent-soft); }
.pay-total .label { font-weight: 700; }
.pay-total .pay-amount { margin: 0; }
/* 付款步驟 ① ② */
.pay-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 20px; }
.step-title { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 10px; }
.step-no { display: inline-grid; place-items: center; width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; background: var(--accent); color: var(--on-accent, #fff); font-size: .9rem; line-height: 1; }
.pay-steps .pay { margin: 0; }
/* 收據上傳框 */
.drop { position: relative; display: block; padding: 22px 16px; border: 2px dashed var(--ink); border-radius: 14px; background: var(--card); text-align: center; cursor: pointer; transition: background .15s, border-color .15s; }
.drop:hover, .drop.is-over { background: var(--accent-soft); }
.drop input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.drop:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.drop-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.drop.has-file { padding: 14px 16px; border-style: solid; border-color: var(--accent); text-align: left; }
.drop-file { display: flex; align-items: center; gap: 14px; }
.drop-file img, .drop-pdf { width: 64px; height: 64px; flex-shrink: 0; border-radius: 8px; border: 1.5px solid var(--ink); object-fit: cover; }
.drop-pdf { display: grid; place-items: center; background: var(--accent); color: var(--on-accent, #fff); font-weight: 700; }
.drop-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; word-break: break-all; }
.drop-change { color: var(--accent); font-weight: 700; text-decoration: underline; }
.drop [hidden], .co-todo[hidden] { display: none !important; }
.field-err { margin-top: 8px; color: #8E2A26; font-size: .92rem; }
/* 沒填好的欄位：按了送出後變紅 */
.co.tried .f input:invalid, .co.tried .f textarea:invalid, .co.tried .f select:invalid { border-color: var(--accent); }
/* 備註收起來 */
.co-note { margin-bottom: 8px; }
.co-note summary { cursor: pointer; font-weight: 700; color: var(--accent); list-style: none; padding: 4px 0; }
.co-note summary::-webkit-details-marker { display: none; }
.co-note[open] summary { margin-bottom: 10px; }
/* 送出按鈕下面：還差什麼 */
.co-todo { margin-top: 10px; font-size: .88rem; color: var(--muted); text-align: center; }
/* 彩蛋：阿咩拿著錢 */
.co-egg { position: relative; margin-top: 28px; text-align: center; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.co-egg img { display: block; width: 100%; max-width: 190px; height: auto; margin: 0 auto; }
.egg-bubble {
  position: relative; display: inline-block; margin: 0 0 10px; padding: 8px 16px;
  background: #fff; border: 2px solid var(--ink); border-radius: 18px; font-weight: 900; font-size: 1rem;
}
.egg-bubble::after { content: ""; position: absolute; left: 50%; bottom: -9px; width: 14px; height: 14px; background: #fff; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateX(-50%) rotate(45deg); }
.co-egg.is-paid .egg-bubble { color: var(--accent); }
.co-egg.is-shake img { animation: eggShake .5s ease; }
@keyframes eggShake { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-4deg); } 40% { transform: rotate(4deg); } 60% { transform: rotate(-3deg); } 80% { transform: rotate(2deg); } }
@media (prefers-reduced-motion: reduce) { .co-egg.is-shake img { animation: none; } }
@media (max-width: 860px) { .co-egg { margin-top: 8px; } }

/* ===== 付款卡（手繪卡片風格，跟角色卡一樣：粗黑框 + 黑色陰影）===== */
.pay-card { border: 2.5px solid var(--ink); border-radius: 16px; background: var(--card); box-shadow: 5px 5px 0 var(--ink); overflow: hidden; }
.pay-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 16px 18px; background: var(--accent-soft); border-bottom: 2.5px dashed var(--ink); }
.pay-head .label { font-weight: 700; }
.pay-head .pay-amount { margin: 0; font-size: 1.6rem; font-weight: 900; display: inline-flex; align-items: center; gap: 8px; }
.pay-head .pay-amount.muted { font-size: 1rem; font-weight: 700; }
/* 切換：DuitNow QR / 銀行轉帳 */
.pay-tabs { display: flex; gap: 6px; margin: 16px 18px 0; padding: 4px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper, #FBF5EE); }
.pay-tab { flex: 1; padding: 9px 10px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; transition: background .15s, color .15s; }
.pay-tab.is-on { background: var(--accent); color: var(--on-accent); }
.pay-tab[hidden] { display: none; }
.pay-pane { padding: 18px; text-align: center; }
.pay-pane[hidden] { display: none; }
.pay-pane img { display: block; width: 200px; max-width: 70%; height: auto; margin: 4px auto 14px; border-radius: 10px; }
.pay-pane .qr-save { display: inline-flex; padding: 10px 26px; color: var(--on-accent); text-decoration: none; }
.pay-tip { margin: 0 0 10px; font-size: .88rem; color: var(--muted); line-height: 1.55; }
.pay-pane .pay-tip.only-mouse { margin: 12px 0 0; }
.only-touch { display: none; }
.is-touch .only-touch { display: block; } .is-touch .only-mouse { display: none; } /* is-touch 由 shop.js 判斷 */
/* 銀行資料：一行一項，右邊複製 */
.bank-rows { list-style: none; padding: 0; margin: 0 0 12px; text-align: left; }
.bank-rows li { display: flex; align-items: center; gap: 10px; padding: 12px 2px; border-bottom: 1px dashed var(--line); }
.bank-rows li:last-child { border-bottom: 0; }
.bank-rows .k { width: 4.5em; flex-shrink: 0; color: var(--muted); font-size: .9rem; }
.bank-rows .v { flex: 1; min-width: 0; font-weight: 700; word-break: break-all; }
.bank-rows .acc-no { font-size: 1.15rem; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.bank-rows[hidden] { display: none; }
/* 完成的步驟：數字變成 ✓ */
.pay-step.is-done .step-no { background: #3B9A5A; font-size: 0; }
.pay-step.is-done .step-no::before { content: "✓"; font-size: .95rem; }
@media (max-width: 640px) {
  .pay-head .pay-amount { font-size: 1.35rem; }
  .pay-tabs { margin: 14px 14px 0; }
  .pay-pane { padding: 16px 14px; }
}

/* 商品圖片圓角小一點（商店、商品頁、相關商品） */
.pcard img, .pd-main img, .skeleton .pcard-img { border-radius: 8px; }
.thumb { border-radius: 6px; }

/* ===== 商品頁（手繪風）===== */
.pd-main img { border: 3px solid var(--ink); border-radius: 9px 11px 8px 12px / 11px 8px 12px 9px; box-shadow: 6px 6px 0 var(--ink); }
.pd-cat { align-self: flex-start; padding: 3px 12px; border: 1.5px solid var(--ink); border-radius: 999px; font-size: .85rem; font-weight: 700; color: var(--ink); background: var(--card); }
.pd-cat:hover { background: var(--accent-soft); }
.pd-info h1 { font-size: clamp(1.9rem, 4.4vw, 2.6rem); font-weight: 900; line-height: 1.25; margin-top: -4px; }
.pd-price { font-size: clamp(1.6rem, 3.6vw, 2rem); font-weight: 900; color: var(--accent); margin-top: -6px; }
.vchip { border-color: var(--ink); padding-top: 6px; padding-bottom: 6px; }
.vchip img { width: 28px; height: 28px; }
.pd-ship { display: flex; align-items: flex-start; gap: 8px; margin-top: -4px; font-size: .9rem; line-height: 1.5; color: var(--muted); }
.pd-ship svg { flex-shrink: 0; margin-top: 2px; color: var(--accent); }
/* 你可能也喜歡：跟首頁標題、周邊卡片一樣 */
.related { margin-top: 80px; }
.related .cloud-title { display: flex; border-bottom: 0; margin: 0 auto 40px; font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
.merch-grid.related-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 28px; max-width: none; }
@media (max-width: 860px) { .merch-grid.related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; } }

/* 款式按鈕：選中的不要陰影，改成紅色框 */
.vchip { border: 1.5px solid var(--line); }
.vchip[aria-pressed="true"] { border: 2px solid var(--accent); box-shadow: none; color: var(--accent); font-weight: 700; }
.vchip { justify-content: center; padding: 7px 16px; }
.vchip:has(img) { padding-left: 5px; } /* 有小圖時左邊留少一點 */

/* 手機：商店分類按鈕縮小，排成兩行 */
@media (max-width: 640px) {
  .chips { gap: 5px; justify-content: center; }
  .chip { font-size: .82rem; padding: 4px 9px; }
  /* 中文分類字短：排成一行（太窄的手機可以左右滑） */
  html[lang="zh-Hant"] .chips { flex-wrap: nowrap; justify-content: center; gap: min(4px, 1vw); }
  html[lang="zh-Hant"] .chip { flex: 0 1 auto; min-width: 0; white-space: nowrap; font-size: min(.8rem, 3.5vw); padding: 4px min(8px, 1.9vw); } /* 跟著螢幕寬度縮，不會被切掉 */
}

/* 商品頁：minimalist（跟商店卡片一樣的細框，不要陰影） */
.pd-main img { border: 1.5px solid var(--ink); border-radius: 8px; box-shadow: none; }
.pd-cat { border: 1.5px solid var(--ink); color: var(--ink); font-weight: 700; } /* 分類標籤：黑框 */
.pd-info h1 { font-size: clamp(1.7rem, 3.6vw, 2.2rem); font-weight: 800; }
.pd-price { font-size: clamp(1.4rem, 2.8vw, 1.7rem); font-weight: 800; }
.related .cloud-title { font-size: clamp(1.3rem, 2.2vw, 1.7rem); margin-bottom: 28px; }

/* 網店暫停下單的提示條 */
.closed-bar { margin: 0 0 20px; padding: 12px 18px; border: 1.5px solid var(--accent); border-radius: 12px; background: var(--accent-soft); color: var(--ink); font-weight: 700; text-align: center; line-height: 1.5; }
.closed-bar[hidden] { display: none; }
