/* 2026-11-24 商城前台改版(分支 storefront-redesign)— 新元件樣式
   顏色變數在 shop.css 最後一段(.shop-body 底下 --primary / --bg / --ink …),這裡只用變數,不寫死顏色。
   給首頁 / 商品列表 / 商品頁 / 購物車用;一律限定 .shop-body(司機頁不受影響)。
   字級:頁面標題 26–28/900、區塊標題 20–22、品名與按鈕 17–20/700、內文 16–17、說明最小 14、價格 17–28/900 主色。 */

/* ── 共用:按鈕 ── */
.shop-body .sf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 56px; padding: 0 20px;
  border: 0; border-radius: 12px;
  background: var(--primary); color: #fff;
  font-size: 18px; font-weight: 700; font-family: inherit; line-height: 1;
  cursor: pointer; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.shop-body .sf-btn:hover, .shop-body .sf-btn:active { background: var(--primary-press); text-decoration: none; }
.shop-body .sf-btn:disabled { background: var(--ink-sub); cursor: not-allowed; }
.shop-body .sf-btn-2 {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 48px; padding: 0 16px;
  border: 2px solid var(--primary); border-radius: 12px;
  background: var(--surface); color: var(--primary);
  font-size: 17px; font-weight: 700; font-family: inherit; line-height: 1;
  cursor: pointer; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.shop-body .sf-btn-ico { display: inline-flex; flex: none; }   /* 2026-12-05 「畫給師傅看怎麼切」前面的菜刀 */
.shop-body .sf-btn-ico svg { width: 22px; height: 22px; }
.shop-body .sf-btn-2:hover, .shop-body .sf-btn-2:active { border-color: var(--primary-press); color: var(--primary-press); background: var(--tint); text-decoration: none; }
.shop-body .sf-btn-2:disabled { border-color: var(--line); color: var(--ink-sub); background: var(--surface); cursor: not-allowed; }
.shop-body .sf-btn:focus-visible, .shop-body .sf-btn-2:focus-visible, .shop-body .sf-pill:focus-visible,
.shop-body .sf-card a:focus-visible, .shop-body .sf-add:focus-visible, .shop-body .sf-cat:focus-visible,
.shop-body .sf-thumb:focus-visible, .shop-body .sf-gal-nav:focus-visible {
  outline: 3px solid var(--ink); outline-offset: 2px;
}

/* ── 共用:分類膠囊 ── */
.shop-body .sf-pills {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 10px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.shop-body .sf-pills::-webkit-scrollbar { display: none; }
.shop-body .sf-pills[hidden] { display: none; }   /* 「全部」分類時部位那排要真的藏起來(display:flex 會蓋過 hidden) */
.shop-body .sf-pill {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: 46px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink);
  font-size: 17px; font-weight: 700; font-family: inherit; white-space: nowrap;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.shop-body .sf-pill[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.shop-body .sf-pill svg { width: 18px; height: 18px; flex: none; }
.shop-body .sf-pill-sep { flex: none; width: 1px; margin: 8px 2px; background: var(--line); }

/* ── 共用:商品照片 / 沒照片的預設圖(純 CSS,不載圖) ── */
.shop-body .sf-photo { position: relative; aspect-ratio: 1 / 1; background: var(--surface); overflow: hidden; container-type: inline-size; }
.shop-body .sf-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-body .sf-ph {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 10%; text-align: center;
  background: var(--tint);
}
.shop-body .sf-ph-cat { font-size: 14px; font-weight: 700; color: var(--ink-sub); line-height: 1.2; }
.shop-body .sf-ph-name {
  font-size: clamp(14px, 12cqi, 26px); font-weight: 900; color: var(--primary); line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; word-break: break-all;
}
@container (max-width: 110px) {
  .shop-body .sf-ph-cat { display: none; }
  .shop-body .sf-ph { padding: 6px; }
}
/* 舊的小圖位(購物車 / 我的常買 / 加入彈窗)也用同一個預設圖 */
.shop-body .yfs-img { container-type: inline-size; }
.shop-body .yfs-img .sf-ph { position: absolute; inset: 0; }

/* 「可客製」標籤(舊樣式,留著給還沒重新整理的頁面)與照片張數(照片右下) */
.shop-body .sf-tag-custom {
  position: absolute; left: 8px; bottom: 8px; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 8px; border-radius: 6px;
  background: var(--tag-bg); color: var(--tag-ink);
  font-size: 13px; font-weight: 700; line-height: 1.2;
}
.shop-body .sf-tag-custom svg { width: 14px; height: 14px; flex: none; }
/* 2026-11-26 老闆:可客製圖示(照片左上角;自己畫的菜刀 + 虛線切痕)。
   深紅圓底 + 米色線 + 白邊 + 淡陰影 → 白底照片、深色肉都看得清楚;縮在角落,不擋到中間的肉。
   列表卡片 / 首頁推薦 / 商品頁大照片共用;小卡片(容器 < 110px)只留圓形圖示。 */
.shop-body .sf-custom-mark {
  position: absolute; left: 8px; top: 8px; z-index: 3;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px 2px 2px; border-radius: 999px;
  background: var(--primary); color: var(--tag-ink);
  box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(42, 29, 24, .35);
  font-size: 13px; font-weight: 900; line-height: 1; letter-spacing: .02em;
  pointer-events: none;
}
.shop-body .sf-custom-ico {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; background: var(--primary-press);
}
.shop-body .sf-custom-ico svg { width: 20px; height: 20px; }
.shop-body .sf-gallery .sf-custom-mark { left: 12px; top: 12px; padding: 3px 12px 3px 3px; font-size: 15px; gap: 6px; }
.shop-body .sf-gallery .sf-custom-ico { width: 32px; height: 32px; }
.shop-body .sf-gallery .sf-custom-ico svg { width: 24px; height: 24px; }
@container (max-width: 110px) {
  .shop-body .sf-custom-mark { left: 4px; top: 4px; padding: 2px; }
  .shop-body .sf-custom-txt { display: none; }
}
.shop-body .sf-photo-count {
  position: absolute; right: 8px; bottom: 8px; z-index: 2;
  padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
  font-size: 13px; font-weight: 700; line-height: 1.2;
}

/* ── 商品卡片(列表兩欄、首頁推薦) ── */
.shop-body .sf-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
  padding: 4px 16px 0;
}
.shop-body .sf-card {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.shop-body .sf-card-link { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; flex: 1; }
.shop-body .sf-card-link:hover { text-decoration: none; }
.shop-body .sf-card-body { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 0; flex: 1; }
.shop-body .sf-name {
  font-size: 17px; font-weight: 700; line-height: 1.35; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-all;
}
.shop-body .sf-desc {
  font-size: 14px; line-height: 1.45; color: var(--ink-sub);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.shop-body .sf-price-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 46px; padding: 8px 12px 12px;
}
.shop-body .sf-price { font-size: 19px; font-weight: 900; color: var(--primary); line-height: 1.2; font-variant-numeric: tabular-nums; }
.shop-body .sf-price small { font-size: 14px; font-weight: 500; color: var(--ink-sub); }
.shop-body .sf-price-note { display: block; font-size: 14px; font-weight: 700; color: var(--ink-sub); }
.shop-body .sf-add {
  flex: none; width: 46px; height: 46px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 12px; background: var(--primary); color: #fff; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.shop-body .sf-add:hover, .shop-body .sf-add:active { background: var(--primary-press); }
.shop-body .sf-add svg { width: 24px; height: 24px; }
.shop-body .sf-add.is-in { background: var(--surface); color: var(--primary); border: 2px solid var(--primary); font-size: 14px; font-weight: 700; width: auto; padding: 0 10px; }
.shop-body .sf-ask { height: 46px; padding: 0 12px; font-size: 16px; flex: none; }
.shop-body .sf-login-price {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 16px; font-weight: 700; color: var(--primary); text-decoration: none;
}
.shop-body .sf-login-price:hover { text-decoration: underline; }
.shop-body .sf-oos { font-size: 16px; font-weight: 700; color: var(--ink-sub); }
.shop-body .sf-list-more { padding: 20px 16px; text-align: center; font-size: 16px; color: var(--ink-sub); }
.shop-body .sf-empty { padding: 48px 16px; text-align: center; font-size: 17px; color: var(--ink-sub); }

/* ── 商品列表頁 ── */
.shop-body .sf-list-head { padding: 16px 16px 8px; display: flex; flex-direction: column; gap: 12px; }
.shop-body .sf-page-title { margin: 0; font-size: 27px; font-weight: 900; line-height: 1.25; color: var(--ink); }
.shop-body .sf-search {
  width: 100%; height: 52px; padding: 0 16px;
  border: 2px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink);
  font-size: 17px; font-family: inherit; box-sizing: border-box;
}
.shop-body .sf-search::placeholder { color: var(--ink-sub); }
.shop-body .sf-search:focus { outline: none; border-color: var(--primary); }

/* ── 首頁 ── */
.shop-body .sf-home-top { display: flex; flex-direction: column; gap: 16px; padding: 12px 16px 0; }
.shop-body .sf-hero { position: relative; border-radius: 16px; overflow: hidden; background: var(--tint); }
.shop-body .sf-hero-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.shop-body .sf-hero-track::-webkit-scrollbar { display: none; }
.shop-body .sf-slide { position: relative; flex: 0 0 100%; aspect-ratio: 16 / 9; scroll-snap-align: start; background: var(--tint); }
.shop-body .sf-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-body .sf-slide-cap {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 20px; text-align: center;
  font-size: 26px; font-weight: 900; line-height: 1.35; color: var(--primary);
}
.shop-body .sf-slide.has-img .sf-slide-cap {
  inset: auto 0 0 0; justify-content: flex-start; text-align: left;
  padding: 14px 16px; font-size: 20px; font-weight: 700;
  background: rgba(42, 29, 24, .82); color: #fff;
}
.shop-body .sf-hero-dots { position: absolute; left: 0; right: 0; bottom: 4px; display: flex; justify-content: center; }
.shop-body .sf-hero-dot {
  width: 44px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.shop-body .sf-hero-dot::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink); }
.shop-body .sf-hero-dot[aria-current="true"]::before { background: var(--primary); border-color: var(--primary); }
.shop-body .sf-home-text h1 { margin: 0 0 8px; font-size: 28px; font-weight: 900; line-height: 1.3; color: var(--ink); }
.shop-body .sf-home-text p { margin: 0 0 16px; font-size: 17px; line-height: 1.6; color: var(--ink); }
.shop-body .sf-home-text .sf-btn { max-width: 320px; }
.shop-body .sf-h2 {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 28px 16px 12px; font-size: 21px; font-weight: 900; line-height: 1.3; color: var(--ink);
}
.shop-body .sf-more { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; font-weight: 700; color: var(--primary); text-decoration: none; }
.shop-body .sf-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 16px; }
.shop-body .sf-cat {
  display: flex; align-items: center; justify-content: center; min-height: 76px; padding: 12px;
  border: 2px solid transparent; border-radius: 12px; background: var(--tint); color: var(--ink);
  font-size: 18px; font-weight: 700; line-height: 1.3; text-align: center; text-decoration: none;
}
.shop-body .sf-cat:hover, .shop-body .sf-cat:active { border-color: var(--primary); text-decoration: none; }
.shop-body .sf-hscroll {
  display: grid; grid-auto-flow: column; grid-auto-columns: 46%; gap: 12px;
  overflow-x: auto; padding: 0 16px 8px; scroll-snap-type: x mandatory; scroll-padding: 0 16px; scrollbar-width: none;
}
.shop-body .sf-hscroll::-webkit-scrollbar { display: none; }
.shop-body .sf-hscroll > .sf-card { scroll-snap-align: start; }
/* 舊首頁區塊(再訂一次 / 該補貨了 / 今日特價 …)排在新區塊下面,標題字級跟新版一致 */
.shop-body.sf .home-h { font-size: 21px; font-weight: 900; }

/* ── 商品頁 ── */
.shop-body .sf-pd-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 16px; font-size: 17px; font-weight: 700; color: var(--ink); text-decoration: none; }
.shop-body .sf-pd-back svg { width: 22px; height: 22px; }
.shop-body .sf-gallery { position: relative; background: var(--surface); }
.shop-body .sf-gal-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.shop-body .sf-gal-track::-webkit-scrollbar { display: none; }
.shop-body .sf-gal-slide { position: relative; flex: 0 0 100%; aspect-ratio: 1 / 1; scroll-snap-align: center; background: var(--surface); container-type: inline-size; }
.shop-body .sf-gal-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-body .sf-gal-count {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(42, 29, 24, .88); color: #fff;
  font-size: 15px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums;
}
.shop-body .sf-gal-nav {
  position: absolute; top: 50%; z-index: 2; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer;
  display: none; align-items: center; justify-content: center;
}
.shop-body .sf-gal-nav svg { width: 24px; height: 24px; }
.shop-body .sf-gal-nav.prev { left: 12px; }
.shop-body .sf-gal-nav.next { right: 12px; }
.shop-body .sf-thumbs { display: flex; gap: 8px; padding: 10px 16px 0; overflow-x: auto; scrollbar-width: none; }
.shop-body .sf-thumbs::-webkit-scrollbar { display: none; }
.shop-body .sf-thumb {
  flex: none; position: relative; width: 64px; height: 64px; padding: 0;
  border: 2px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); cursor: pointer;
}
.shop-body .sf-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-body .sf-thumb[aria-current="true"] { border-color: var(--primary); border-width: 3px; }
.shop-body .sf-pd-info { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.shop-body .sf-pd-name { margin: 0; font-size: 26px; font-weight: 900; line-height: 1.3; color: var(--ink); word-break: break-all; }
.shop-body .sf-pd-desc { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ink-sub); }
.shop-body .sf-pd-meta { font-size: 15px; color: var(--ink-sub); }
.shop-body .sf-pd-price { font-size: 28px; font-weight: 900; color: var(--primary); line-height: 1.2; font-variant-numeric: tabular-nums; }
.shop-body .sf-pd-price small { font-size: 17px; font-weight: 500; color: var(--ink-sub); }
.shop-body .sf-pd-price .sf-price-note { font-size: 15px; }
.shop-body .sf-pd-ask { font-size: 20px; font-weight: 900; color: var(--primary); }
.shop-body .sf-label { font-size: 17px; font-weight: 700; color: var(--ink); margin-top: 8px; }
.shop-body .sf-units { display: flex; gap: 8px; flex-wrap: wrap; }
.shop-body .sf-qty { display: flex; align-items: center; gap: 12px; }
.shop-body .sf-qty .sf-btn-2 { width: 52px; height: 52px; padding: 0; font-size: 26px; }
.shop-body .sf-qty-box { display: inline-flex; align-items: center; gap: 6px; }
.shop-body .sf-qty-input {
  width: 96px; height: 52px; text-align: center;
  border: 2px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink);
  font-size: 22px; font-weight: 700; font-family: inherit; box-sizing: border-box;
  -moz-appearance: textfield;
}
.shop-body .sf-qty-input::-webkit-outer-spin-button, .shop-body .sf-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.shop-body .sf-qty-input:focus { outline: none; border-color: var(--primary); }
.shop-body .sf-qty-input.is-err { border-color: var(--primary); }
.shop-body .sf-qty-unit { font-size: 17px; font-weight: 700; color: var(--ink); }
.shop-body .sf-err { font-size: 15px; font-weight: 700; color: var(--primary); }
.shop-body .sf-hint { font-size: 15px; line-height: 1.5; color: var(--ink-sub); }
.shop-body .sf-note {
  width: 100%; min-height: 96px; padding: 12px 14px; box-sizing: border-box; resize: vertical;
  border: 2px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink);
  font-size: 16px; line-height: 1.5; font-family: inherit;
}
.shop-body .sf-note::placeholder { color: var(--ink-sub); }
.shop-body .sf-note:focus { outline: none; border-color: var(--primary); }
.shop-body .sf-fav { align-self: flex-start; }
/* 2026-12-02 商品分享:LINE / Facebook / 複製網址 /(手機有系統分享才出現)更多 */
.shop-body .sf-share { margin-top: 4px; display: flex; flex-direction: column; gap: 8px; }
.shop-body .sf-share-h { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink-sub); }
.shop-body .sf-share-row { display: flex; flex-wrap: wrap; gap: 8px; }
.shop-body .sf-share-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink);
  font-size: 15px; font-weight: 700; font-family: inherit; line-height: 1; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.shop-body .sf-share-btn svg { width: 20px; height: 20px; flex: none; }
.shop-body .sf-share-btn.is-line svg { color: #06C755; }
.shop-body .sf-share-btn.is-fb svg { color: #1877F2; }
.shop-body .sf-share-btn:hover, .shop-body .sf-share-btn:active { background: var(--tint); }
.shop-body .sf-share-btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.shop-body .sf-custom { margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.shop-body .sf-custom-h { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 20px; font-weight: 900; color: var(--ink); }
.shop-body .sf-soon { padding: 3px 8px; border-radius: 6px; background: var(--tint); color: var(--ink); font-size: 13px; font-weight: 700; }
.shop-body .sf-custom-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.shop-body .sf-custom-grid button {
  height: 48px; border: 2px dashed var(--ink-sub); border-radius: 12px; background: var(--surface); color: var(--ink-sub);
  font-size: 17px; font-weight: 700; font-family: inherit; cursor: not-allowed;
}
.shop-body .sf-pd-cta {
  position: fixed; left: 0; right: 0; bottom: var(--shop-nav-h); z-index: 19;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: var(--surface); border-top: 1px solid var(--line);
}
.shop-body .sf-pd-cta-sum { flex: none; display: flex; flex-direction: column; font-size: 14px; color: var(--ink-sub); line-height: 1.3; }
.shop-body .sf-pd-cta-sum b { font-size: 20px; font-weight: 900; color: var(--primary); font-variant-numeric: tabular-nums; }
.shop-body .sf-pd-cta .sf-btn { flex: 1; height: 58px; }
.shop-body.sf-pd-page .app-shell { padding-bottom: calc(var(--shop-nav-h) + 96px); }

/* ── 購物車:套新元件(功能不變) ── */
.shop-body .cf-btn { height: 56px; border-radius: 12px; background: var(--primary); color: #fff; font-size: 18px; font-weight: 700; }
.shop-body .cf-btn:hover, .shop-body .cf-btn:active { background: var(--primary-press); }
.shop-body .cf-btn:disabled { background: var(--ink-sub); }
.shop-body .cl-step {
  width: 46px; height: 46px; border: 2px solid var(--primary); border-radius: 12px;
  background: var(--surface); color: var(--primary); font-size: 22px; font-weight: 700;
}
.shop-body .cl-step:disabled { border-color: var(--line); color: var(--ink-sub); }
.shop-body .cl-name { font-size: 17px; font-weight: 700; color: var(--ink); }
.shop-body .cl-unit-price, .shop-body .cl-ask { font-size: 15px; color: var(--ink-sub); }
.shop-body .cl-subtotal { font-size: 19px; font-weight: 900; color: var(--primary); }
.shop-body .cl-del { min-height: 44px; font-size: 15px; font-weight: 700; color: var(--ink-sub); }
.shop-body .cl-note { display: block; margin-top: 2px; font-size: 14px; line-height: 1.45; color: var(--ink-sub); word-break: break-all; }
.shop-body .cf-amount { color: var(--primary); }
.shop-body .cart-line { border-color: var(--line); }
.shop-body .cart-line.is-inquiry { background: var(--surface); border-color: var(--line); }

/* ── 平板 ── */
@media (min-width: 768px) {
  .shop-body .sf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shop-body .sf-hscroll { grid-auto-columns: 30%; }
}

/* ── 桌機 1024 以上:上方導覽列、左文右圖主打區、分類 4 欄、推薦 4 欄、商品頁左右兩欄 ── */
@media (min-width: 1024px) {
  .shop-body.sf { --shop-nav-h: 0px; }
  .shop-body.sf .app-shell { max-width: 1200px; padding-bottom: 40px; }
  .shop-body.sf .shop-topbar {
    height: 68px; display: flex; align-items: center;
    padding: 0 max(24px, calc((100vw - 1200px) / 2 + 24px));
  }
  .shop-body.sf .shop-topbar .cart-icon-btn { display: none; }
  .shop-body.sf .bottom-nav {
    top: var(--sf-nav-top, 0px); bottom: auto; left: auto; right: max(24px, calc((100vw - 1200px) / 2 + 24px));
    transform: none; width: auto; max-width: none; height: 68px; padding: 0;
    background: transparent; border: 0; border-radius: 0; box-shadow: none; gap: 4px; z-index: 21;
  }
  .shop-body.sf .bottom-nav .item { flex: none; flex-direction: row; gap: 8px; padding: 0 14px; font-size: 17px; position: relative; }
  .shop-body.sf .bottom-nav .item .ico, .shop-body.sf .bottom-nav .item .ico svg { width: 22px; height: 22px; }
  .shop-body.sf .bottom-nav .item .badge { top: 8px; left: 26px; margin-left: 0; }
  .shop-body.sf .bottom-nav .item.active { box-shadow: inset 0 -3px 0 var(--primary); }

  .shop-body .sf-home-top { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 32px 24px 8px; }
  .shop-body .sf-home-text { order: -1; }
  .shop-body .sf-home-text h1 { font-size: 28px; }
  .shop-body .sf-slide { aspect-ratio: 4 / 3; }
  .shop-body .sf-h2 { margin: 36px 24px 14px; font-size: 22px; }
  .shop-body .sf-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0 24px; }
  .shop-body .sf-hscroll { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-columns: auto; overflow: visible; padding: 0 24px; }
  .shop-body .sf-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 4px 24px 0; }
  .shop-body .sf-list-head { flex-direction: row; align-items: center; justify-content: space-between; padding: 24px 24px 8px; }
  .shop-body .sf-search { max-width: 420px; }
  .shop-body .sf-pills { padding: 4px 24px 12px; flex-wrap: wrap; overflow: visible; }

  .shop-body .sf-pd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; padding: 16px 24px 0; align-items: start; }
  .shop-body .sf-pd-media { position: sticky; top: 84px; }
  .shop-body .sf-gallery { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
  .shop-body .sf-gal-nav { display: inline-flex; }
  .shop-body .sf-thumbs { padding: 12px 0 0; }
  .shop-body .sf-pd-info { padding: 0; }
  .shop-body .sf-pd-cta { position: static; padding: 16px 0 0; border: 0; background: transparent; }
  .shop-body.sf-pd-page .app-shell { padding-bottom: 40px; }
}
.shop-body a.cl-name { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.shop-body a.cl-name:hover { text-decoration: underline; }
/* 年紀大的客人:頂列小字、再訂一次的小字至少 14px */
.shop-body.sf .shop-topbar .greet small, .shop-body.sf .hr-meta { font-size: 14px; }

/* ── 2026-11-25 客製分切(本機試玩,分支 cut-options-1125):商品頁「選切法」區塊 + 彈出視窗(cut-sim.js) ──
   一樣限定 .shop-body;肉 / 骨頭 / 刀線的顏色只在這個視窗用。 */
.shop-body .sf-cut-chosen { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; padding: 12px 14px; border-radius: 12px; background: var(--tint); font-size: 16px; line-height: 1.5; color: var(--ink); }
.shop-body .sf-cut-chosen b { font-weight: 900; word-break: break-all; }
.shop-body .sf-cut-chosen-t { flex: none; padding: 2px 8px; border-radius: 6px; background: var(--surface); font-size: 14px; font-weight: 700; color: var(--ink-sub); }
.shop-body .sf-cut-dirty { flex-basis: 100%; font-size: 15px; font-weight: 700; color: var(--primary); }
.shop-body .sf-cut-actions { display: flex; gap: 8px; }
.shop-body .sf-cut-actions .sf-btn-2 { flex: 1; }
.shop-body .sf-cut-actions .sf-btn-2[hidden] { display: none; }

.shop-body .sf-cut-backdrop {
  position: fixed; inset: 0; z-index: 120; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(30, 20, 15, .55);
}
.shop-body .sf-cut-sheet {
  --cut-red: #D62828; --cut-meat: #e9a19a; --cut-meat-2: #d9807a; --cut-fat: #f6e3d6; --cut-bone: #fbf6ea; --cut-bone-edge: #d8ccb4;
  position: relative; width: 100%; max-width: 640px; max-height: 94vh; max-height: 94dvh;
  display: flex; flex-direction: column; background: var(--bg); color: var(--ink);
  border-radius: 20px 20px 0 0; overflow: hidden; animation: slide-up .25s ease-out;
}
.shop-body .sf-cut-head { flex: none; display: flex; align-items: center; gap: 8px; padding: 12px 8px 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.shop-body .sf-cut-head h2 { flex: 1; margin: 0; font-size: 20px; font-weight: 900; line-height: 1.3; word-break: break-all; }
.shop-body .sf-cut-x { flex: none; width: 48px; height: 48px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font-size: 30px; line-height: 1; cursor: pointer; }
.shop-body .sf-cut-body > * { flex-shrink: 0; }   /* 捲動區裡的東西不要被壓扁 */
.shop-body .sf-cut-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.shop-body .sf-cut-foot { flex: none; display: flex; gap: 10px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.shop-body .sf-cut-foot .sf-btn-2 { flex: 0 0 34%; height: 56px; }
.shop-body .sf-cut-foot .sf-btn { flex: 1; }
/* 2026-11-26 老闆:「原料加工會有損耗」— 固定在按鈕上面(不在捲動區裡,怎麼捲都看得到);字在 storefront-config.js */
.shop-body .sf-cut-loss {
  flex: none; display: flex; align-items: flex-start; gap: 8px; margin: 0;
  padding: 10px 16px; background: #FFF1CC; color: #5C3B00; border-top: 2px solid #E9C46A;
  font-size: 15px; font-weight: 700; line-height: 1.45;
}
.shop-body .sf-cut-loss svg { flex: none; width: 20px; height: 20px; margin-top: 1px; }
/* 2026-12-01 只能畫圖的商品(里肌心、雞腿…):損耗提醒縮成一行小字、底下說明縮短;畫圖下面放 10 元硬幣大小參考 */
.shop-body .sf-cut-loss.is-small { padding: 6px 16px; border-top-width: 1px; font-size: 13px; font-weight: 400; }
.shop-body .sf-cut-loss.is-small svg { width: 16px; height: 16px; }
.shop-body .sf-cut-sum.is-small { padding-top: 8px; }
.shop-body .sf-cut-coin-ref { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; line-height: 1.45; color: var(--ink-sub); }
.shop-body .sf-cut-coin-ref svg { flex: none; }
/* 2026-12-02 超簡單版:後台填了最小尺寸 → 畫圖下面整行寬的同比例大小參考(圖在 public/common/cut-size-ref.js);有畫線沒寫字的提醒 */
.shop-body .sf-cut-minref { margin: 4px 0 2px; }
.shop-body .sf-cut-minref .yfs-csr-svg { width: 100%; height: auto; }
.shop-body .sf-cut-nudge { margin: 6px 0 0; padding: 8px 12px; border-radius: 10px; background: #fff3cd; border: 1px solid #f0d98a; font-size: 15px; font-weight: 700; color: #6b4e00; }
/* 2026-12-05 老闆改方向「讓客人填」:店家最小不顯示了;視窗最上面一句說明、客人自己填「大約切幾公分」(一格 + 常用大小)、有填畫肉 + 15 公分的尺 */
.shop-body .sf-cut-intro { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--tint); font-size: 15px; line-height: 1.5; color: var(--ink); }
.shop-body .sf-cut-mysize { display: grid; gap: 8px; }
.shop-body .sf-cut-mysize-row { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; color: var(--ink-sub); }
.shop-body .sf-cut-mysize-in { width: 6em; height: 52px; padding: 0 12px; box-sizing: border-box; text-align: center; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 20px; font-weight: 700; font-family: inherit; color: var(--ink); }
.shop-body .sf-cut-mysize-in:focus { border-color: var(--primary); outline: none; }
.shop-body .sf-cut-mysize-in:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.shop-body .sf-cut-mysize-in[aria-invalid="true"] { border-color: #b42318; }
.shop-body .sf-cut-mysize-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.shop-body .sf-cut-mysize-picks .sf-pill { min-height: 44px; }
.shop-body .sf-cut-mysize-err { margin: 0; font-size: 15px; font-weight: 700; color: #b42318; }
.shop-body .sf-cut-mysize-ref:empty { display: none; }
.shop-body .sf-cut-mysize-ref .yfs-csr-svg { width: 100%; height: auto; }
.shop-body .sf-cut-x:focus-visible, .shop-body .sf-cut-sheet .sf-pill:focus-visible, .shop-body .sf-cut-size-in:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.shop-body .sf-cut-sheet .sf-pill:disabled { opacity: .45; cursor: not-allowed; }
.shop-body .sf-cut-frozen { padding: 10px 12px; border-radius: 12px; background: #E3ECF7; color: #1D3F73; font-size: 15px; font-weight: 700; }
/* 2026-11-28 我的切法:選切法視窗最上面「你上次:…〔跟上次一樣〕」、商品頁「照上次的切法」提示(手機一行放不下就換行,不跑版) */
.shop-body .sf-cut-last { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; border-radius: 12px; background: var(--tint); font-size: 15px; line-height: 1.45; }
.shop-body .sf-cut-last-t { flex: 1 1 12em; min-width: 0; word-break: break-all; color: var(--ink); }
.shop-body .sf-cut-last .sf-btn-2 { flex: none; min-height: 44px; }
.shop-body .sf-cut-repeat { margin: 8px 0 0; padding: 10px 12px; border-radius: 12px; background: #FFF1CC; color: #5C3B00; font-size: 15px; font-weight: 700; line-height: 1.45; word-break: break-all; }

.shop-body .sf-cut-size-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 17px; }
.shop-body .sf-cut-size-lab { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 700; color: var(--ink-sub); }
.shop-body .sf-cut-size-in {
  width: 84px; height: 52px; text-align: center; box-sizing: border-box;
  border: 2px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink);
  font-size: 20px; font-weight: 700; font-family: inherit;
}
.shop-body .sf-cut-size-in:focus { border-color: var(--primary); }

.shop-body .sf-cut-result { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: stretch; }
.shop-body .sf-cut-res-photo { position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.shop-body .sf-cut-res-photo img { display: block; width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.shop-body .sf-cut-res-photo.is-pending img { filter: grayscale(.35) opacity(.85); }
.shop-body .sf-cut-cap { position: absolute; left: 6px; top: 6px; right: 6px; width: fit-content; padding: 2px 8px; border-radius: 6px; background: rgba(255, 255, 255, .92); font-size: 13px; line-height: 1.4; color: var(--ink); }
.shop-body .sf-cut-size-card { display: flex; flex-direction: column; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.shop-body .sf-cut-sc-t { font-size: 14px; color: var(--ink-sub); }
.shop-body .sf-cut-sc-big { font-size: 18px; font-weight: 900; line-height: 1.35; }
.shop-body .sf-cut-size-card svg { display: block; width: 100%; height: auto; max-height: 150px; flex: 1; margin: 4px 0; }
.shop-body .sf-cut-sc-note { font-size: 14px; line-height: 1.45; color: var(--ink-sub); }
.shop-body .sf-cut-lines-btn { width: 100%; }
.shop-body .sf-cut-lines-btn[aria-expanded="true"] { background: var(--tint); }
.shop-body .sf-cut-lines { position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.shop-body .sf-cut-lines svg { display: block; width: 100%; height: auto; }
.shop-body .sf-cut-lines.is-diagram { padding-top: 32px; }

.shop-body .sf-cut-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.shop-body .sf-cut-pad { border: 2px dashed var(--primary); border-radius: 12px; overflow: hidden; background: var(--surface); }
.shop-body .sf-cut-pad.no-photo { background: var(--tint); }
.shop-body .sf-cut-pad svg { display: block; width: 100%; height: auto; max-height: 60vh; touch-action: none; cursor: crosshair; }
/* 2026-12-05 老闆「手機打開客製 圖片太大 會先按到畫線」:手機預設看 / 滑,按「✏️ 開始畫」才畫(cut-sim.js penOn);照片最高約 1/3 螢幕 */
.shop-body .sf-cut-draw { display: flex; flex-direction: column; gap: 10px; }
.shop-body .sf-cut-pen-bar { display: flex; }
.shop-body .sf-cut-pen-bar .sf-btn { flex: 1; min-height: 48px; font-size: 17px; }
.shop-body .sf-cut-draw .sf-cut-pen-off,
.shop-body .sf-cut-draw .sf-cut-tools,
.shop-body .sf-cut-draw.is-pen .sf-cut-pen-on { display: none; }
.shop-body .sf-cut-draw.is-pen .sf-cut-pen-off { display: inline-flex; align-items: center; justify-content: center; }
.shop-body .sf-cut-draw.is-pen .sf-cut-tools { display: flex; }
.shop-body .sf-cut-draw .sf-cut-pad svg { touch-action: pan-x pan-y pinch-zoom; max-height: 33vh; }
.shop-body .sf-cut-draw.is-pen .sf-cut-pad { border-style: solid; border-color: var(--cut-red); box-shadow: 0 0 0 3px rgba(214, 40, 40, .18); }
.shop-body .sf-cut-draw.is-pen .sf-cut-pad svg { touch-action: none; }
.shop-body .sf-cut-hint-mouse { display: none; }
@media (hover: hover) and (pointer: fine) {
  /* 電腦(滑鼠):維持直接拖拉就畫,不顯示開始畫 / 畫好了;照片照舊最高 60vh */
  .shop-body .sf-cut-pen-bar { display: none; }
  .shop-body .sf-cut-draw .sf-cut-tools { display: flex; }
  .shop-body .sf-cut-draw .sf-cut-pad svg { max-height: 60vh; touch-action: none; }
  .shop-body .sf-cut-hint-touch { display: none; }
  .shop-body .sf-cut-hint-mouse { display: inline; }
}

.shop-body .sf-cut-sum { margin-top: 4px; padding-top: 12px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 6px; }
.shop-body .sf-cut-pcs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; }
.shop-body .sf-cut-badge { padding: 3px 10px; border-radius: 999px; background: var(--tint); color: var(--ink); font-size: 14px; font-weight: 700; }
.shop-body .sf-cut-badge.is-simple { background: #E4F2E7; color: #1E5B2E; }
.shop-body .sf-cut-badge.is-complex { background: #FFF0DC; color: #7A3E00; }
.shop-body .sf-cut-fee { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-sub); }
.shop-body .sf-cut-fee.is-complex { color: #7A3E00; font-weight: 700; }
.shop-body .sf-cut-note-preview { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--surface); font-size: 15px; line-height: 1.5; word-break: break-all; }

.shop-body .sf-cut-line { stroke: var(--cut-red); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: sf-cut-draw .35s ease-out forwards; }
.shop-body .sf-cut-line.thin { stroke-width: 1.2; }
.shop-body .sf-cut-line.halo { stroke: #fff; stroke-opacity: .9; }
@keyframes sf-cut-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .shop-body .sf-cut-line { animation: none; stroke-dashoffset: 0; }
  .shop-body .sf-cut-sheet { animation: none; }
}
@media (min-width: 720px) {
  .shop-body .sf-cut-backdrop { align-items: center; }
  .shop-body .sf-cut-sheet { border-radius: 20px; max-height: 90vh; }
}
/* 2026-12-05 官網「產品」入口:訪客「加入會員看價格」(商品頁是按鈕,外觀跟連結一樣) */
.shop-body button.sf-login-price { background: none; border: none; padding: 0; font-family: inherit; cursor: pointer; }
.shop-body .sf-join-price { color: var(--primary); font-weight: 700; }
.shop-body .sf-join-price > span { display: inline-block; white-space: nowrap; }
