/* jbs 元件。選擇器維持單一 class 權重(BEM-lite),狀態用 .is-* 或屬性;不寫 ID、不寫 !important。
   一排子項的間距用 `> * + *` 的 margin:flex 的 gap 要 iOS 14.1。 */

/* ── 按鈕 ───────────────────────────────────────────────────────────────── */

/* 所有按鈕一個形狀(方形圓角 --jbs-radius-btn 4px,每個主題都一樣)、一組高度,只換顏色;
   「確認結單」這類頁面主要大按鈕由各自的 class 改用 --jbs-radius-cta 8px,不是每顆 --cta 都算。
   主要 --cta;次要 --neutral / --outline(同一個樣子,舊名都留著);危險 --danger;小尺寸 --sm。 */
.jbs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 20px;
  border: 1px solid transparent;
  border-radius: var(--jbs-radius-btn);
  font-size: 15px;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  cursor: pointer;
}
.jbs-btn > * + * { margin-left: 6px; }

/* App 客製皮膚的底色是漸層:從邊框外緣開始畫,透明邊框下才不會重複鋪一條反色細線 */
.jbs-btn--cta {
  color: var(--jb-text-on-fill);
  background: var(--jbs-cta-bg);
  background-origin: border-box;
  box-shadow: var(--jbs-cta-shadow);
}

@media (hover: hover) {
  .jbs-btn--cta:not(:disabled):hover {
    background: var(--jbs-cta-hover-bg);
    background-origin: border-box;
  }
}

.jbs-btn--neutral,
.jbs-btn--outline {
  color: var(--jbs-text-strong);
  background: var(--jbs-card-bg);
  border-color: var(--jb-border-strong);
}

.jbs-btn--danger {
  color: var(--jb-text-error);
  background: var(--jbs-card-bg);
  border-color: var(--jb-color-error);
}

/* FB 登入:品牌色不跟主題。字級 18px 粗體(大字)對 #1877F2 白字 4.2:1 */
.jbs-btn--fb {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  background: #1877f2;
}

/* LINE:品牌綠 #06C755 白字只有 2.2:1,用綁定頁同一個調深的綠(3.4:1,18px 粗體是大字) */
.jbs-btn--line {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  background: #00a31d;
}

.jbs-btn:disabled,
.jbs-btn.is-disabled {
  opacity: .5;
  cursor: not-allowed;
}

.jbs-btn.is-disabled { pointer-events: none; }
.jbs-btn[data-wait]::after {
  content: '\00a0(' attr(data-wait) ')';
  font-variant-numeric: tabular-nums;
}

/* ── 對話框 ─────────────────────────────────────────────────────────────── */

/* top / height 跟著 jbs.js 寫的 visual viewport:iOS 鍵盤彈出時 fixed 仍以 layout viewport 定位,
   不跟會被鍵盤蓋住。cursor: pointer 不能拿掉:iOS Safari 對不可點的 div 不把 click 委派到 document,點背景就關不掉。 */
.jbs-modal {
  position: fixed;
  top: var(--jbs-visual-top, 0);
  right: 0;
  /* bottom 跟 height 算出同一個底邊:AdSense 會在廣告的祖先寫 inline 的 height:auto !important 與 min-height:0 !important(蓋不掉),
     height 失效時靠 top + bottom 撐滿,手機的面板才貼底 */
  bottom: calc(100% - var(--jbs-visual-top, 0px) - var(--jbs-visual-h, 100%));
  left: 0;
  height: var(--jbs-visual-h, 100%);
  z-index: var(--jb-z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--jbs-overlay);
  cursor: pointer;
}

.jbs-modal__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 600px;
  max-height: calc(var(--jbs-visual-h, 100vh) - 32px);
  overflow: hidden;
  background: var(--jb-bg-surface);
  border-radius: 10px;
  cursor: auto;
}
.jbs-modal__panel:focus { outline: none; }

.jbs-modal__header {
  flex: 0 0 auto;
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--jbs-border-card);
}
/* 右上角的 × 在 header 之前;沒有 × 的對話框標題不留右側空白 */
.jbs-modal__close ~ .jbs-modal__header { padding-right: 56px; }

.jbs-modal__title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--jbs-text-heading);
}

.jbs-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px;
  overflow-y: auto;
}

.jbs-modal__body--stack > * + * { margin-top: 12px; }

/* jbsAlert / jbsConfirm 的訊息:文字用 textContent 填,換行靠 pre-line 保留 */
.jbs-modal__message {
  white-space: pre-line;
  word-break: break-word;
}

.jbs-modal__footer {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding: 6px 16px 10px;
}
/* 只有一顆鈕(確定、關閉)撐滿整列;藏起來的鈕也算一個子元素,條件不同的鈕要在模板就不輸出 */
.jbs-modal__footer > :only-child { flex: 1 1 auto; }
.jbs-modal__footer > * { margin-top: 4px; margin-bottom: 4px; }
.jbs-modal__footer > * + * { margin-left: 8px; }

/* 對話框裡的控制項 34px。.jbs-btn 只在這裡加 position:頁面上的 .jbs-bill-card__action::after 要靠它沒有定位才撐得滿整張卡片 */
.jbs-modal .jbs-btn {
  position: relative;
  min-height: 34px;
  padding-top: 5px;
  padding-bottom: 5px;
}
.jbs-modal .jbs-btn--cta { font-weight: 700; }
.jbs-modal .jbs-btn::before {
  content: "";
  position: absolute;
  top: -6px;
  right: -2px;
  bottom: -6px;
  left: -2px;
}

/* 字級維持 16px(iOS 小於 16px 聚焦會放大),靠 padding 與行高收到 34px */
.jbs-modal .jbs-field__input {
  min-height: 34px;
  padding-top: 5px;
  padding-bottom: 5px;
  line-height: 1.4;
}

.jbs-modal .jbs-qty__btn { min-height: 34px; }
.jbs-modal .jbs-qty__btn::before { top: -6px; bottom: -6px; }

.jbs-modal--center .jbs-modal__panel { max-width: 350px; }
.jbs-modal--center .jbs-modal__header,
.jbs-modal--center .jbs-modal__body { text-align: center; }
.jbs-modal--center .jbs-modal__header { border-bottom: 0; }

/* 手機從底部滑出:遮罩的 top / height 跟著 visual viewport,面板貼它的下緣 = 鍵盤打開時貼在鍵盤上緣 */
@media (max-width: 768px) {
  .jbs-modal {
    align-items: flex-end;
    padding: 0;
  }

  .jbs-modal__panel {
    max-width: none;
    max-height: calc(var(--jbs-visual-h, 100vh) * .88);
    padding-bottom: env(safe-area-inset-bottom);
    border-radius: 16px 16px 0 0;
  }

  .jbs-modal--center,
  .jbs-channel-popup {
    align-items: center;
    padding: 16px;
  }

  .jbs-modal--center .jbs-modal__panel,
  .jbs-channel-popup .jbs-modal__panel {
    max-height: calc(var(--jbs-visual-h, 100vh) - 32px);
    padding-bottom: 0;
    border-radius: 10px;
  }

  .jbs-channel-popup .jbs-modal__panel { max-width: 600px; }
}

/* 打開時的動畫(拿掉 hidden 時重播);關閉沒有動畫:jbs.js 的關閉是同步的,隊伍會馬上開下一個 */
@keyframes jbs-fade-in { from { opacity: 0; } }
@keyframes jbs-fade-out { to { opacity: 0; } }
@keyframes jbs-pop-in { from { opacity: 0; transform: scale(.96); } }
@keyframes jbs-sheet-in { from { transform: translateY(100%); } }
@keyframes jbs-sheet-out { to { transform: translateY(100%); } }

.jbs-modal { animation: jbs-fade-in .2s ease-out; }
.jbs-modal__panel { animation: jbs-pop-in .2s ease-out; }

@media (max-width: 768px) {
  .jbs-modal:not(.jbs-modal--center):not(.jbs-channel-popup):not(.jbs-modal--drawer) .jbs-modal__panel { animation-name: jbs-sheet-in; }
}

.jbs-modal__close {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 44px;
  height: 44px;
  font-size: 24px;
  line-height: 44px;
  color: var(--jbs-text-label);
}

/* jbs.js 開 modal 時掛在 body:position:fixed 才擋得住 iOS 13 的背景捲動(overflow:hidden 擋不住) */
.jbs-scroll-lock {
  position: fixed;
  right: 0;
  left: 0;
  overflow: hidden;
}

.jbs-modal__eyebrow {
  color: var(--jbs-text-eyebrow);
}

.jbs-modal__subtitle {
  margin-left: 31px;
  padding-left: 15px;
  font-weight: 300;
  color: var(--jbs-price);
  border-left: 1px solid var(--jbs-price);
}

/* ── 圖示字型 ───────────────────────────────────────────────────────────── */

/* 字型檔換了就改 ?v=:這支 url 不經過 _jbs_assets.html 的版本號 */
@font-face {
  font-family: 'jbs-icons';
  src: url('../font/jbs-icons.woff2?v=202610130930') format('woff2'),
       url('../font/jbs-icons.woff?v=202610130930') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

.jbs-icon {
  display: inline-block;
  font-family: 'jbs-icons';
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  text-transform: none;
  -webkit-font-smoothing: antialiased;
}
.jbs-icon--bill::before { content: "\e907"; }
.jbs-icon--pack::before { content: "\e915"; }
.jbs-icon--order::before { content: "\e914"; }
.jbs-icon--shop::before { content: "\e916"; }
.jbs-icon--cart::before { content: "\e90d"; }
.jbs-icon--n-cart::before { content: "\e905"; }
.jbs-icon--n-board::before { content: "\e900"; }
.jbs-icon--n-search::before { content: "\e903"; }
.jbs-icon--mail::before { content: "\e911"; }
.jbs-icon--copy::before { content: "\f0c5"; }
.jbs-icon--chat::before { content: "\e906"; }

/* 字型裡沒有的圖示用 SVG 遮罩補。Chrome 120 以前與 iOS 只認 -webkit-mask */
.jbs-icon--phone::before,
.jbs-icon--edit::before,
.jbs-icon--bell::before,
.jbs-icon--view::before,
.jbs-icon--like::before,
.jbs-icon--store::before,
.jbs-icon--logout::before,
.jbs-icon--group::before {
  content: '';
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: top;
  background-color: currentColor;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.jbs-icon--phone::before { -webkit-mask-image: url('../img/icon/phone.svg'); mask-image: url('../img/icon/phone.svg'); }
.jbs-icon--logout::before { -webkit-mask-image: url('../img/member/logout.svg'); mask-image: url('../img/member/logout.svg'); }
.jbs-icon--group::before { -webkit-mask-image: url('../img/member/group.svg'); mask-image: url('../img/member/group.svg'); }
.jbs-icon--edit::before { -webkit-mask-image: url('../img/icon/edit.svg'); mask-image: url('../img/icon/edit.svg'); }
.jbs-icon--bell::before { -webkit-mask-image: url('../img/icon/bell.svg'); mask-image: url('../img/icon/bell.svg'); }
.jbs-icon--view::before { -webkit-mask-image: url('../img/icon/view.svg'); mask-image: url('../img/icon/view.svg'); }
.jbs-icon--like::before { -webkit-mask-image: url('../img/icon/like.svg'); mask-image: url('../img/icon/like.svg'); }
.jbs-icon--store::before { -webkit-mask-image: url('../img/icon/store.svg'); mask-image: url('../img/icon/store.svg'); }

/* 排在 .jbs-icon 之後:同權重,display 要蓋過 .jbs-icon 的 inline-block */
/* ── 提示(對話框內:大圖示 + 品牌色文字)──────────────────────────────── */

/* Notes inside paragraphs (the BunnyGo checkout card explanations, D20): --info blue, --danger red; the colour tokens are in
   themes.css and pass contrast in every theme. The list form (ul) puts a dot before each item */
.jbs-note {
  padding: 10px 12px;
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  list-style: none;
  border-radius: 8px;
}

.jbs-note--info { color: var(--jbs-notice-info-fg); background: var(--jbs-notice-info-bg); }
.jbs-note--danger { color: var(--jbs-notice-danger-fg); background: var(--jbs-notice-danger-bg); }
.jbs-note > li + li { margin-top: 4px; }
.jbs-note > li::before { content: '・'; }
.jbs-note--warning::before { content: '⚠ '; }

.jbs-notice {
  padding: 25px 0;
  text-align: center;
  color: var(--jbs-price);
}

/* 手機一定上下排(圖示獨佔一行),桌機才左右排;不能交給 inline-block 依字數決定 */
.jbs-notice__icon {
  display: block;
  margin-bottom: 20px;
  font-size: 100px;
}

/* keep-all 時一整句沒有斷點,inline-block 會被撐到那句的寬度、超出對話框;max-width 限住,句子才在框內折行 */
.jbs-notice__text {
  display: inline-block;
  max-width: 100%;
  font-size: 24px;
  line-height: 1.5;
  vertical-align: middle;
  word-break: break-word;
}
/* 中文大字一折行常剩一個字在最後一行:在標點處換行,一句放不下時才在句中斷(text-wrap: balance 低於買家頁的瀏覽器下限) */
.jbs-notice__text:lang(zh) {
  word-break: keep-all;
  overflow-wrap: break-word;
}
.jbs-notice__text--pre { white-space: pre-line; }

.jbs-notice__disc {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: var(--jbs-badge-warning-bg);
  border-radius: 50%;
}
.jbs-notice__disc img { width: 46px; height: 46px; }

.jbs-result-ad { margin-top: 16px; text-align: center; }
.jbs-result-subscribe { text-align: center; }

/* 店家主題的結帳結果:圖示位置改放店家 logo */
.jbs-notice__logo {
  display: block;
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
  object-fit: contain;
}

.jbs-notice__error,
.jbs-notice--error { color: var(--jb-status-error-text); }

/* 照片瀏覽(匯款憑證、銀行 QR):全螢幕深色底,點圖開原圖(手機才能兩指放大) */
.jbs-modal--viewer {
  padding: 0;
  background: #000;
}
.jbs-modal--viewer .jbs-modal__panel {
  max-width: none;
  height: 100%;
  max-height: none;
  background: transparent;
  border-radius: 0;
}
.jbs-modal--viewer .jbs-modal__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 12px 16px;
}
.jbs-modal--viewer .jbs-modal__close { color: var(--jb-text-on-fill); }

.jbs-photo-viewer__img {
  display: block;
  max-width: 100%;
  max-height: calc(var(--jbs-visual-h, 100vh) - 140px);
  object-fit: contain;
  cursor: zoom-in;
}

.jbs-photo-viewer__video {
  display: block;
  max-width: 100%;
  max-height: calc(var(--jbs-visual-h, 100vh) - 140px);
  background: #000;
}

/* ── 輪播 .jbs-slider / 單張橫幅 .jbs-banner(商城首頁、品牌頁;jbs.js 的 [data-jbs-slider])──────
   圓點的 ::before 把點擊範圍撐到 44px 高(一格 24px 寬:圓點密時不互相蓋住)。 */
.jbs-slider {
  --jbs-slider-ratio: 33.3333%;
  position: relative;
  min-width: 0;
}
.jbs-slider--wide { --jbs-slider-ratio: 33.3333%; }
.jbs-slider--tall { --jbs-slider-ratio: 130.2083%; }
.jbs-slider--c1 { --jbs-slider-ratio: 57.7922%; }
.jbs-slider--c2 { --jbs-slider-ratio: 91.7526%; }

.jbs-slider__track {
  display: flex;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  list-style: none;
  -webkit-overflow-scrolling: touch;
  -ms-scroll-snap-type: x mandatory;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.jbs-slider__track::-webkit-scrollbar { display: none; }

.jbs-slider__slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 0;
  padding-top: var(--jbs-slider-ratio);
  background: var(--jb-bg-muted);
  scroll-snap-align: start;
}

.jbs-slider__link {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.jbs-slider__link:focus-visible { outline-offset: -2px; }

.jbs-slider__img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jbs-slider__dots {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}
.jbs-slider__dots > li {
  flex: 0 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
}

.jbs-slider__dot {
  position: relative;
  display: block;
  width: 8px;
  height: 8px;
  margin: 0;
  padding: 0;
  background: rgba(0, 0, 0, .4);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .85);
  cursor: pointer;
  pointer-events: auto;
}
.jbs-slider__dot::before {
  content: '';
  position: absolute;
  top: -18px;
  right: -8px;
  bottom: -18px;
  left: -8px;
}
.jbs-slider__dot[aria-current="true"] {
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .5);
}

.jbs-banner { margin: 0; }
.jbs-banner__link,
.jbs-banner picture { display: block; }
.jbs-banner__img {
  display: block;
  width: 100%;
  height: auto;
}

/* ── 橫向多卡列 .jbs-strip(jbs.js 的 [data-jbs-strip])──────────────────────
   欄寬手機 80%(露出下一張),769 起 1 / 欄數;卡間距是每張右側的 padding(flex gap 在 Chrome 84 才有),所以捲一個可視寬度剛好對齊下一張。
   前後鈕只在 769 以上且內容超出時由 jbs.js 取消 hidden;選擇器多一層 .jbs-strip 是為了壓過後面 .jbs-icon-btn 的 28px。 */
.jbs-strip {
  --jbs-strip-cols: 3;
  --jbs-strip-gap: 12px;
  position: relative;
  min-width: 0;
}
.jbs-strip--cols-2 { --jbs-strip-cols: 2; }
.jbs-strip--cols-3 { --jbs-strip-cols: 3; }

.jbs-strip__track {
  display: flex;
  align-items: stretch;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  list-style: none;
  -webkit-overflow-scrolling: touch;
  -ms-scroll-snap-type: x mandatory;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.jbs-strip__track::-webkit-scrollbar { display: none; }

.jbs-strip__item {
  flex: 0 0 80%;
  min-width: 0;
  padding-right: var(--jbs-strip-gap);
  scroll-snap-align: start;
}
.jbs-strip__item > * { height: 100%; }

@media (min-width: 769px) {
  .jbs-strip__item { flex-basis: calc(100% / var(--jbs-strip-cols)); }
}

/* 張數排不滿時置中;超出可捲時 auto margin 算成 0,照常從左排 */
.jbs-strip--center .jbs-strip__item:first-child { margin-left: auto; }
.jbs-strip--center .jbs-strip__item:last-child { margin-right: auto; }

.jbs-strip .jbs-strip__prev,
.jbs-strip .jbs-strip__next {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 36px;
  height: 36px;
  margin-top: -18px;
  padding: 0;
  color: var(--jbs-text-strong);
  background: var(--jbs-card-bg);
  border: 1px solid var(--jbs-border-card);
  border-radius: 50%;
  box-shadow: var(--jbs-card-shadow);
  cursor: pointer;
}
.jbs-strip__prev { left: -8px; }
.jbs-strip__next { right: -8px; }
.jbs-strip__prev::after,
.jbs-strip__next::after {
  content: '';
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
}
.jbs-strip__prev::after { margin-left: 3px; transform: rotate(-135deg); }
.jbs-strip__next::after { margin-right: 3px; transform: rotate(45deg); }

/* ── 分頁 .jbs-tablist(jbs.js 的 [data-jbs-tablist];App 三分頁是 .jbs-tabs,不同元件)──────── */
.jbs-tablist { min-width: 0; }
.jbs-tablist__bar {
  display: flex;
  margin: 0 0 12px;
  padding: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--jbs-border-card);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.jbs-tablist__bar::-webkit-scrollbar { display: none; }
@media (hover: hover) and (pointer: fine) {
  .jbs-tablist__bar { scrollbar-width: thin; scrollbar-color: var(--jbs-border-card) transparent; }
  .jbs-tablist__bar::-webkit-scrollbar { display: block; height: 6px; }
  .jbs-tablist__bar::-webkit-scrollbar-thumb { background: var(--jbs-border-card); border-radius: 3px; }
}
.jbs-tablist__tab {
  flex: 0 0 auto;
  min-height: 44px;
  margin: 0;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--jbs-card-text);
  white-space: nowrap;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  cursor: pointer;
}
.jbs-tablist__tab[aria-selected="true"] {
  color: var(--jbs-page-title);
  border-bottom-color: var(--jbs-menu-active-line);
}
.jbs-tablist__panel { min-width: 0; }

/* ── 區塊外框 .jbs-home-section(商城首頁各區塊共用)──────────────────────────
   標題空就不輸出 h2:查看更多靠 margin-left: auto,單獨一行也靠右。 */
.jbs-home-section {
  min-width: 0;
  margin: 0 0 24px;
}
.jbs-home-section__head {
  display: flex;
  align-items: center;
  margin: 0 0 12px;
}
.jbs-home-section__title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 20px;
  line-height: 1.4;
  color: var(--jbs-page-title);
  word-break: break-word;
}
.jbs-home-section__more {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 0 0 0 12px;
  font-size: 14px;
  color: var(--jbs-card-text);
  text-decoration: none;
  white-space: nowrap;
}

/* 商品區塊 B / D / E:組之間留距、組橫幅與卡片格的間距、「查看更多」置中 */
.jbs-home-section__head .jbs-store-legend { margin-left: auto; }
.jbs-home-section__head .jbs-store-legend__list { right: 0; left: auto; }
.jbs-home-section__title + .jbs-store-legend { margin-left: 12px; }
.jbs-chips.jbs-home-filter { margin-bottom: 12px; }
.jbs-home-group + .jbs-home-group { margin-top: 24px; }
.jbs-home-group__banner { margin-bottom: 12px; }
.jbs-home-group__title {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--jbs-card-name);
  word-break: break-word;
}
.jbs-home-section__foot { margin: 16px 0 0; text-align: center; }
.jbs-home-d__desc { margin: 12px 0; font-size: 14px; color: var(--jbs-card-text); word-break: break-word; }

/* ── 文章卡 .jbs-article-card / 評論卡 .jbs-review-card(放在 .jbs-strip__item 裡;商城首頁 I / J / K)──────
   文章卡:圖 3:1、作者、日期、標題最多兩行。評論卡:圓形頭像、標題、名字。整張卡是一個連結。 */
.jbs-article-card,
.jbs-review-card {
  display: block;
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
  color: var(--jbs-card-text);
  text-decoration: none;
  background: var(--jbs-card-bg);
  border: 1px solid var(--jbs-border-card);
  border-radius: 8px;
}
.jbs-article-card__media {
  position: relative;
  padding-top: 33.3333%;
  background: var(--jb-bg-muted);
}
.jbs-article-card__img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.jbs-article-card__body { padding: 12px; }
.jbs-article-card__meta {
  display: flex;
  flex-wrap: wrap;
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--jbs-text-label);
}
.jbs-article-card__author { min-width: 0; margin-right: 8px; word-break: break-word; }
.jbs-article-card__date { white-space: nowrap; }
.jbs-article-card__title {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--jbs-card-name);
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.jbs-review-card { display: flex; align-items: center; padding: 12px; }
.jbs-review-card__avatar {
  position: relative;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  margin-right: 12px;
  overflow: hidden;
  background: var(--jb-bg-muted);
  border-radius: 50%;
}
.jbs-review-card__img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.jbs-review-card__body { flex: 1 1 auto; min-width: 0; }
.jbs-review-card__title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--jbs-card-name);
  word-break: break-word;
}
.jbs-review-card__name { margin: 0; font-size: 14px; line-height: 1.4; color: var(--jbs-text-label); word-break: break-word; }

/* ── 店家 HTML 容器 .jbs-seller-content(外層)+ .ck-content(內層;商品介紹、品牌頁、關於我們、文章、評論)──────
   圖、影片、iframe 不能撐出頁寬;表格太寬時在自己的框裡左右捲。內層的 CKEditor 內容樣式由 ckeditor5-content.css 提供 */
.jbs-seller-content { overflow-x: auto; overflow-wrap: break-word; word-break: break-word; }
.jbs-seller-content img,
.jbs-seller-content video,
.jbs-seller-content iframe { max-width: 100%; }
.jbs-seller-content img { height: auto; }
.jbs-seller-content p,
.jbs-seller-content h2,
.jbs-seller-content h3,
.jbs-seller-content h4,
.jbs-seller-content strong,
.jbs-seller-content i,
.jbs-seller-content a,
.jbs-seller-content ul,
.jbs-seller-content ol,
.jbs-seller-content li {
  all: revert;
}
.jbs-seller-content .ck-content > :first-child { margin-top: 0; }
/* 寬表格:CKEditor 的 figure.table 是 display: table(跟著表格撐寬),改成 block 在自己的框裡橫捲;
   格子不逐字斷行,最窄 6em(短字一行)。沒包 figure 的表格由外層 overflow-x 接住 */
.jbs-seller-content .ck-content .table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.jbs-seller-content td,
.jbs-seller-content th,
.jbs-seller-content .ck-content .table table td,
.jbs-seller-content .ck-content .table table th {
  min-width: 6em;
  overflow-wrap: normal;
  word-break: normal;
}

/* ── 內容頁標題 .jbs-content-head(品牌、關於我們、文章列表、文章、評論):h1 + 選填的作者 / 日期列 ────── */
.jbs-content-head { min-width: 0; margin: 16px 0; }
.jbs-content-head__title {
  margin: 0;
  font-size: 24px;
  line-height: 1.4;
  color: var(--jbs-page-title);
  word-break: break-word;
}
.jbs-content-head__meta {
  display: flex;
  flex-wrap: wrap;
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--jbs-text-label);
}
.jbs-content-head__author { min-width: 0; margin-right: 12px; word-break: break-word; }
.jbs-content-head__date { white-space: nowrap; }

/* ── 文章格線 .jbs-article-grid(文章列表):手機 1 欄、641 起 2 欄、961 起 3 欄,格內放 .jbs-article-card ────── */
.jbs-article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.jbs-article-grid__item { display: flex; min-width: 0; }
.jbs-article-grid__item > * { flex: 1 1 auto; }
@media (min-width: 641px) {
  .jbs-article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 16px; }
}
@media (min-width: 961px) {
  .jbs-article-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ── 評論詳情 .jbs-review(評論頁):96px 圓形頭像(沒圖只剩底色圓)+ 標題 + 名字 ────── */
.jbs-review { display: flex; align-items: center; min-width: 0; margin: 16px 0; }
.jbs-review__avatar {
  position: relative;
  flex: 0 0 96px;
  width: 96px;
  height: 96px;
  margin-right: 16px;
  overflow: hidden;
  background: var(--jb-bg-muted);
  border-radius: 50%;
}
.jbs-review__img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.jbs-review__body { flex: 1 1 auto; min-width: 0; }
.jbs-review__title {
  margin: 0 0 4px;
  font-size: 24px;
  line-height: 1.4;
  color: var(--jbs-page-title);
  word-break: break-word;
}
.jbs-review__name { margin: 0; font-size: 16px; line-height: 1.4; color: var(--jbs-text-label); word-break: break-word; }

/* ── 問答 .jbs-faq(品牌頁 Q&A):<details> 可同時展開多題;有封面圖時 769 起兩欄(圖最寬 470),手機圖在上 ──────
   summary 不用 flex:舊版 Safari 的 summary 當不了 flex 容器;箭頭用絕對定位 */
.jbs-faq__media { max-width: 470px; margin: 0 0 16px; }
.jbs-faq__img { display: block; width: 100%; height: auto; }
.jbs-faq__list { min-width: 0; border-top: 1px solid var(--jbs-border-card); }
.jbs-faq__item { border-bottom: 1px solid var(--jbs-border-card); }
.jbs-faq__q {
  display: block;
  position: relative;
  padding: 14px 36px 14px 4px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--jbs-card-name);
  word-break: break-word;
  list-style: none;
  cursor: pointer;
}
.jbs-faq__q::-webkit-details-marker { display: none; }
.jbs-faq__q::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 12px;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
.jbs-faq__item[open] > .jbs-faq__q::after {
  margin-top: -2px;
  transform: rotate(-135deg);
}
.jbs-faq__q:focus { outline: 2px solid var(--jb-color-focus-ring); outline-offset: -2px; }
.jbs-faq__q:focus:not(:focus-visible) { outline: none; }
.jbs-faq__a {
  padding: 0 4px 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--jbs-card-text);
  word-break: break-word;
}
@media (min-width: 769px) {
  .jbs-faq { display: flex; align-items: flex-start; }
  .jbs-faq__media { flex: 0 0 40%; margin: 0 24px 0 0; }
  .jbs-faq__list { flex: 1 1 auto; }
}

/* ── 品牌頁外框(pay/brand_shop/_base_jbs.html):內容左右留白同首頁區塊,769 起貼齊版寬 ────── */
.jbs-brand-page > .jbs-banner,
.jbs-brand-page > .jbs-content-head,
.jbs-brand-page > .jbs-review,
.jbs-brand-page > .jbs-seller-content,
.jbs-brand-page > .jbs-chips,
.jbs-brand-page > .jbs-article-grid,
.jbs-brand-page > .jbs-empty,
.jbs-brand-page > .jbs-home-section { margin-right: 10px; margin-left: 10px; }
.jbs-brand-page > .jbs-banner { margin-top: 8px; }
.jbs-brand-page > .jbs-banner + .jbs-seller-content { margin-top: 16px; }
.jbs-brand-page > .jbs-seller-content,
.jbs-brand-page > .jbs-article-grid { margin-bottom: 24px; }
.jbs-brand-page > .jbs-chips { margin-bottom: 8px; }
.jbs-brand-page > .jbs-empty { text-align: center; }
@media (min-width: 769px) {
  .jbs-brand-page > .jbs-banner,
  .jbs-brand-page > .jbs-content-head,
  .jbs-brand-page > .jbs-review,
  .jbs-brand-page > .jbs-seller-content,
  .jbs-brand-page > .jbs-chips,
  .jbs-brand-page > .jbs-article-grid,
  .jbs-brand-page > .jbs-empty,
  .jbs-brand-page > .jbs-home-section { margin-right: 0; margin-left: 0; }
}

/* ── 商城首頁組裝(pay/shop_main/index.html):區塊左右留白、A 兩組輪播依 768 切、C 一大一小並排 ──────
   A 只有一組圖時,另一個寬度整個區塊藏起來(不留 margin 空框)。 */
.jbs-shop-main > .jbs-home-section,
.jbs-shop-main > .jbs-marquee,
.jbs-shop-main > .jbs-empty { margin-right: 10px; margin-left: 10px; }
.jbs-shop-main { padding-top: 12px; }
.jbs-shop-main > .jbs-empty { text-align: center; }
.jbs-shop-main > .jbs-marquee { margin-bottom: 12px; }
.jbs-home-section__item + .jbs-home-section__item { margin-top: 16px; }
.jbs-banner + .jbs-banner { margin-top: 8px; }
.jbs-home-a__wide { display: none; }
.jbs-home-c > .jbs-slider + .jbs-slider { margin-top: 12px; }
@media (max-width: 768px) {
  .jbs-home-section--wide-only { display: none; }
}
@media (min-width: 769px) {
  .jbs-shop-main > .jbs-home-section,
  .jbs-shop-main > .jbs-marquee,
  .jbs-shop-main > .jbs-empty { margin-right: 0; margin-left: 0; }
  .jbs-home-a__wide { display: block; }
  .jbs-home-a__tall { display: none; }
  .jbs-home-section--tall-only { display: none; }
  .jbs-home-c--pair {
    display: grid;
    grid-template-columns: minmax(0, 770fr) minmax(0, 485fr);
    grid-gap: 12px;
  }
  .jbs-home-c--pair > .jbs-slider + .jbs-slider { margin-top: 0; }
}

/* ── 跑馬燈 .jbs-marquee(jbs.js 的 [data-jbs-marquee];商城首頁頂端公告列)────────
   每則疊在同一格(grid),只有 .is-current 可見;其餘 visibility: hidden 才不會被讀屏、Tab 讀到。
   淡出時 visibility 延遲到 opacity 跑完才切,淡入時立刻可見(新的一則才能馬上接焦點)。
   每則完整換行(不截斷),疊格的高度 = 最高那則,換則不跳。
   減少動態:全部列成清單、則與則之間有分隔線,最高 126px(約 3.5 則,讓捲軸看得出還有別則),超出 overflow-y: auto 捲動;不靠 .is-current。 */
.jbs-marquee {
  min-width: 0;
  background: var(--jbs-card-bg);
  border: 1px solid var(--jbs-border-card);
  border-radius: 4px;
}
.jbs-marquee__list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.jbs-marquee__item {
  grid-area: 1 / 1;
  align-self: center;
  min-width: 0;
  padding: 0 12px;
  visibility: hidden;
  opacity: 0;
  transition: opacity .4s ease, visibility 0s linear .4s;
}
.jbs-marquee__item.is-current {
  visibility: visible;
  opacity: 1;
  transition: opacity .4s ease, visibility 0s;
}
.jbs-marquee__text {
  display: block;
  font-size: 14px;
  line-height: 20px;
  padding: 8px 0;
  color: var(--jbs-card-text);
  text-decoration: none;
  word-break: break-word;
}
a.jbs-marquee__text { color: var(--jbs-text-link); }

@media (prefers-reduced-motion: reduce) {
  .jbs-marquee__list {
    display: block;
    max-height: 126px;
    overflow-y: auto;
  }
  .jbs-marquee__item {
    visibility: visible;
    opacity: 1;
  }
  .jbs-marquee__item + .jbs-marquee__item { border-top: 1px solid var(--jbs-border-card); }
}

/* ── 拼貼 .jbs-mosaic(5 格;桌機 3 / 4 / 3 欄、第 3 格跨兩列)───────────────
   格子高度由 ::before 的 padding-top 撐出(桌機各格比例 = 原圖比例,同列取較高者、其餘格 object-fit 裁切);
   連結絕對定位滿版,所以第 3 格高度 = 第 1 列 + 列距 + 第 2 列。768 以下兩欄、第 3 格滿寬。 */
.jbs-mosaic {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  grid-gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.jbs-mosaic__cell {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: var(--jbs-card-bg);
}
.jbs-mosaic__cell::before {
  content: '';
  display: block;
  padding-top: 71.43%;
}
.jbs-mosaic__cell--1 { grid-column: 1 / 4; grid-row: 1; }
.jbs-mosaic__cell--2 { grid-column: 4 / 8; grid-row: 1; }
.jbs-mosaic__cell--3 { grid-column: 8 / 11; grid-row: 1 / 3; }
.jbs-mosaic__cell--4 { grid-column: 1 / 5; grid-row: 2; }
.jbs-mosaic__cell--5 { grid-column: 5 / 8; grid-row: 2; }
.jbs-mosaic__cell--2::before,
.jbs-mosaic__cell--4::before { padding-top: 48.04%; }
.jbs-mosaic__cell--3::before { padding-top: 135.53%; }
.jbs-mosaic__link {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  color: #fff;
  text-decoration: none;
}
.jbs-mosaic__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.jbs-mosaic__name {
  position: absolute;
  bottom: 0;
  left: 0;
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: 6px 10px;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.4;
  color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--jbs-overlay);
}
@media (max-width: 768px) {
  .jbs-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jbs-mosaic__cell--1,
  .jbs-mosaic__cell--2,
  .jbs-mosaic__cell--3,
  .jbs-mosaic__cell--4,
  .jbs-mosaic__cell--5 { grid-column: auto; grid-row: auto; }
  .jbs-mosaic__cell--3 { grid-column: 1 / 3; }
  .jbs-mosaic__cell--1::before,
  .jbs-mosaic__cell--2::before,
  .jbs-mosaic__cell--4::before,
  .jbs-mosaic__cell--5::before { padding-top: 71.43%; }
  .jbs-mosaic__cell--3::before { padding-top: 56.25%; }
}

/* ── 圖卡格 .jbs-tile-grid(G 圖卡、H 品牌;圖 240:125)──────────────────── */
.jbs-tile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 641px) {
  .jbs-tile-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-gap: 12px; }
}
.jbs-tile-grid > li { min-width: 0; }
.jbs-tile-grid__link {
  display: block;
  color: var(--jbs-card-text);
  text-decoration: none;
}
.jbs-tile-grid__media {
  position: relative;
  display: block;
  height: 0;
  padding-top: 52.08%;
  overflow: hidden;
  background: var(--jbs-card-bg);
  border-radius: 4px;
}
.jbs-tile-grid__img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.jbs-tile-grid__name {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  font-size: 14px;
  color: var(--jbs-card-name);
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── 文字按鈕卡 .jbs-cta-block(L、O)────────────────────────────────────── */
.jbs-cta-block {
  min-width: 0;
  padding: 24px 16px;
  text-align: center;
}
.jbs-cta-block__title {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.4;
  color: var(--jbs-page-title);
  word-break: break-word;
}
.jbs-cta-block__text {
  margin: 0 0 16px;
  color: var(--jbs-card-text);
  word-break: break-word;
}
.jbs-cta-block__text:last-child { margin-bottom: 0; }

/* ── 影片外框 .jbs-video(N;16:9,--portrait 9:16 且最寬 360px;直式比例走 ::before,padding 百分比才會以 360px 為基準)───────────────── */
.jbs-video {
  position: relative;
  height: 0;
  padding-top: 56.25%;
  overflow: hidden;
  background: #000;
}
.jbs-video--portrait {
  max-width: 360px;
  height: auto;
  margin: 0 auto;
  padding-top: 0;
}
.jbs-video--portrait::before {
  content: '';
  display: block;
  padding-top: 177.78%;
}
.jbs-video > iframe,
.jbs-video > video {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── 圖庫 .jbs-gallery(商品頁;jbs.js 的 [data-jbs-gallery])──────────────────
   主圖是原生 scroll-snap 橫滑,縮圖橫排在主圖下;比例跟商品卡共用 --jbs-product-ratio(方圖 100%、直圖 150%)。 */
.jbs-gallery {
  position: relative;
  min-width: 0;
}
.jbs-gallery--portrait { --jbs-product-ratio: 150%; }

.jbs-gallery__track {
  display: flex;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  list-style: none;
  -webkit-overflow-scrolling: touch;
  -ms-scroll-snap-type: x mandatory;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.jbs-gallery__track::-webkit-scrollbar { display: none; }

.jbs-gallery__slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 0;
  padding-top: var(--jbs-product-ratio, 100%);
  background: var(--jb-bg-muted);
  scroll-snap-align: start;
}

.jbs-gallery__media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  cursor: zoom-in;
}
.jbs-gallery__media[data-gallery-video] { cursor: pointer; }
.jbs-gallery__media:focus-visible { outline-offset: -2px; }

.jbs-gallery__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.jbs-gallery__play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  background: rgba(0, 0, 0, .55);
  border-radius: 50%;
  pointer-events: none;
}
.jbs-gallery__play::before {
  position: absolute;
  top: 14px;
  left: 19px;
  content: "";
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff;
}

.jbs-gallery__count {
  position: absolute;
  top: 8px;
  right: 8px;
  margin: 0;
  padding: 0 8px;
  font-size: 12px;
  line-height: 22px;
  color: #fff;
  background: rgba(0, 0, 0, .55);
  border-radius: 11px;
  pointer-events: none;
}

.jbs-gallery__thumbs {
  display: flex;
  margin: 8px 0 0;
  padding: 2px 0;
  overflow-x: auto;
  list-style: none;
  -webkit-overflow-scrolling: touch;
}
.jbs-gallery__thumbs > li { flex: 0 0 auto; margin-right: 8px; }

.jbs-gallery__thumb {
  position: relative;
  display: block;
  width: 56px;
  height: 56px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--jb-bg-muted);
  border: 2px solid transparent;
  border-radius: 6px;
}
.jbs-gallery__thumb[aria-current="true"] { border-color: var(--jbs-accent); }
.jbs-gallery__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.jbs-gallery__thumb .jbs-gallery__play { transform: scale(.5); }

.jbs-photo-viewer__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  color: var(--jb-text-on-fill);
}

/* 縮圖列(泰文 / 英文的銀行 QR、已上傳的匯款憑證) */
.jbs-thumbs {
  display: flex;
  flex-wrap: wrap;
}
.jbs-thumbs > * { margin: 4px 6px 0 0; }

.jbs-thumb {
  display: block;
  width: 64px;
  height: 64px;
  padding: 0;
  overflow: hidden;
  background: var(--jb-bg-muted);
  border: 1px solid var(--jbs-border-card);
  border-radius: 6px;
}
.jbs-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.jbs-photo-viewer__nav > * + * { margin-left: 12px; }

/* ── 網頁版頁首(pay/_links_jbs.html)────────────────────────────────────
   頁首一排 logo + 工具(語言、購物車、帳號),固定在頂端;三個分頁在頁首下方另成一列、跟著捲走。 */

.jbs-site-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: var(--jb-z-header);
  background: var(--jbs-header-bg);
  border-bottom: var(--jbs-header-border);
}

.jbs-site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 16px 0;
}

.jbs-site-header__logo {
  flex: 0 0 auto;
  width: 72px;
  margin-bottom: 8px;
}
.jbs-site-header__logo img { width: 100%; }
.jbs-site-header__logo--brand { width: 110px; }

.jbs-brand-logo { display: var(--jbs-brand-logo-display); }
.jbs-brand-logo--inverse { display: var(--jbs-brand-logo-inverse-display); }

.jbs-site-header__title {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0 0 8px 10px;
  padding-left: 10px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--jbs-page-title);
  border-left: 1px solid var(--jbs-border-card);
}

/* flex-basis 0:剩餘寬度不夠時縮名字,不把整組工具換到第二行;
   min-width 用 em:字放大到連 7em 都放不下才整組換到第二行,不然帳號 ID 會被擠成一字一行 */
.jbs-site-header__tools {
  display: flex;
  flex: 1 1 0;
  justify-content: flex-end;
  align-items: center;
  min-width: 7em;
  margin: 0 0 8px 6px;
}
.jbs-site-header__tools > * + * { margin-left: 6px; }

.jbs-site-header__shop {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  color: var(--jbs-menu-text);
}
.jbs-site-header__shop .jbs-icon { font-size: 20px; }

.jbs-site-header__shop-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.jbs-site-header__shop--cart {
  position: relative;
  justify-content: center;
  min-width: 44px;
}
.jbs-site-header__shop--cart .jbs-site-header__cart-count {
  top: 2px;
  right: 0;
}

.jbs-site-header__cart { position: relative; }
.jbs-site-header__cart img { width: 30px; }
.jbs-site-header__cart.is-empty .jbs-site-header__cart-count { display: none; }

.jbs-site-header__cart-count {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 1.64em;
  min-height: 18px;
  padding: 2px 4px;
  font-size: 11px;
  line-height: 1.27;
  text-align: center;
  color: var(--jb-text-on-fill);
  background: var(--jbs-count-bg);
  border-radius: 999px;
}

.jbs-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  background: var(--jbs-count-bg);
  border-radius: 50%;
}

/* 分頁字色是配著頁首底色調的(深色頁首的店家主題),底色要跟頁首同一個 token */
.jbs-main-menu {
  background: var(--jbs-header-bg);
  border-bottom: 1px solid var(--jbs-border-card);
}

.jbs-main-menu__list {
  display: flex;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

.jbs-main-menu__item {
  flex: 1 1 0;
  min-width: 0;
}

.jbs-main-menu__link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 4px 8px;
  font-size: 14px;
  line-height: 1.2;
  text-align: center;
  color: var(--jbs-menu-text);
}
/* 主題頁把圖示關掉(display: none):間距寫在圖示上,不能改成 `> * + *`,不然文字會留一段空白 */
.jbs-main-menu__link > .jbs-icon {
  display: var(--jbs-menu-icon-display);
  flex: 0 0 auto;
  margin-right: 6px;
  font-size: 18px;
}
.jbs-main-menu__link.is-current {
  font-weight: 600;
  color: var(--jbs-menu-active-text);
}
.jbs-main-menu__link.is-current::after {
  content: '';
  position: absolute;
  right: 8px;
  bottom: 0;
  left: 8px;
  height: 3px;
  background: var(--jbs-active-line);
  border-radius: 3px 3px 0 0;
}

.jbs-main-menu__link .jbs-dot {
  margin-left: 3px;
  -webkit-transform: translateY(-6px);
  transform: translateY(-6px);
}

/* ── 帳號選單(pay/_links_jbs.html;開關走 data-jbs-toggle)──────────────── */

.jbs-account {
  position: relative;
  min-width: 0;
}

.jbs-account__toggle {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 100%;
  min-height: 44px;
  font-size: 14px;
  color: var(--jbs-menu-text);
}
.jbs-account__toggle > * + * { margin-left: 4px; }

.jbs-account__avatar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  overflow: hidden;
  font-weight: 600;
  color: var(--jbs-text-strong);
  background: var(--jbs-bg-page);
  border: 1px solid var(--jbs-border-card);
  border-radius: 50%;
}
.jbs-account__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 名字太長只截名字;ID 不能截斷(客服靠截圖對帳號),放不下就換行(LINE 的 ID 是 33 字元) */
.jbs-account__label {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
  text-align: left;
}

.jbs-account__name {
  max-width: 160px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jbs-account__id {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}

.jbs-account__toggle .jbs-dot {
  position: absolute;
  top: 7px;
  left: 20px;
  margin: 0;
  box-shadow: 0 0 0 2px var(--jbs-header-bg);
}

.jbs-account__caret {
  width: 0;
  height: 0;
  border-top: 5px solid currentColor;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
}

.jbs-account__menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: var(--jb-z-dropdown);
  width: 240px;
  max-width: calc(100vw - 32px);
  margin-top: 4px;
  padding: 4px 0;
  color: var(--jbs-text-strong);
  background: var(--jbs-card-bg);
  border: 1px solid var(--jbs-border-card);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
}

.jbs-account__item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  font-size: 14px;
  text-align: left;
}
.jbs-account__item:hover,
.jbs-account__item:focus { background: var(--jbs-bg-page); }
.jbs-account__item .jbs-dot { margin-left: 6px; }

/* SEA:結帳時間所用的時區城市 */
.jbs-account__tz {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
  padding: 8px 16px 10px;
  font-size: 12px;
  color: var(--jbs-text-label);
  border-bottom: 1px solid var(--jbs-border-card);
}
/* 圖檔是給舊版漸層頂條用的白色圖示:轉成灰色才看得到 */
.jbs-account__tz img {
  width: 14px;
  margin-right: 6px;
  filter: brightness(0) opacity(.55);
}

.jbs-account__login {
  min-height: 32px;
  padding: 6px 16px;
  font-size: 14px;
}

/* ── 主題版商店頁首(pay/_shop_header_jbs.html)──────────────────────────────
   768 以下:漢堡鈕開左側抽屜(.jbs-modal--drawer);769 以上:橫向選單,子項是 data-jbs-popup 下拉。
   下拉、搜尋、購物車預覽以整個頁首(sticky = 定位基準)為準,頁首裡其他層不能加 position。 */

.jbs-shop-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: var(--jb-z-header);
  color: var(--jbs-menu-text);
  background: var(--jbs-header-bg);
  border-bottom: var(--jbs-header-border);
}

/* logo 最少留 72px:工具列放不下(320 寬 + 語言幣別 + 登入)時在自己的欄位裡換行,不把 logo 擠成一個點、不撐出橫捲 */
.jbs-shop-header__bar {
  display: grid;
  grid-template-columns: auto minmax(72px, 1fr) auto;
  grid-template-areas: "burger logo tools";
  align-items: center;
  max-width: 1280px;
  min-height: 56px;
  margin: 0 auto;
  padding: 6px 8px;
}

.jbs-shop-header__burger {
  grid-area: burger;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  width: 44px;
  height: 44px;
  color: inherit;
}

.jbs-shop-header__burger-icon,
.jbs-shop-header__burger-icon::before,
.jbs-shop-header__burger-icon::after {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}
.jbs-shop-header__burger-icon { position: relative; }
.jbs-shop-header__burger-icon::before,
.jbs-shop-header__burger-icon::after {
  content: '';
  position: absolute;
  left: 0;
}
.jbs-shop-header__burger-icon::before { top: -6px; }
.jbs-shop-header__burger-icon::after { top: 6px; }

.jbs-shop-header__logo {
  grid-area: logo;
  display: block;
  justify-self: start;
  min-width: 0;
  margin: 0 8px;
}
.jbs-shop-header--center .jbs-shop-header__logo { justify-self: center; }
.jbs-shop-header__logo img {
  width: auto;
  max-width: 100%;
  max-height: 40px;
}
.jbs-shop-header__logo-img { display: block; }

.jbs-shop-header__tools {
  grid-area: tools;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  min-width: 0;
}
.jbs-shop-header__tools > * + * { margin-left: 4px; }

.jbs-shop-header__tool {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 44px;
  font-size: 22px;
  color: inherit;
}
.jbs-shop-header__tool[aria-expanded="true"] { color: var(--jbs-menu-active-text); }
.jbs-shop-header__cart .jbs-site-header__cart-count {
  top: 4px;
  right: -4px;
}

.jbs-shop-nav { display: none; }

.jbs-shop-nav__caret {
  flex: 0 0 auto;
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 5px solid currentColor;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
}
.jbs-shop-nav__link[aria-expanded="true"] .jbs-shop-nav__caret { transform: rotate(180deg); }

.jbs-shop-nav__panel,
.jbs-shop-search,
.jbs-shop-cart {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  z-index: var(--jb-z-dropdown);
  color: var(--jbs-text-strong);
  background: var(--jbs-card-bg);
  border-top: 1px solid var(--jbs-border-card);
  box-shadow: 0 8px 16px rgba(0, 0, 0, .12);
}

.jbs-shop-nav__panel {
  max-height: 70vh;
  overflow-y: auto;
}

.jbs-shop-nav__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px 20px;
}

.jbs-shop-nav__all {
  display: inline-block;
  padding: 6px 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--jbs-text-strong);
  word-break: break-word;
}

.jbs-shop-nav__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px 24px;
  margin-top: 8px;
}

.jbs-shop-nav__child,
.jbs-shop-nav__leaf {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}
.jbs-shop-nav__child--head {
  margin-bottom: 4px;
  font-weight: 700;
  border-bottom: 1px solid var(--jbs-border-card);
}
.jbs-shop-nav__leaf { color: var(--jbs-text-body); }
.jbs-shop-nav__all:hover,
.jbs-shop-nav__child:hover,
.jbs-shop-nav__leaf:hover { text-decoration: underline; }
p.jbs-shop-nav__child:hover { text-decoration: none; }

.jbs-shop-search {
  display: flex;
  align-items: center;
  padding: 10px 16px;
}
.jbs-shop-search__input {
  flex: 1 1 auto;
  min-width: 0;
}
.jbs-shop-search__submit {
  flex: 0 0 auto;
  margin-left: 8px;
}

.jbs-shop-cart {
  display: flex;
  flex-direction: column;
  max-height: 70vh;
}

.jbs-shop-cart__list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0 16px;
}

.jbs-shop-cart__item {
  display: flex;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--jbs-border-card);
}
.jbs-shop-cart__item > * + * { margin-left: 10px; }

.jbs-shop-cart__photo {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
}

.jbs-shop-cart__info {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--jbs-card-text);
  word-break: break-word;
}
.jbs-shop-cart__name {
  font-size: 14px;
  color: var(--jbs-card-name);
}

.jbs-shop-cart__item .jbs-btn--mini { flex: 0 0 auto; }

.jbs-shop-cart__empty {
  padding: 24px 16px;
  font-size: 14px;
  text-align: center;
  color: var(--jbs-text-label);
}

.jbs-shop-cart__checkout {
  flex: 0 0 auto;
  margin: 12px 16px 16px;
}

/* 抽屜:從左邊滑出、整個畫面高;內容是一串 <details>(各層可展開) */
.jbs-modal--drawer {
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
}
.jbs-modal--drawer .jbs-modal__panel {
  width: 85%;
  max-width: 360px;
  max-height: none;
  padding-bottom: env(safe-area-inset-bottom);
  border-radius: 0;
  animation-name: jbs-drawer-in;
}
@keyframes jbs-drawer-in { from { transform: translateX(-100%); } }

.jbs-shop-drawer { padding: 0; }

.jbs-shop-drawer__version {
  flex: 0 0 auto;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--jbs-text-label);
  text-align: center;
}

.jbs-shop-drawer__item { border-bottom: 1px solid var(--jbs-border-card); }

/* summary 不用 flex:舊版 Safari 的 summary 當不了 flex 容器;箭頭用絕對定位 */
.jbs-shop-drawer__summary,
.jbs-shop-drawer__link {
  display: block;
  min-height: 48px;
  padding: 13px 16px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--jbs-text-strong);
  word-break: break-word;
}

.jbs-shop-drawer__summary {
  position: relative;
  padding-right: 44px;
  list-style: none;
  cursor: pointer;
}
.jbs-shop-drawer__summary::-webkit-details-marker { display: none; }
.jbs-shop-drawer__summary::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 20px;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
details[open] > .jbs-shop-drawer__summary::after {
  margin-top: -2px;
  transform: rotate(-135deg);
}

.jbs-shop-drawer__sub {
  padding-left: 16px;
  background: var(--jbs-bg-page);
}
.jbs-shop-drawer__sub .jbs-shop-drawer__summary,
.jbs-shop-drawer__sub .jbs-shop-drawer__link {
  min-height: 44px;
  padding-top: 11px;
  padding-bottom: 11px;
  font-size: 14px;
}

/* 選單項目換行而不是撐寬:項目放不下就換到下一列,名稱太長在項目裡換行 */
@media (min-width: 769px) {
  .jbs-shop-header__bar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "logo nav tools";
    min-height: 72px;
    padding: 8px 24px;
  }
  .jbs-shop-header--center .jbs-shop-header__bar {
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas: ". logo tools" "nav nav nav";
  }

  .jbs-shop-header__burger { display: none; }

  .jbs-shop-header__logo { margin: 0 16px 0 0; }
  .jbs-shop-header--center .jbs-shop-header__logo { margin: 0 16px; }
  .jbs-shop-header__logo img {
    max-width: 200px;
    max-height: 64px;
  }

  .jbs-shop-header__tools > * + * { margin-left: 8px; }

  .jbs-shop-nav {
    grid-area: nav;
    display: block;
    min-width: 0;
  }

  .jbs-shop-nav__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }
  .jbs-shop-header--center .jbs-shop-nav__list { justify-content: center; }

  .jbs-shop-nav__item {
    min-width: 0;
    max-width: 100%;
  }

  .jbs-shop-nav__link {
    display: flex;
    align-items: center;
    max-width: 100%;
    min-height: 44px;
    padding: 4px 14px;
    font-size: 15px;
    line-height: 1.3;
    text-align: left;
    color: inherit;
    word-break: break-word;
  }
  .jbs-shop-nav__link > span:first-child { min-width: 0; }
  .jbs-shop-nav__link:hover,
  .jbs-shop-nav__link[aria-expanded="true"] { color: var(--jbs-menu-active-text); }

  .jbs-shop-search,
  .jbs-shop-cart {
    right: 24px;
    right: max(24px, calc((100% - 1280px) / 2 + 24px));
    left: auto;
    border: 1px solid var(--jbs-border-card);
    border-radius: 0 0 8px 8px;
  }
  .jbs-shop-search { width: 420px; }
  .jbs-shop-cart { width: 360px; }
}

/* ── App 內外框(common/_app_header_jbs.html、pay/_tabs_jbs.html)─────────── */

.jbs-app-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: var(--jb-z-header);
  min-height: 5px;
  background: var(--jbs-app-header-bg);
}

.jbs-app-search {
  display: flex;
  align-items: center;
  padding: 5px 10px;
}

.jbs-app-search__toggle {
  flex: 0 0 auto;
  padding: 8px;
  font-size: 20px;
  color: var(--jbs-text-strong);
}

.jbs-app-search__form {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  margin-left: 8px;
}
.jbs-app-search__form > * + * { margin-left: 8px; }

.jbs-app-search__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 6px 10px;
  border: 1px solid var(--jbs-border-card);
  border-radius: 6px;
}

/* 白牌各自的「選中」圖示由主題 token 指定;url 寫在 themes.css,與本檔同目錄,相對路徑一致 */
.jbs-app-tabbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: var(--jb-z-sticky);
  display: none;
  height: 70px;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--jb-color-white);
  border-top: 1px solid var(--jbs-tabbar-border);
  box-shadow: 0 -3px 6px rgba(0, 0, 0, .16);
  box-sizing: content-box;
}

.jbs-app-header--tabbar .jbs-app-tabbar { display: flex; }

.jbs-app-tabbar__item {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  background-repeat: no-repeat;
}
.jbs-app-tabbar__item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 11px;
  right: 0;
  height: 24px;
  border-left: 1px solid var(--jbs-tabbar-divider);
}

.jbs-app-tabbar__item--home { background-image: url('../img/icon/tab_home.svg'); background-size: 37%; background-position: center 7px; }
.jbs-app-tabbar__item--live { background-image: url('../img/icon/tab_live.svg'); background-size: 37%; background-position: center 7px; }
.jbs-app-tabbar__item--track { background-image: url('../img/icon/tab_collection.svg'); background-size: 32%; background-position: center 10px; }
.jbs-app-tabbar__item--cart { background-image: url('../img/icon/btn-cart.svg'); background-size: 36%; background-position: center 9px; }
.jbs-app-tabbar__item--mine { background-image: url('../img/icon/tab_personal.svg'); background-size: 28%; background-position: center 8px; }
.jbs-app-tabbar__item--msg { background-image: url('../img/icon/tab_ring.svg'); background-size: 40%; background-position: center 4px; }

.jbs-app-tabbar__item--home.is-active,
.jbs-app-tabbar__item--home:hover { background-image: var(--jbs-tab-home-active); }
.jbs-app-tabbar__item--live.is-active,
.jbs-app-tabbar__item--live:hover { background-image: var(--jbs-tab-live-active); }
.jbs-app-tabbar__item--track.is-active,
.jbs-app-tabbar__item--track:hover { background-image: var(--jbs-tab-track-active); }
.jbs-app-tabbar__item--cart.is-active,
.jbs-app-tabbar__item--cart:hover { background-image: var(--jbs-tab-cart-active); }
.jbs-app-tabbar__item--mine.is-active,
.jbs-app-tabbar__item--mine:hover { background-image: var(--jbs-tab-mine-active); }
.jbs-app-tabbar__item--msg.is-active,
.jbs-app-tabbar__item--msg:hover { background-image: var(--jbs-tab-msg-active); }

.jbs-app-tabbar__link {
  display: block;
  height: 70px;
}

.jbs-app-tabbar__count {
  position: absolute;
  top: 4px;
  right: 15px;
  min-width: 1.67em;
  min-height: 20px;
  padding: 2px 3px;
  font-size: 12px;
  line-height: 1.34;
  text-align: center;
  color: var(--jb-text-on-fill);
  background: var(--jbs-count-bg);
  border-radius: 999px;
}

@-webkit-keyframes jbs-reveal { to { visibility: visible; } }
@keyframes jbs-reveal { to { visibility: visible; } }

/* 比最寬的手機(430)更寬時:圖示大小是格子寬的百分比(同舊版),格子很寬會撐爆,所以加上限;數量跟著圖示,不貼格子右緣 */
@media (min-width: 431px) {
  .jbs-app-tabbar__item--home,
  .jbs-app-tabbar__item--live { background-size: 36px; }
  .jbs-app-tabbar__item--track { background-size: 31px; }
  .jbs-app-tabbar__item--cart { background-size: 35px; }
  .jbs-app-tabbar__item--mine { background-size: 27px; }
  .jbs-app-tabbar__item--msg { background-size: 39px; }
  .jbs-app-tabbar__count { right: calc(50% - 39px); }
}

.jbs-tabs {
  display: flex;
  max-width: 500px;
  margin: 30px auto;
  text-align: center;
}

.jbs-tabs__item {
  flex: 1 1 0;
  min-width: 0;
}

.jbs-tabs__link {
  display: block;
  padding: 5px 0;
  font-size: 14px;
  line-height: 14px;
  color: var(--jbs-tabs-text);
  border-bottom: 1px solid var(--jbs-tabs-line);
}
.jbs-tabs__link.is-current {
  color: var(--jbs-price);
  border-bottom: 4px solid var(--jbs-price);
}

.jbs-tabs__icon {
  margin-right: 5px;
  font-size: 14px;
  color: var(--jbs-tabs-icon);
}
.jbs-tabs__link.is-current .jbs-tabs__icon { color: var(--jbs-tabs-icon-active); }

/* ── 頁面主體 ───────────────────────────────────────────────────────────── */

.jbs-page {
  display: block;
  max-width: 1180px;
  margin: 0 auto;
}

/* App 內底部 tabbar 是 fixed,內容要讓出它的高度;顯示與否由 _app_header_jbs.html 的 --tabbar 決定 */
.jbs-app-header--tabbar ~ .jbs-page {
  padding-bottom: calc(70px + env(safe-area-inset-bottom));
}

/* ── 單則提示頁(fugo_alert、need_group_permission、initial_setup)──────────── */

.jbs-message {
  max-width: 360px;
  margin: 40px auto;
  text-align: center;
}

.jbs-message__logo {
  display: block;
  max-width: 160px;
  margin: 0 auto 20px;
}

.jbs-message__title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--jbs-text-strong);
  word-break: break-word;
}

.jbs-message__text {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--jbs-card-label);
}

.jbs-message__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 24px;
}
.jbs-message__actions > * { margin: 0 4px 8px; }

/* ── 內部人員填的 HTML 內容(關於我們)────────────────────────────────── */

.jbs-article {
  max-width: 860px;
  margin: 0 auto;
  padding: 16px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--jbs-text-strong);
  word-break: break-word;
}
.jbs-article > * + * { margin-top: 12px; }
.jbs-article h1,
.jbs-article h2,
.jbs-article h3 { font-weight: 600; }
.jbs-article h1 { font-size: 22px; }
.jbs-article h2 { font-size: 19px; }
.jbs-article h3 { font-size: 17px; }
/* 內容是賣家填的 HTML,reset.css 歸零的清單、小標、巢狀段落要補回接近瀏覽器預設的樣子 */
.jbs-article h4,
.jbs-article h5,
.jbs-article h6 { font-size: 15px; font-weight: 600; }
.jbs-article ul,
.jbs-article ol { padding-left: 1.5em; }
.jbs-article ul { list-style: disc; }
.jbs-article ol { list-style: decimal; }
.jbs-article ul ul { list-style: circle; }
.jbs-article p + p,
.jbs-article p + ul,
.jbs-article p + ol,
.jbs-article ul + p,
.jbs-article ol + p { margin-top: 12px; }
.jbs-article img { max-width: 100%; height: auto; }
.jbs-article a { color: var(--jbs-text-link); text-decoration: underline; }

/* ── 收件匣 ─────────────────────────────────────────────────────────────── */

.jbs-inbox {
  max-width: 860px;
  margin: 0 auto;
  padding-top: 12px;
}

.jbs-notice-filter {
  display: block;
  margin: 0 12px 12px auto;
  padding: 6px 10px;
  font-size: 14px;
  color: var(--jbs-text-strong);
  background: var(--jbs-card-bg);
  border: 1px solid var(--jbs-border-card);
  border-radius: 6px;
}

.jbs-notice-list {
  margin: 0 12px 24px;
  overflow: hidden;
  background: var(--jbs-card-bg);
  border: 1px solid var(--jbs-border-card);
  border-radius: 10px;
}

.jbs-notice-item + .jbs-notice-item { border-top: 1px solid var(--jbs-border-card); }

/* 活動通知:左側主題色條 + 中性淡底(App 主題沒有品牌淡色 token,用品牌淡色會在藍色系白牌出現粉紅底) */
.jbs-notice-item--promotion {
  background: var(--jb-bg-muted);
  box-shadow: inset 4px 0 0 var(--jb-color-brand);
}

.jbs-notice-item__link {
  display: flex;
  align-items: flex-start;
  padding: 12px;
  color: inherit;
  text-decoration: none;
}

.jbs-notice-item__avatar {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  object-fit: cover;
  border: 2px solid transparent;
  border-radius: 50%;
}
.is-unread .jbs-notice-item__avatar { border-color: var(--jbs-price); }

.jbs-notice-item__main {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  margin-left: 10px;
}

.jbs-notice-item__title {
  font-size: 15px;
  line-height: 1.45;
  color: var(--jbs-card-name);
  word-break: break-word;
}
.is-unread .jbs-notice-item__title { font-weight: 600; }

.jbs-notice-item__body {
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--jbs-card-label);
  word-break: break-word;
}

.jbs-notice-item__date {
  margin-top: 4px;
  font-size: 12px;
  color: var(--jbs-card-label);
}

/* ── 通知詳情(獨立頁與收件匣載入的片段共用)───────────────────────────── */

.jbs-notice-detail {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
}

.jbs-notice-detail__back {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--jbs-text-link);
}

.jbs-notice-detail__head {
  display: flex;
  align-items: center;
}

.jbs-notice-detail__avatar {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  object-fit: cover;
  border: 1px solid var(--jbs-border-card);
  border-radius: 50%;
}

.jbs-notice-detail__sender {
  min-width: 0;
  margin-left: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--jbs-card-name);
  word-break: break-word;
}

.jbs-notice-detail__title {
  margin-top: 14px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--jbs-text-strong);
  word-break: break-word;
}

.jbs-notice-detail__body {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--jbs-card-label);
  word-break: break-word;
}

.jbs-notice-detail__actions { margin-top: 20px; }

.jbs-empty {
  padding: 20px 0 50px;
}
.jbs-empty img {
  max-width: 80%;
  margin: 0 auto;
}

/* ── 廣告輪播(jbs.js 每 data-jbs-interval 毫秒換下一張,預設 2000)────── */

.jbs-ad-carousel__slide {
  display: none;
  padding: 10px;
}
.jbs-ad-carousel__slide.is-active { display: block; }
.jbs-ad-carousel__slide img {
  width: 100%;
  border-radius: 16px;
}

.jbs-page > .jbs-ad-carousel { margin: 0 2px 16px; }

/* ── 待填單賣場卡片 ─────────────────────────────────────────────────────── */

.jbs-bill-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-gap: 10px;
  margin: 12px 12px 24px;
}

.jbs-bill-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--jbs-card-bg);
  border-radius: 8px;
  box-shadow: var(--jbs-card-shadow);
}

.jbs-bill-card__head {
  display: flex;
  align-items: center;
  padding: 10px 14px;
}

.jbs-bill-card__avatar {
  flex: 0 0 auto;
  width: 80px;
  height: 80px;
  overflow: hidden;
  background: var(--jbs-card-bg);
  border: 2px solid var(--jbs-border-card);
  border-radius: 50%;
}
.jbs-bill-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jbs-bill-card__title {
  flex: 1 1 auto;
  min-width: 0;
  margin-left: 11px;
}

.jbs-bill-card__name {
  display: -webkit-box;
  overflow: hidden;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--jbs-card-name);
  word-break: break-word;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.jbs-bill-card__meta {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--jbs-card-label);
}
.jbs-bill-card__meta strong {
  font-size: 17px;
  font-weight: 700;
  color: var(--jbs-card-name);
}

.jbs-bill-card__count {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
}

.jbs-bill-card__sep {
  margin: 0 5px;
  opacity: .55;
}

.jbs-bill-card__new {
  position: absolute;
  top: 0;
  left: 0;
  max-width: 104px;
  padding: 2px 8px;
  font-size: 11px;
  word-break: break-word;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .04em;
  color: var(--jb-text-on-fill);
  background: var(--jbs-count-bg);
  border-radius: 8px 0 4px 0;
}

/* margin-top:auto:同一排卡片店名下方高度不同時,金額列仍對齊卡片底部 */
.jbs-bill-card__money {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  margin-top: auto;
  padding: 8px 14px;
  border-top: 1px solid var(--jbs-border-card);
}

.jbs-bill-card__label {
  flex: 0 0 auto;
  margin-right: 8px;
  font-size: 12px;
  color: var(--jbs-card-label);
}

.jbs-bill-card__total {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: var(--jbs-card-number);
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.jbs-bill-card__action {
  flex: 0 0 auto;
  align-self: center;
  margin-left: auto;
  min-height: 34px;
  padding-top: 5px;
  padding-bottom: 5px;
  font-size: 14px;
  max-width: 100%;
  font-weight: 700;
  border-radius: var(--jbs-radius-btn);
}

/* 整張卡都能點:按鈕的 ::after 撐滿卡片 */
.jbs-bill-card__action::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: 8px;
}

/* ── 次要按鈕 / 文字按鈕 / 圖示按鈕 ─────────────────────────────────────── */

.jbs-btn--sm {
  min-height: 32px;
  padding: 4px 14px;
  font-size: 13px;
}
.jbs-btn--sm > * + * { margin-left: 4px; }
.jbs-btn--sm .jbs-icon { font-size: 14px; }

/* 卡片內的小按鈕。26px 是視覺高度,::before 往外撐的距離不能超過按鈕間距的一半(放按鈕的列間距 8px),否則相鄰按鈕的點擊範圍會重疊、點到別顆;
   position 只能寫在這裡,.jbs-btn 本身要維持 static(整卡點擊層靠它) */
.jbs-btn--mini {
  position: relative;
  min-height: 26px;
  padding: 2px 10px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--jbs-text-body);
  background: var(--jbs-card-bg);
  border-color: var(--jbs-mini-border);
}
.jbs-btn--mini::before {
  content: '';
  position: absolute;
  top: -4px;
  right: -4px;
  bottom: -4px;
  left: -4px;
}
.jbs-btn--mini > * + * { margin-left: 4px; }
.jbs-btn--mini { max-width: 100%; }
.jbs-btn--mini > span { min-width: 0; word-break: break-word; }
.jbs-btn--mini img { flex: 0 0 auto; width: 22px; height: auto; }
.jbs-btn--mini-accent {
  font-weight: 700;
  color: var(--jbs-price);
  border-color: var(--jbs-price);
}

/* 訂單卡上的付款動作(輸入末五碼、上傳匯款憑證):比 --mini 高(32px,點擊範圍照 --mini 再撐 4px = 40px);
   還沒做是實心粗體(--pay-todo),做完拿掉 --pay-todo 回到 --mini 的灰框一般字重(pay-bills.js 切換) */
.jbs-btn--pay {
  min-height: 32px;
  padding: 4px 12px;
}
.jbs-btn--pay-todo {
  font-weight: 700;
  color: var(--jb-text-on-fill);
  background: var(--jbs-cta-bg);
  background-origin: border-box;
  border-color: transparent;
}

.jbs-text-btn {
  display: inline;
  padding: 0;
  font-size: inherit;
  line-height: inherit;
  color: var(--jbs-text-link);
  text-decoration: underline;
  cursor: pointer;
}

.jbs-text-btn--track {
  position: relative;
  margin-left: 4px;
  font-size: 13px;
  color: var(--jbs-price);
}
.jbs-text-btn--track::before {
  content: '';
  position: absolute;
  top: -12px;
  right: -4px;
  bottom: -12px;
  left: -4px;
}

/* 視覺 28px,點擊範圍撐到 44px */
.jbs-icon-btn {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--jbs-card-label);
  border-radius: 50%;
}
.jbs-icon-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}
.jbs-icon-btn .jbs-icon { font-size: 16px; }

/* ── 狀態標籤 ───────────────────────────────────────────────────────────── */

.jbs-badge {
  display: inline-block;
  max-width: 100%;
  padding: 2px 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  word-break: break-word;
  color: var(--jb-text-secondary);
  background: var(--jbs-badge-bg);
  border-radius: 4px;
}
.jbs-badge--success { color: var(--jb-status-success-text); background: var(--jbs-badge-success-bg); }
.jbs-badge--warning { color: var(--jb-status-warning-text); background: var(--jbs-badge-warning-bg); }
.jbs-badge--info { color: var(--jb-status-info-text); background: var(--jbs-badge-info-bg); }
.jbs-badge--error { color: var(--jb-status-error-text); background: var(--jbs-badge-error-bg); }

/* ── 訂單處理中 / 歷史訂單:付款單卡片 ──────────────────────────────────── */

.jbs-order-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-gap: 16px;
  margin: 12px 12px 24px;
}

.jbs-order-list__divider { border-top: 1px solid var(--jbs-border-card); }

.jbs-order-list__link {
  margin: 12px 12px 0;
  font-size: 13px;
}

.jbs-order-card {
  overflow: hidden;
  background: var(--jbs-card-bg);
  border-radius: 8px;
  box-shadow: var(--jbs-card-shadow);
}

.jbs-order-card__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  padding: 12px 12px 0;
  cursor: pointer;
}

.jbs-order-card__logo {
  flex: 0 0 auto;
  width: 80px;
  height: 80px;
  margin: 0 12px 8px 0;
  object-fit: cover;
  background: var(--jbs-card-bg);
  border: 2px solid var(--jbs-border-card);
  border-radius: 50%;
}

.jbs-order-card__info {
  flex: 1 1 11em;
  min-width: 0;
  margin-bottom: 8px;
}

.jbs-order-card__shop {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--jbs-card-name);
  word-break: break-word;
}

.jbs-order-card__retention,
.jbs-order-card__meta {
  margin-top: 2px;
  font-size: 13px;
  color: var(--jbs-order-meta-label);
  word-break: break-all;
}
.jbs-order-card__value { color: var(--jbs-card-name); }

.jbs-order-card__badges {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}
.jbs-order-card__badges > * { margin: 0 6px 4px 0; }

.jbs-order-card__contacts {
  margin-top: 2px;
  font-size: 13px;
  color: var(--jbs-card-text);
}

.jbs-order-card__contact {
  display: flex;
  align-items: center;
  min-height: 24px;
  color: var(--jbs-card-text);
  text-decoration: none;
  word-break: break-word;
}
.jbs-order-card__contact > * + * { margin-left: 6px; }
.jbs-order-card__contact .jbs-icon {
  flex: 0 0 auto;
  font-size: 14px;
}

.jbs-order-card__actions { display: flex; flex-wrap: wrap; }
.jbs-order-card__actions > * { margin: 8px 8px 0 0; }

.jbs-order-card__facts {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  padding: 0 12px 12px;
}

.jbs-order-card__figures {
  flex: 1 1 9em;
  min-width: 0;
  margin-right: 8px;
}

.jbs-order-card__figure {
  display: inline-block;
  margin-right: 14px;
  padding: 5px 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--jbs-card-label);
  word-break: break-word;
}
.jbs-order-card__figure strong {
  font-size: 16px;
  font-weight: 700;
  color: var(--jbs-card-name);
  white-space: nowrap;
}
.jbs-order-card__figure--sub strong { font-size: 13px; font-weight: 600; }

.jbs-order-card__amount {
  color: var(--jbs-card-number);
  font-variant-numeric: tabular-nums;
}

/* 收合鈕的 ::before 蓋住整列當點擊範圍(列上其他都是純文字);按鈕本身不能 position,::before 才會以整列為準 */
.jbs-order-card__toggle {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  max-width: 50%;
  min-height: 32px;
  margin-left: auto;
  padding: 4px 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--jbs-price);
  text-align: right;
  word-break: normal;
  overflow-wrap: break-word;
}
.jbs-order-card__toggle::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}
.jbs-order-card__toggle::after {
  content: '';
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin: 0 3px 0 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s;
}
.jbs-order-card__toggle[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
.jbs-order-card__toggle:focus { outline: none; }
.jbs-order-card__toggle:focus::before { outline: 2px solid var(--jb-color-focus-ring); outline-offset: -2px; }
.jbs-order-card__toggle:focus:not(:focus-visible)::before { outline: none; }
@media (hover: hover) {
  .jbs-order-card__toggle:hover::before { background: rgba(0, 0, 0, .03); }
}
.jbs-order-card__toggle:active::before { background: rgba(0, 0, 0, .06); }

.jbs-order-card__detail {
  padding: 0;
  border-top: 1px solid var(--jbs-border-card);
}

.jbs-order-card__retry {
  display: block;
  margin: 12px auto;
}

/* ── 付款單明細(pay/bill.html,fetch 後塞進卡片)─────────────────────────── */

.jbs-bill-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-row-gap: 6px;
  grid-column-gap: 6px;
  font-size: 13px;
  background: var(--jbs-bg-page);
}

.jbs-bill-detail__section {
  padding: 14px 12px 12px;
  background: var(--jbs-card-bg);
}

@media (min-width: 769px) {
  .jbs-bill-detail {
    grid-template-columns: minmax(0, 1fr) 400px;
    grid-template-rows: auto 1fr;
  }
  .jbs-bill-detail__section:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; }
  .jbs-bill-detail__section:nth-child(2) { grid-column: 2; grid-row: 1; }
  .jbs-bill-detail__section:nth-child(3) { grid-column: 2; grid-row: 2; }
  .jbs-bill-detail__section { padding-top: 16px; }
}

.jbs-bill-detail__heading {
  margin-bottom: 4px;
  padding-left: 8px;
  border-left: 3px solid var(--jbs-price);
  line-height: 1.3;
  font-size: 14px;
  font-weight: 600;
  color: var(--jbs-card-name);
}

.jbs-bill-item {
  display: flex;
  flex-wrap: wrap;
  padding: 10px 0;
}
.jbs-bill-item + .jbs-bill-item { border-top: 1px solid var(--jbs-border-card); }

.jbs-bill-item__photo {
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  object-fit: cover;
  background: var(--jb-bg-muted);
  border-radius: 4px;
}

.jbs-bill-item__main {
  flex: 1 1 0;
  min-width: 0;
  margin-left: 10px;
}

.jbs-bill-item__name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--jbs-card-name);
  word-break: break-word;
}

.jbs-bill-item__date {
  margin-top: 2px;
  font-size: 12px;
  color: var(--jbs-card-label);
}

.jbs-bill-item__meta {
  margin-top: 2px;
  font-size: 12px;
  color: var(--jbs-card-text);
}
.jbs-bill-item__meta > * + * { margin-left: 6px; }

.jbs-bill-item__spec {
  margin-top: 4px;
  font-size: 13px;
  color: var(--jbs-card-text);
  word-break: break-word;
}

.jbs-bill-item__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  margin-top: 4px;
  color: var(--jbs-card-text);
  font-variant-numeric: tabular-nums;
}
.jbs-bill-item__price + .jbs-bill-item__price { margin-top: 0; }

.jbs-bill-item__label { min-width: 0; margin-right: 8px; word-break: break-word; }
.jbs-bill-item__label > [translate="no"] { white-space: nowrap; }
.jbs-bill-item__off { color: var(--jbs-price); white-space: nowrap; }

.jbs-bill-item__subtotal {
  margin-left: auto;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--jbs-price);
  white-space: nowrap;
}

/* 要在基本規則之後:權重一樣,後面的贏 */
@media (min-width: 769px) {
  .jbs-bill-item__photo { width: 84px; height: 84px; }
  .jbs-bill-item__name { font-size: 15px; }
  .jbs-bill-item__subtotal { font-size: 20px; }
}

.jbs-bill-item__remark {
  display: flex;
  flex: 1 1 100%;
  align-items: center;
  margin-top: 8px;
  padding: 2px 4px 2px 8px;
  font-size: 12px;
  color: var(--jbs-card-text);
  background: var(--jb-bg-muted);
  border-radius: 6px;
}
.jbs-bill-item__remark > * + * { margin-left: 4px; }
.jbs-bill-item__remark > :first-child {
  flex: 0 0 auto;
  white-space: nowrap;
}

.jbs-bill-item__remark-text {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--jbs-card-name);
  word-break: break-word;
}

.jbs-bill-rows { margin: 0; }

.jbs-bill-rows__group {
  margin: 8px 0 2px;
  font-size: 13px;
  font-weight: 700;
  color: var(--jbs-card-name);
}

.jbs-bill-rows__row {
  display: flex;
  align-items: baseline;
  padding: 3px 0;
  font-size: 14px;
}

.jbs-bill-rows__row dt {
  flex: 0 0 110px;
  min-width: 0;
  padding-right: 12px;
  color: var(--jbs-card-label);
}

.jbs-bill-rows__row dd {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--jbs-card-name);
  word-break: break-word;
}

.jbs-bill-rows--money .jbs-bill-rows__row dd { font-variant-numeric: tabular-nums; }

/* 縮排靠 ~ 選擇器:總金額要排在所有費用 / 折抵列之後,它和其後的列才會回到不縮排。
   標籤欄扣掉縮排(左框 2px + padding),值才和不縮排的列對齊;縮排改了這裡一起改 */
.jbs-bill-rows__group ~ .jbs-bill-rows__row {
  padding-left: 10px;
  border-left: 2px solid var(--jbs-border-card);
}
.jbs-bill-rows__group ~ .jbs-bill-rows__row dt { flex-basis: 98px; }
.jbs-bill-rows__group ~ .jbs-bill-rows__row--sub { padding-left: 20px; }
.jbs-bill-rows__group ~ .jbs-bill-rows__row--sub dt { flex-basis: 88px; }
.jbs-bill-rows__row--total ~ .jbs-bill-rows__row {
  padding-left: 0;
  border-left: 0;
}
.jbs-bill-rows__row--total ~ .jbs-bill-rows__row dt { flex-basis: 110px; }
.jbs-bill-rows__row--discount dd { color: var(--jbs-price); }

.jbs-bill-rows__row--sub {
  padding-top: 1px;
  padding-bottom: 1px;
  font-size: 12px;
}
.jbs-bill-rows__row--sub dt,
.jbs-bill-rows__row--sub dd { color: var(--jbs-card-label); }

/* 主題沒有淺色 token,底色用 ::before 疊主題色 8%。整列滿版:左右外推到 .jbs-bill-detail__section 的 padding(12px)
   再內縮同樣的量,文字才和上下列同一條左邊線;section 的 padding 改了這裡一起改 */
.jbs-bill-rows__row--total,
.jbs-bill-rows__group ~ .jbs-bill-rows__row--total {
  position: relative;
  z-index: 0;
  align-items: center;
  margin: 8px -12px 4px;
  padding: 6px 12px;
  border-left: 0;
}
.jbs-bill-rows__group ~ .jbs-bill-rows__row--total dt { flex-basis: 110px; }
.jbs-bill-rows__row--total dt,
.jbs-bill-rows__row--total dd { line-height: var(--jbs-total-line-height); }
.jbs-bill-rows__row--total dt {
  font-size: 15px;
  font-weight: 700;
  color: var(--jbs-card-name);
}
[data-jbs-theme^="app-"] .jbs-bill-rows__row--total::before {
  background: var(--jbs-total-bg);
  opacity: 1;
}
.jbs-bill-rows__row--total::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  background: var(--jbs-price);
  border-radius: inherit;
  opacity: .08;
}
.jbs-bill-rows__row--total dd {
  font-size: 20px;
  font-weight: 700;
  color: var(--jbs-card-number);
}

.jbs-bill-rows__note {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--jbs-card-text);
}

.jbs-bill-rows__account-line { display: block; }
/* 跟 .jbs-icon-btn 一起用。點擊範圍往左長、右緣停在鈕邊:帳號那行常排到欄位右緣,往右撐會讓欄位能橫向捲動 */
.jbs-copy-btn {
  width: 30px;
  height: 26px;
  color: var(--jbs-price);
  background: var(--jbs-card-bg);
  border: 1px solid var(--jbs-price);
  border-radius: var(--jbs-radius-btn);
}
.jbs-copy-btn::before {
  left: auto;
  right: 0;
  width: 40px;
  height: 40px;
  transform: translateY(-50%);
}

.jbs-bill-rows__copy {
  margin: -4px 0 -4px 6px;
  vertical-align: middle;
}

.jbs-bill-rows__account + .jbs-bill-rows__account { margin-top: 8px; }

/* 內容是縮圖(沒有文字基線)時,標籤對齊頂端 */
.jbs-bill-rows__row--top { align-items: flex-start; }

.jbs-bill-detail__actions {
  display: flex;
  flex-wrap: wrap;
  margin-top: 14px;
}
.jbs-bill-detail__actions > * { margin: 0 8px 8px 0; }

.jbs-bill-rows__row dd.jbs-bill-rows__price {
  font-weight: 700;
  color: var(--jbs-price);
}

.jbs-bill-rows--recipient {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--jbs-border-card);
}

.jbs-bill-detail__remark {
  display: flex;
  align-items: flex-start;
  margin-top: 12px;
  padding: 8px 10px;
  background: var(--jbs-bg-page);
  border-radius: 4px;
}
.jbs-bill-detail__remark-text {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--jbs-card-text);
  word-break: break-word;
  white-space: pre-line;
}
.jbs-bill-detail__remark-text > span { color: var(--jbs-card-name); }
.jbs-bill-detail__remark .jbs-icon-btn { flex: 0 0 auto; margin-left: auto; }

/* ── 表單欄位(對話框內)──────────────────────────────────────────────── */

.jbs-field__label {
  display: block;
  padding: 0;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--jbs-text-strong);
}

/* 16px:iOS 小於 16px 的輸入框聚焦時會整頁放大 */
.jbs-field__input {
  display: block;
  width: 100%;
  padding: 10px 12px;
  font-size: 16px;
  color: var(--jbs-text-strong);
  background: var(--jbs-card-bg);
  border: 1px solid var(--jbs-border-card);
  border-radius: 8px;
}
.jbs-field__input:focus {
  border-color: var(--jbs-focus-border);
  outline: var(--jbs-focus-outline);
  outline-offset: 1px;
  box-shadow: var(--jbs-focus-glow);
}

.jbs-field__input--code {
  font-size: 22px;
  text-align: center;
  letter-spacing: .4em;
}

.jbs-field__format {
  margin-top: 6px;
  font-size: 13px;
  color: var(--jbs-text-label);
}

.jbs-field__error {
  margin-top: 6px;
  font-size: 13px;
  color: var(--jb-text-error);
}

.jbs-field__hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--jbs-text-label);
}

/* ── 短暫提示 ───────────────────────────────────────────────────────────── */

.jbs-toast {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 50%;
  z-index: var(--jb-z-toast);
  padding: 8px 16px;
  font-size: 13px;
  color: var(--jb-text-on-fill);
  background: rgba(0, 0, 0, .8);
  border-radius: 20px;
  transform: translateX(-50%);
}

/* 等待中:前面加轉圈圈、不自動消失,300ms 後才淡入(很快就好的不會閃一下);不擋點擊 */
@keyframes jbs-spin { to { transform: rotate(360deg); } }
@keyframes jbs-pulse { 50% { opacity: .35; } }

.jbs-toast--busy {
  display: flex;
  align-items: center;
  max-width: calc(100vw - 32px);
  pointer-events: none;
  animation: jbs-fade-in .15s ease-out .3s both;
}

.jbs-toast__spinner {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: var(--jb-text-on-fill);
  border-radius: 50%;
  animation: jbs-spin .8s linear infinite;
}

/* 減少動態效果時 reset.css 改成明暗閃爍(要 !important 壓過它自己的全域規則),這裡只把圈補滿 */
@media (prefers-reduced-motion: reduce) {
  .jbs-toast__spinner { border-color: var(--jb-text-on-fill); }
}

/* ── 匯款憑證上傳 / 超商條碼(對話框內)──────────────────────────────── */

.jbs-upload__preview {
  display: block;
  max-width: 100%;
  max-height: 50vh;
  margin: 0 auto 12px;
  object-fit: contain;
}

.jbs-upload__zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  padding: 16px;
  font-size: 14px;
  color: var(--jbs-card-label);
  text-align: center;
  background: var(--jb-bg-muted);
  border: 1px dashed var(--jbs-border-card);
  border-radius: 8px;
  cursor: pointer;
}
.jbs-upload__preview:not([hidden]) + .jbs-upload__zone { display: none; }
.jbs-upload__plus { font-size: 28px; line-height: 1; }
.jbs-upload__plus + * { margin-top: 6px; }

.jbs-upload__actions {
  display: flex;
  justify-content: center;
}
.jbs-upload__actions > * + * { margin-left: 8px; }
.jbs-modal__footer > .jbs-upload__actions { margin-left: 0; }

.jbs-barcode img {
  margin: 0 auto 8px;
}

/* ── 頁尾(pay/_footer_jbs.html、pay/brand_shop/_footer_jbs.html)──────── */

.jbs-footer {
  padding: 30px 0 10px;
  color: var(--jbs-footer-text);
  text-align: center;
  background: var(--jbs-footer-bg);
  border-top: 3px solid var(--jbs-footer-border);
}

.jbs-footer__inner {
  max-width: 1180px;
  margin: 0 auto;
}

.jbs-footer__logo {
  display: inline-block;
  margin-bottom: 8px;
  vertical-align: top;
}

.jbs-footer__logo-link {
  display: block;
  width: 156px;
}
.jbs-footer__logo-link img {
  width: 100%;
  opacity: .35;
  filter: grayscale(1);
}
.jbs-footer__logo-link:hover img {
  opacity: 1;
  filter: none;
}

.jbs-footer__nav {
  word-break: break-word;
}

.jbs-footer__nav-item {
  display: inline-block;
  margin: 2px 8px;
}

.jbs-footer__legal > * + * { margin-left: 8px; }

.jbs-footer__social {
  margin-top: 5px;
}

.jbs-footer__social li {
  display: inline-block;
  padding-left: 10px;
  vertical-align: top;
}

.jbs-footer__social img {
  width: 26px;
  height: 26px;
}

.jbs-brand-footer {
  padding: 30px 0 10px;
  color: var(--jbs-footer-text);
  background: var(--jbs-footer-bg);
  border-top: 3px solid var(--jbs-footer-border);
}

.jbs-brand-footer__inner {
  max-width: 1180px;
  margin: 0 auto;
}

.jbs-brand-footer__shop-logo img {
  width: auto;
  height: 50px;
  margin: 20px 0 0 10px;
}

.jbs-brand-footer__sections {
  display: flex;
  flex-direction: column;
}

.jbs-brand-footer__section {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  margin-bottom: 10px;
  padding: 10px;
}

/* 不用 display:none:要留在 Tab 順序裡,鍵盤才能展開 */
.jbs-brand-footer__toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.jbs-brand-footer__title {
  margin-bottom: 10px;
  padding-bottom: 5px;
  font-size: 16px;
  font-weight: 600;
  color: var(--jbs-bf-title);
  border-bottom: 1px solid var(--jbs-bf-title-line);
}

.jbs-brand-footer__label {
  display: block;
  cursor: pointer;
}
.jbs-brand-footer__label::after {
  content: '-';
  float: right;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  font-size: 15px;
  font-weight: bold;
  line-height: 20px;
  text-align: center;
  color: var(--jbs-bf-toggle-text);
  background: var(--jbs-bf-toggle-bg);
}
.jbs-brand-footer__toggle:checked ~ .jbs-brand-footer__title .jbs-brand-footer__label::after { content: '+'; }
.jbs-brand-footer__toggle:checked ~ .jbs-brand-footer__body { display: none; }
.jbs-brand-footer__toggle:focus ~ .jbs-brand-footer__title .jbs-brand-footer__label {
  outline: 2px solid var(--jb-color-focus-ring);
  outline-offset: 2px;
}

.jbs-brand-footer__body {
  font-size: 14.4px;
  line-height: 25px;
  word-break: break-word;
}

.jbs-brand-footer__policy {
  display: block;
  width: 100%;
  font-size: 16px;
  line-height: inherit;
  text-align: left;
}

.jbs-brand-footer__social {
  display: flex;
  margin: 20px 0 0 10px;
}

.jbs-brand-footer__social-link {
  flex: 0 0 auto;
  margin-right: 10px;
}

.jbs-brand-footer__social-link svg {
  width: 30px;
  height: 30px;
  padding: 1px;
  fill: var(--jbs-bf-social-fill);
  background: var(--jbs-bf-social-bg);
  border-radius: 50%;
}

.jbs-brand-footer__copyright {
  padding: 10px;
  font-size: 12px;
  color: var(--jbs-bf-copyright);
}

/* ── 語言 / 幣別選擇器(pay/_buyer_picker_jbs.html)──────────────────────── */

.jbs-buyer-picker {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 3px 6px;
  vertical-align: middle;
  background: var(--jb-color-white);
  border: 1px solid var(--jbs-picker-border);
  border-radius: 4px;
}
.jbs-buyer-picker > * + * { margin-left: 6px; }

.jbs-buyer-picker__item {
  position: relative;
  display: inline-flex;
}

.jbs-buyer-picker__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: bold;
  line-height: 1;
  color: var(--jbs-text-strong);
}
/* 視覺維持小膠囊,點擊範圍撐到 44px */
.jbs-buyer-picker__btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  min-width: 44px;
  min-height: 44px;
  transform: translate(-50%, -50%);
}

.jbs-buyer-picker__flag {
  display: block;
  border: 1px solid rgba(0, 0, 0, .1);
}

.jbs-buyer-picker__menu {
  position: absolute;
  top: 100%;
  left: 50%;
  z-index: var(--jb-z-dropdown);
  margin-top: 8px;
  padding: 4px 0;
  white-space: nowrap;
  background: var(--jb-color-white);
  border: 1px solid var(--jbs-picker-border);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
  transform: translateX(-50%);
}

.jbs-buyer-picker__option {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--jbs-text-strong);
  cursor: pointer;
}
.jbs-buyer-picker__option > * + * { margin-left: 6px; }
.jbs-buyer-picker__option:hover,
.jbs-buyer-picker__option:focus { background: var(--jbs-bg-page); }

.jbs-buyer-picker__divider {
  width: 1px;
  height: 14px;
  background: var(--jbs-picker-border);
}

/* ── 切換帳號 modal ────────────────────────────────────────────────────── */

.jbs-logout { padding: 0 16px; }

.jbs-logout__row {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 0;
  font-size: 16px;
  line-height: 1.4;
  color: var(--jbs-text-strong);
}
.jbs-logout__row + .jbs-logout__row { border-top: 1px solid var(--jbs-border-card); }
.jbs-logout__row > .jbs-icon { flex: 0 0 auto; margin-right: 12px; font-size: 20px; color: var(--jbs-text-strong); }
.jbs-logout__row > span { flex: 1 1 auto; min-width: 0; word-break: break-word; }
.jbs-logout__row::after {
  content: '\203A';
  flex: 0 0 auto;
  margin-left: 8px;
  font-size: 22px;
  line-height: 1;
  color: var(--jbs-card-label);
}

/* ── 庫存不足 / 請確認訂單(置中提示框)──────────────────────────────── */

.jbs-shortage__icon {
  display: block;
  width: 48px;
  height: 48px;
  margin: 8px auto 12px;
  font-size: 30px;
  font-weight: 700;
  line-height: 48px;
  color: var(--jbs-text-heading);
  text-align: center;
  background: var(--jbs-badge-warning-bg);
  border-radius: 50%;
}
.jbs-shortage__icon::before { content: '!'; }

.jbs-shortage__section + .jbs-shortage__section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--jbs-border-card);
}

.jbs-shortage__text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--jbs-text-body);
  word-break: break-word;
}

.jbs-shortage__names {
  margin-top: 12px;
  padding: 10px 12px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--jbs-text-strong);
  word-break: break-word;
  background: var(--jbs-bg-page);
  border-radius: 8px;
}

@media (min-width: 641px) {
  .jbs-site-header__cart { display: none; }
}

@media (min-width: 769px) {
  .jbs-site-header__inner {
    flex-wrap: nowrap;
    min-height: 64px;
    padding: 0 24px;
  }

  .jbs-site-header__logo {
    width: 120px;
    margin-bottom: 0;
  }
  .jbs-site-header__logo--brand { width: 130px; }

  .jbs-site-header__title,
  .jbs-site-header__tools { margin-bottom: 0; }
  .jbs-site-header__tools { min-width: 0; }

  .jbs-main-menu__list {
    justify-content: center;
    padding: 0 24px;
  }

  .jbs-main-menu__item { flex: 0 1 auto; }

  .jbs-main-menu__link {
    min-height: 48px;
    padding: 4px 30px;
    font-size: 15px;
  }
  .jbs-main-menu__link.is-current::after {
    right: 20px;
    left: 20px;
  }

  .jbs-site-header__tools > * + * { margin-left: 12px; }
  .jbs-site-header__shop .jbs-icon { margin-right: 4px; }
  .jbs-site-header__shop-text {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }
  .jbs-account__avatar {
    width: 32px;
    height: 32px;
  }
  .jbs-account__toggle .jbs-dot {
    top: 5px;
    left: 24px;
  }
  .jbs-site-header__tools { margin-left: 12px; }
  .jbs-account__toggle > * + * { margin-left: 6px; }
  .jbs-buyer-picker { padding: 3px 10px; }
  .jbs-buyer-picker > * + * { margin-left: 8px; }
  .jbs-site-header__title {
    margin-left: 16px;
    padding-left: 16px;
  }
  .jbs-account__name { font-size: 14px; }
  .jbs-account__id { font-size: 12px; }

  .jbs-modal__subtitle { margin-left: 0; }

  .jbs-page { padding: 0 24px; }

  .jbs-bill-list {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    grid-gap: 14px;
    margin: 22px 0 44px;
  }
  .jbs-bill-card__head { padding: 12px 16px; }
  .jbs-bill-card__avatar { width: 88px; height: 88px; }
  .jbs-bill-card__money { padding: 9px 16px; }
  .jbs-bill-card__total { font-size: 24px; }
  .jbs-page > .jbs-ad-carousel { margin: 0 -10px 24px; }

  .jbs-order-list,
  .jbs-order-list__link {
    max-width: 1080px;
    margin-right: auto;
    margin-left: auto;
  }
  .jbs-order-list { grid-gap: 20px; margin-top: 24px; }
  .jbs-order-card__logo { width: 88px; height: 88px; }
  .jbs-order-card__contact { display: inline-flex; margin-right: 16px; }

  .jbs-notice__icon,
  .jbs-notice__logo {
    display: inline-block;
    margin: 0 25px 0 0;
    vertical-align: middle;
  }
  .jbs-notice__text { text-align: left; }
  .jbs-notice__disc {
    display: inline-flex;
    margin: 0 25px 0 0;
    vertical-align: middle;
  }

  .jbs-footer {
    text-align: left;
  }

  .jbs-footer__inner {
    display: flex;
    align-items: center;
    padding: 0 24px;
  }

  .jbs-footer__logo { margin-bottom: 0; }
  .jbs-footer__logo-link { width: 154px; }

  .jbs-footer__main {
    flex: 0 1 auto;
    min-width: 0;
    padding-left: 20px;
  }
  .jbs-footer__nav { margin: 0 -8px; }

  .jbs-footer__social {
    flex: 0 0 auto;
    margin-left: auto;
  }

  .jbs-brand-footer__shop-logo img {
    width: 160px;
    margin-left: 0;
  }

  /* 區塊自帶 10px 外距,加起來和頁首、頁面主體一樣內縮 24px */
  .jbs-brand-footer__inner { padding: 0 14px; }
  .jbs-brand-footer__sections { flex-direction: row; }
  .jbs-brand-footer__section { margin-bottom: 0; }
  .jbs-brand-footer__toggle { display: none; }
  .jbs-brand-footer__label { cursor: auto; }
  .jbs-brand-footer__label::after { display: none; }
  .jbs-brand-footer__toggle:checked ~ .jbs-brand-footer__body { display: block; }

  .jbs-brand-footer__body {
    font-size: 16px;
  }
  .jbs-brand-footer__body p { margin: 5px 0; }

  .jbs-brand-footer__copyright {
    margin-left: 10px;
    padding: 30px 0 80px;
    font-size: 18px;
  }
}

/* 769–1023 先收 logo,寬度留給帳號的名字與 ID */
@media (min-width: 1024px) {
  .jbs-site-header__logo { width: 140px; }
  .jbs-site-header__logo--brand { width: 170px; }
}

/* ── 頻道卡片(channel/_channel_card_jbs.html)──────────────────────────── */

.jbs-channel-columns {
  display: flex;
  align-items: flex-start;
  margin: 0 10px 24px;
}

.jbs-channel-columns__col {
  flex: 1 1 0;
  min-width: 0;
}

.jbs-channel-columns__col + .jbs-channel-columns__col { margin-left: 18px; }

.jbs-channel-columns__ad,
.jbs-channel-card { margin-bottom: 20px; }

.jbs-channel-columns__ad .jbs-ad-carousel {
  overflow: hidden;
  border-radius: 10px;
}

.jbs-channel-card__media {
  position: relative;
  height: 300px;
  overflow: hidden;
  background: var(--jb-bg-muted);
  border-radius: 10px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.35);
}

.jbs-channel-card__cover,
.jbs-channel-card__thumb {
  display: block;
  width: 100%;
  height: 100%;
}

.jbs-channel-card__thumb { object-fit: cover; }

.jbs-channel-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
}

.jbs-channel-card__badge {
  position: absolute;
  top: 20px;
  right: -6px;
  width: 56px;
}

.jbs-channel-card__avatar {
  position: absolute;
  top: 5px;
  left: 6px;
  width: 60px;
  height: 60px;
}

.jbs-channel-card__avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 3px solid #097fef;
  border-radius: 50%;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.62);
}

.jbs-channel-card__avatar--ig .jbs-channel-card__avatar-img { border-color: #ffaa00; }

.jbs-channel-card__platform {
  position: absolute;
  left: -2px;
  bottom: -4px;
  width: 26px;
  height: 26px;
}

.jbs-channel-card__info {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 36px 6px 8px;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 61%, rgba(0, 0, 0, 0.9) 100%);
  pointer-events: none;
}

.jbs-channel-card__info > * { pointer-events: auto; }

/* 愛心:28 格的序列圖,按下時播一次 */
.jbs-channel-card__follow {
  position: absolute;
  top: -16px;
  left: -5px;
  width: 60px;
  height: 60px;
  padding: 0;
  background: url('../img/channel/heart.png') left center / 2900% no-repeat;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.jbs-channel-card__follow[aria-pressed="true"] {
  background-position: right center;
  -webkit-animation: jbs-heart-blast 0.8s steps(28) 1;
  animation: jbs-heart-blast 0.8s steps(28) 1;
}

@-webkit-keyframes jbs-heart-blast {
  0% { background-position: left center; }
  100% { background-position: right center; }
}

@keyframes jbs-heart-blast {
  0% { background-position: left center; }
  100% { background-position: right center; }
}

.jbs-channel-card__name {
  overflow: hidden;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.jbs-channel-card__stats {
  display: flex;
  margin-top: 4px;
  font-size: 12px;
}

.jbs-channel-card__stats li {
  display: flex;
  align-items: center;
  min-width: 0;
}

.jbs-channel-card__stats li + li { margin-left: 30px; }
.jbs-channel-card__stats .jbs-icon { margin-right: 4px; font-size: 14px; }

.jbs-channel-card__desc {
  display: -webkit-box;
  min-height: 3em;
  margin: 12px 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.5;
  color: var(--jbs-text-body);
  word-break: break-word;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.jbs-channel-card__media + .jbs-channel-card__shop { margin-top: 12px; }

.jbs-channel-card__shop {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 88%;
  margin: 0 auto;
}

.jbs-channel { padding-top: 10px; }

.jbs-channel-title {
  display: flex;
  align-items: center;
  margin: 8px 10px 14px;
  font-size: 20px;
  font-weight: 600;
  color: var(--jbs-text-heading);
}

.jbs-channel-title > * + * { margin-left: 6px; }

.jbs-channel-title__icon {
  display: flex;
  flex: 0 0 auto;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  background: var(--jbs-accent);
  border-radius: 50%;
}

.jbs-channel-title__icon img {
  display: block;
  width: 24px;
  height: 20px;
}

.jbs-channel-title__count { color: var(--jbs-price); }

.jbs-live-strip {
  display: flex;
  margin-bottom: 14px;
  padding: 0 10px 6px;
  scroll-padding: 0 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  -ms-scroll-snap-type: x mandatory;
  scroll-snap-type: x mandatory;
}

.jbs-live-strip__item {
  position: relative;
  flex: 0 0 100px;
  height: 175px;
  margin-right: 12px;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.35);
  scroll-snap-align: start;
}

.jbs-live-strip__cover,
.jbs-live-strip__thumb {
  display: block;
  width: 100%;
  height: 100%;
}

.jbs-live-strip__thumb { object-fit: cover; }

.jbs-live-strip__play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
}

.jbs-live-strip__badge {
  position: absolute;
  top: 8px;
  right: -4px;
  width: 38px;
}

.jbs-live-strip__avatar {
  position: absolute;
  top: 5px;
  left: 7px;
  width: 40px;
  height: 40px;
}

.jbs-live-strip__avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 2px solid #097fef;
  border-radius: 50%;
}

.jbs-live-strip__avatar--ig .jbs-live-strip__avatar-img { border-color: #ffaa00; }

.jbs-live-strip__platform {
  position: absolute;
  left: -4px;
  bottom: -6px;
  width: 20px;
  height: 20px;
}

.jbs-live-strip__info {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 20px 5px 5px;
  font-size: 12px;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 61%, rgba(0, 0, 0, 0.9) 100%);
  pointer-events: none;
}

.jbs-live-strip__name {
  overflow: hidden;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.jbs-live-strip__views {
  display: flex;
  align-items: center;
}

.jbs-live-strip__views .jbs-icon { margin-right: 4px; }

.jbs-reward-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  min-height: 50px;
  margin: -10px 0 10px;
  padding: 6px 10px;
  font-size: 16px;
  color: #fff;
  background: linear-gradient(180deg, #634ce4 0%, #204385 100%);
}

.jbs-reward-bar > * + * { margin-left: 4px; }
.jbs-reward-bar__coin { width: 20px; height: 20px; }

.jbs-reward-bar__points {
  font-size: 20px;
  color: #ffd800;
}

.jbs-reward-bar__history {
  margin-left: 12px;
  padding: 4px 10px;
  font-size: 16px;
  color: var(--jbs-text-strong);
  background: #f6bb43;
  border: 2px solid #fff;
  border-radius: var(--jbs-radius-btn);
  cursor: pointer;
}

/* 紅利點數歷史紀錄:整片淺灰底,最上面白色點數卡;月份列與點數卡區塊左右推到 modal body 的 padding(16px)邊,兩個值要一起改 */
.jbs-reward-logs {
  padding-top: 0;
  background: var(--jb-color-gray-50);
}

.jbs-reward-logs__hero {
  margin: 0 -16px;
  padding: 14px 16px;
  background: var(--jb-color-gray-100);
}

.jbs-reward-logs__card {
  padding: 16px 18px;
  background: var(--jbs-card-bg);
  border-radius: 12px;
  box-shadow: var(--jbs-card-shadow);
}

.jbs-reward-logs__label {
  font-size: 15px;
  font-weight: 700;
  color: var(--jbs-card-label);
}

.jbs-reward-logs__balance {
  margin-top: 2px;
  font-size: 36px;
  line-height: 1.15;
  font-weight: 700;
  color: var(--jbs-price);
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}

.jbs-reward-logs__expiry {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--jbs-border-card);
}
.jbs-reward-logs__expiry > * + * { margin-left: 10px; }

.jbs-reward-logs__expiry-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--jbs-card-text);
}

.jbs-reward-logs__expiry-date {
  font-size: 14px;
  font-weight: 700;
  color: var(--jbs-price);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.jbs-reward-logs__expiry-points {
  margin-left: auto;
  font-size: 18px;
  font-weight: 700;
  color: var(--jbs-price);
  font-variant-numeric: tabular-nums;
}

.jbs-reward-logs__empty { padding-top: 16px; }

.jbs-reward-logs__month {
  margin: 0 -16px;
  padding: 7px 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--jb-color-gray-800);
  background: var(--jb-color-gray-200);
  font-variant-numeric: tabular-nums;
}

.jbs-reward-logs__item + .jbs-reward-logs__item { border-top: 1px solid var(--jbs-border-card); }

.jbs-reward-logs__row {
  display: grid;
  grid-template-columns: minmax(44px, auto) minmax(0, 1fr) auto 18px;
  grid-column-gap: 10px;
  grid-row-gap: 2px;
  align-items: baseline;
  width: 100%;
  padding: 10px 0;
  font: inherit;
  text-align: left;
  color: var(--jbs-card-name);
  background: none;
  border: 0;
  cursor: pointer;
}

.jbs-reward-logs__date {
  grid-column: 1;
  font-size: 14px;
  color: var(--jbs-card-label);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.jbs-reward-logs__title {
  grid-column: 2;
  font-size: 15px;
  font-weight: 700;
  word-break: break-word;
}

.jbs-reward-logs__points {
  grid-column: 3;
  font-size: 17px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.jbs-reward-logs__points--add { color: var(--jb-text-success); }

.jbs-reward-logs__expires {
  grid-column: 2;
  grid-row: 2;
  font-size: 13px;
  color: var(--jbs-card-text);
}
.jbs-reward-logs__expires--soon {
  font-weight: 700;
  color: var(--jbs-price);
}

.jbs-reward-logs__running {
  grid-column: 3;
  grid-row: 2;
  font-size: 13px;
  color: var(--jbs-card-text);
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.jbs-reward-logs__chevron {
  grid-column: 4;
  grid-row: 1;
  align-self: center;
  justify-self: center;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--jbs-card-label);
  border-bottom: 2px solid var(--jbs-card-label);
  transform: translateY(-2px) rotate(45deg);
}
.jbs-reward-logs__row[aria-expanded="true"] .jbs-reward-logs__chevron { transform: translateY(2px) rotate(-135deg); }

.jbs-reward-logs__detail {
  margin: 0 0 12px;
  padding: 2px 14px;
  font-size: 14px;
  background: var(--jbs-addon-bg);
  border-radius: 8px;
}
.jbs-reward-logs__detail > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 8px 0;
}
.jbs-reward-logs__detail > div + div { border-top: 1px solid var(--jbs-border-card); }
.jbs-reward-logs__detail dt {
  flex: 0 0 auto;
  margin-right: 12px;
  color: var(--jbs-card-text);
}
.jbs-reward-logs__detail dd {
  min-width: 0;
  color: var(--jbs-card-name);
  text-align: right;
  word-break: break-word;
}

.jbs-checkin__header {
  padding: 15px 40px;
  text-align: center;
  line-height: 1.3;
  color: var(--jb-text-on-fill);
  background: var(--jbs-cta-bg);
}

.jbs-checkin__title { font-size: 22px; font-weight: 600; }
.jbs-checkin__subtitle span,
.jbs-checkin__signed span { font-size: 20px; font-weight: 600; }

.jbs-checkin__body { text-align: center; }
.jbs-checkin__body > * + * { margin-top: 10px; }
.jbs-checkin__date { font-size: 18px; font-weight: 600; }

.jbs-checkin__bonus {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  font-weight: 600;
  color: var(--jbs-price);
}

.jbs-checkin__bonus img { width: 36px; height: 36px; margin-right: 8px; }

.jbs-channel-popup .jbs-modal__panel { padding: 0; overflow: hidden; }

/* ── 頻道賣場頁(channel/detail.html)────────────────────────────────────── */

.jbs-store__name {
  margin: 0 8px 8px;
  font-size: 20px;
  font-weight: 600;
  color: var(--jbs-text-heading);
}

.jbs-store__intro {
  display: flex;
  align-items: flex-start;
  margin: 0 10px 24px;
}

.jbs-store-hero {
  position: relative;
  flex: 0 0 46%;
  height: 300px;
  overflow: hidden;
  background: var(--jb-bg-muted);
  border-radius: 10px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.35);
}

.jbs-store-hero__cover,
.jbs-store-hero__thumb {
  display: block;
  width: 100%;
  height: 100%;
}

.jbs-store-hero__thumb { object-fit: cover; }

.jbs-store-hero__play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
}

.jbs-store-hero__badge {
  position: absolute;
  top: 20px;
  right: -6px;
  width: 56px;
}

.jbs-store-hero__avatar {
  position: absolute;
  top: 5px;
  left: 6px;
  width: 60px;
  height: 60px;
}

.jbs-store-hero__avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 3px solid #097fef;
  border-radius: 50%;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.62);
}

.jbs-store-hero__avatar--ig .jbs-store-hero__avatar-img { border-color: #ffaa00; }

.jbs-store-hero__platform {
  position: absolute;
  left: -2px;
  bottom: -4px;
  width: 26px;
  height: 26px;
}

.jbs-store-hero__info {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 36px 6px 8px;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 61%, rgba(0, 0, 0, 0.9) 100%);
  pointer-events: none;
}

.jbs-store-hero__info > * { pointer-events: auto; }

.jbs-store-hero__name {
  overflow: hidden;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.jbs-store-hero__stats {
  display: flex;
  align-items: center;
  margin-top: 4px;
  font-size: 12px;
}

.jbs-store-hero__stats .jbs-icon { margin-right: 4px; font-size: 14px; }

.jbs-store__side {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  min-width: 0;
  min-height: 300px;
  margin-left: 16px;
}

.jbs-store__desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--jbs-text-body);
  white-space: pre-wrap;
  word-break: break-word;
}

.jbs-store__actions { margin-top: auto; padding: 16px 0 24px; }
.jbs-store__actions > li + li { margin-top: 14px; }

.jbs-store__btn {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 40px;
  padding: 6px 12px;
  font-size: 16px;
  color: var(--jb-text-on-fill);
  border-radius: var(--jbs-radius-btn);
  box-shadow: var(--jbs-cta-shadow);
}

.jbs-store__btn > * + * { margin-left: 6px; }
.jbs-store__btn span { min-width: 0; word-break: break-word; }
.jbs-store__btn img { width: 20px; height: 20px; }
/* 連到粉專,用 FB 藍不跟主題;壓暗到 16px 白字也有 4.5:1(#1877f2 只有 4.2:1) */
.jbs-store__btn--contact { background: #1565d8; }
.jbs-store__btn--mall { background: var(--jbs-cta-bg); }

.jbs-store__status {
  font-size: 14px;
  color: var(--jbs-text-body);
}

.jbs-store-products { margin: 0 10px 24px; }

.jbs-store-products__head {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.jbs-store-products__head > * + * { margin-left: 6px; }

.jbs-store-products__title {
  min-width: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--jbs-text-heading);
  overflow-wrap: break-word;
}

.jbs-store-legend { position: relative; }

.jbs-store-legend__toggle {
  font-style: italic;
  font-weight: 600;
  color: var(--jb-text-on-fill);
  background: var(--jbs-text-label);
  border-radius: 50%;
}

.jbs-store-legend__list {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 5;
  min-width: 140px;
  padding: 8px 12px;
  background: var(--jbs-card-bg);
  border: 1px solid var(--jbs-border-card);
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.jbs-store-legend__list li {
  display: flex;
  align-items: center;
  font-size: 14px;
}

.jbs-store-legend__list li + li { margin-top: 6px; }
.jbs-store-legend__list img { width: 24px; height: 24px; margin-right: 8px; }

.jbs-store-search {
  display: flex;
  max-width: 480px;
  margin-bottom: 14px;
}

.jbs-store-search__input {
  flex: 1 1 0;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  font-size: 16px;
  line-height: normal;
  background: var(--jbs-card-bg);
  border: 1px solid var(--jbs-border-card);
  border-right: 0;
  border-radius: var(--jbs-radius-btn) 0 0 var(--jbs-radius-btn);
}

.jbs-store-search > .jbs-btn {
  flex: 0 0 auto;
  border-radius: 0 var(--jbs-radius-btn) var(--jbs-radius-btn) 0;
}

.jbs-commodity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  grid-gap: 12px;
}

.jbs-commodity-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-bottom: 10px;
  overflow: hidden;
  background: var(--jbs-card-bg);
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.jbs-commodity-card__media {
  position: relative;
  padding-top: 100%;
  background: var(--jb-bg-muted);
}

.jbs-commodity-card__photo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jbs-commodity-card__badges {
  position: absolute;
  top: 6px;
  left: 6px;
  display: flex;
}

.jbs-commodity-card__badges img { width: 28px; height: 28px; margin-right: 4px; }

.jbs-commodity-card__name,
.jbs-commodity-card__price,
.jbs-commodity-card__sub { margin: 8px 10px 0; }

.jbs-commodity-card__name {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.4;
  color: var(--jbs-text-strong);
  word-break: break-word;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.jbs-commodity-card__price {
  font-size: 16px;
  font-weight: 600;
  color: var(--jbs-price);
}

.jbs-commodity-card__sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--jbs-text-label);
}

.jbs-commodity-card__buy,
.jbs-commodity-card__soldout { margin: auto 10px 0; }

.jbs-commodity-card__buy { margin-top: 10px; }

.jbs-commodity-card__soldout {
  display: block;
  padding: 10px 0;
  text-align: center;
  color: var(--jb-text-on-fill);
  background: #a4a9ae;
  border-radius: 4px;
}

.jbs-store-products__foot {
  margin-top: 16px;
  text-align: center;
  color: var(--jbs-text-body);
}

.jbs-store-products__head > .jbs-store-category {
  position: relative;
  flex-shrink: 0;
  margin-left: auto;
  padding-left: 12px;
}

.jbs-store-category__toggle { white-space: nowrap; }

.jbs-store-category__chevron {
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.jbs-store-category__toggle[aria-expanded="true"] .jbs-store-category__chevron { transform: translateY(1px) rotate(-135deg); }

.jbs-store-category__menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 21;
  width: 220px;
  max-height: 60vh;
  padding: 8px 0;
  overflow-y: auto;
  background: var(--jbs-card-bg);
  border: 1px solid var(--jbs-border-card);
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.jbs-store-category__menu a,
.jbs-store-category__group summary {
  display: block;
  padding: 10px 16px;
  font-size: 15px;
  color: var(--jbs-text-strong);
  cursor: pointer;
}

.jbs-store-category__group ul a { padding-left: 30px; font-size: 14px; }
.jbs-store-category__menu a.is-current { font-weight: 600; color: var(--jbs-price); }

/* ── 商店頁(pay/shop.html):經典版與主題版共用 ─────────────────────────── */

.jbs-shop__banner { display: block; margin: 0 0 12px; }
.jbs-shop__banner-img { display: block; width: 100%; height: auto; }
/* 同結帳頁的店家橫幅:賣家上傳的圖常帶字,桌機限高但不裁切 */
@media (min-width: 961px) {
  .jbs-shop__banner--store .jbs-shop__banner-img { max-height: 360px; object-fit: contain; }
}

.jbs-shop__bar {
  display: flex;
  align-items: center;
  margin: 0 10px 10px;
}
.jbs-shop__name {
  flex: 1 1 0;
  min-width: 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--jbs-text-heading);
  word-break: break-word;
}
.jbs-shop__list-title { font-size: 18px; }
.jbs-shop__search { margin: 0 10px 14px; }
.jbs-shop__banner--flush { margin-bottom: 0; }

.jbs-shop-head {
  padding: 14px 14px 4px;
  background: var(--jbs-card-bg);
}
.jbs-shop-head--end { margin-bottom: 12px; padding-bottom: 14px; }

.jbs-store-search--field {
  position: relative;
  max-width: none;
  margin: 12px 0 0;
}
.jbs-store-search--field .jbs-store-search__input {
  height: 40px;
  padding: 0 12px 0 40px;
  background: var(--jbs-bg-page);
  border: 1px solid transparent;
  border-radius: 8px;
}
.jbs-store-search--field .jbs-store-search__input:focus {
  background: var(--jbs-card-bg);
  border-color: var(--jbs-focus-border);
  outline: var(--jbs-focus-outline);
  box-shadow: var(--jbs-focus-glow);
}
.jbs-store-search__submit {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 18px;
  color: var(--jbs-text-label);
  background: none;
  border: 0;
  cursor: pointer;
}

/* 手機分類列:左右滑;往下捲黏在頁首下(top 由 shop.js 量頁首高度) */
.jbs-shop-cats {
  position: -webkit-sticky;
  position: sticky;
  top: var(--jbs-shop-cats-top, 0);
  z-index: var(--jb-z-sticky);
  margin-bottom: 12px;
}
.jbs-shop-cats__bar {
  position: relative;
  display: flex;
  background: var(--jbs-card-bg);
  border-bottom: 1px solid var(--jbs-border-card);
}
.jbs-shop-cats__strip {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.jbs-shop-cats__strip::-webkit-scrollbar { display: none; }
.jbs-shop-cats__strip > li { flex: 0 0 auto; }
.jbs-shop-cats__tab {
  position: relative;
  display: flex;
  align-items: center;
  height: 46px;
  padding: 0 14px;
  font-size: 16px;
  white-space: nowrap;
  color: var(--jbs-text-strong);
  background: none;
  border: 0;
  cursor: pointer;
}
.jbs-shop-cats__label {
  display: block;
  max-width: 12em;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jbs-shop-cats__tab.is-current { font-weight: 600; color: var(--jbs-active-text); }
.jbs-shop-cats__tab.is-current::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 0;
  left: 14px;
  height: 3px;
  background: var(--jbs-active-line);
  border-radius: 3px 3px 0 0;
}
.jbs-shop-cats__chevron {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin: 0 0 4px 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
.jbs-shop-cats__tab[aria-expanded="true"] .jbs-shop-cats__chevron,
.jbs-shop-cats__all[aria-expanded="true"] .jbs-shop-cats__chevron,
.jbs-shop-cats__chevron--up { margin-bottom: 0; margin-top: 4px; transform: rotate(-135deg); }
.jbs-shop-cats__all {
  position: relative;
  display: flex;
  flex: 0 0 48px;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0;
  color: var(--jbs-text-strong);
  background: var(--jbs-card-bg);
  border: 0;
  cursor: pointer;
}
.jbs-shop-cats__all::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -16px;
  width: 16px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), var(--jbs-card-bg));
  pointer-events: none;
}
.jbs-shop-cats__all .jbs-shop-cats__chevron { margin-left: 0; }

.jbs-shop-cats__panel {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
}
.jbs-shop-cats__sheet {
  max-height: calc(100vh - var(--jbs-shop-cats-top, 0px) - 120px);
  padding: 14px 14px 0;
  overflow-y: auto;
  background: var(--jbs-card-bg);
}
.jbs-shop-cats__title {
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--jbs-text-heading);
}
.jbs-shop-cats__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 10px;
}
.jbs-shop-cats__cell {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 42px;
  padding: 4px 6px;
  font-size: 15px;
  line-height: 1.3;
  text-align: center;
  color: var(--jbs-text-strong);
  background: var(--jbs-bg-page);
  border: 1px solid transparent;
  border-radius: 8px;
}
.jbs-shop-cats__cell-text {
  display: -webkit-box;
  overflow: hidden;
  word-break: break-word;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.jbs-shop-cats__cell.is-current {
  font-weight: 600;
  color: var(--jbs-cat-current-text);
  background: var(--jbs-cat-current-bg);
  border-color: var(--jbs-cat-current-border);
}
.jbs-shop-cats__fold {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  font-size: 14px;
  color: var(--jbs-text-label);
  background: none;
  border: 0;
  cursor: pointer;
}
/* 面板下緣接到視窗底;cursor 讓 iOS 把點擊送到 document(jbs.js 的開關委派) */
.jbs-shop-cats__backdrop {
  height: 100vh;
  background: var(--jbs-overlay);
  cursor: pointer;
}

@media (min-width: 769px) {
  .jbs-shop-head {
    display: flex;
    align-items: center;
    margin: 0 10px;
    padding: 24px 0 20px;
    background: none;
  }
  .jbs-shop-head--end { margin-bottom: 0; }
  .jbs-store-search--field {
    flex: 0 1 360px;
    margin: 0 0 0 16px;
  }
  .jbs-store-search--field .jbs-store-search__input {
    background: var(--jbs-card-bg);
    border-color: var(--jbs-border-card);
  }
  .jbs-shop-cats { display: none; }
}

.jbs-shop__count {
  min-width: 0;
  margin-left: auto;
  font-size: 14px;
  color: var(--jbs-text-label);
  word-break: break-word;
}

.jbs-shop__count--app { order: 1; margin-left: 8px; }

.jbs-shop-rules {
  margin: 0 0 12px;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--jbs-shop-rules-text);
  background: var(--jbs-shop-rules-bg);
  border-radius: 8px;
}
.jbs-shop-rules li { word-break: break-word; }

.jbs-product-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 10px;
}

.jbs-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 8px 10px;
  font-size: 14px;
  color: var(--jbs-text-body);
}
.jbs-crumbs > * { margin: 2px 8px 2px 0; }
.jbs-crumbs__sep { color: var(--jbs-text-label); }
.jbs-crumbs__home { display: block; color: inherit; }
.jbs-crumbs__icon { display: block; width: 22px; height: 22px; }
.jbs-crumbs__link { min-width: 0; color: inherit; word-break: break-word; }
.jbs-crumbs__link[aria-current] { font-weight: 600; color: var(--jbs-text-strong); }

.jbs-shop__layout { margin: 0 10px; }
.jbs-shop__main { margin: 0 0 24px; }
.jbs-shop-side { display: none; }

@media (min-width: 641px) {
  .jbs-product-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-gap: 16px; }
}

@media (min-width: 769px) {
  .jbs-shop--themed { max-width: 1280px; }
  .jbs-shop__banner--mobile { display: none; }
  .jbs-shop__layout--side {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    grid-column-gap: 28px;
  }
  .jbs-shop-side {
    display: block;
    position: -webkit-sticky;
    position: sticky;
    top: 72px;
    align-self: start;
    min-width: 0;
    max-height: calc(100vh - 88px);
    overflow-y: auto;
  }
  .jbs-shop__layout { margin: 0; }
  .jbs-shop__layout--classic { margin: 0 10px; }
  .jbs-store-products__head > .jbs-store-category--app { display: none; }
  .jbs-shop__count--app { order: 0; margin-left: auto; }
}

@media (min-width: 961px) {
  .jbs-product-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-gap: 20px; }
}

.jbs-shop-side__list ul { margin-left: 12px; border-left: 1px solid var(--jbs-border-card); }
.jbs-shop-side__link {
  display: block;
  padding: 8px 10px;
  font-size: 15px;
  color: var(--jbs-text-strong);
  word-break: break-word;
  cursor: pointer;
}
.jbs-shop-side__link.is-current { font-weight: 600; color: var(--jbs-active-text); }
/* 經典版兩行截斷;主題把 display 設回 inline,overflow 與 line-clamp 對行內元素無效,外觀與沒包這層相同 */
.jbs-shop-side__name {
  display: var(--jbs-side-name-display);
  max-width: calc(100% - 16px);
  overflow: hidden;
  vertical-align: top;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.jbs-shop-side__group > summary { list-style: none; }
.jbs-shop-side__group > summary::-webkit-details-marker { display: none; }
.jbs-shop-side__group > summary::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 0 3px 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
.jbs-shop-side__group[open] > summary::after { margin-bottom: 0; transform: rotate(-135deg); }
.jbs-shop-side__sub .jbs-shop-side__link { font-size: 14px; color: var(--jbs-text-label); }
.jbs-shop-side__sub .jbs-shop-side__link.is-current { color: var(--jbs-active-text); }

.jbs-ig-posts { margin: 0 8px 24px; }
.jbs-ig-posts .jbs-store-products__title { margin: 15px 7px 12px; }

.jbs-ig-posts__column {
  max-width: 540px;
  margin: 0 auto;
}

/* 嵌入前先撐住高度,版面不會在 IG 載完時跳動;備援連結也看得到 */
.jbs-ig-posts__item {
  width: 100%;
  max-width: 540px;
  min-height: 480px;
  margin: 0 auto 16px;
  background: #fff;
}

.jbs-ig-posts__item a { display: block; padding: 16px; color: var(--jbs-text-link); word-break: break-word; }

.jbs-ig-posts__empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--jbs-text-body);
}

/* ── 加入購物車對話框(pay/_cart_modal_jbs.html)──────────────────────────── */

.jbs-cart__loading { padding: 24px 0; text-align: center; color: var(--jbs-text-body); }
.jbs-cart__form > * + * { margin-top: 12px; }

.jbs-cart__name {
  font-size: 18px;
  font-weight: 600;
  color: var(--jbs-text-strong);
  word-break: break-word;
}

.jbs-cart__row {
  display: flex;
  align-items: center;
}

.jbs-cart__row > * + * { margin-left: 10px; }

.jbs-cart__label {
  flex: 0 0 auto;
  min-width: 56px;
  font-size: 14px;
  color: var(--jbs-text-label);
}

.jbs-cart__row .jbs-field__input { flex: 1 1 0; min-width: 0; }

.jbs-cart__tags { margin-bottom: 4px; }

.jbs-cart__spec {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--jbs-text-label);
  white-space: pre-line;
  word-break: break-word;
}

.jbs-cart__multi {
  overflow: hidden;
  background: var(--jbs-card-bg);
  border: 1px solid var(--jb-color-brand);
  border-radius: 8px;
}

.jbs-cart__multi-title {
  padding: 4px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  color: var(--jb-text-on-fill);
  background: var(--jb-color-brand);
}

.jbs-cart__multi-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px 0;
  font-size: 14px;
}

.jbs-cart__multi-body img { width: 48px; height: 48px; }

.jbs-deal {
  padding: 10px 12px;
  background: var(--jbs-row-bg);
  border-radius: 8px;
}
/* 標籤與各組都是 inline-block,窄的時候整組換行,不會從一組中間斷開 */
.jbs-deal__row { margin-bottom: -4px; }
.jbs-deal__row .jbs-badge { margin: 0 12px 4px 0; vertical-align: middle; }
.jbs-deal__list { display: inline; }
.jbs-deal__list > li {
  display: inline-block;
  margin: 0 20px 4px 0;
  font-size: 15px;
  color: var(--jbs-price);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
.jbs-deal__list > li:last-child { margin-right: 0; }
.jbs-deal__note { margin-top: 6px; font-size: 12px; color: var(--jbs-text-label); }
.jbs-cart__note { padding: 6px 12px 8px; font-size: 12px; color: var(--jbs-text-label); }
.jbs-cart__intro {
  display: inline-block;
  margin-top: 6px;
  font-size: 14px;
  color: var(--jbs-price);
  text-decoration: none;
}
.jbs-cart__intro::after { content: ' \203a'; }

.jbs-cart__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  margin-top: 4px;
}
.jbs-cart__price > * + * { margin-left: 6px; }
.jbs-cart__price-label { font-size: 13px; color: var(--jbs-card-label); }
.jbs-cart__price-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--jbs-price);
  font-variant-numeric: tabular-nums;
}

.jbs-cart__notice {
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  color: var(--jbs-price);
  background: var(--jbs-card-bg);
  border: 1px solid var(--jbs-price);
  border-radius: 8px;
}

.jbs-cart__campaign {
  padding: 10px 12px;
  background: var(--jbs-card-bg);
  border: 1px solid var(--jb-color-brand);
  border-radius: 8px;
}
.jbs-cart__campaign > * + * { margin-top: 8px; }
.jbs-cart__campaign-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; }
.jbs-cart__campaign-title { font-size: 15px; font-weight: 600; color: var(--jbs-text-strong); }
.jbs-cart__campaign-clock { font-size: 14px; font-variant-numeric: tabular-nums; color: var(--jbs-price); }
.jbs-cart__campaign-line { font-size: 14px; word-break: break-word; }
.jbs-cart__campaign-line b { color: var(--jbs-price); font-variant-numeric: tabular-nums; }

/* 集量時間軸:第 i 階的點中心在進度條 (i+1)/n 處(= 後端的 percentage,填色才會停在點上)。
   左右 8px 是點的半徑;清單右移 8px 讓貼格子右緣的點中心落在段尾,兩個 8px 要一起改 */
.jbs-milestones { padding: 0 8px; }
.jbs-milestones__track {
  height: 8px;
  margin-top: 4px;
  overflow: hidden;
  background: var(--jbs-border-card);
  border-radius: 4px;
}
.jbs-milestones__fill {
  width: 0;
  height: 100%;
  background: var(--jb-color-brand);
}
.jbs-milestones__list {
  position: relative;
  left: 8px;
  display: flex;
  margin-top: -12px;
}
.jbs-milestones__item {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  padding: 22px 0 0 8px;
  text-align: right;
  word-break: break-word;
}
.jbs-milestones__dot {
  position: absolute;
  top: 0;
  right: 0;
  width: 16px;
  height: 16px;
  background: var(--jbs-card-bg);
  border: 2px solid var(--jbs-border-card);
  border-radius: 50%;
}
.jbs-milestones__item.is-done .jbs-milestones__dot { background: var(--jb-color-brand); border-color: var(--jb-color-brand); }
.jbs-milestones__item.is-now .jbs-milestones__dot { box-shadow: 0 0 0 4px var(--jb-color-brand-subtle); }
.jbs-milestones__goal { display: block; font-size: 13px; color: var(--jbs-text-label); }
.jbs-milestones__reward { display: block; font-size: 14px; font-weight: 700; color: var(--jbs-text-strong); font-variant-numeric: tabular-nums; }
.jbs-milestones__item.is-done .jbs-milestones__reward { color: var(--jbs-price); }

.jbs-cart__tiers {
  display: flex;
  flex-wrap: wrap;
  margin: -4px 0 0 -6px;
  padding: 0;
  list-style: none;
}
.jbs-cart__tier {
  margin: 4px 0 0 6px;
  padding: 2px 8px;
  font-size: 12px;
  color: var(--jbs-text-label);
  border: 1px solid var(--jbs-border-card);
  border-radius: 10px;
}
.jbs-cart__tier.is-done { color: var(--jbs-text-strong); border-color: var(--jb-color-brand); }
.jbs-cart__tier.is-now { font-weight: 600; color: var(--jb-text-on-fill); background: var(--jb-color-brand); border-color: var(--jb-color-brand); }

.jbs-cart__quantity {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.jbs-cart__quantity > * + * { margin-left: 12px; }
.jbs-cart__left { font-size: 13px; color: var(--jbs-card-label); }

/* ── 改訂單(pay/_checkout_order_modals.html #jbs-order-modal)──────────────── */

.jbs-order-edit__product { display: flex; align-items: flex-start; }

.jbs-order-edit__photo {
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  margin-right: 12px;
  object-fit: cover;
  border-radius: 4px;
}

.jbs-order-edit__info { flex: 1 1 0; min-width: 0; }
.jbs-order-edit__pick { margin-top: 4px; font-size: 14px; color: var(--jbs-price); word-break: break-word; }
.jbs-order-edit__label { margin-bottom: 6px; font-size: 14px; color: var(--jbs-text-label); }

/* 樣式 chip:radio 疊在 label 上、透明。選中只換框色與底色(字重、padding、框寬都不變),點了寬度不跳、旁邊的 chip 不換行 */
.jbs-chips { display: flex; flex-wrap: wrap; margin-bottom: -8px; }

.jbs-chip {
  position: relative;
  display: block;
  max-width: 100%;
  margin: 0 8px 8px 0;
}

.jbs-chip__input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.jbs-chip__input:disabled { cursor: not-allowed; }

.jbs-chip__text {
  position: relative;
  z-index: 0;
  display: block;
  min-width: 44px;
  min-height: 34px;
  padding: 6px 12px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--jbs-text-strong);
  text-align: center;
  word-break: break-word;
  background: var(--jbs-card-bg);
  border: 1px solid var(--jbs-border-card);
  border-radius: 4px;
  pointer-events: none;
}

.jbs-chip__input:checked + .jbs-chip__text {
  border-color: var(--jbs-price);
  box-shadow: inset 0 0 0 1px var(--jbs-price);
}

.jbs-chip__input:checked + .jbs-chip__text::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  background: var(--jbs-price);
  border-radius: 3px;
  opacity: .08;
}

[data-jbs-theme^="app-"] .jbs-chip__input:checked + .jbs-chip__text::before {
  background: var(--jbs-total-bg);
  opacity: 1;
}

.jbs-chip__input:disabled + .jbs-chip__text {
  color: var(--jb-text-disabled);
  background:
    linear-gradient(to top right, transparent calc(50% - .5px), var(--jb-border-default) calc(50% - .5px), var(--jb-border-default) calc(50% + .5px), transparent calc(50% + .5px)),
    linear-gradient(to top left, transparent calc(50% - .5px), var(--jb-border-default) calc(50% - .5px), var(--jb-border-default) calc(50% + .5px), transparent calc(50% + .5px)),
    var(--jb-bg-muted);
  border-color: var(--jb-border-default);
}

/* 不認得 :focus-visible 的舊瀏覽器(Chrome < 86、iOS < 15.4)整條 :not() 規則會被丟掉,退回一律顯示 */
.jbs-chip__input:focus + .jbs-chip__text {
  outline: var(--jbs-focus-outline);
  outline-offset: 1px;
  box-shadow: var(--jbs-focus-glow);
}

/* 選中的框色與內框是選取記號,聚焦不能蓋掉 */
.jbs-chip__input:focus:not(:checked) + .jbs-chip__text { border-color: var(--jbs-focus-border); }
.jbs-chip__input:checked:focus + .jbs-chip__text { box-shadow: var(--jbs-focus-ring), inset 0 0 0 1px var(--jbs-price); }

.jbs-chip__input:focus:not(:focus-visible) + .jbs-chip__text { outline: none; }

/* 篩選 chip --pill(商城首頁 B 依商品組篩):膠囊形,選中填主題 CTA 色白字 */
.jbs-chips--pill .jbs-chip__text {
  min-height: 36px;
  padding: 7px 16px;
  border-radius: 18px;
}

/* 連結式膠囊(文章列表分類):nav.jbs-chips.jbs-chips--pill > a.jbs-chip__text,目前這一個 aria-current="page" 跟選中的 radio 同樣式 */
.jbs-chip__text[href] {
  box-sizing: border-box;
  max-width: 100%;
  margin: 0 8px 8px 0;
  text-decoration: none;
  pointer-events: auto;
}

.jbs-chip__text[href]:focus {
  outline: 2px solid var(--jb-color-focus-ring);
  outline-offset: 1px;
}

.jbs-chip__text[href]:focus:not(:focus-visible) { outline: none; }

.jbs-chips--pill .jbs-chip__input:checked + .jbs-chip__text,
.jbs-chips--pill .jbs-chip__text[aria-current="page"] {
  color: var(--jb-text-on-fill);
  background: var(--jbs-cta-bg);
  background-origin: border-box;
  border-color: transparent;
  box-shadow: none;
}

.jbs-chips--pill .jbs-chip__input:checked:focus + .jbs-chip__text { box-shadow: var(--jbs-focus-ring); }

.jbs-chips--pill .jbs-chip__input:checked + .jbs-chip__text::before { content: none; }

@media (hover: hover) and (pointer: fine) {
  .jbs-chips--pill .jbs-chip__input:not(:checked):not(:disabled):hover + .jbs-chip__text,
  .jbs-chips--pill .jbs-chip__text[href]:not([aria-current]):hover { border-color: var(--jbs-card-text); }
}

.jbs-sub-commodities__title { font-size: 15px; font-weight: 600; }

.jbs-sub-commodities__item {
  display: flex;
  margin-top: 8px;
  font-size: 14px;
}

.jbs-sub-commodities__photo {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  margin-right: 10px;
  object-fit: cover;
  border-radius: 6px;
}

.jbs-sub-commodities__body { flex: 1 1 0; min-width: 0; }
.jbs-sub-commodities__body > * + * { margin-top: 4px; }
.jbs-sub-commodities__name { font-weight: 600; word-break: break-word; }

.jbs-sub-commodities__item--row {
  padding: 12px;
  background: var(--jbs-row-bg);
  border-radius: 8px;
}
.jbs-sub-commodities__item--row .jbs-sub-commodities__photo { margin-right: 12px; }
.jbs-sub-commodities__item--row .jbs-select { margin-top: 8px; }

/* 自畫箭頭的下拉:寬度跟著最長的選項。加在 .jbs-field__input 上;頁面 40px(9 + 20 + 9 + 框線 2),
   對話框裡由 .jbs-modal .jbs-field__input 的內距與行高蓋成 34px */
.jbs-select {
  display: block;
  width: auto;
  min-width: 140px;
  max-width: 100%;
  padding-top: 9px;
  padding-right: 32px;
  padding-bottom: 9px;
  line-height: 1.25;
  text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23757575' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-size: 10px 6px;
  background-repeat: no-repeat;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.jbs-channel-popup .jbs-modal__panel img { display: block; width: 100%; }

.jbs-channel-empty {
  padding: 10px 16px 40px;
  text-align: center;
  font-size: 16px;
  color: var(--jbs-text-body);
}

.jbs-channel-empty__icon {
  display: block;
  width: 200px;
  height: 200px;
  margin: 0 auto 16px;
  padding: 40px;
  background: var(--jbs-accent);
  border-radius: 50%;
}

.jbs-channel-empty__icon img {
  display: block;
  width: 100%;
  height: 100%;
}

/* 寬螢幕:整頁最寬 1180(同待填單),頻道卡片的欄數由 channel.js 依寬度決定 */
@media (min-width: 641px) {
  .jbs-channel {
    padding-right: 16px;
    padding-left: 16px;
  }

  /* 伺服器先排成手機的兩欄,channel.js 依寬度重排完才顯示,不會先看到兩欄再跳成多欄。
     只在 JS 有跑時才藏;channel.js 沒跑起來最多藏 2 秒,之後顯示伺服器排的兩欄 */
  .jbs-js .jbs-channel-columns:not([data-channel-laid-out]) {
    visibility: hidden;
    -webkit-animation: jbs-reveal 0s 2s forwards;
    animation: jbs-reveal 0s 2s forwards;
  }

  .jbs-store-hero { flex-basis: 240px; }
  .jbs-store__actions { max-width: 360px; }
}

/* ── 表單列、單選(會員中心編輯資料等)────────────────────────────────────── */

.jbs-field {
  display: block;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.jbs-field + .jbs-field,
.jbs-field + * + .jbs-field { margin-top: 16px; }

.jbs-radio-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.jbs-radio-group > * { margin-right: 20px; }

/* 點擊範圍撐到 44px 高 */
.jbs-radio {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  color: var(--jbs-text-strong);
  cursor: pointer;
}

.jbs-radio input {
  width: 18px;
  height: 18px;
  margin: 0 6px 0 0;
  accent-color: var(--jb-color-brand);
}

/* ── 會員中心(buyer/index.html)──────────────────────────────────────────── */

.jbs-member { max-width: 960px; padding-top: 12px; padding-bottom: 50px; }

.jbs-member .jbs-channel-title { margin-top: 20px; }

.jbs-member__back { margin: 0 12px 12px; }

.jbs-profile,
.jbs-member-card {
  margin: 0 12px;
  padding: 16px;
  background: var(--jbs-card-bg);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.jbs-member__top > * + * { margin-top: 20px; }

/* 兩張一樣高:個人卡的列數因人而異 */
@media (min-width: 769px) {
  .jbs-member__top {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    grid-gap: 20px;
    align-items: stretch;
    margin: 0 12px;
  }

  .jbs-member__top > * { margin: 0; }
  .jbs-member__top > * + * { margin-top: 0; }

  .jbs-member__top .jbs-profile {
    display: flex;
    flex-direction: column;
  }

  .jbs-member__top .jbs-profile__actions { margin-top: auto; padding-top: 12px; }
}

.jbs-profile__head {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.jbs-profile__avatar {
  flex: 0 0 auto;
  width: 80px;
  height: 80px;
  margin-right: 16px;
  object-fit: cover;
  border: 3px solid var(--jbs-accent);
  border-radius: 50%;
}

.jbs-profile__who { min-width: 0; }

.jbs-profile__name {
  font-size: 20px;
  font-weight: 600;
  color: var(--jbs-text-heading);
  word-break: break-word;
}

.jbs-profile__note {
  margin-top: 4px;
  font-size: 13px;
  color: var(--jbs-text-label);
}

.jbs-profile__quick > * { margin: 8px 8px 0 0; }

.jbs-profile__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 12px;
}

.jbs-profile__actions > * { margin: 4px 0 0 8px; }

.jbs-member__top > .jbs-member__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 12px 14px 10px;
}
.jbs-member__top > .jbs-member__head + * { margin-top: 0; }
.jbs-member .jbs-member__head .jbs-channel-title { min-width: 0; margin: 0 12px 0 0; }
.jbs-member-card[data-profile] { padding-top: 6px; }
.jbs-member__head .jbs-btn { flex-shrink: 0; }

@media (min-width: 769px) {
  .jbs-member__top { grid-template-rows: auto 1fr; grid-row-gap: 14px; }
  .jbs-member__top > .jbs-profile { grid-row: 1 / span 2; }
  .jbs-member__top > .jbs-member__head { grid-column: 2; margin: 0; }
  .jbs-member__top > [data-profile] { grid-column: 2; }
}

/* 資料列:標籤 / 值 / 動作同一列,列間細線;值是唯讀文字(不做成灰框,免得像不能用的輸入框) */
.jbs-member-field {
  display: grid;
  grid-template-columns: 7.5em minmax(0, 1fr) auto;
  grid-column-gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 10px 0;
}

.jbs-member-field + .jbs-member-field { border-top: 1px solid var(--jb-color-gray-100); }

.jbs-member-field__label {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--jbs-text-label);
}

.jbs-member-field__warn {
  width: 18px;
  height: 18px;
  margin-left: 5px;
}

.jbs-member-field__value {
  font-size: 15px;
  line-height: 1.4;
  color: var(--jbs-text-strong);
  word-break: break-word;
}

/* 平台 ID(LINE 33 字元)沒有斷點,任意處換行 */
.jbs-member-field__value--id { word-break: break-all; }

.jbs-member-field__action { grid-column: 3; }

/* 個人卡(寬螢幕是窄的左欄)與手機:標籤與動作鈕一行、值在下一行 */
.jbs-profile .jbs-member-field {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-row-gap: 4px;
}

.jbs-profile .jbs-member-field__value { grid-column: 1 / -1; grid-row: 2; }
.jbs-profile .jbs-member-field__action { grid-column: 2; grid-row: 1; }

@media (max-width: 480px) {
  .jbs-member-field {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-row-gap: 4px;
  }

  .jbs-member-field__value { grid-column: 1 / -1; grid-row: 2; }
  .jbs-member-field__action { grid-column: 2; grid-row: 1; }
}

.jbs-member-edit__change { margin-top: 8px; }

/* SEA:語系 / 時區設定(buyer/_index_region.html) */
.jbs-member-settings__tz { display: flex; }

.jbs-member-settings__tz > * { min-width: 0; }

.jbs-member-settings__tz > * + * { margin-left: 8px; }

.jbs-member-settings__relogin {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
}

.jbs-member-barcode { text-align: center; }

.jbs-member-barcode__name {
  font-size: 18px;
  font-weight: 600;
  color: var(--jbs-text-heading);
}

.jbs-member-barcode__code {
  margin-top: 10px;
  font-size: 16px;
  color: var(--jbs-text-label);
}

.jbs-member-barcode__svg {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 20px auto 0;
}

/* 變體只換 --event-color */
.jbs-event-list {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 20px;
}

@media (min-width: 641px) {
  .jbs-event-list { grid-template-columns: 1fr 1fr; }
}

.jbs-event-card {
  --event-color: #FFBB00;
  --event-name-color: var(--event-color);
  position: relative;
  min-height: 120px;
  padding: 3px 88px 6px 40px;
  background: var(--jbs-card-bg);
  border: 1px solid var(--event-color);
}

.jbs-event-card--coupon { --event-color: #449A9A; }
/* 中獎:外框與分類換粉紅,活動名稱維持抽獎的黃 */
.jbs-event-card--win { --event-color: #E75280; --event-name-color: #FFBB00; border-width: 3px; }
.jbs-event-card--expired { --event-color: var(--jb-color-gray-300); opacity: .5; }
.jbs-event-card--expired .jbs-event-card__icon img { filter: grayscale(1); opacity: .5; }

.jbs-event-card::before,
.jbs-event-card::after {
  content: '';
  position: absolute;
  left: 20px;
  z-index: 1;
  width: 16px;
  height: 16px;
  background: var(--jbs-bg-page);
  border: 1px solid var(--event-color);
  border-radius: 50%;
}

.jbs-event-card::before { top: -9px; }
.jbs-event-card::after { bottom: -9px; }

.jbs-event-card__category {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 30px;
  font-size: 16px;
  font-weight: 600;
  line-height: 30px;
  color: var(--jb-text-on-fill);
  text-align: center;
  white-space: nowrap;
  writing-mode: vertical-rl;
  background: var(--event-color);
  /* 長的翻譯(泰文「好友分享券」)比卡片高:截在卡片內,不蓋到下一張 */
  overflow: hidden;
}

.jbs-event-card__serial {
  font-size: 14px;
  color: var(--jbs-text-strong);
  word-break: break-word;
}

.jbs-event-card__name {
  display: block;
  padding: 3px 0;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--event-name-color);
  text-align: left;
  word-break: break-word;
  background: none;
  border: 0;
  border-bottom: 2px solid var(--event-name-color);
}

/* 整張卡都能點(開活動說明):名稱按鈕的 ::after 撐滿卡片;右側圖示鈕疊在上面 */
button.jbs-event-card__name { cursor: pointer; }

button.jbs-event-card__name::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.jbs-event-card__balls {
  padding: 3px 0;
  font-size: 13px;
  color: var(--jbs-text-strong);
}

.jbs-event-card__ball {
  display: inline-block;
  width: 22px;
  height: 22px;
  margin-right: 4px;
  font-size: 13px;
  line-height: 22px;
  color: var(--jb-text-on-fill);
  text-align: center;
  background: #E75280;
  border-radius: 50%;
}

.jbs-event-card__ball--out,
.jbs-event-card--expired .jbs-event-card__ball { background: var(--jb-color-gray-300); }

.jbs-event-card__date {
  font-size: 12px;
  color: var(--jbs-text-label);
}

.jbs-event-card__icon {
  position: absolute;
  top: 50%;
  right: 4px;
  z-index: 2;
  width: 80px;
  height: 80px;
  padding: 0;
  margin-top: -40px;
  background: var(--jbs-card-bg);
  border: 0;
  border-radius: 50%;
}

button.jbs-event-card__icon { cursor: pointer; }

.jbs-event-card__icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (min-width: 769px) {
  .jbs-modal--narrow:not(.jbs-modal--center) .jbs-modal__panel { max-width: 420px; }
}

.jbs-event-modal__head {
  display: flex;
  align-items: center;
}

.jbs-event-modal__icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  margin-right: 12px;
}

.jbs-event-modal__head .jbs-modal__eyebrow {
  font-size: 13px;
  font-weight: 600;
}

.jbs-event-modal__head .jbs-event-modal__title {
  margin-bottom: 0;
  text-align: left;
}

.jbs-event-modal__title {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 600;
  color: var(--jbs-price);
  text-align: center;
  word-break: break-word;
}

.jbs-lottery-balls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

/* 號碼球:視覺 36px,點擊範圍撐到 44px */
.jbs-lottery-ball {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  cursor: pointer;
}

.jbs-lottery-ball input {
  position: absolute;
  opacity: 0;
}

.jbs-lottery-ball span {
  width: 36px;
  height: 36px;
  font-size: 15px;
  line-height: 36px;
  color: var(--jbs-text-strong);
  text-align: center;
  border: 1px solid var(--jbs-border-card);
  border-radius: 50%;
}

.jbs-lottery-ball input:checked + span {
  color: var(--jb-text-on-fill);
  background: #E75280;
  border-color: #E75280;
}

.jbs-lottery-ball input:disabled + span { opacity: .4; }

/* 焦點環:不認得 :focus-visible 的舊瀏覽器(Chrome < 86、iOS < 15.4)整條 :not() 規則會被丟掉,退回一律顯示 */
.jbs-lottery-ball input:focus + span {
  outline: 2px solid var(--jb-color-focus-ring);
  outline-offset: 1px;
}

.jbs-lottery-ball input:focus:not(:focus-visible) + span { outline: none; }

/* ── 會員訂閱:清單卡(會員中心)與對話框(pay/_membership_subscribe_dialog_jbs.html)── */

.jbs-membership-list {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 20px;
}

@media (min-width: 641px) {
  .jbs-membership-list { grid-template-columns: 1fr 1fr; }
}

.jbs-membership-card {
  position: relative;
  padding: 20px;
  background: var(--jbs-card-bg);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.jbs-membership-card__tier {
  position: absolute;
  top: 15px;
  right: 15px;
}

.jbs-tier {
  display: block;
  width: 48px;
  height: 40px;
  background-color: var(--tier-color);
  -webkit-mask: url('../img/member/crown.svg') center / contain no-repeat;
  mask: url('../img/member/crown.svg') center / contain no-repeat;
}

.jbs-tier--1 { --tier-color: #B4B4B4; }
.jbs-tier--2 { --tier-color: #F5B833; }
.jbs-tier--3 { --tier-color: #4A4A4A; }

/* 右側留給等級徽章 */
.jbs-membership-card__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
  padding-right: 55px;
}

.jbs-membership-card__header > * { margin: 0 8px 4px 0; }

.jbs-membership-card__store {
  font-size: 18px;
  font-weight: 600;
  color: var(--jbs-text-heading);
  word-break: break-word;
}

.jbs-membership-card__row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  color: var(--jbs-text-label);
}

.jbs-membership-card__row + .jbs-membership-card__row { border-top: 1px solid var(--jb-color-gray-100); }

.jbs-membership-card__row > :last-child {
  margin-left: 12px;
  font-weight: 500;
  color: var(--jbs-text-strong);
  text-align: right;
  word-break: break-word;
}

.jbs-membership-card__footer {
  display: flex;
  align-items: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--jb-color-gray-100);
}

.jbs-membership-card__footer .jbs-btn {
  flex: 1 1 auto;
  margin-left: 8px;
}

.jbs-membership .jbs-modal__body {
  display: flex;
  flex-direction: column;
}
.jbs-membership .jbs-modal__body > * { flex: 0 0 auto; }
.jbs-membership .jbs-modal__body > * + * { margin-top: 16px; }

/* 卡片底 padding 要 ≥ 6px:卡片 overflow:hidden 會裁掉「更換方案」往下撐的點擊範圍(.jbs-modal .jbs-btn::before) */
.jbs-membership__current-card {
  overflow: hidden;
  padding-bottom: 12px;
  border: 2px solid var(--jb-color-gray-200);
  border-radius: 12px;
}

.jbs-membership__current-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 8px 16px;
  background: linear-gradient(135deg, #F5F7FA 0%, #C3CFE2 100%);
}
.jbs-membership__current-head > :not(:empty) + * { margin-left: 8px; }

.jbs-membership__tier .jbs-tier {
  width: 28px;
  height: 28px;
}

.jbs-membership__plan-name {
  min-width: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--jbs-text-heading);
  word-break: break-word;
}

.jbs-membership__info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 8px 16px;
  padding: 14px 16px 0;
  line-height: 1.4;
}

.jbs-membership__info dt {
  font-size: 12px;
  font-weight: 500;
  color: var(--jbs-text-label);
}

.jbs-membership__info dd {
  font-size: 16px;
  font-weight: 600;
  color: var(--jbs-text-strong);
}

.jbs-membership__pending {
  margin: 12px 16px 0;
  padding: 12px;
  font-size: 14px;
  color: var(--jb-text-warning);
  background: var(--jb-color-warning-light);
  border-left: 4px solid var(--jb-color-warning);
  border-radius: 4px;
}

.jbs-membership__current-actions {
  display: flex;
  justify-content: flex-end;
  padding: 8px 16px 0;
}

.jbs-membership .jbs-membership__current-actions .jbs-btn {
  padding: 6px 16px;
  font-size: 14px;
}

.jbs-membership__actions .jbs-btn { flex: 1 1 0; }

.jbs-membership__actions { display: flex; }

.jbs-membership__hint {
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--jb-text-warning);
  text-align: right;
}

.jbs-membership__actions > * + * { margin-left: 10px; }

.jbs-membership__heading {
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--jbs-text-heading);
}

.jbs-membership__note {
  font-size: 13px;
  color: var(--jbs-text-label);
}

.jbs-membership__records > li + li { margin-top: 10px; }

.jbs-membership__record {
  padding: 4px 14px;
  font-size: 14px;
  border: 1px solid var(--jb-color-gray-200);
  border-radius: 8px;
}

.jbs-membership__record dl > div {
  display: flex;
  align-items: baseline;
  padding: 6px 0;
}
.jbs-membership__record dl > div + div { border-top: 1px solid var(--jb-color-gray-100); }

.jbs-membership__record dt {
  flex: 0 0 96px;
  min-width: 0;
  padding-right: 12px;
  color: var(--jbs-text-label);
  word-break: break-word;
}

.jbs-membership__record dd {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--jbs-text-strong);
  word-break: break-word;
}

.jbs-membership__ok { color: var(--jb-text-success); }
.jbs-membership__fail { color: var(--jb-text-error); }

.jbs-membership__tiers {
  display: flex;
  margin-bottom: 16px;
}

.jbs-membership__tiers > * + * { margin-left: 12px; }

.jbs-membership__tier-tab,
.jbs-membership__plan {
  flex: 1 1 0;
  min-height: 44px;
  padding: 8px 4px;
  font-weight: 600;
  color: var(--jbs-text-strong);
  background: var(--jb-color-gray-100);
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

.jbs-membership__plans {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 12px;
}

@media (min-width: 641px) {
  .jbs-membership__plans { grid-template-columns: repeat(3, 1fr); }
}

.jbs-membership__plan {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--jbs-card-bg);
  border: 1px solid var(--jb-color-gray-200);
}

.jbs-membership__tier-tab[aria-pressed="true"],
.jbs-membership__plan[aria-pressed="true"] {
  background: #FFF7E6;
  border: 2px solid #EEB77C;
  box-shadow: 0 1px 0 #F5B853;
}

.jbs-membership__plan-cycle {
  display: block;
  font-size: 15px;
  font-weight: 700;
}

.jbs-membership__plan-price {
  display: block;
  font-size: 20px;
  font-weight: 800;
}

.jbs-membership__plan-price del {
  margin-right: 4px;
  font-size: 14px;
  font-weight: 400;
  color: var(--jb-color-gray-500);
}

.jbs-membership__plan-price strong { color: #E74C3C; }

.jbs-membership__section {
  position: relative;
  margin-top: 12px;
  padding: 10px;
  background: var(--jb-color-gray-100);
}

.jbs-membership__section summary {
  min-height: 24px;
  padding-right: 96px;
  font-weight: 700;
  cursor: pointer;
}

.jbs-membership__agree {
  position: absolute;
  top: 6px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: 13px;
  color: var(--jbs-text-label);
  cursor: pointer;
}

.jbs-membership__agree input {
  width: 16px;
  height: 16px;
  margin: 0 6px 0 0;
}

.jbs-membership__content {
  margin-top: 8px;
  word-break: break-word;
}

.jbs-membership__content--text { white-space: pre-line; }

.jbs-membership__content img { max-width: 100%; height: auto; }

.jbs-membership__summary {
  margin: 16px 0;
  padding: 12px;
  background: var(--jbs-card-bg);
  border: 2px solid #F5B853;
  border-radius: 8px;
  box-shadow: 0 3px 6px #FFEBCB;
}

.jbs-membership__summary-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}

.jbs-membership__summary-row > :last-child { font-weight: 700; }

.jbs-membership__pay {
  padding: 10px;
  background: #FFF7E6;
  border: 2px solid #EEB77C;
  border-radius: 8px;
}

.jbs-membership__pay-title { font-weight: 700; }

.jbs-membership__secondary { text-align: center; }

/* 客戶要求做得不明顯(同舊版):灰色小字、底線,中間「|」分隔;點擊範圍撐到 44px */
.jbs-membership__secondary .jbs-text-btn {
  display: inline-block;
  min-height: 44px;
  padding: 12px 8px;
  font-size: 12px;
  line-height: 20px;
  color: #999999;
}

.jbs-membership__sep {
  margin: 0 4px;
  font-size: 12px;
  color: #DDDDDD;
}

/* ── 網頁登入(pay/login.html)────────────────────────────────────────── */

/* 舊版是白底;裝飾圖以卡片外框(寬 450px)為基準絕對定位,粉色底圖在卡片下、遮陽棚在卡片上 */
.jbs-login-page { background: #ffffff; }

.jbs-login {
  position: relative;
  width: 450px;
  max-width: 100%;
  margin: 150px auto 40px;
}

.jbs-login__deco {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 0;
  pointer-events: none;
}

.jbs-login__deco > * { position: absolute; }

.jbs-login__deco-pink {
  top: -100px;
  left: -50px;
  width: 550px;
  max-width: none;
}

.jbs-login__deco-canopy {
  top: -92px;
  left: -29px;
  z-index: 2;
  width: 222px;
}

.jbs-login__deco-mobile {
  top: -112px;
  left: -22px;
}

.jbs-login__slogan {
  top: -100px;
  right: 20px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  color: #e2007e;
  text-align: right;
}
.jbs-login__slogan > span { display: block; }

.jbs-login__deco-logo {
  top: -45px;
  right: 20px;
  width: 160px;
}

.jbs-login__card {
  position: relative;
  z-index: 1;
  margin-top: 100px;
  padding: 50px 24px 24px;
  text-align: center;
  background: #ffffff;
  border: 2px solid #d65c80;
  border-radius: 20px;
}

.jbs-login--branded .jbs-login__card {
  margin-top: 20px;
  border-color: transparent;
  box-shadow: 0 3px 6px rgba(0, 0, 0, .16);
}

.jbs-login__logos {
  display: flex;
  align-items: center;
  justify-content: center;
}

.jbs-login__logo {
  max-width: 80px;
  max-height: 80px;
  border-radius: 17px;
}

.jbs-login__and {
  width: 30px;
  height: 30px;
  margin: 0 10px;
}

.jbs-login__fb {
  max-width: 80px;
  max-height: 80px;
}

/* SEA 的語系選單(pay/_login_region.html);TW 不輸出 */
.jbs-login__locale {
  display: block;
  width: 210px;
  margin: 24px auto 0;
}
.jbs-login__locale > .jbs-field__label {
  color: var(--jbs-card-label);
  text-align: center;
}

/* 舊版 #D65C80 在白底 3.7:1,只調明度到 4.8:1 */
.jbs-login__hint {
  margin-top: 16px;
  font-size: 16px;
  color: #c04670;
}
.jbs-login--branded .jbs-login__hint { color: #545454; }

.jbs-login__actions { margin-top: 30px; }

.jbs-login__fb-btn {
  width: calc(60% + 74px);
  max-width: 100%;
  min-height: 46px;
}

.jbs-login__error {
  margin: 20px 0 10px;
  font-size: 16px;
  font-weight: 500;
  color: var(--jb-text-error);
  word-break: break-word;
}

.jbs-login__alt { margin-top: 20px; }

.jbs-login__alt > .jbs-login__error { margin-top: 0; }

.jbs-login__alt-btn {
  width: 220px;
  font-size: 14px;
}

.jbs-login__or { margin: 12px 0; }

.jbs-login__steps {
  width: 260px;
  margin: 20px auto 0;
}

.jbs-login__steps > img {
  display: block;
  margin: 10px auto;
}

.jbs-login__steps-row {
  display: flex;
  justify-content: space-around;
  font-size: 12px;
  line-height: 1.4;
}
.jbs-login__steps-row:first-child { font-size: 14px; }

.jbs-login__guest { margin-top: 30px; }

.jbs-login__turnstile {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

@media (max-width: 768px) {
  .jbs-login {
    width: auto;
    margin: 120px 13px 24px;
  }

  .jbs-login__deco-pink {
    top: -90px;
    left: -29px;
    width: 100%;
  }

  .jbs-login__deco-canopy {
    top: -83px;
    left: -21px;
    width: 214px;
  }

  .jbs-login__deco-mobile {
    top: -102px;
    left: -14px;
    width: 219px;
  }

  .jbs-login__slogan,
  .jbs-login__deco-logo { right: 0; }

  .jbs-login__card { padding-top: 30px; }
}

/* ── App 內登入(pay/login_app.html)───────────────────────────────────── */

.jbs-login-app { text-align: center; }

.jbs-login-app__logo {
  max-width: 180px;
  margin: 0 auto;
}

.jbs-login-app__text {
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--jbs-price);
}

.jbs-login-app__btn { width: 100%; }

/* ── App 內綁定回呼(pay/link_callback_app.html)──────────────────────────── */

.jbs-link-callback__text {
  font-size: 18px;
  line-height: 1.5;
  color: var(--jbs-price);
  text-align: center;
}

/* ── TikTok 綁定(pay/tiktok_bind.html)──────────────────────────────────── */

/* 舊版底圖半透明疊在白底上 */
.jbs-bind-page {
  min-height: 100vh;
  background: #ffffff url('../img/login/bg-web.png') center top / cover no-repeat;
}

.jbs-bind {
  max-width: 576px;
  margin: 0 auto;
  padding: 60px 16px;
  text-align: center;
}

.jbs-bind__head {
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid #cccccc;
}

.jbs-bind__logo {
  max-width: 200px;
  margin: 0 auto;
}

.jbs-bind__title {
  margin-top: 8px;
  font-size: 24px;
  font-weight: 500;
  color: var(--jbs-text-strong);
}

.jbs-bind__hello {
  margin-top: 12px;
  font-size: 14px;
  color: var(--jbs-text-strong);
  word-break: break-word;
}

/* 舊版 #E75280 在白底 3.6:1,只調明度到 4.9:1 */
.jbs-bind__switch { color: #c83a68; }

.jbs-bind__item + .jbs-bind__item { margin-top: 40px; }

.jbs-bind__prompt {
  margin-bottom: 8px;
  font-size: 16px;
}

.jbs-bind__prompt > mark {
  padding: 2px 1px;
  color: #c83a68;
  background: linear-gradient(transparent 40%, rgba(255, 255, 255, 0) 55%, #fff176 90%, transparent 95%);
}

/* Messenger 藍 6.8:1;LINE 綠舊版 #00BA22 白字 2.6:1,調深到 3.4:1(20px 粗體是大字,門檻 3:1) */
.jbs-bind__btn {
  width: 204px;
  min-height: 48px;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}
.jbs-bind__btn--fb { background: #3a5a97; }
.jbs-bind__btn--line { background: #00a31d; }

.jbs-bind__code {
  font-size: 18px;
  word-break: break-all;
}

.jbs-bind__error {
  font-size: 16px;
  color: var(--jbs-text-strong);
}

/* ── 手機驗證(buyer/phone_verify.html)──────────────────────────────────── */

.jbs-phone-verify {
  max-width: 600px;
  margin: 24px auto;
  padding: 32px 24px;
  background: var(--jbs-card-bg);
  border: 1px solid var(--jbs-border-card);
  border-radius: 8px;
}

.jbs-phone-verify__title {
  font-size: 22px;
  font-weight: 600;
  color: var(--jbs-text-strong);
  text-align: center;
}

.jbs-phone-verify__intro {
  margin: 16px 0 24px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--jbs-card-label);
  text-align: center;
}

.jbs-phone-verify__row {
  display: flex;
  align-items: center;
}
.jbs-phone-verify__row > .jbs-field__input {
  flex: 1 1 auto;
  min-width: 0;
}
.jbs-phone-verify__row > .jbs-btn {
  flex: 0 0 auto;
  margin-left: 8px;
}

.jbs-phone-verify__actions { margin-top: 24px; }

.jbs-phone-verify__actions > .jbs-btn {
  display: flex;
  width: 100%;
}
.jbs-phone-verify__actions > * + * { margin-top: 10px; }

@media (max-width: 600px) {
  .jbs-phone-verify {
    margin: 16px;
    padding: 20px 16px;
  }
}

/* ── 限時競標(pay/time_limited_bids.html)──────────────────────────────── */

.jbs-bid-card {
  margin-bottom: 10px;
  background: var(--jbs-card-bg);
}

/* 舊版倒數列的黃底(Nicepage palette-3-light-1) */
.jbs-bid-card__timer {
  display: flex;
  align-items: center;
  min-height: 80px;
  padding: 10px 16px;
  font-size: 14px;
  color: #111111;
  background: #f5d654;
}

.jbs-bid-card__clock {
  flex: 0 0 auto;
  width: 56px;
  margin-right: 12px;
}

.jbs-bid-card__countdown {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.jbs-bid-card__unit {
  min-width: 36px;
  margin: 0 4px;
  padding: 4px 6px;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  background: #333333;
  border-radius: 6px;
}

.jbs-bid-card__ended {
  font-size: 18px;
  font-weight: 700;
}

.jbs-bid-card__name {
  margin: 10px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--jbs-text-strong);
  word-break: break-word;
}

.jbs-bid-card__body {
  display: flex;
  align-items: center;
  padding: 0 10px 12px;
}

.jbs-bid-card__photo {
  flex: 0 0 42%;
  width: 42%;
  max-width: 200px;
  margin-right: 12px;
  border-radius: 12px;
}

.jbs-bid-card__info {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--jbs-text-strong);
}

.jbs-bid-card__label {
  font-size: 14px;
  color: var(--jbs-card-label);
}

.jbs-bid-card__value {
  display: flex;
  align-items: center;
  word-break: break-word;
}

.jbs-bid-card__icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-right: 6px;
}

.jbs-bid-card__actions {
  display: flex;
  flex-wrap: wrap;
  margin-top: 8px;
}
.jbs-bid-card__actions > * { margin: 0 8px 6px 0; }

.jbs-bid-modal__highest {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 32px;
  font-weight: 700;
  color: var(--jbs-price);
}

.jbs-bid-modal__coin {
  width: 40px;
  height: 40px;
  margin-right: 8px;
}

.jbs-bid-modal__send {
  display: flex;
  width: 100%;
  margin-top: 16px;
}

.jbs-bid-modal__balance {
  margin-top: 12px;
  font-size: 14px;
  color: var(--jbs-card-label);
  text-align: center;
}

/* ── 展示頁(templates/jbs/showcase.html)────────────────────────────────── */

.jbs-showcase {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px;
}

.jbs-showcase__section + .jbs-showcase__section {
  margin-top: 32px;
}

.jbs-showcase__title {
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--jbs-text-heading);
}

.jbs-showcase__row > * {
  margin: 0 8px 8px 0;
  vertical-align: middle;
}

.jbs-showcase__narrow { width: 92px; }

.jbs-showcase__gallery { max-width: 390px; margin-bottom: 16px; }

.jbs-showcase__slider-pair {
  display: grid;
  grid-template-columns: 770fr 485fr;
  grid-column-gap: 8px;
  margin-bottom: 16px;
}
.jbs-showcase__slider { margin-bottom: 16px; }
.jbs-showcase__panel-shell { min-height: 80px; padding: 12px; background: var(--jbs-card-bg); border: 1px dashed var(--jbs-border-card); }
.jbs-showcase__subtitle { margin: 16px 0 8px; font-size: 14px; font-weight: 700; }

/* transform 讓 position: fixed 的元件(吸底列)定位在框裡 */
.jbs-showcase__frame {
  position: relative;
  height: 72px;
  max-width: 390px;
  overflow: hidden;
  border: 1px dashed var(--jbs-border-card);
  transform: translateZ(0);
}

/* ── 結帳頁(pay/checkout.html 與 pay/_checkout_*.html)──────────────────────── */

.jbs-checkout {
  padding: 0 0 50px;
  line-height: 180%;
}

.jbs-checkout__billboard {
  position: relative;
  z-index: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin: 12px 16px 0;
  padding: 12px 12px 12px 16px;
  background: var(--jbs-card-bg);
  border-radius: 8px;
  word-break: break-word;
}

/* 主題沒有淺粉 token:底色與框都用偽元素疊 --jbs-price(同 .jbs-bill-rows__row--total),App 主題底色改用 --jbs-total-bg。
   疊在卡片白底上,不然透出灰色頁底變成灰紫 */
.jbs-checkout__billboard::before,
.jbs-checkout__billboard::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
}

.jbs-checkout__billboard::before {
  background: var(--jbs-price);
  opacity: .08;
}

.jbs-checkout__billboard::after {
  border: 1px solid var(--jbs-price);
  opacity: .3;
}

[data-jbs-theme^="app-"] .jbs-checkout__billboard::before {
  background: var(--jbs-total-bg);
  opacity: 1;
}

.jbs-checkout__billboard p,
.jbs-checkout__billboard h2,
.jbs-checkout__billboard h3,
.jbs-checkout__billboard h4,
.jbs-checkout__billboard strong,
.jbs-checkout__billboard i,
.jbs-checkout__billboard a,
.jbs-checkout__billboard ul,
.jbs-checkout__billboard ol,
.jbs-checkout__billboard li {
  all: revert;
}
.jbs-checkout__billboard .ck-content > :first-child { margin-top: 0; }
.jbs-checkout__billboard .ck-content > :last-child { margin-bottom: 0; }

.jbs-checkout__billboard-close {
  grid-column: 2;
  align-self: start;
  margin: -4px -6px 0 8px;
  font-size: 24px;
  line-height: 1;
  color: var(--jbs-text-label);
}

.jbs-checkout__banner { margin: 0 16px; padding-top: 20px; }
.jbs-checkout__banner img { width: 100%; }

[data-jbs-host="app"] .jbs-checkout__banner { padding-top: 0; }

[data-jbs-host="app"] .jbs-checkout__banner img {
  position: relative;
  top: -12px;
  height: 110px;
  padding: 10px;
  border-radius: 16px;
}

.jbs-checkout__layout {
  display: flex;
  flex-direction: column;
  margin: 0 16px;
}

.jbs-checkout__main { min-width: 0; }
.jbs-checkout__form { min-width: 0; margin-top: 12px; }

/* 分欄的斷點不能低於 884px:更窄時訂單表會蓋到右側的表單欄 */
@media (min-width: 961px) {
  .jbs-checkout__billboard,
  .jbs-checkout__banner,
  .jbs-checkout__layout { margin-right: 24px; margin-left: 24px; }

  /* 賣家上傳的橫幅常帶字,限高但不裁切 */
  .jbs-checkout__banner img { max-height: 360px; object-fit: contain; }

  .jbs-checkout__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    grid-column-gap: 20px;
    align-items: start;
  }

  /* 跟左欄第一張店家卡的上邊距(.jbs-checkout-store 641 起 16px)一樣,兩欄頂端對齊 */
  .jbs-checkout__form { margin-top: 16px; }
}

.jbs-checkout-panel {
  padding: 16px;
  background: var(--jbs-card-bg);
  border-radius: 8px;
  box-shadow: var(--jbs-card-shadow);
}

.jbs-checkout-panel + .jbs-checkout-panel { margin-top: 12px; }
.jbs-checkout-panel > * + * { margin-top: 20px; }

.jbs-checkout-section__title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--jbs-text-body);
}

/* 粉紅線在面板最上緣:填色細條給圓角裁掉,不用 border-top(跟圓角一起畫兩端會往下彎成括號) */
.jbs-checkout-panel--summary {
  position: relative;
  overflow: hidden;
}
.jbs-checkout-panel--summary::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--jbs-price);
}

.jbs-checkout-panel--summary .jbs-checkout-summary--detail {
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.jbs-checkout-offer__row { position: relative; }

.jbs-checkout-offer__icon {
  position: absolute;
  top: 50%;
  left: 0;
  width: 24px;
  height: 24px;
  margin-top: -12px;
  pointer-events: none;
}

.jbs-checkout-offer__icon img { display: block; width: 24px; height: 24px; }

.jbs-checkout-offer__open {
  position: relative;
  display: block;
  width: 100%;
  min-height: 40px;
  padding: 8px 24px 8px 36px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--jbs-text-body);
  text-align: left;
  overflow-wrap: break-word;
  background: none;
  border: 0;
}

.jbs-checkout-offer__open > span { min-width: 0; }

.jbs-checkout-offer__open::after {
  content: '\203A';
  position: absolute;
  top: 50%;
  right: 0;
  margin-top: -14px;
  font-size: 24px;
  font-weight: 400;
  line-height: 28px;
  color: var(--jbs-card-label);
}

.jbs-checkout-section,
.jbs-checkout-field,
.jbs-checkout-pickup,
.jbs-checkout-pickup__city,
.jbs-checkout-ads { display: block; }

.jbs-checkout-pair,
.jbs-checkout-city {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  grid-gap: 0 8px;
}

.jbs-checkout-pair .jbs-checkout-field__select,
.jbs-checkout-city .jbs-checkout-field__select { margin: 0 0 8px; }

/* 泰國府名、馬來西亞城市名、美國州名長,手機兩格一列會截字:400px 以下一格一列(SK-05) */
@media (max-width: 399px) {
  .jbs-checkout-address__th,
  .jbs-checkout-address__my,
  .jbs-checkout-address__us { grid-template-columns: minmax(0, 1fr); }
}

/* 泰國四格自動帶出地名後提示字就不見了,每格上方要有看得到的標籤 */
.jbs-checkout-city__item { min-width: 0; margin-bottom: 8px; }
.jbs-checkout-city__label {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--jbs-card-text);
}

.jbs-checkout-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
}

.jbs-checkout-section__head .jbs-checkout-section__title { margin-right: 8px; }

/* 換選項時被點那一列由頁面程式補位(page.js keepInPlace);瀏覽器的 scroll anchoring 再補一次就會多捲 */
.jbs-checkout-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-gap: 8px;
  overflow-anchor: none;
}

/* 選中的外框不能用 :has(下限 Chrome 80),由頁面程式切 is-checked */
.jbs-checkout-option {
  position: relative;
  z-index: 0;
  background: var(--jbs-card-bg);
  border: 1px solid var(--jbs-border-card);
  border-radius: 4px;
}

.jbs-checkout-option.is-checked { border-color: var(--jbs-price); }

.jbs-checkout-option.is-checked::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  background: var(--jbs-price);
  border-radius: 3px;
  opacity: .08;
  pointer-events: none;
}

[data-jbs-theme^="app-"] .jbs-checkout-option.is-checked::before {
  background: var(--jbs-total-bg);
  opacity: 1;
}

/* 點擊範圍只到 label 這一列:框裡的期數選單、末五碼輸入框在 label 外,radio 蓋滿外框會點不到它們 */
.jbs-checkout-option__label {
  display: flex;
  align-items: flex-start;
  min-height: 42px;
  padding: 11px 12px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--jbs-text-strong);
}

/* accent-color 要 Chrome 93 / iOS 15.4,下限會是系統藍:圓鈕自己畫。上邊界 .7em 是 label 行高 1.4 的一半,兩個一起改 */
.jbs-checkout-option__label input {
  position: relative;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: calc(.7em - 9px) 8px 0 0;
  background: var(--jbs-card-bg);
  border: 2px solid var(--jb-border-strong);
  border-radius: 50%;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.jbs-checkout-option__label input:checked { border-color: var(--jbs-price); }

.jbs-checkout-option__label input:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  bottom: 2px;
  left: 2px;
  background: var(--jbs-price);
  border-radius: 50%;
}

.jbs-checkout-option__label input:disabled {
  border-color: var(--jb-text-disabled);
  cursor: not-allowed;
}

.jbs-checkout-option__label input:disabled ~ span { color: var(--jb-text-disabled); }

/* 不認得 :focus-visible 的舊瀏覽器(Chrome < 86、iOS < 15.4)整條 :not() 規則會被丟掉,退回一律顯示 */
.jbs-checkout-option__label input:focus {
  outline: var(--jbs-focus-outline);
  outline-offset: 2px;
  box-shadow: var(--jbs-focus-ring);
}

.jbs-checkout-option__label input:focus:not(:focus-visible) { outline: none; }

@media (hover: hover) {
  .jbs-checkout-option__label:hover input:enabled { border-color: var(--jbs-price); }
}

.jbs-checkout-option__label > span {
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-word;
}

/* 說明與子欄位(label 之後)對齊名稱;負的上邊界跟前一個的下邊界相抵,兩段之間留 4px */
.jbs-checkout-option > .jbs-checkout-option__label ~ * { margin: -6px 12px 10px 38px; }

.jbs-checkout-option__note {
  margin-bottom: 5px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--jbs-card-text);
  word-break: break-word;
}

.jbs-checkout-option__line { display: block; }

.jbs-checkout-installment > * + * { margin-top: 6px; }

.jbs-checkout-installment > .jbs-checkout-option__note { margin-bottom: 0; }

.jbs-checkout-atm { margin-bottom: 5px; }

/* 帳號清單、QR、上傳區用整個框的寬度(預設跟名稱對齊縮 38px);只有說明那行照名稱對齊 */
.jbs-checkout-option > .jbs-checkout-option__label ~ .jbs-checkout-atm--wide { margin-left: 12px; }
.jbs-checkout-atm--wide > .jbs-checkout-option__note { margin-left: 26px; }

.jbs-checkout-option > .jbs-checkout-field__select {
  min-height: 42px;
  margin: 0;
  padding: 0 12px;
  background-color: transparent;
  border: 0;
  border-radius: 4px;
}

.jbs-checkout-atm__photo { width: 100%; }

/* 上傳匯款憑證是這一塊的主要動作(泰國沒上傳不能結單),比 --sm 高 */
.jbs-checkout-atm__upload {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 40px;
  margin-bottom: 10px;
  font-size: 14px;
}

.jbs-checkout-atm__postfix {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.jbs-checkout-atm__label {
  margin-right: 8px;
  font-size: 14px;
  color: var(--jbs-card-text);
}

.jbs-checkout-atm__account {
  margin-top: 5px;
  padding: 3px 20px;
  font-weight: 600;
  color: var(--jbs-price);
  background: var(--jbs-card-bg);
  border-radius: 5px;
  word-break: break-word;
}

/* SEA:多張匯款憑證、匯款帳號清單(可複製)、掃碼匯款的帳號與 QR */
.jbs-checkout-atm__upload-area { margin-top: 10px; border-top: 1px solid #e3e4e8; }

.jbs-checkout-atm__title {
  margin: 8px 0 5px;
  font-size: 14px;
  font-weight: 600;
  color: var(--jbs-card-label);
}

.jbs-checkout-atm__photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  grid-gap: 6px;
  margin-bottom: 8px;
}

.jbs-checkout-bank { margin: 5px 0; }

.jbs-checkout-bank__item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 6px;
  padding: 6px 10px;
  background: var(--jbs-card-bg);
  border: 1px solid #e3e4e8;
  border-radius: 5px;
}

.jbs-checkout-bank__info { min-width: 0; word-break: break-word; }
.jbs-checkout-bank__name { font-weight: 600; color: var(--jbs-text-strong); }
.jbs-checkout-bank__account { font-weight: 600; color: var(--jbs-price); }

.jbs-checkout-bank__branch,
.jbs-checkout-bank__note {
  font-size: 12px;
  color: var(--jbs-card-label);
  white-space: pre-wrap;
}

.jbs-checkout-bank__copy { width: 32px; height: 32px; margin-left: 8px; }
.jbs-checkout-bank__copy.is-copied { background: var(--jb-color-brand-subtle); }

.jbs-checkout-bank--qr .jbs-checkout-field__select { margin-top: 5px; }
.jbs-checkout-bank--qr .jbs-btn { max-width: 100%; white-space: normal; word-break: break-word; }

.jbs-checkout-bank__qr {
  display: block;
  width: 100%;
  max-width: 240px;
  margin: 5px auto;
}

.jbs-checkout-bank__qr-large { display: block; width: 100%; }

/* SEA:收件地址的地區欄位(運送地區、寄送種類、取貨點、泰國地址)、商店公告、PDPA */
.jbs-checkout-address { display: block; }
.jbs-checkout-address__row { display: block; }

.jbs-checkout-address__th .jbs-checkout-field__input { display: block; width: 100%; }

.jbs-checkout-billboard { margin-bottom: 10px; word-break: break-word; }

.jbs-checkout-pdpa__heading {
  margin-top: 8px;
  font-size: 16px;
  font-weight: 600;
}

.jbs-checkout-field--inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 5px;
}

.jbs-checkout-field__label {
  display: inline-block;
  max-width: 100%;
  margin-bottom: 5px;
  word-break: break-word;
  font-size: 14px;
  line-height: 1.4;
  color: var(--jbs-card-text);
}

.jbs-checkout-field--inline .jbs-checkout-field__label {
  margin: 0 4px 0 0;
  font-size: 14px;
  font-weight: 600;
}

/* 必填只放一個價格色的 *,選填寫「(選填)」;卡片標題旁說明一次「* 必填」(K-47) */
.jbs-checkout-field__mark { margin-left: 2px; font-weight: 700; color: var(--jbs-price); }
.jbs-checkout-field__optional { margin-left: 4px; font-size: 13px; font-weight: 400; color: var(--jbs-card-label); }
.jbs-checkout-section__legend { margin-left: 8px; font-size: 13px; font-weight: 400; color: var(--jbs-text-body); white-space: nowrap; }
.jbs-checkout-section__legend .jbs-checkout-field__mark { margin: 0 2px 0 0; }

/* 輸入框字級不能小於 16px:iOS 聚焦時會整頁放大 */
.jbs-checkout-field__input,
.jbs-checkout-field__textarea,
.jbs-checkout-atm__input,
.jbs-checkout-birth__year,
.jbs-checkout-birth__part,
.jbs-checkout-reward__input,
.jbs-coupon-code__input {
  margin-bottom: 5px;
  padding: 9px;
  line-height: 1.25;
  color: var(--jbs-text-strong);
  background: var(--jbs-card-bg);
  border: 1px solid var(--jbs-border-card);
  border-radius: 8px;
}

.jbs-checkout-field__textarea { resize: none; }

.jbs-checkout-field--inline .jbs-checkout-field__input {
  flex: 1 1 100px;
  min-width: 0;
  max-width: 200px;
  margin-bottom: 0;
  padding: 6px;
}

.jbs-checkout-atm__input {
  flex: 1 1 8em;
  min-width: 5.5em;
  max-width: 12em;
  margin-bottom: 0;
  padding: 6px;
}

.jbs-checkout-field__select {
  display: block;
  width: 100%;
  min-height: 40px;
  margin: 10px 0 5px;
  padding: 8px 9px;
  font-size: 16px;
  line-height: 1.25;
  color: #2e2e2e;
  background: var(--jbs-card-bg);
  border: 1px solid var(--jbs-border-card);
  border-radius: 8px;
}

.jbs-checkout-field__select:focus {
  border-color: var(--jbs-focus-border);
  outline: var(--jbs-focus-outline);
  outline-offset: 2px;
  box-shadow: var(--jbs-focus-glow);
}

.jbs-checkout-field__select:focus:not(:focus-visible) { outline: none; }

.jbs-checkout-field__label + .jbs-checkout-field__select { margin-top: 0; }
.jbs-checkout-installment .jbs-checkout-field__select { margin: 0; }
.jbs-checkout-installment > * + .jbs-checkout-field__select { margin-top: 6px; }

.jbs-checkout-field__notice {
  display: block;
  font-size: 12px;
  color: var(--jbs-price);
}

/* 送出前的欄位錯誤(checkout/field-errors.js 插在欄位後面;並排的一列共用一行 __line,放在那一列後面) */
.jbs-field-error,
.jbs-field-error-line {
  display: block;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--jbs-error-text);
  white-space: pre-line;
  word-break: break-word;
}

.jbs-field-error-line .jbs-field-error {
  display: inline;
  margin: 0 8px 0 0;
}

.jbs-checkout-installment .jbs-field-error { margin: 4px 0 0; }

.jbs-field__input[aria-invalid="true"],
.jbs-checkout-field__select[aria-invalid="true"] { border-color: var(--jbs-error-text); }

.jbs-checkout-check {
  display: block;
  margin-bottom: 5px;
  overflow-wrap: break-word;
  cursor: pointer;
}

.jbs-checkout-check input { margin: 0 4px 0 0; vertical-align: middle; }

.jbs-checkout-check--brand input,
.jbs-checkout-split__all input,
.jbs-checkout-item__pick input {
  position: relative;
  width: 20px;
  height: 20px;
  margin: 0;
  vertical-align: text-bottom;
  background: var(--jbs-card-bg);
  border: 2px solid var(--jb-color-brand);
  border-radius: 3px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.jbs-checkout-check--brand input:checked::after,
.jbs-checkout-split__all input:checked::after,
.jbs-checkout-split__all input:indeterminate::after,
.jbs-checkout-item__pick input:checked::after {
  content: '\2713';
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  color: var(--jb-color-brand);
  transform: translate(-50%, -50%);
}

.jbs-checkout-split__all input:indeterminate::after { content: '\2212'; }

.jbs-checkout-section__head .jbs-checkout-check { margin: 0; }
.jbs-checkout-section__head .jbs-checkout-check > span { margin-left: 2px; color: var(--jbs-card-text); }

.jbs-checkout-tax {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  font-size: 14px;
}

.jbs-checkout-tax + .jbs-checkout-tax { margin-top: 4px; }
.jbs-checkout-tax__label { margin-right: 12px; color: var(--jbs-card-text); }
.jbs-checkout-tax__value { min-width: 0; color: var(--jbs-text-strong); overflow-wrap: break-word; }

.jbs-checkout-cvs {
  min-width: 0;
  margin: 10px 0 0;
  padding: 0;
  border: 0;
}

.jbs-checkout-cvs__info { margin-bottom: 5px; word-break: break-word; }

.jbs-checkout-cvs__btn {
  width: 100%;
  font-weight: 700;
  color: var(--jbs-price);
  background: var(--jbs-card-bg);
  border-color: var(--jbs-price);
}

@media (hover: hover) {
  .jbs-checkout-cvs__btn:hover { box-shadow: inset 0 0 0 1px var(--jbs-price); }
}

.jbs-checkout-pickup__address { word-break: break-word; }

.jbs-checkout-birth {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-gap: 0 8px;
}

.jbs-checkout-birth__year,
.jbs-checkout-birth__part {
  width: 100%;
  min-width: 0;
}

.jbs-checkout-summary {
  margin-bottom: 10px;
  padding: 5px;
  background: var(--jbs-card-bg);
  border: 1px solid #e3e4e8;
  border-radius: 5px;
  box-shadow: 0 2px 1px rgba(169, 169, 169, .5);
}

.jbs-checkout-summary__head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 3px;
}

.jbs-checkout-summary__store {
  min-width: 0;
  font-weight: 600;
  word-break: break-word;
}

/* ::before 蓋住整列,要收在列內:窄螢幕卡片貼齊視窗右緣,超出會撐出橫捲 */
.jbs-checkout-summary__toggle {
  position: static;
  border-radius: 0;
}
.jbs-checkout-summary__toggle::before {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: auto;
  height: auto;
  border-radius: 4px;
  transform: none;
}
.jbs-checkout-summary__toggle::after {
  content: '';
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(2px) rotate(-135deg);
  transition: transform .2s;
}
.jbs-checkout-summary__toggle[aria-expanded="false"]::after { transform: translateY(-2px) rotate(45deg); }
.jbs-checkout-summary__toggle:focus { outline: none; }
.jbs-checkout-summary__toggle:focus::before { outline: 2px solid var(--jb-color-focus-ring); outline-offset: -2px; }
.jbs-checkout-summary__toggle:focus:not(:focus-visible)::before { outline: none; }
@media (hover: hover) {
  .jbs-checkout-summary__toggle:hover::before { background: rgba(0, 0, 0, .03); }
}
.jbs-checkout-summary__toggle:active::before { background: rgba(0, 0, 0, .06); }

.jbs-checkout-summary__body {
  display: flex;
  flex-direction: column;
}

.jbs-checkout-summary__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 14px;
  line-height: 1.5;
}

.jbs-checkout-summary__label { margin-right: 8px; color: var(--jbs-text-body); }
/* 粉紅只給折扣(與總金額),數量、商品總額、運費、手續費用深色 */
.jbs-checkout-summary__value { font-weight: 500; color: var(--jbs-card-name); white-space: nowrap; }
.jbs-checkout-summary__row--discount > .jbs-checkout-summary__value { color: var(--jbs-price); }

.jbs-checkout-summary__note {
  flex: 1 1 100%;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--jbs-card-text);
}

.jbs-checkout-summary__parts { flex: 1 1 100%; }

.jbs-checkout-summary__row--discount.jbs-checkout-summary__row--right { padding-bottom: 0; }

/* 專屬折扣底下的明細、券列、紅利的使用點數共用同一條灰色縱線,左邊距與內縮要一起改 */
.jbs-checkout-summary__part,
.jbs-checkout-summary__coupons,
.jbs-checkout-summary__note--part {
  margin-left: 2px;
  padding-left: 12px;
  border-left: 2px solid var(--jbs-border-card);
}

.jbs-checkout-summary__part {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 2px;
  padding-bottom: 2px;
}

.jbs-checkout-summary__part-label { margin-right: 8px; color: var(--jbs-card-text); }
.jbs-checkout-summary__part-value { font-weight: 500; color: var(--jbs-price); white-space: nowrap; }

.jbs-checkout-summary__coupons .jbs-checkout-summary__row {
  flex-wrap: nowrap;
  align-items: center;
  min-height: 44px;
  padding-top: 0;
  padding-bottom: 0;
}

.jbs-checkout-summary__coupons .jbs-checkout-summary__label { min-width: 0; color: var(--jbs-card-text); word-break: break-word; }
.jbs-checkout-summary__coupons .jbs-checkout-summary__value { display: flex; align-items: center; color: var(--jbs-price); }

/* 刪除鈕外觀 22px,點擊範圍是 .jbs-icon-btn::before 的 44px;左邊留的空隙大於它往左多出的 11px,點擊範圍不蓋到金額。每列至少 44px 高,相鄰列的範圍才不重疊 */
.jbs-checkout-summary__delete {
  width: 22px;
  height: 22px;
  margin-left: 14px;
  background: url('../img/icon/cancel-circle.svg') center / contain no-repeat;
}

.jbs-checkout-summary__total {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 5px;
  border-top: 2px dashed #dfdfdf;
}

.jbs-checkout-summary__total > .jbs-checkout-summary__label {
  font-size: 16px;
  font-weight: 700;
  color: var(--jbs-card-name);
}

.jbs-checkout-summary__total-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--jbs-price);
  white-space: nowrap;
}

.jbs-checkout-summary__total > .jbs-checkout-summary__note { margin-top: 4px; }

/* 左右外推 8px 再內縮 8px,兩個值要一起改 */
.jbs-checkout-summary--detail .jbs-checkout-summary__total {
  position: relative;
  z-index: 0;
  align-items: center;
  margin: 8px -8px 0;
  padding: 10px 8px;
  border-top: 0;
  border-radius: 8px;
}

.jbs-checkout-summary--detail .jbs-checkout-summary__total::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  background: var(--jbs-price);
  border-radius: inherit;
  opacity: .08;
}

[data-jbs-theme^="app-"] .jbs-checkout-summary--detail .jbs-checkout-summary__total::before {
  background: var(--jbs-total-bg);
  opacity: 1;
}

/* 美金參考價的上方間距要放在值上、不放在列上:值是空的時候整列才沒有高度
   (App 不載寫值的 js/buyer_currency.js,列會一直空著) */
.jbs-usd-ref { margin: 0; text-align: left; }
.jbs-usd-ref__value { display: inline-block; padding-top: 5px; color: var(--jbs-text-body); }

@media (min-width: 641px) {
  .jbs-usd-ref__value { font-size: 12px; }
}

.jbs-usd-ref__value::before { content: '\2248\00a0'; }
.jbs-usd-ref__value:empty { display: none; }

.jbs-checkout-terms { margin: 5px 0; overflow-wrap: break-word; }
.jbs-checkout-terms .jbs-checkout-check { display: inline; margin: 0; font-size: 16px; color: #484848; }

.jbs-checkout-terms__link {
  display: inline-block;
  margin-left: 7%;
  font-size: 14px;
  color: var(--jbs-price);
}

.jbs-checkout-actions {
  display: grid;
  grid-template-columns: 1fr;
}

.jbs-checkout-actions__btn {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--jbs-radius-cta);
}

.jbs-checkout-actions__cancel {
  display: block;
  padding: 13px 0;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  text-decoration: underline;
  color: var(--jbs-card-label);
}

.jbs-checkout-linepay {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 5px;
  font-size: 14px;
  color: var(--jbs-card-label);
}

.jbs-checkout-linepay > * + * { margin-left: 4px; }
.jbs-checkout-linepay__logo { width: auto; height: 15px; }
.jbs-checkout-linepay__logo + .jbs-checkout-linepay__logo { height: 28px; }

@media (max-width: 640px) {
  .jbs-checkout-linepay__logo { height: 25px; }
  .jbs-checkout-linepay__logo + .jbs-checkout-linepay__logo { height: 45px; margin-left: 14px; }
}

.jbs-checkout-ads__label { margin: 5px; padding-top: 30px; font-size: 14px; color: #717171; }
.jbs-checkout-ads__item { display: block; }
.jbs-checkout-ads__item img { display: inline-block; max-width: 225px; }
[data-jbs-host="app"] .jbs-checkout-ads__item { margin-top: 60px; }

.jbs-checkout-ads__item--adsense {
  max-width: 350px;
  margin-top: 10px;
  padding-top: 70px;
  text-align: center;
  background: #dfdfdf;
}

[data-jbs-host="app"] .jbs-checkout-ads__item--adsense { margin-top: 10px; }

@media (max-width: 960px) {
  .jbs-checkout-ads__item { text-align: center; }
  .jbs-checkout-ads__item img { max-width: 100%; }
  .jbs-checkout-ads__item--adsense,
  [data-jbs-host="app"] .jbs-checkout-ads__item { padding-right: 40px; padding-left: 40px; }
}

.jbs-checkout-store {
  position: relative;
  z-index: 1;
  margin: 12px 0;
  background: var(--jbs-card-bg);
  border-radius: 8px;
  box-shadow: var(--jbs-card-shadow);
}

.jbs-checkout-store__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  padding: 16px 12px 4px;
}

.jbs-checkout-store__identity {
  flex: 0 0 80px;
  width: 80px;
  margin: 0 12px 8px 0;
  text-align: center;
}

.jbs-checkout-store__avatar {
  width: 80px;
  height: 80px;
  overflow: hidden;
  background: url('../img/checkout/bg-avatar.png') right center / cover no-repeat;
  border: 2px solid var(--jbs-border-card);
  border-radius: 50%;
}

.jbs-checkout-store__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jbs-checkout-store__vip {
  position: relative;
  margin-top: -10px;
  font-size: 12px;
  line-height: 1.3;
}

.jbs-checkout-store__vip-badge {
  display: inline-block;
  max-width: 100%;
  padding: 1px 8px;
  font-weight: 700;
  color: var(--jbs-vip-text);
  overflow-wrap: break-word;
  background: var(--jbs-vip-bg);
  border-radius: 10px;
}

.jbs-checkout-store__vip-expiry {
  display: block;
  margin-top: 2px;
  color: var(--jbs-card-label);
  overflow-wrap: break-word;
}

/* 資料欄 flex:1 1 14em(電話整串不斷、Email 從 @ 後換行所需的寬度):頭像旁放不下時整欄換到頭像下面、用滿卡片寬度 */
.jbs-checkout-store__body {
  flex: 1 1 14em;
  min-width: 0;
  margin-bottom: 8px;
  font-size: 12px;
}

/* 資料欄 flex:1 1 12em,旁邊放不下兩顆連結圖示(320 寬、字放大)時圖示換到資料欄下面,店名與紅利用滿整個右欄 */
.jbs-checkout-store__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}

.jbs-checkout-store__main {
  flex: 1 1 12em;
  min-width: 0;
  font-size: 13px;
}

.jbs-checkout-store__name {
  display: -webkit-box;
  overflow: hidden;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--jbs-card-name);
  word-break: break-word;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.jbs-checkout-store__reward {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.jbs-checkout-store__reward > * { margin: 8px 8px 0 0; }

.jbs-checkout-store__points {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  color: var(--jbs-card-text);
}
.jbs-checkout-store__points span { white-space: nowrap; }
.jbs-checkout-store__points img { flex: 0 0 auto; width: 20px; height: 20px; margin-right: 4px; }
.jbs-checkout-store__points strong {
  margin-left: 4px;
  font-size: 16px;
  font-weight: 700;
  color: var(--jbs-card-name);
  white-space: nowrap;
}

.jbs-checkout-store__links {
  display: flex;
  flex: 0 0 56px;
  flex-direction: column;
  margin-left: auto;
  padding-left: 8px;
  box-sizing: content-box;
}

.jbs-checkout-store__link {
  display: block;
  width: 56px;
  height: 32px;
}
.jbs-checkout-store__link + .jbs-checkout-store__link { margin-top: 8px; }
.jbs-checkout-store__link img { width: 56px; height: 32px; object-fit: contain; }

.jbs-checkout-store__contacts {
  padding-top: 8px;
  font-size: 1em;
  line-height: 1.4;
  color: var(--jbs-card-text);
}

.jbs-checkout-store__contact {
  display: flex;
  align-items: flex-start;
  min-width: 0;
}
.jbs-checkout-store__contact + .jbs-checkout-store__contact { margin-top: 4px; }
.jbs-checkout-store__contact > span { min-width: 0; }
.jbs-checkout-store__contact--phone > span { white-space: nowrap; }
.jbs-checkout-store__contact--mail > span { overflow-wrap: normal; word-break: normal; }
.jbs-checkout-store__contact img { flex: 0 0 auto; width: 16px; height: 16px; margin: 1px 6px 0 0; }

.jbs-checkout-store__facts {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  padding: 8px 12px 12px;
  border-top: 1px solid var(--jbs-border-card);
}

.jbs-checkout-store__figures {
  flex: 1 1 9em;
  min-width: 0;
  margin-right: 8px;
}

.jbs-checkout-store__counts { margin: 0; }
.jbs-checkout-store__counts > span {
  display: inline-block;
  margin-right: 14px;
  padding: 5px 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--jbs-card-label);
  word-break: break-word;
}
.jbs-checkout-store__counts strong {
  font-size: 16px;
  font-weight: 700;
  color: var(--jbs-card-name);
  white-space: nowrap;
}

/* 同付款單卡片的收合鈕:::before 蓋住整列;這一列在卡片底,要跟著卡片下緣的圓角 */
.jbs-checkout-store__toggle {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  max-width: 50%;
  min-height: 32px;
  margin-left: auto;
  padding: 4px 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--jbs-price);
  text-align: right;
  word-break: normal;
  overflow-wrap: break-word;
}
.jbs-checkout-store__toggle::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: 0 0 8px 8px;
}
.jbs-checkout-store__toggle::after {
  content: '';
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin: 0 3px 0 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s;
}
.jbs-checkout-store__toggle[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
.jbs-checkout-store__toggle:focus { outline: none; }
.jbs-checkout-store__toggle:focus::before { outline: 2px solid var(--jb-color-focus-ring); outline-offset: -2px; }
.jbs-checkout-store__toggle:focus:not(:focus-visible)::before { outline: none; }
@media (hover: hover) {
  .jbs-checkout-store__toggle:hover::before { background: rgba(0, 0, 0, .03); }
}
.jbs-checkout-store__toggle:active::before { background: rgba(0, 0, 0, .06); }

@media (min-width: 641px) {
  .jbs-checkout-store { margin: 16px 0; }
  .jbs-checkout-store__head { padding: 20px 16px 4px; }
  .jbs-checkout-store__facts { padding: 8px 16px 12px; }
  .jbs-checkout-store__identity { flex-basis: 88px; width: 88px; }
  .jbs-checkout-store__avatar { width: 88px; height: 88px; }
  .jbs-checkout-store__contacts { display: flex; flex-wrap: wrap; }
  .jbs-checkout-store__contact { margin-right: 16px; }
  .jbs-checkout-store__contact + .jbs-checkout-store__contact { margin-top: 0; }
}

/* --jbs-orders-pad:加購條、多件優惠、預購的標題列左右推到這個內距,貼齊卡片邊;overflow 裁掉它們在卡片圓角外的直角 */
.jbs-checkout-orders {
  --jbs-orders-pad: 16px;
  --jbs-pick-col: 32px;
  margin: 0;
  padding: 0 var(--jbs-orders-pad);
  overflow: hidden;
  background: var(--jbs-card-bg);
  border-radius: 8px;
  box-shadow: var(--jbs-card-shadow);
}

/* 店家卡的收合列就寫著「商品明細」,標題只給讀屏(同 .us-sr-only) */
.jbs-checkout-orders__title {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.jbs-checkout-item { border-top: 1px solid var(--jbs-border-card); }
.jbs-checkout-orders__title ~ .jbs-checkout-items:first-of-type > :first-child,
.jbs-checkout-add-on:not([hidden]) + .jbs-checkout-item { border-top: 0; }

/* 備註框在縮圖與文字欄之後、自己一列整列寬(K-12):窄螢幕文字欄只剩 225px,整列多約 100px */
.jbs-checkout-item {
  display: flex;
  flex-wrap: wrap;
  padding: 12px 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--jbs-card-text);
}

.jbs-checkout-item__date { color: var(--jbs-card-label); }

/* 勾選框在照片左邊;整個 label 當點擊範圍,最小 44px(往左借 12px,在列裡佔 --jbs-pick-col) */
.jbs-checkout-item__pick {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  align-self: flex-start;
  min-width: calc(var(--jbs-pick-col) + 12px);
  min-height: 44px;
  margin-left: -12px;
  padding-left: 12px;
  cursor: pointer;
}

.jbs-checkout-item__pick input { margin: 0 10px 0 0; flex: 0 0 auto; }

/* 勾選介面打開時(split.js 加 data-split-active),沒有勾選框的列(贈品、子單、商品贈品)留同寬的空欄,照片對齊 */
.jbs-checkout-orders[data-split-active] .jbs-checkout-items:not(.jbs-checkout-items--muted) > .jbs-checkout-item > .jbs-checkout-item__photo:first-child { margin-left: var(--jbs-pick-col); }

/* 沒勾的列:內容變淡,勾選框和提示條維持可讀(提示條在 __main 外面) */
.jbs-checkout-item[data-split-off] .jbs-checkout-item__photo,
.jbs-checkout-item[data-split-off] .jbs-checkout-item__main,
.jbs-checkout-item[data-split-off] .jbs-checkout-item__remark { opacity: 0.45; }

/* 底色與字色是設計稿指定的值,不是主題色 */
.jbs-checkout-item__skip-note {
  --jbs-skip-note-bg: #fff8e6;
  --jbs-skip-note-text: #9a6400;
  flex: 1 1 100%;
  margin-top: 8px;
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--jbs-skip-note-text);
  background: var(--jbs-skip-note-bg);
  border-radius: 6px;
}

.jbs-checkout-split {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid var(--jbs-border-card);
}

.jbs-checkout-split__all {
  display: flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  margin-right: 16px;
  cursor: pointer;
}

.jbs-checkout-split__all input { margin: 0 8px 0 0; flex: 0 0 auto; }
.jbs-checkout-split__all > span { color: var(--jbs-card-name); font-weight: var(--jbs-checkout-split-all-weight); }
.jbs-checkout-split__count { min-width: 0; max-width: 100%; color: var(--jbs-checkout-split-count); font-size: 13px; overflow-wrap: break-word; }

.jbs-checkout-item__photo {
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  padding: 0;
  overflow: hidden;
  background: var(--jb-bg-muted);
  border-radius: 4px;
}
.jbs-checkout-item__photo:enabled { cursor: zoom-in; }
.jbs-checkout-item__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }

.jbs-checkout-item__main {
  flex: 1 1 0;
  min-width: 0;
  margin-left: 10px;
}
.jbs-checkout-item > .jbs-checkout-item__remark { flex: 1 1 100%; }

.jbs-checkout-item__name {
  font-weight: 700;
  line-height: 1.45;
  color: var(--jbs-card-name);
  word-break: break-word;
}
.jbs-checkout-item__name--need-style { color: var(--jbs-error-text); }

.jbs-checkout-item__date { margin-top: 2px; font-size: 13px; }

.jbs-checkout-item__line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.jbs-checkout-item__line + .jbs-checkout-item__line { margin-top: 0; }

.jbs-checkout-item__label { min-width: 0; margin-right: 8px; word-break: break-word; }
.jbs-checkout-item__label > [translate="no"] { white-space: nowrap; }
.jbs-checkout-item__off { color: var(--jbs-price); white-space: nowrap; }

.jbs-checkout-item__subtotal {
  margin-left: auto;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--jbs-price);
  white-space: nowrap;
}

/* 預購(未計費)整列刻意淡化:文字、金額都用 card-label,不用要讀的字的 card-text */
.jbs-checkout-items--muted .jbs-checkout-item,
.jbs-checkout-items--muted .jbs-checkout-item__subtotal,
.jbs-checkout-items--muted .jbs-checkout-item__off { color: var(--jbs-card-label); }
.jbs-checkout-items--muted .jbs-checkout-item__photo { opacity: 0.7; }
.jbs-checkout-item__badge--gift { font-weight: 700; padding-left: 8px; }
.jbs-checkout-item__badges { display: flex; flex-wrap: wrap; margin-top: 2px; }

.jbs-checkout-item__badge {
  display: inline-flex;
  align-items: center;
  margin: 4px 6px 0 0;
  padding: 1px 8px 1px 4px;
  font-size: 12px;
  font-weight: 400;
}
.jbs-checkout-item__badge img { flex: 0 0 auto; width: 16px; height: 16px; margin-right: 4px; object-fit: contain; }
.jbs-checkout-item__badge > span { min-width: 0; }

/* 規格平常一行、截斷;超出一行時才有展開鈕(actions.js 量),鈕的 ::before 蓋滿整行,整行都能點 */
.jbs-checkout-item__spec {
  position: relative;
  display: flex;
  align-items: flex-start;
  margin-top: 4px;
  font-size: 13px;
}

.jbs-checkout-item__spec-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.jbs-checkout-item__spec.is-open .jbs-checkout-item__spec-text { white-space: normal; word-break: break-word; }

.jbs-checkout-item__spec-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 20px;
  margin-left: 4px;
  color: var(--jbs-card-label);
  cursor: pointer;
}
.jbs-checkout-item__spec-toggle::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 0;
  bottom: -6px;
  left: 0;
}
.jbs-checkout-item__spec-toggle::after {
  content: '';
  border-top: 5px solid currentColor;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
}
.jbs-checkout-item__spec.is-open .jbs-checkout-item__spec-toggle::after { transform: rotate(180deg); }

/* 「! 選樣式」是待處理的錯誤色,不跟主題 */
.jbs-checkout-item__style {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin-top: 4px;
  padding: 2px 10px 2px 6px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--jbs-error-text);
  text-align: left;
  word-break: break-word;
  background: var(--jbs-card-bg);
  border: 1px solid var(--jb-color-error);
  border-radius: var(--jbs-radius-btn);
  cursor: pointer;
}

/* 下拉箭頭用 ::after(::before 是點擊範圍) */
.jbs-checkout-item__style::after {
  content: '';
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-left: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.jbs-checkout-item__style::before {
  content: '';
  position: absolute;
  top: -4px;
  right: -4px;
  bottom: -4px;
  left: -4px;
}

.jbs-checkout-item__style-mark {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 1.4em;
  height: 1.4em;
  margin-right: 5px;
  font-size: 11px;
  line-height: 1;
  color: var(--jb-text-on-fill);
  background: var(--jb-color-error);
  border-radius: 50%;
}

.jbs-checkout-item__actions { display: flex; flex-wrap: wrap; }
.jbs-checkout-item__actions > * { margin: 8px 8px 0 0; }

.jbs-checkout-item__remark {
  display: flex;
  align-items: flex-start;
  width: 100%;
  margin-top: 8px;
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--jbs-card-text);
  text-align: left;
  background: var(--jb-bg-muted);
  border-radius: 6px;
}
.jbs-checkout-item__remark--edit { cursor: pointer; }
.jbs-checkout-item__remark-label { flex: 0 0 auto; margin-right: 4px; }

.jbs-checkout-item__remark-label + span {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--jbs-card-name);
  white-space: pre-line;
  word-break: break-word;
}
.jbs-checkout-item__remark .jbs-icon { flex: 0 0 auto; margin: 2px 0 0 8px; font-size: 16px; }

@media (max-width: 359px) {
  .jbs-checkout-item__photo { width: 60px; height: 60px; }
}

@media (min-width: 769px) {
  .jbs-checkout-orders { --jbs-orders-pad: 18px; }
  .jbs-checkout-item__photo { width: 84px; height: 84px; }
  .jbs-checkout-item__name { font-size: 15px; }
  .jbs-checkout-item__subtotal { font-size: 20px; }
}

@media (max-width: 320px) {
  [data-jbs-host="app"] .jbs-checkout-summary__row .jbs-checkout-summary__label { font-size: 13px; }
}

@media (max-width: 280px) {
  [data-jbs-host="app"] .jbs-checkout-summary__row .jbs-checkout-summary__label { font-size: 12px; }
}

.jbs-checkout-add-on__bar {
  display: flex;
  align-items: center;
  width: calc(100% + 2 * var(--jbs-orders-pad));
  min-height: 39px;
  margin: 0 calc(-1 * var(--jbs-orders-pad));
  padding: 6px var(--jbs-orders-pad);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--jbs-card-name);
  text-align: left;
  background: var(--jbs-addon-bg);
  cursor: pointer;
}
.jbs-checkout-add-on__bar:focus-visible { outline-offset: -2px; }
.jbs-checkout-add-on__bar .jbs-icon { flex: 0 0 auto; margin-right: 6px; font-size: 16px; color: var(--jbs-checkout-add-on-icon); }
.jbs-checkout-add-on__label { flex: 1 1 auto; min-width: 0; word-break: break-word; }
.jbs-checkout-add-on__go { display: inline-flex; flex: 0 0 auto; margin-left: 8px; color: var(--jbs-price); }
.jbs-checkout-add-on__go > * + * { margin-left: 4px; }

.jbs-checkout-offers { margin: 0; padding: 0 0 4px; font-size: 14px; line-height: 1.5; }
.jbs-checkout-offers__title,
.jbs-checkout-orders__kind {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-height: 39px;
  margin: 12px calc(-1 * var(--jbs-orders-pad)) 0;
  padding: 6px var(--jbs-orders-pad);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--jbs-card-name);
  background: var(--jb-bg-muted);
}
.jbs-checkout-offers__title img { flex: 0 0 auto; width: 16px; height: 16px; margin-right: 6px; object-fit: contain; }
.jbs-checkout-offers__list { margin: 0; padding: 0; list-style: none; }
.jbs-checkout-offers__row { padding: 10px 0; border-top: 1px solid var(--jbs-border-card); }
.jbs-checkout-offers__list > :first-child { border-top: 0; }
.jbs-checkout-offers__name { font-weight: 700; color: var(--jbs-card-name); word-break: break-word; }
.jbs-checkout-offers__numbers { display: flex; flex-wrap: wrap; color: var(--jbs-card-text); }
.jbs-checkout-offers__numbers > * { min-width: 0; margin-right: 16px; word-break: break-word; }
.jbs-checkout-offers__numbers [translate="no"],
.jbs-checkout-offers__discount [translate="no"] { white-space: nowrap; }
.jbs-checkout-offers__discount { color: var(--jbs-card-text); }
.jbs-checkout-offers__discount > [translate="no"] { font-weight: 700; color: var(--jbs-price); }

.jbs-checkout-orders__kind { justify-content: space-between; }
.jbs-checkout-orders__kind > * { margin: 2px 8px 2px 0; }

.jbs-checkout-orders__kind-toggle {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  font-weight: 600;
  text-align: left;
  word-break: break-word;
  cursor: pointer;
}

.jbs-checkout-orders__kind-toggle::after {
  content: '';
  flex: 0 0 auto;
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 5px solid currentColor;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
}

.jbs-checkout-orders__kind-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }
/* 只是說明、不是金額也不能點:灰字。標題列底色 #F3F4F6 上 #717171 只有 4.43:1,用 #6B6B6B(4.84:1) */
.jbs-checkout-orders__kind-note { font-size: 12px; font-weight: 400; color: #6b6b6b; }

.jbs-pick-list > * + * { margin-top: 12px; }

/* 加購的「已選品項/上限」、多樣式的「可選擇數量」:固定在對話框捲動區頂端,要有底色,捲上來的列才不會透出來 */
.jbs-pick-list__summary,
.jbs-multi-styles__head {
  padding: 8px 12px;
  font-size: 14px;
  color: var(--jbs-text-strong);
  background: var(--jb-bg-muted);
  border-radius: 4px;
}

/* sticky 從捲動區的 padding 內緣算:top 要抵掉 .jbs-modal__body 的 padding-top,不然上面留一條縫透出列 */
.jbs-modal__body .jbs-pick-list__summary,
.jbs-modal__body .jbs-multi-styles__head {
  position: sticky;
  top: -16px;
  z-index: 1;
}

.jbs-pick-list__summary { margin-bottom: 12px; }

.jbs-pick-item {
  display: flex;
  align-items: flex-start;
}

.jbs-pick-item__radio { flex: 0 0 auto; margin: 4px 8px 0 0; }
.jbs-pick-item__thumb { display: flex; flex: 0 0 auto; }
.jbs-pick-item__radio,
.jbs-pick-item__thumb,
.jbs-pick-item__name[for] { cursor: pointer; }
.jbs-pick-item__photo { flex: 0 0 auto; width: 64px; height: 64px; margin-right: 10px; object-fit: cover; }

.jbs-pick-item__body {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  min-width: 0;
}

.jbs-pick-item__body > * + * { margin-top: 6px; }
.jbs-pick-item__body > .jbs-qty { align-self: flex-start; }
.jbs-pick-item__name { word-break: break-word; }
.jbs-pick-item__price { color: var(--jbs-price); }
.jbs-pick-item__select { width: 100%; }
.jbs-pick-item__sold-out { color: #ed5565; }

.jbs-pick-item--add-on {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  grid-column-gap: 10px;
  align-items: start;
}

.jbs-pick-item--add-on + .jbs-pick-item--add-on { padding-top: 12px; border-top: 1px solid var(--jbs-border-card); }
.jbs-pick-item--add-on .jbs-pick-item__photo { grid-row: 1 / span 2; margin-right: 0; }
.jbs-pick-item--add-on .jbs-pick-item__name { grid-column: 2; }
.jbs-pick-item__detail { grid-column: 2; min-width: 0; margin-top: 4px; }
.jbs-pick-item__detail > * + * { margin-top: 6px; }

.jbs-pick-item__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.jbs-pick-item__actions > * + * { margin-top: 6px; }
.jbs-pick-item__actions .jbs-pick-item__select { width: auto; max-width: 100%; }

@media (max-width: 420px) {
  .jbs-pick-item--add-on { grid-template-columns: 48px minmax(0, 1fr); }
  .jbs-pick-item--add-on .jbs-pick-item__photo { grid-row: 1; width: 48px; height: 48px; }
  .jbs-pick-item--add-on .jbs-pick-item__name { align-self: center; }
  .jbs-pick-item--add-on .jbs-pick-item__detail { grid-column: 1 / -1; margin-top: 8px; }
}

/* 框線畫在 ::after 疊在格子上面:畫在 .jbs-qty 自己的 border 會被格子的最小高度撐高,框高就不是 34 / 40px */
.jbs-qty {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: stretch;
  max-width: 100%;
  background: var(--jbs-qty-bg);
  border-radius: var(--jbs-radius-btn);
}
.jbs-qty > * + * { margin-left: var(--jbs-qty-gap); }

.jbs-qty::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border: var(--jbs-qty-frame);
  border-radius: inherit;
  pointer-events: none;
}

.jbs-qty:focus-within { box-shadow: var(--jbs-focus-glow); }
.jbs-qty:focus-within::after { border-color: var(--jbs-focus-border); }

/* 點擊範圍:::before 撐到 44px。它從 padding box 量起(框線內),左右外推的值要把框線寬算進去 */
.jbs-qty__btn {
  position: relative;
  flex: 0 0 auto;
  width: var(--jbs-qty-btn-w);
  min-height: 40px;
  font-size: var(--jbs-qty-glyph-size);
  line-height: 1;
  color: var(--jbs-text-strong);
  background-color: var(--jbs-card-bg);
  background-image: var(--jbs-qty-sign);
  background-position: center;
  background-size: 12px 2px;
  background-repeat: no-repeat;
  border: var(--jbs-qty-cell-border-w) solid var(--jbs-border-card);
  border-radius: var(--jbs-radius-btn);
  cursor: pointer;
}

.jbs-qty__btn:last-child {
  background-image: var(--jbs-qty-sign), var(--jbs-qty-sign);
  background-size: 12px 2px, 2px 12px;
}

.jbs-qty__btn::before {
  content: '';
  position: absolute;
  top: -3px;
  right: calc(var(--jbs-qty-cell-border-w) - 4px);
  bottom: -3px;
  left: calc(var(--jbs-qty-cell-border-w) - 4px);
}

.jbs-qty__btn:disabled,
.jbs-qty__btn[aria-disabled="true"] { color: var(--jb-text-disabled); background-color: var(--jbs-qty-btn-off-bg); cursor: not-allowed; }

.jbs-qty__input {
  flex: 0 1 var(--jbs-qty-input-w);
  width: var(--jbs-qty-input-w);
  min-width: 44px;
  margin-bottom: 0;
  padding: var(--jbs-qty-input-pad-y) 4px;
  text-align: center;
  border-width: var(--jbs-qty-cell-border-w);
  -moz-appearance: var(--jbs-qty-field-appearance);
  appearance: var(--jbs-qty-field-appearance);
}
.jbs-qty__input:focus { box-shadow: none; }
/* 用 display 開關上下箭頭,別改成經 var() 帶 -webkit-appearance:有的 Chrome 版本設回後不會再畫出預設箭頭 */
.jbs-qty__input::-webkit-inner-spin-button { display: var(--jbs-qty-spin); }

@media (max-width: 360px) {
  .jbs-pick-item__photo { width: 48px; height: 48px; }
}

.jbs-multi-styles,
.jbs-sub-orders { font-size: 14px; }
.jbs-multi-styles__head { display: flex; flex-wrap: wrap; justify-content: space-between; }
.jbs-multi-styles__list { margin-top: 4px; }
.jbs-multi-styles__total { font-size: 14px; }

.jbs-multi-styles__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #cccccc;
}

.jbs-multi-styles__body { min-width: 0; margin-right: 8px; }
.jbs-multi-styles__name { font-size: 16px; word-break: break-word; }
.jbs-multi-styles__out { display: block; color: #ed5565; }
.jbs-multi-styles__stock { display: block; font-size: 14px; color: var(--jbs-card-label); }

.jbs-sub-orders__split { padding-bottom: 12px; border-bottom: 1px solid #cccccc; }
.jbs-sub-orders__split > * + * { margin-top: 6px; }
.jbs-sub-orders__split-row { display: flex; align-items: center; }
.jbs-sub-orders__split-row > * + * { margin-left: 8px; }
.jbs-sub-orders__split-row .jbs-field__input { flex: 1 1 0; min-width: 0; }
.jbs-sub-orders__split-row .jbs-btn { flex: 0 0 auto; white-space: nowrap; }
.jbs-sub-orders__note { font-size: 12px; color: var(--jbs-card-label); }
.jbs-sub-orders__list { margin-top: 12px; }
.jbs-sub-orders__item { word-break: break-word; }
.jbs-sub-orders__item + .jbs-sub-orders__item { margin-top: 12px; padding-top: 12px; border-top: 1px solid #cccccc; }
.jbs-sub-orders__item > * + * { margin-top: 6px; }

.jbs-recommend {
  margin: 12px 0 0;
  overflow: hidden;
  line-height: 1.4;
  background: var(--jbs-card-bg);
  border-radius: 8px;
  box-shadow: var(--jbs-card-shadow);
}

.jbs-recommend__head {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--jbs-border-card);
}

.jbs-recommend__head > * + * { margin-left: 8px; }
.jbs-recommend__title { min-width: 0; font-size: 16px; font-weight: 700; color: var(--jbs-card-name); word-break: break-word; }
.jbs-recommend__more { flex: 0 0 auto; margin-left: auto; font-size: 14px; font-weight: 700; color: var(--jbs-price); }
.jbs-recommend__more::after { content: ' \203a'; }

.jbs-recommend__list {
  display: flex;
  align-items: stretch;
  padding: 12px 16px 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 16px;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 641px) {
  .jbs-recommend { margin-top: 16px; }
}

.jbs-recommend__list > .jbs-product-card {
  flex: 0 0 136px;
  margin-right: 10px;
  scroll-snap-align: start;
}

.jbs-recommend__list > .jbs-product-card:last-child { margin-right: 0; }

/* 固定四格:只有一到三筆時卡片不會被拉寬 */
@media (min-width: 600px) {
  .jbs-recommend__list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-column-gap: 12px;
    grid-row-gap: 12px;
    overflow-x: visible;
  }
  .jbs-recommend__list > .jbs-product-card { margin-right: 0; }
}

/* 共用商品卡(pay/_product_card_jbs.html):寬度與排列由外層的清單決定 */
.jbs-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--jbs-card-bg);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(28, 22, 24, .06), 0 2px 8px rgba(28, 22, 24, .07);
}

.jbs-product-card__link { display: block; min-width: 0; }
/* 卡片 overflow: hidden,焦點環往內縮才不會被切掉 */
.jbs-product-card__link:focus-visible { outline-offset: -2px; }

/* 圖框比例跟商家的商品圖一致:一般 1:1,直式主題(商店前台的長圖主題、結帳推薦 API 的 portrait_photo)在清單加
   .jbs-product-cards--portrait 改 2:3。圖一律 contain 不裁切:商家常把文字做在圖的上下緣;直式主題裡沒有直式圖的商品會退回正方形圖 */
.jbs-product-cards--portrait { --jbs-product-ratio: 150%; }

.jbs-product-card__media {
  position: relative;
  padding-top: var(--jbs-product-ratio, 100%);
  background: var(--jb-bg-muted);
}
.jbs-product-card__media[data-card-zoom] { cursor: zoom-in; }
.jbs-product-card__media[data-card-zoom]:focus-visible { outline-offset: -2px; }

.jbs-product-card__photo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.jbs-product-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  transform: translate(-50%, -50%);
}

.jbs-product-card__timer {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--jb-text-on-fill);
  background: var(--jbs-price);
}

.jbs-product-card.is-unavailable .jbs-product-card__photo { opacity: var(--jbs-card-off-photo-opacity); }

/* 長譯文放大字級時切掉:完整的字在下方狀態鈕,溢出會把窄卡片撐出橫捲 */
.jbs-product-card__veil {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: none;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  padding: 8px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  overflow-wrap: break-word;
  color: var(--jb-text-on-fill);
  background: rgba(117, 117, 117, .8);
}
.jbs-product-card.is-unavailable .jbs-product-card__veil { display: var(--jbs-card-veil-display); }

.jbs-product-card__head { padding: 8px 10px 0; }

.jbs-product-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  padding: 2px 10px 10px;
}
.jbs-product-card__body > * + * { margin-top: 2px; }

/* 角標放圖下方:疊在圖上會蓋掉商家做在圖上緣的字 */
.jbs-product-card__badges {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 2px;
}
.jbs-product-card__badge {
  margin: 0 4px 2px 0;
  padding: 0 6px;
  font-size: 11px;
  line-height: 1.6;
}
.jbs-product-card__app { color: var(--jb-text-on-fill); background: #ff6b00; }

/* 品名固定兩行高,同一排的價格對齊 */
.jbs-product-card__name {
  display: -webkit-box;
  min-height: 2.9em;
  overflow: hidden;
  font-size: var(--jbs-card-name-size);
  line-height: 1.45;
  color: var(--jbs-text-strong);
  word-break: break-word;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.jbs-product-card__vip {
  display: inline-block;
  max-width: 100%;
  padding: 0 5px;
  overflow-wrap: break-word;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  vertical-align: 2px;
  color: var(--jbs-vip-text);
  background: var(--jbs-vip-bg);
  border-radius: 4px;
}

.jbs-product-card__price {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--jbs-price);
  overflow-wrap: break-word;
}
.jbs-product-card__sub {
  font-size: var(--jbs-card-sub-size);
  line-height: 1.4;
  color: #6b6b6b;
  overflow-wrap: break-word;
}
.jbs-product-card__sub b { font-weight: 700; color: var(--jbs-price); }
.jbs-product-card__sub--strike [data-card-original] { text-decoration: line-through; }
.jbs-product-card__campaign > * + * { margin-top: 2px; }
.jbs-product-card [data-card-price],
.jbs-product-card [data-card-points],
.jbs-product-card [data-card-original] {
  display: inline-block;
  max-width: 100%;
  word-break: normal;
  overflow-wrap: break-word;
}

.jbs-product-card__body > .jbs-product-card__spacer { flex: 1 1 auto; min-height: 8px; margin-top: 0; }

.jbs-product-card .jbs-product-card__buy,
.jbs-product-card .jbs-product-card__status {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 32px;
  margin-top: 0;
  padding: 4px 8px;
  font-size: var(--jbs-card-buy-size);
  font-weight: 700;
  line-height: 1.4;
  border-radius: var(--jbs-radius-btn);
}
.jbs-product-card .jbs-product-card__buy {
  color: var(--jbs-card-buy-text);
  background: var(--jbs-card-buy-bg);
  border: 0;
  box-shadow: none;
}
@media (hover: hover) {
  .jbs-product-card .jbs-product-card__buy:hover { background: var(--jbs-card-buy-hover-bg); }
}
.jbs-product-card .jbs-product-card__status {
  font-weight: var(--jbs-card-status-weight);
  color: var(--jbs-card-status-text);
  background: var(--jbs-card-status-bg);
  border: 1px solid var(--jbs-card-status-border);
}

.jbs-checkout-reward {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: 14px;
}

.jbs-checkout-offer__row + .jbs-checkout-reward { margin-top: 8px; }

.jbs-checkout-reward__label { margin: 0 8px 4px 0; font-size: 16px; }

.jbs-checkout-reward__input {
  display: inline-block;
  flex: 1 1 120px;
  min-width: 0;
  max-width: 160px;
  margin: 0 0 4px;
  font-size: 16px;
}

.jbs-checkout-reward__hint {
  flex: 0 0 100%;
  font-size: 14px;
  color: var(--jbs-card-text);
}

[data-jbs-host="app"] .jbs-checkout { font-size: 16px; }
[data-jbs-host="app"] .jbs-checkout-option__label { font-size: 16px; }
[data-jbs-host="app"] .jbs-checkout-summary__store { padding-bottom: 10px; font-size: 16px; }

/* ── 手機吸底列與明細面板(checkout.html 的 <main> 之後)──────────────────────
   960 以下才有(961 起兩欄,確認結單在右欄)。藏起來一律用 hidden:移出畫面的話 Playwright 仍算看得到,
   轉接層「看得到的確認結單剛好一顆」就會壞。頁面底部不讓位:捲到底時原本的確認結單一定在畫面上或已捲過,列是藏著的 */
.jbs-checkout-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: var(--jb-z-sticky);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 3px 12px calc(8px + env(safe-area-inset-bottom));
  background: var(--jbs-card-bg);
  border-top: 1px solid var(--jbs-border-card);
}

/* 分頁列 70px 內容 + 1px 上框,content-box 再加安全區 */
.jbs-app-header--tabbar ~ .jbs-checkout-bar {
  bottom: calc(71px + env(safe-area-inset-bottom));
  padding-bottom: 8px;
}

/* 子項的 margin-top 撐出換行後的列距;一行時列高 = 3 + 4 + 40 + 8 + 1 = 56px。
   __info 的 flex-grow 遠大於送出鈕:一行時空白都給 __info(鈕維持原寬),換行後鈕自己一行撐滿 */
.jbs-checkout-bar__info {
  display: flex;
  flex: 1000 1 auto;
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
  margin-top: 4px;
  margin-right: 8px;
}

.jbs-checkout-bar__total {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  min-width: 0;
  margin: 0 8px 0 0;
  line-height: 1.3;
}

.jbs-checkout-bar__label {
  margin-right: 6px;
  font-size: 14px;
  color: var(--jbs-text-body);
}

.jbs-checkout-bar__amount {
  font-size: 18px;
  font-weight: 700;
  color: var(--jbs-price);
  white-space: nowrap;
}

.jbs-checkout-bar__detail {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 4px;
  font-size: 13px;
  color: var(--jbs-card-label);
}

.jbs-checkout-bar__detail::before {
  content: '';
  position: absolute;
  top: -2px;
  right: 0;
  bottom: -2px;
  left: 0;
}

.jbs-checkout-bar__detail::after {
  content: '';
  width: 6px;
  height: 6px;
  margin-left: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(2px) rotate(225deg);
}

.jbs-checkout-bar__detail[aria-expanded="true"]::after { transform: translateY(-2px) rotate(45deg); }

.jbs-checkout-bar__submit {
  position: relative;
  flex: 1 0 auto;
  margin-top: 4px;
  padding-right: 16px;
  padding-left: 16px;
  font-weight: 700;
  border-radius: var(--jbs-radius-cta);
}

/* 定位從 1px 透明框內側算起:40px 的鈕要 -3px 才撐到 44px */
.jbs-checkout-bar__submit::before {
  content: '';
  position: absolute;
  top: -3px;
  right: 0;
  bottom: -3px;
  left: 0;
}

/* 面板與遮罩蓋頁面、不蓋吸底列:page.js 打開時把 bottom 設成 barOffset() */
.jbs-checkout-sheet {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: var(--jb-z-overlay);
}

/* cursor: pointer 不能拿掉:iOS Safari 對不可點的 div 不送 click */
.jbs-checkout-sheet__backdrop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: var(--jbs-overlay);
  cursor: pointer;
  animation: jbs-fade-in .2s ease-out;
}

/* is-closing:page.js 播完收合動畫(200ms,同 SHEET_CLOSE_MS)才藏 */
.jbs-checkout-sheet.is-closing { pointer-events: none; }
.jbs-checkout-sheet.is-closing .jbs-checkout-sheet__backdrop { animation: jbs-fade-out .2s ease-in forwards; }
.jbs-checkout-sheet.is-closing .jbs-checkout-sheet__panel { animation: jbs-sheet-out .2s ease-in forwards; }

.jbs-checkout-sheet__panel {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  max-height: calc(100% - 48px);
  background: var(--jb-bg-surface);
  border-radius: 16px 16px 0 0;
  animation: jbs-sheet-in .2s ease-out;
}
.jbs-checkout-sheet__panel:focus { outline: none; }

.jbs-checkout-sheet__close {
  position: absolute;
  top: 11px;
  right: 10px;
  font-size: 24px;
  line-height: 1;
  color: var(--jbs-text-label);
}

.jbs-checkout-sheet__title {
  flex: 0 0 auto;
  margin: 0;
  padding: 14px 52px 6px 16px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--jbs-text-body);
}

.jbs-checkout-sheet__body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 16px 12px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 961px) {
  .jbs-checkout-bar,
  .jbs-checkout-sheet { display: none; }
}

/* 改單後重新載入時(page.js 掛上):游標顯示等待,點擊由 page.js 擋 */
html[data-checkout-reloading],
html[data-checkout-reloading] * { cursor: progress; }

.jbs-checkout-awaiting {
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--jb-z-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  padding: 16px;
  background: var(--jbs-overlay);
}

.jbs-checkout-awaiting__text {
  width: 100%;
  max-width: 350px;
  padding: 24px 16px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--jbs-text-heading);
  text-align: center;
  background: var(--jb-bg-surface);
  border-radius: 10px;
}

.jbs-coupon-code {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  margin-top: -8px;
}

.jbs-coupon-code > * { margin-top: 8px; }
.jbs-coupon-code > .jbs-btn { flex: 0 0 auto; min-width: 4.5em; margin-left: 8px; }

.jbs-coupon-code__input { flex: 1 1 10em; min-width: 0; margin-bottom: 0; }

/* 票根樣式要掛在 .jbs-coupon-list--ticket 底下:活動資訊卡(--info)也在 ul.jbs-coupon-list 裡 */
.jbs-coupon-list { margin-top: -5px; line-height: 25.2px; }

.jbs-coupon-card--info {
  position: relative;
  display: flex;
  min-height: 120px;
  margin-top: 28px;
  background: var(--jbs-card-bg);
  border: 1px solid #3589a4;
  cursor: auto;
}

.jbs-coupon-card--info .jbs-coupon-card__category {
  flex: 0 0 30px;
  font-size: 18px;
  font-weight: 600;
  line-height: 30px;
  color: var(--jb-text-on-fill);
  text-align: center;
  white-space: nowrap;
  writing-mode: vertical-rl;
  background: #3589a4;
  overflow: hidden;
}

.jbs-coupon-card--info .jbs-coupon-card__category::before,
.jbs-coupon-card--info .jbs-coupon-card__category::after {
  content: '';
  position: absolute;
  left: 20px;
  z-index: 1;
  width: 16px;
  height: 16px;
  background: var(--jbs-bg-page);
  border: 1px solid #3589a4;
  border-radius: 50%;
}

.jbs-coupon-card--info .jbs-coupon-card__category::before { top: -9px; }
.jbs-coupon-card--info .jbs-coupon-card__category::after { bottom: -9px; }

.jbs-coupon-card--info .jbs-coupon-card__body {
  flex: 1 1 auto;
  min-width: 0;
  padding: 3px 117px 0 10px;
}

.jbs-coupon-card--info .jbs-coupon-card__head { display: flex; align-items: flex-start; }

.jbs-coupon-card--info .jbs-coupon-card__name {
  display: block;
  flex: 0 0 auto;
  width: 100%;
  padding: 3px 0;
  font-size: 24px;
  font-weight: 600;
  color: #3589a4;
  word-break: break-word;
  border-bottom: 2px solid #3589a4;
}

.jbs-coupon-card--info .jbs-coupon-card__status {
  display: block;
  margin: 5px 5px 10px 0;
  font-size: 16px;
  font-weight: 800;
  color: #4ca44c;
}

.jbs-coupon-card--info .jbs-coupon-card__rule {
  padding: 3px 0;
  font-size: 24px;
  font-weight: 600;
  color: #3589a4;
}

.jbs-coupon-card--info .jbs-coupon-card__detail {
  font-size: 14px;
  color: var(--jbs-card-label);
  word-break: break-word;
}

.jbs-coupon-card--info .jbs-coupon-card__session-label { font-weight: 600; color: #c2410c; }

.jbs-coupon-card--info .jbs-coupon-card__session {
  display: inline-block;
  margin-bottom: 3px;
  padding: 3px;
  color: #9a3412;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 5px;
  word-break: keep-all;
}

.jbs-coupon-card--info .jbs-coupon-card__message {
  padding: 10px;
  font-size: 13px;
  color: #808080;
  white-space: pre-wrap;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
}

.jbs-coupon-card--info .jbs-coupon-card__icon {
  position: absolute;
  top: 60%;
  right: 10px;
  width: 97px;
  transform: translateY(-50%);
}

@media (max-width: 640px) {
  .jbs-coupon-card--info .jbs-coupon-card__head { display: block; }
  .jbs-coupon-card--info .jbs-coupon-card__status { display: inline; }
  .jbs-coupon-card--info .jbs-coupon-card__message { padding: 8px; }
  .jbs-coupon-card--info .jbs-coupon-card__rule { font-size: 15px; }
  .jbs-coupon-card--info .jbs-coupon-card__body { padding-right: 10px; }
  .jbs-coupon-card--info .jbs-coupon-card__name { font-size: 18px; }
  .jbs-coupon-card--info .jbs-coupon-card__icon { display: none; }
}

[data-jbs-host="app"] .jbs-coupon-list:not(.jbs-coupon-list--ticket) { line-height: 1; }
[data-jbs-host="app"] .jbs-coupon-card--info { margin-top: 23px; }
[data-jbs-host="app"] .jbs-coupon-card--info .jbs-coupon-card__status { display: block; margin: 3px 5px; }
[data-jbs-host="app"] .jbs-coupon-card--info .jbs-coupon-card__detail { line-height: 1.5; }
[data-jbs-host="app"] .jbs-coupon-card--info .jbs-coupon-card__message { padding: 10px; font-size: 13px; }
[data-jbs-host="app"] .jbs-coupon-card--info .jbs-coupon-card__icon { transform: translateY(-35px); }

/* 選券視窗的票根:左邊一排小半圓缺口畫在票根的 background(radial-gradient 直向重複),卡片本身在票根那段是透明的,
   缺口才露出對話框底色;陰影在 box-shadow,不經過濾鏡 */
.jbs-coupon-list--ticket {
  margin-top: 12px;
  line-height: 1.5;
}

.jbs-coupon-list--ticket > li + li { margin-top: 12px; }

.jbs-coupon-list__notice {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--jbs-text-body);
  background: var(--jbs-addon-bg);
  border-radius: 8px;
  word-break: break-word;
}

.jbs-coupon-list--ticket .jbs-coupon-card {
  --jbs-coupon-stub: 104px;
  --jbs-coupon-stub-bg: var(--jb-color-brand-subtle);
  position: relative;
  display: flex;
  min-height: 96px;
  padding-right: 48px;
  background: linear-gradient(to right, transparent var(--jbs-coupon-stub), var(--jbs-card-bg) var(--jbs-coupon-stub));
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 3px 8px rgba(0, 0, 0, .12);
  cursor: pointer;
}

.jbs-coupon-list--ticket .jbs-coupon-card--shipping { --jbs-coupon-stub-bg: var(--jb-color-warning-light); }
.jbs-coupon-list--ticket .jbs-coupon-card--mission { --jbs-coupon-stub-bg: var(--jb-color-gray-100); }

.jbs-coupon-list--ticket .jbs-coupon-card[aria-checked="true"] {
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 4px 16px var(--jbs-badge-error-bg);
}

.jbs-coupon-list--ticket .jbs-coupon-card[aria-disabled="true"] {
  --jbs-coupon-stub-bg: var(--jb-color-gray-100);
  opacity: .55;
  cursor: not-allowed;
}

.jbs-coupon-list--ticket .jbs-coupon-card::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 14px;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  box-sizing: border-box;
  background: var(--jbs-card-bg);
  border: 2px solid var(--jbs-border-card);
  border-radius: 50%;
}

.jbs-coupon-list--ticket .jbs-coupon-card[role="checkbox"]::after { border-radius: 4px; }

.jbs-coupon-list--ticket .jbs-coupon-card[aria-checked="true"]::after {
  background: var(--jbs-price);
  border-color: var(--jbs-price);
}

.jbs-coupon-list--ticket .jbs-coupon-card[aria-checked="true"]::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 22px;
  z-index: 1;
  width: 5px;
  height: 10px;
  margin-top: -7px;
  border: solid var(--jb-text-on-fill);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.jbs-coupon-card__stub {
  display: flex;
  flex: 0 0 var(--jbs-coupon-stub);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 12px 8px 12px 12px;
  text-align: center;
  background: radial-gradient(circle at 0 6px, transparent 4px, var(--jbs-coupon-stub-bg) 4.5px) 0 0 / 100% 12px repeat-y;
  border-radius: 12px 0 0 12px;
  border-right: 1px dashed var(--jbs-border-card);
}

.jbs-coupon-list--ticket .jbs-coupon-card__category {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--jbs-price);
}

.jbs-coupon-card__off {
  margin-top: 2px;
  font-size: 11px;
  color: var(--jbs-card-text);
}

.jbs-coupon-card__amount {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  margin-top: 4px;
  font-weight: 700;
  color: var(--jbs-price);
}

.jbs-coupon-card__figure { font-size: 20px; white-space: nowrap; }
.jbs-coupon-card__currency { margin: 0 2px; font-size: 13px; }

.jbs-coupon-list--ticket .jbs-coupon-card__body {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 0 12px 12px;
}

.jbs-coupon-list--ticket .jbs-coupon-card__name {
  font-size: 16px;
  font-weight: 600;
  color: var(--jbs-text-heading);
  word-break: break-word;
}

.jbs-coupon-list--ticket .jbs-coupon-card__status {
  font-size: 14px;
  font-weight: 700;
  color: var(--jb-text-success);
}

.jbs-coupon-list--ticket .jbs-coupon-card__status--pending { color: var(--jbs-error-text); }

.jbs-coupon-list--ticket .jbs-coupon-card__rule {
  margin-top: 2px;
  font-size: 13px;
  color: var(--jbs-text-body);
}

.jbs-coupon-list--ticket .jbs-coupon-card__detail {
  margin-top: 4px;
  font-size: 12px;
  color: var(--jbs-text-body);
  word-break: break-word;
}

.jbs-coupon-list--ticket .jbs-coupon-card__detail > p + p { margin-top: 2px; }

.jbs-coupon-card__date {
  display: inline-block;
  max-width: 100%;
  word-break: break-word;
}

.jbs-coupon-list--ticket .jbs-coupon-card__session {
  display: inline-block;
  margin: 2px 0;
  padding: 1px 6px;
  color: var(--jbs-text-body);
  background: var(--jbs-addon-bg);
  border-radius: 4px;
}

.jbs-coupon-list--ticket .jbs-coupon-card__message {
  padding: 8px 10px;
  font-size: 12px;
  white-space: pre-wrap;
  background: var(--jbs-total-bg);
  border-radius: 8px;
}

/* 英文、泰文最寬的字「Shipping」要 84px,窄螢幕也維持 104px */
@media (max-width: 420px) {
  html:not([lang^="en"]):not([lang^="th"]) .jbs-coupon-list--ticket .jbs-coupon-card { --jbs-coupon-stub: 84px; }
}

/* 商店前台浮動鈕(pay/_float_links_jbs.html)。
   --jbs-tabbar-height 要跟 .jbs-app-tabbar 的 70px 內容 + 1px 上框同步;float 必須排在 App 頁首之後,兄弟選擇器才抬得起來 */
:root { --jbs-tabbar-height: 71px; }

.jbs-float-links {
  position: fixed;
  right: 8px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: var(--jb-z-sticky);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.jbs-app-header--tabbar ~ .jbs-float-links {
  bottom: calc(16px + var(--jbs-tabbar-height) + env(safe-area-inset-bottom));
}
.jbs-float-links > * + * { margin-top: 8px; }

.jbs-float-links__btn {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 22px;
  color: var(--jbs-text-strong);
  background: var(--jbs-card-bg);
  border: 1px solid var(--jbs-border-card);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
  cursor: pointer;
}
.jbs-float-links__btn[hidden] { display: none; }
.jbs-float-links__btn--social { padding: 0; overflow: hidden; border: 0; }
.jbs-float-links__btn--social img { display: block; width: 100%; height: 100%; }
.jbs-float-links__cart {
  color: var(--jbs-float-cart-icon);
  border-color: var(--jbs-float-cart-border);
}
.jbs-float-links__cart .jbs-icon { -webkit-text-stroke-width: var(--jbs-float-cart-stroke); }
.jbs-float-links__cart .jbs-site-header__cart-count { top: -4px; right: -4px; box-shadow: var(--jbs-float-cart-badge-ring); }

.jbs-float-links__arrow {
  display: block;
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(45deg);
}

/* ── 商品介紹頁(pay/introduction.html):經典版與主題版共用 ─────────────────── */

.jbs-product__main { margin: 0 0 16px; }
.jbs-product__info { min-width: 0; padding: 12px 12px 0; }
.jbs-product__info > * + * { margin-top: 12px; }

.jbs-product__countdown {
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--jbs-price);
  background: var(--jbs-card-bg);
  border: 1px solid var(--jbs-price);
  border-radius: 8px;
  word-break: break-word;
}
.jbs-product__clock { font-variant-numeric: tabular-nums; }

.jbs-product__name {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--jbs-text-heading);
  word-break: break-word;
}

.jbs-product__spec { font-size: 14px; color: var(--jbs-text-body); word-break: break-word; }
.jbs-product__spec > * + * { margin-top: 6px; }

.jbs-product__add-on-note {
  padding: 8px 12px;
  font-size: 14px;
  color: var(--jbs-text-body);
  background: var(--jbs-addon-bg);
  border-radius: 8px;
  word-break: break-word;
}
.jbs-product__add-on-note b { color: var(--jbs-price); }

.jbs-product__prices { display: flex; flex-wrap: wrap; align-items: baseline; }
.jbs-product__price {
  margin-right: 12px;
  font-size: 26px;
  font-weight: 700;
  color: var(--jbs-price);
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}
.jbs-product__original { font-size: 14px; color: var(--jbs-text-label); word-break: break-word; }

.jbs-product__progress {
  display: block;
  width: 100%;
  height: 8px;
  overflow: hidden;
  color: var(--jb-color-brand);
  background: var(--jbs-border-card);
  border: 0;
  border-radius: 4px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.jbs-product__progress::-webkit-progress-bar { background: var(--jbs-border-card); }
.jbs-product__progress::-webkit-progress-value { background: var(--jb-color-brand); }
.jbs-product__progress::-moz-progress-bar { background: var(--jb-color-brand); }

.jbs-product__buy > * + * { margin-top: 14px; }
.jbs-product__submit {
  width: 100%;
  min-height: 48px;
  font-size: 16px;
  border-radius: var(--jbs-radius-cta);
}

.jbs-product__share { display: flex; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--jbs-text-label); }
.jbs-product__share > * + * { margin-left: 10px; }
.jbs-product__share-link { display: block; width: 36px; height: 36px; overflow: hidden; border-radius: 50%; }
.jbs-product__share-link img { display: block; width: 100%; height: 100%; }

.jbs-product__section { margin: 16px 12px 0; }
.jbs-product__section-title {
  margin-bottom: 12px;
  padding-bottom: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--jbs-text-heading);
  border-bottom: 1px solid var(--jbs-border-card);
  word-break: break-word;
}


.jbs-product-add-on__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--jbs-border-card); margin-bottom: 12px; }
.jbs-product-add-on__head .jbs-product__section-title { margin: 0 12px 0 0; border-bottom: 0; }
.jbs-product-add-on__count { padding-bottom: 8px; font-size: 14px; color: var(--jbs-text-label); }
.jbs-product-add-on__count b { color: var(--jbs-price); }
.jbs-product-add-on__list { display: grid; grid-template-columns: minmax(0, 1fr); grid-gap: 12px; }
.jbs-product-add-on__item {
  display: flex;
  align-items: flex-start;
  padding: 10px;
  background: var(--jbs-card-bg);
  border: 1px solid var(--jbs-border-card);
  border-radius: 8px;
}
.jbs-product-add-on__photo {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  margin-right: 10px;
  object-fit: cover;
  border-radius: 6px;
}
.jbs-product-add-on__body { flex: 1 1 0; min-width: 0; }
.jbs-product-add-on__body > * + * { margin-top: 6px; }
.jbs-product-add-on__name { font-size: 14px; font-weight: 600; word-break: break-word; }
.jbs-product-add-on__price { font-weight: 700; color: var(--jbs-price); word-break: break-word; }
.jbs-product-add-on__select { width: 100%; margin-bottom: 0; }
.jbs-product-add-on__actions { display: flex; flex-wrap: wrap; align-items: center; margin-bottom: -6px; }
.jbs-product-add-on__actions > * { margin: 0 8px 6px 0; }
.jbs-product-add-on__added { font-size: 13px; color: var(--jbs-text-body); word-break: break-word; }
.jbs-product-add-on__added-item { display: flex; align-items: center; padding: 4px 0; border-top: 1px dashed var(--jbs-border-card); }
.jbs-product-add-on__added-text { flex: 1 1 0; min-width: 0; margin-right: 8px; }
.jbs-product-add-on__added-item .jbs-btn { flex: 0 0 auto; }

/* 吸底列按「請選擇樣式」時標出還沒選的那組(product.js 加 is-attention,選了就拿掉) */
.jbs-product__group { border-radius: 8px; }
.jbs-product__group.is-attention { outline: 2px solid var(--jbs-error-text); outline-offset: 4px; }
.jbs-product__group.is-attention .jbs-order-edit__label { color: var(--jbs-error-text); }

.jbs-product__tags + .jbs-product__name { margin-top: 6px; }

/* 經典版白卡:模板只在沒有 shop_themed 時加 --card / --row 與 .jbs-product__purchase、.jbs-product__flash */
.jbs-product__main--card { margin-bottom: 8px; background: var(--jbs-card-bg); }
.jbs-product__main--card .jbs-product__info { padding: 16px; }
/* 選購區在資訊卡裡面:左右下負邊距要等於 .jbs-product__info 的內距,上緣色帶才會滿版 */
.jbs-product__info > .jbs-product__purchase {
  margin: 16px -16px -16px;
  padding: 16px;
  border-top: 8px solid var(--jbs-bg-page);
}
.jbs-product__purchase > * + * { margin-top: 12px; }

.jbs-product__flash {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--jb-text-on-fill);
  background: var(--jbs-price);
  word-break: break-word;
}
.jbs-product__flash--soon { color: var(--jbs-price); background: var(--jb-color-brand-subtle); }
.jbs-product__flash-label { margin-right: 16px; }
.jbs-product__flash-clock { font-size: 20px; font-variant-numeric: tabular-nums; }

.jbs-product__section--card { margin: 0 0 8px; padding: 16px; background: var(--jbs-card-bg); }
.jbs-product__section--card .jbs-product__section-title { padding-bottom: 0; border-bottom: 0; }
.jbs-product__section--card .jbs-product-add-on__head { border-bottom: 0; }
.jbs-product__section--card .jbs-product-add-on__count { padding-bottom: 0; }
.jbs-product__section--card.jbs-tablist { padding-top: 4px; }

.jbs-product-add-on__item--row { padding: 12px; background: var(--jbs-row-bg); border: 0; }
.jbs-product-add-on__item--row .jbs-product-add-on__photo { width: 64px; height: 64px; margin-right: 12px; }
.jbs-product-add-on__item--row .jbs-product-add-on__body { display: flex; flex-wrap: wrap; align-items: flex-start; }
.jbs-product-add-on__item--row .jbs-product-add-on__body > * { flex: 0 0 100%; }
.jbs-product-add-on__item--row .jbs-product-add-on__select { flex: 1 1 0; min-width: 0; }
.jbs-product-add-on__item--row .jbs-product-add-on__select + .jbs-product-add-on__select { margin-left: 8px; }
.jbs-product-add-on__item--row .jbs-product-add-on__price { font-size: 18px; }
.jbs-product-add-on__item--row .jbs-product-add-on__actions .jbs-btn { min-height: 40px; }

.jbs-product__recommend { margin: 16px 12px 24px; }

/* 商品頁推薦:寬螢幕也維持橫滑(不像結帳頁換成四格)。卡寬不能讓內容寬剛好放滿整數張,要露出下一張的邊才看得出能滑 */
@media (min-width: 600px) {
  .jbs-product__recommend .jbs-recommend__list { display: flex; overflow-x: auto; }
  .jbs-product__recommend .jbs-recommend__list > .jbs-product-card { flex: 0 0 190px; margin-right: 12px; }
  .jbs-product__recommend .jbs-recommend__list > .jbs-product-card:last-child { margin-right: 0; }
}

.jbs-product-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: var(--jb-z-sticky);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 0 12px calc(8px + env(safe-area-inset-bottom));
  background: var(--jbs-card-bg);
  border-top: 1px solid var(--jbs-border-card);
}
.jbs-app-header--tabbar ~ .jbs-product-bar {
  bottom: calc(var(--jbs-tabbar-height) + env(safe-area-inset-bottom));
  padding-bottom: 8px;
}
.jbs-product-bar__price {
  flex: 1000 1 auto;
  min-width: 0;
  margin: 8px 12px 0 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--jbs-price);
  word-break: break-word;
}
.jbs-product-bar__submit { flex: 1 0 auto; margin-top: 8px; border-radius: var(--jbs-radius-cta); }

/* 吸底列出現時 product.js 在 html 掛 data-jbs-bottom-bar 並設 --jbs-bottom-bar-h(列高):頁尾讓位、浮動鈕移到列上方。
   網頁的列高已含安全區,App 的列在分頁之上(分頁自己含安全區) */
html[data-jbs-bottom-bar] body { padding-bottom: var(--jbs-bottom-bar-h, 0px); }
html[data-jbs-bottom-bar] .jbs-float-links { bottom: calc(16px + var(--jbs-bottom-bar-h, 0px)); }
html[data-jbs-bottom-bar] .jbs-app-header--tabbar ~ .jbs-float-links {
  bottom: calc(16px + var(--jbs-tabbar-height) + env(safe-area-inset-bottom) + var(--jbs-bottom-bar-h, 0px));
}

@media (min-width: 641px) {
  .jbs-product-add-on__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 769px) {
  .jbs-product__main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-column-gap: 32px;
    align-items: start;
    margin: 16px 0 24px;
  }
  .jbs-product__info { padding: 0; }
  .jbs-product__name { font-size: 24px; }
  .jbs-product__section { margin: 24px 0 0; }
  .jbs-product__recommend { margin: 24px 0 32px; }
  /* 底色滿版,內容對齊頁面內容寬(.jbs-page 1180 / 主題版 1280,左右各 24px) */
  .jbs-product-bar {
    padding-right: max(24px, calc((100% - 1180px) / 2 + 24px));
    padding-left: max(24px, calc((100% - 1180px) / 2 + 24px));
  }
  .jbs-product-bar--themed {
    padding-right: max(24px, calc((100% - 1280px) / 2 + 24px));
    padding-left: max(24px, calc((100% - 1280px) / 2 + 24px));
  }
  .jbs-product__main--card { margin-bottom: 8px; padding: 24px; border-radius: 8px; }
  .jbs-product__main--card .jbs-product__info { padding: 0; }
  /* 負邊距 = 卡片內距,色條才貼齊卡片上緣與左右 */
  .jbs-product__main--card .jbs-product__flash {
    grid-column: 1 / -1;
    margin: -24px -24px 24px;
    padding: 12px 24px;
    border-radius: 8px 8px 0 0;
  }
  .jbs-product__info > .jbs-product__purchase { margin: 20px 0 0; padding: 0; border-top: 0; }
  .jbs-product__section--card { margin: 0 0 8px; padding: 24px; border-radius: 8px; }
  .jbs-product__section--card.jbs-tablist { padding-top: 12px; }
}

@media (min-width: 1041px) {
  .jbs-product__main { grid-template-columns: 480px minmax(0, 1fr); }
}

/* BunnyGo: the message under the split bar when the last ticked row is unticked (bg-checkout.js keepOnePick) */
.jbs-bg-split-msg {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--jb-text-error);
}

.jbs-bg-split-msg:empty { display: none; }

/* BunnyGo checkout page (display_config bg_checkout): no columns, one centred column from phone to desktop (D26);
   the form appears only after 「前往結帳」, and the card's amount block hides while it shows (one total on screen at a
   time, D5/D6). Card and row colour tokens are in themes.css */
.jbs-checkout__layout.jbs-checkout__layout--bg {
  display: block;
  max-width: 720px;
  margin-right: auto;
  margin-left: auto;
  padding: 0 16px;
}

.jbs-checkout__layout--bg:not(.jbs-checkout__layout--paying) > .jbs-checkout__form { display: none; }
.jbs-checkout__layout--paying .jbs-bg-amounts { display: none; }
.jbs-checkout__layout--bg > * + * { margin-top: 12px; }

.jbs-bg-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  font-size: 13px;
  color: var(--jbs-card-label);
}

.jbs-bg-top__time { margin-right: 8px; }

.jbs-bg-strip {
  display: flex;
  align-items: center;
  font-size: 14px;
}

.jbs-bg-strip__avatar {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  margin-right: 8px;
  border-radius: 50%;
  object-fit: cover;
}

.jbs-bg-strip__name {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
  word-break: break-word;
}

.jbs-bg-strip__points { margin-left: 8px; white-space: nowrap; }

.jbs-bg-card {
  background: var(--jbs-card-bg);
  border-radius: 12px;
  box-shadow: var(--jbs-card-shadow);
}

.jbs-bg-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 14px 16px;
  font: inherit;
  text-align: left;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.jbs-bg-card__title { margin-right: 8px; font-size: 16px; font-weight: 700; }
.jbs-bg-card__count { margin-right: auto; font-size: 13px; color: var(--jbs-card-label); }
.jbs-bg-card__sub { flex: 1 0 100%; margin-top: 4px; font-size: 13px; color: var(--jbs-card-label); }
.jbs-bg-card__amount { font-size: 14px; font-weight: 700; }
.jbs-bg-card__amount--alert { color: var(--jbs-amount-alert); }
.jbs-bg-card__body { padding: 0 16px 16px; }
.jbs-bg-card__body > * + * { margin-top: 12px; }
.jbs-bg-card__status:empty { display: none; }
.jbs-bg-card__status { font-weight: 600; color: var(--jb-text-brand); }
.jbs-bg-card__go { width: 100%; }
.jbs-bg-card__note { font-size: 13px; color: var(--jbs-card-label); }
.jbs-bg-card__empty { color: var(--jbs-card-label); }

.jbs-bg-card__actions { display: flex; flex-wrap: wrap; }
.jbs-bg-card__actions > * { margin: 0 8px 8px 0; }

.jbs-bg-amounts__row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  line-height: 1.6;
}

.jbs-bg-amounts__value { margin-left: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.jbs-bg-amounts__row--total { margin-top: 4px; font-size: 16px; font-weight: 700; color: var(--jbs-amount-total); }

.jbs-bg-rows { padding: 0; margin: 0; list-style: none; }

.jbs-bg-row {
  display: flex;
  align-items: flex-start;
  padding: 10px 0;
  border-top: 1px solid var(--jbs-border-card);
}

.jbs-bg-row:first-child { border-top: 0; }

.jbs-bg-row__photo {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  margin-right: 10px;
  border-radius: 6px;
  object-fit: cover;
}

.jbs-bg-row__main { flex: 1 1 auto; min-width: 0; font-size: 14px; }

.jbs-bg-row__name {
  display: -webkit-box;
  overflow: hidden;
  font-weight: 600;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.jbs-bg-row__meta,
.jbs-bg-row__overdue,
.jbs-bg-row__left { font-size: 13px; color: var(--jbs-card-label); }

.jbs-bg-row__left--expired { color: var(--jbs-amount-alert); }

.jbs-bg-row__side {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  margin-left: 10px;
}

.jbs-bg-row__amount { white-space: nowrap; font-variant-numeric: tabular-nums; }
.jbs-bg-row__status { margin-top: 4px; }
.jbs-bg-more { font-size: 13px; }

.jbs-checkout-item.jbs-bg-highlight { background: var(--jbs-badge-info-bg); }

@media (max-width: 374px) {
  .jbs-bg-top { flex-wrap: wrap; }
  .jbs-bg-card__amount { flex: 1 0 100%; margin-top: 4px; }
}

/* BunnyGo 可付款 card coupons and 購物金 (D9, D10): dropdown, coupon code, one 購物金 row; messages go under the fields */
.jbs-bg-offers > * + * { margin-top: 12px; }
.jbs-bg-offers__label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.jbs-bg-coupon__select { width: 100%; min-height: 44px; }
.jbs-bg-coupon__note { margin-top: 6px; font-size: 13px; color: var(--jb-text-brand); }
.jbs-bg-coupon__mission { margin-top: 8px; }
.jbs-bg-coupon__code,
.jbs-bg-reward__row { display: flex; align-items: center; margin-top: 8px; }
.jbs-bg-coupon__input,
.jbs-bg-reward__input { flex: 1 1 auto; min-width: 0; min-height: 44px; margin-right: 8px; }
.jbs-bg-offers__msg { margin-top: 4px; font-size: 13px; color: var(--jb-text-error); }
.jbs-bg-offers__msg--info { color: var(--jbs-card-label); }
.jbs-bg-offers__msg:empty { display: none; }

@media (max-width: 374px) {
  .jbs-bg-coupon__code,
  .jbs-bg-reward__row { flex-wrap: wrap; }
  .jbs-bg-coupon__input,
  .jbs-bg-reward__input { flex: 1 0 100%; margin: 0 0 8px; }
}

/* BunnyGo card header colours (D20): primary for 可付款, light for 預購・商家棄單, alert for overdue */
.jbs-bg-card--payable > .jbs-bg-card__head {
  color: var(--jbs-card-primary-fg);
  background: var(--jbs-card-primary-bg);
  border-radius: 12px 12px 0 0;
}

.jbs-bg-card--payable > .jbs-bg-card__head .jbs-bg-card__count { color: inherit; }
.jbs-bg-card--payable > .jbs-bg-card__body { padding-top: 12px; }
.jbs-bg-card[data-bg-card="held"] > .jbs-bg-card__head { background: var(--jbs-card-muted-bg); border-radius: 12px; }
.jbs-bg-card[data-bg-card="overdue"] > .jbs-bg-card__head { background: var(--jbs-card-alert-bg); border-radius: 12px; }

/* -- Native app tab bar (<html data-jbs-native-tabbar>, set by jbs_root_attrs) --
   The BunnyGo Android app lays its tab bar over the bottom of the WebView, which the page cannot measure.
   112px = 64dp tab bar + 48dp three-button navigation (about 24px spare on gesture-navigation phones).
   Dialog overlays end at the bar's top edge, bottom bars sit on it, and the page end gets matching room. */
html[data-jbs-native-tabbar] { --jbs-native-tabbar-h: 112px; }
html[data-jbs-native-tabbar] body { padding-bottom: var(--jbs-native-tabbar-h); }
html[data-jbs-native-tabbar] .jbs-modal { height: calc(var(--jbs-visual-h, 100vh) - var(--jbs-native-tabbar-h)); }
html[data-jbs-native-tabbar] .jbs-checkout-bar,
html[data-jbs-native-tabbar] .jbs-product-bar { bottom: var(--jbs-native-tabbar-h); }
html[data-jbs-native-tabbar] .jbs-float-links { bottom: calc(16px + var(--jbs-native-tabbar-h)); }
html[data-jbs-native-tabbar] .jbs-photo-viewer__img,
html[data-jbs-native-tabbar] .jbs-photo-viewer__video {
  max-height: calc(var(--jbs-visual-h, 100vh) - var(--jbs-native-tabbar-h) - 140px);
}
@media (max-width: 768px) {
  html[data-jbs-native-tabbar] .jbs-modal__panel {
    max-height: calc((var(--jbs-visual-h, 100vh) - var(--jbs-native-tabbar-h)) * .88);
  }
  html[data-jbs-native-tabbar] .jbs-modal--center .jbs-modal__panel,
  html[data-jbs-native-tabbar] .jbs-channel-popup .jbs-modal__panel {
    max-height: calc(var(--jbs-visual-h, 100vh) - var(--jbs-native-tabbar-h) - 32px);
  }
  html[data-jbs-native-tabbar] .jbs-modal--drawer .jbs-modal__panel { max-height: none; }
}
