/* =====================================================================
   客戶商城前台樣式：顏色全部來自 store.js 依品牌設定寫入的 CSS 變數
   版型：body.t-classic（經典商店）／t-boutique（精品單品）／t-market（生鮮市集）
   ===================================================================== */
:root {
  --brand: #5F7A3A; --on-brand: #fff; --brand-ink: #5F7A3A; --brand-soft: #eef1e9; --brand-softer: #f8f9f6;
  --bg: #fff; --surface: #f7f7f5; --text: #1f1f1d; --muted: #6e6e68; --line: #e6e6e2;
  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --head-font: var(--font);
  --radius: 10px; --radius-sm: 6px; --wrap: 1200px; --gutter: 16px;
  --danger: #b3261e; --ok: #2e7d4f; --warn: #a26200;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.7; min-height: 100vh; display: flex; flex-direction: column; letter-spacing: .01em; }
body:not(.is-ready) .site-main:empty::before { content: ''; display: block; height: 60vh; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--head-font); line-height: 1.35; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.site-main { flex: 1; width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- 按鈕、表單 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: var(--radius-sm); border: 1px solid var(--brand); background: var(--brand); color: var(--on-brand); font-weight: 600; text-decoration: none; cursor: pointer; transition: filter .15s, transform .05s; white-space: nowrap; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; filter: none; transform: none; }
.btn-line { background: transparent; color: var(--text); border-color: var(--line); }
.btn-line:hover { border-color: var(--text); filter: none; }
.btn-block { width: 100%; }
.btn-lg { min-height: 52px; font-size: 16px; }
.link { color: var(--brand-ink); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.field > span b { color: var(--danger); font-weight: 400; }
.input, .field input, .field select, .field textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); outline: none; transition: border-color .15s; }
.field textarea { min-height: 80px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; display: block; }
.row2 { display: grid; gap: 0 12px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .row2 { grid-template-columns: 1fr 1fr; } }
.choice { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.choice label { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: inline-flex; align-items: center; min-height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font-size: 14px; }
.choice input:checked + span { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--brand-softer); font-weight: 600; }
.choice input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.alert { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--brand-soft); margin-bottom: 14px; font-size: 14px; }
.alert-err { background: rgba(179, 38, 30, .09); color: var(--danger); }
.tone-dark .alert-err { color: #ff8a80; }

/* ---------- 頁首 ---------- */
.preview-bar { background: #2b2b2b; color: #fff; text-align: center; font-size: 13px; padding: 8px 16px; }
.preview-bar a { color: #ffd76a; margin-left: 10px; }
.site-header { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.site-header .bar { display: flex; align-items: center; gap: 8px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; min-width: 0; }
.logo { max-height: 40px; width: auto; max-width: 180px; object-fit: contain; }
.logo-lg { max-height: 72px; max-width: 240px; margin: 0 auto 20px; }
.shop-name { font-family: var(--head-font); font-weight: 700; font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-main { display: none; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav-main a { text-decoration: none; padding: 6px 12px; border-radius: 999px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.nav-main a:hover, .nav-main a[aria-current] { color: var(--text); background: var(--brand-softer); }
.tools { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; background: none; border-radius: 50%; cursor: pointer; color: var(--text); }
.icon-btn:hover { background: var(--brand-softer); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand); color: var(--on-brand); font-size: 11px; line-height: 18px; text-align: center; font-weight: 700; }
.drawer { border-top: 1px solid var(--line); background: var(--bg); }
.drawer .wrap { display: flex; flex-direction: column; padding-top: 6px; padding-bottom: 10px; }
.drawer a { text-decoration: none; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.drawer a:last-child { border-bottom: 0; }
@media (min-width: 900px) {
  .menu-btn, .drawer { display: none !important; }
  .nav-main { display: flex; margin-left: 24px; }
}

/* ---------- 頁尾 ---------- */
.site-footer { margin-top: 64px; background: var(--surface); border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.foot-grid { display: grid; gap: 28px; padding-top: 40px; padding-bottom: 28px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h4 { color: var(--text); font-size: 14px; margin-bottom: 10px; }
.site-footer .brand { color: var(--text); margin-bottom: 8px; }
.foot-list { list-style: none; margin: 0; padding: 0; }
.foot-list li { margin-bottom: 4px; }
.foot-list a, .foot-links a { text-decoration: none; }
.foot-list a:hover, .foot-links a:hover { color: var(--text); text-decoration: underline; }
.foot-links { display: flex; flex-direction: column; gap: 4px; }
.foot-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding-top: 16px; padding-bottom: 24px; border-top: 1px solid var(--line); font-size: 12px; }
.powered { font-size: 11px; opacity: .7; }

/* ---------- 共用區塊 ---------- */
.section { padding: 40px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.section-head h2 { font-size: 22px; margin: 0; }
.section-head a { font-size: 14px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.section-head a:hover { color: var(--text); }
.eyebrow { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--brand-ink); margin: 0 0 6px; font-weight: 600; }
.empty { text-align: center; padding: 64px 16px; color: var(--muted); }
.empty h2 { color: var(--text); }
.crumbs { font-size: 13px; color: var(--muted); padding: 16px 0 0; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.page-title { font-size: 26px; margin: 18px 0 22px; }

/* 佔位圖（沒有照片的商品） */
.ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background:
  radial-gradient(circle at 20% 15%, var(--brand-soft) 0 22%, transparent 23%),
  radial-gradient(circle at 85% 90%, var(--brand-soft) 0 30%, transparent 31%),
  var(--brand-softer); overflow: hidden; }
.ph span { font-family: var(--head-font); font-size: clamp(36px, 9vw, 64px); color: var(--brand-ink); opacity: .55; font-weight: 700; }
.ph-big span { font-size: clamp(64px, 18vw, 140px); }

/* 商品卡 */
.grid { display: grid; gap: 20px 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 20px; } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { display: block; text-decoration: none; color: inherit; min-width: 0; }
.card-img { position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.card-body { padding: 10px 2px 0; }
.card-cat { font-size: 12px; color: var(--muted); }
.card-name { font-size: 15px; font-weight: 500; margin: 2px 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-price { margin: 0; font-size: 15px; }
.card-price .price { font-weight: 700; color: var(--brand-ink); }
.card-price s, .price-box s { color: var(--muted); font-size: 13px; margin-left: 4px; }
.is-soldout .card-img { opacity: .6; }
.tag { position: absolute; top: 10px; left: 10px; font-size: 12px; padding: 2px 10px; border-radius: 999px; font-weight: 600; }
.tag-out { background: rgba(0, 0, 0, .7); color: #fff; }
.tag-sale { background: var(--brand); color: var(--on-brand); }

/* ---------- 首頁：主視覺 ---------- */
.hero { position: relative; overflow: hidden; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; min-height: 360px; display: flex; align-items: center; background: var(--brand); color: var(--on-brand); }
.slide-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide.has-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,.1)); }
.slide.has-img { color: #fff; }
.slide-text { position: relative; z-index: 1; padding-top: 48px; padding-bottom: 56px; }
.slide-text h1, .slide-text h2 { font-size: clamp(28px, 6vw, 52px); margin-bottom: 12px; }
.slide-text p { font-size: clamp(15px, 2.2vw, 18px); opacity: .92; max-width: 34em; }
.slide .btn { background: var(--bg); color: var(--text); border-color: var(--bg); }
.slide-deco { position: absolute; right: -60px; bottom: -80px; width: 340px; height: 340px; border-radius: 50%; background: rgba(255,255,255,.08); }
.slide-deco::before { content: ''; position: absolute; left: -120px; top: -140px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.06); }
.dots { position: absolute; left: 0; right: 0; bottom: 16px; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.dots button { width: 8px; height: 8px; padding: 0; border-radius: 4px; border: 0; background: rgba(255,255,255,.5); cursor: pointer; transition: width .2s; }
.dots button[aria-current] { width: 22px; background: #fff; }

/* 分類入口 */
.cat-row { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .cat-row { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; } }
.cat-tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: 4 / 3; padding: 14px; border-radius: var(--radius); overflow: hidden; text-decoration: none; background: var(--brand-soft); color: var(--text); }
.cat-tile img, .cat-tile .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cat-tile.has-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.55), transparent 60%); }
.cat-tile.has-img { color: #fff; }
.cat-tile:not(.has-img) { aspect-ratio: auto; min-height: 116px; }
.cat-tile:not(.has-img):hover { background: var(--brand); color: var(--on-brand); }
.cat-ch { position: absolute; right: 10px; top: -6px; font-family: var(--head-font); font-size: 80px; line-height: 1; font-weight: 700; color: var(--brand-ink); opacity: .16; }
.cat-tile:hover .cat-ch { color: var(--on-brand); }
.cat-tile b { position: relative; z-index: 1; font-size: 17px; }
.cat-tile small { position: relative; z-index: 1; opacity: .8; font-size: 12px; }

/* 活動方塊 */
.promos { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .promos { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
.promo { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 170px; padding: 22px; border-radius: var(--radius); overflow: hidden; text-decoration: none; background: var(--brand-soft); color: var(--text); }
.promo:nth-child(2n) { background: var(--brand); color: var(--on-brand); }
.promo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.promo.has-img { color: #fff; }
.promo.has-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.6), transparent 70%); }
.promo h3, .promo p { position: relative; z-index: 1; margin: 0; }
.promo h3 { font-size: 20px; }
.promo p { opacity: .85; font-size: 14px; }

/* 品牌介紹 */
.story { display: grid; gap: 24px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 820px) { .story { grid-template-columns: 1fr 1fr; gap: 48px; } }
.story-img { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--brand-soft); }
.story-img img { width: 100%; height: 100%; object-fit: cover; }
.story-text h2 { font-size: 24px; }
.story-text { font-size: 16px; }
.story.no-img { grid-template-columns: 1fr; max-width: 720px; margin: 0 auto; text-align: center; }

/* 常見問題 */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 32px 16px 0; position: relative; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 12px; font-size: 22px; font-weight: 300; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 16px; color: var(--muted); }

/* ---------- 商品列表 ---------- */
.list-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter); }
.chips a { flex: none; text-decoration: none; padding: 7px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; background: var(--bg); }
.chips a[aria-current] { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.sort { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-left: auto; }
.sort select { min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.result-count { font-size: 13px; color: var(--muted); margin-bottom: 14px; }

/* ---------- 商品頁 ---------- */
.pd { display: grid; gap: 24px; grid-template-columns: 1fr; padding-top: 12px; }
@media (min-width: 880px) { .pd { grid-template-columns: 1.15fr 1fr; gap: 48px; padding-top: 20px; } .pd-info { position: sticky; top: 84px; align-self: start; } }
.gallery-main { position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden; background: var(--surface); margin: 0 calc(var(--gutter) * -1); border-radius: 0; }
@media (min-width: 600px) { .gallery-main { margin: 0; border-radius: var(--radius); } }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.thumbs button { flex: none; width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; background: var(--surface); }
.thumbs button[aria-current] { border-color: var(--brand); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pd-info h1 { font-size: clamp(22px, 4vw, 30px); margin-bottom: 8px; }
.price-box { font-size: 24px; font-weight: 700; color: var(--brand-ink); margin-bottom: 18px; }
.price-box small { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 8px; }
.axis { margin-bottom: 18px; }
.axis-name { font-size: 14px; margin-bottom: 8px; color: var(--muted); }
.axis-name b { color: var(--text); font-weight: 600; margin-left: 6px; }
.vals { display: flex; flex-wrap: wrap; gap: 8px; }
.val { position: relative; min-height: 42px; min-width: 52px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); cursor: pointer; font-size: 14px; }
.val:hover:not([disabled]) { border-color: var(--text); }
.val[aria-pressed="true"] { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--brand-softer); font-weight: 600; }
.val.out { color: var(--muted); background: repeating-linear-gradient(135deg, transparent 0 6px, var(--brand-softer) 6px 7px); }
.val.out::after { content: '售完'; font-size: 10px; margin-left: 6px; color: var(--muted); }
.val[disabled] { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.stock-note { font-size: 13px; color: var(--muted); min-height: 1.6em; margin-bottom: 10px; }
.stock-note.low { color: var(--warn); }
.stock-note.out { color: var(--danger); }
.buy { display: flex; gap: 10px; align-items: stretch; margin-bottom: 22px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.qty button { width: 40px; height: 44px; border: 0; background: none; cursor: pointer; font-size: 18px; }
.qty button[disabled] { opacity: .3; cursor: default; }
.qty input { width: 40px; height: 44px; border: 0; text-align: center; background: none; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buy .btn { flex: 1; }
.desc { border-top: 1px solid var(--line); padding-top: 18px; }
.desc h2 { font-size: 16px; }
.ship-note { font-size: 13px; color: var(--muted); background: var(--surface); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 18px; }
.sticky-buy { display: none; }
@media (max-width: 879px) {
  .sticky-buy { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; gap: 10px; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); align-items: center; transform: translateY(110%); transition: transform .2s; }
  .sticky-buy.show { transform: none; }
  .sticky-buy .p { font-weight: 700; color: var(--brand-ink); }
  .sticky-buy .btn { flex: 1; }
}

/* ---------- 購物車、結帳 ---------- */
.cart-layout { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 960px) { .cart-layout { grid-template-columns: 1fr 380px; gap: 40px; } .summary { position: sticky; top: 84px; align-self: start; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.panel h2 { font-size: 17px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.panel h2 .n { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-size: 13px; align-items: center; justify-content: center; }
.line { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: start; }
.line:first-child { padding-top: 0; }
.line:last-child { border-bottom: 0; padding-bottom: 0; }
.line-img { position: relative; width: 72px; height: 72px; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg); }
.line-img img { width: 100%; height: 100%; object-fit: cover; }
.line-img .ph span { font-size: 26px; }
.line-name { font-weight: 600; text-decoration: none; display: block; }
.line-opt { font-size: 13px; color: var(--muted); }
.line-bad { font-size: 13px; color: var(--danger); }
.line-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.line .qty button { width: 32px; height: 34px; font-size: 16px; }
.line .qty input { width: 34px; height: 34px; }
.rm { font-size: 12px; color: var(--muted); background: none; border: 0; cursor: pointer; text-decoration: underline; padding: 0; }
.sum-row { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 14px; }
.sum-total { font-size: 18px; font-weight: 700; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.sum-total span:last-child { color: var(--brand-ink); }
.free-bar { font-size: 13px; margin: 8px 0 4px; color: var(--muted); }
.free-bar i { display: block; height: 4px; border-radius: 2px; background: var(--line); margin-top: 6px; overflow: hidden; }
.free-bar i b { display: block; height: 100%; background: var(--brand); }
.store-picked { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--brand); border-radius: var(--radius-sm); background: var(--brand-softer); margin-bottom: 14px; }
.store-picked b { display: block; }
.store-picked small { color: var(--muted); }
.seven { display: inline-flex; width: 28px; height: 28px; border-radius: 6px; background: #f26a21; color: #fff; font-size: 11px; font-weight: 700; align-items: center; justify-content: center; flex: none; }
.agree { font-size: 13px; color: var(--muted); margin: 10px 0 14px; }

/* ---------- 訂單 ---------- */
.order-head { text-align: center; padding: 28px 0 10px; }
.order-head .icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand-ink); }
.order-head .icon svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.order-head.is-bad .icon { background: rgba(179, 38, 30, .1); color: var(--danger); }
.order-head h1 { font-size: 24px; }
.order-wrap { max-width: 720px; margin: 0 auto; }
.kv { display: grid; grid-template-columns: 96px 1fr; gap: 6px 12px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; }
.paycode { font-family: ui-monospace, Menlo, monospace; font-size: 22px; font-weight: 700; letter-spacing: .08em; padding: 12px; background: var(--bg); border: 1px dashed var(--brand); border-radius: var(--radius-sm); text-align: center; margin: 10px 0; }
.status-pill { display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.recent a { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 14px; }
.recent a:last-child { border-bottom: 0; }

/* 資訊頁 */
.prose { max-width: 760px; margin: 0 auto; font-size: 16px; }
.prose p { margin-bottom: 1.2em; }

/* 特殊全頁畫面（未開幕、找不到商店） */
.full-screen { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px 16px; min-height: 100vh; background: radial-gradient(circle at 30% 20%, var(--brand-soft), transparent 60%), var(--bg); }
.full-card { text-align: center; max-width: 420px; }
.full-card h2 { font-size: 30px; }
.closed-name { font-size: 22px; margin-bottom: 28px; color: var(--brand-ink); }
.full-card .powered { display: block; margin-top: 40px; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); background: #222; color: #fff; padding: 12px 18px; border-radius: var(--radius-sm); font-size: 14px; z-index: 50; transition: transform .25s; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.18); display: flex; gap: 12px; align-items: center; }
.toast.show { transform: translate(-50%, 0); }
.toast a { color: #ffd76a; white-space: nowrap; }
.page-product .toast { bottom: 84px; }
@media (min-width: 880px) { .page-product .toast { bottom: 24px; } }

/* =====================================================================
   版型：精品單品（大照片、留白、雜誌感）
   ===================================================================== */
.t-boutique { --radius: 2px; --radius-sm: 2px; --head-font: "Noto Serif TC", "Songti TC", serif; letter-spacing: .03em; }
.t-boutique .site-header { border-bottom-color: transparent; }
.t-boutique .site-header .bar { min-height: 68px; }
@media (min-width: 900px) {
  .t-boutique .site-header .bar { display: grid; grid-template-columns: 1fr auto 1fr; }
  .t-boutique .nav-main { grid-column: 1; grid-row: 1; margin-left: 0; }
  .t-boutique .brand { grid-column: 2; grid-row: 1; justify-content: center; }
  .t-boutique .tools { grid-column: 3; grid-row: 1; }
}
@media (max-width: 899px) { .t-boutique .brand { position: absolute; left: 50%; transform: translateX(-50%); max-width: 55%; } }
.t-boutique .shop-name { font-size: 20px; letter-spacing: .2em; font-weight: 600; }
.t-boutique .nav-main a { border-radius: 0; background: none !important; letter-spacing: .1em; font-size: 13px; }
.t-boutique .nav-main a[aria-current] { text-decoration: underline; text-underline-offset: 6px; }
.t-boutique .btn { text-transform: uppercase; letter-spacing: .15em; font-weight: 500; font-size: 14px; }
.t-boutique .slide { min-height: 72vh; background: var(--brand-softer); color: var(--text); text-align: center; justify-content: center; }
.t-boutique .slide .wrap { display: flex; flex-direction: column; align-items: center; }
.t-boutique .slide.has-img { color: #fff; }
.t-boutique .slide.has-img::after { background: rgba(0,0,0,.28); }
.t-boutique .slide .btn { background: transparent; color: inherit; border-color: currentColor; }
.t-boutique .slide-text h1, .t-boutique .slide-text h2 { font-weight: 500; letter-spacing: .12em; font-size: clamp(30px, 6vw, 60px); }
.t-boutique .slide-deco { display: none; }
.t-boutique .slide:not(.has-img) .slide-text::before { content: ''; display: block; width: 1px; height: 56px; background: var(--brand); margin: 0 auto 28px; }
.t-boutique .dots button { background: rgba(0,0,0,.2); }
.t-boutique .dots button[aria-current] { background: var(--text); }
.t-boutique .section { padding: 64px 0; }
.t-boutique .section-head { flex-direction: column; align-items: center; text-align: center; margin-bottom: 36px; }
.t-boutique .section-head h2 { font-weight: 500; letter-spacing: .14em; font-size: 24px; }
.t-boutique .grid { grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 600px) { .t-boutique .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 24px; } }
@media (min-width: 1040px) { .t-boutique .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 64px 32px; } }
.t-boutique .card-img { aspect-ratio: 4 / 5; }
.t-boutique .card-body { text-align: center; padding-top: 16px; }
.t-boutique .card-name { font-family: var(--head-font); font-size: 17px; font-weight: 500; letter-spacing: .06em; }
.t-boutique .card-price .price { color: var(--muted); font-weight: 400; }
.t-boutique .card-cat { display: none; }
.t-boutique .tag { border-radius: 0; letter-spacing: .1em; }
.t-boutique .story { gap: 0; }
@media (min-width: 820px) { .t-boutique .story { grid-template-columns: 1.1fr 1fr; } .t-boutique .story-text { padding: 48px 64px; } }
.t-boutique .story-img { aspect-ratio: 4 / 5; }
.t-boutique .story-text { padding: 28px 4px; }
.t-boutique .story-text h2 { font-weight: 500; letter-spacing: .12em; font-size: 26px; }
.t-boutique .story-wrap { background: var(--brand-softer); }
.t-boutique .promo { min-height: 260px; background: var(--surface); }
.t-boutique .promo:nth-child(2n) { background: var(--brand-softer); color: var(--text); }
.t-boutique .promo h3 { font-weight: 500; letter-spacing: .1em; }
.t-boutique .faq summary { font-weight: 500; }
.t-boutique .pd { gap: 32px; }
@media (min-width: 880px) { .t-boutique .pd { grid-template-columns: 1.4fr 1fr; gap: 64px; } }
.t-boutique .gallery-main { aspect-ratio: 4 / 5; }
.t-boutique .pd-info h1 { font-weight: 500; letter-spacing: .08em; }
.t-boutique .price-box { color: var(--text); font-weight: 400; }
.t-boutique .val { border-radius: 0; }
.t-boutique .ph { background: var(--brand-softer); }
.t-boutique .ph span { font-weight: 400; opacity: .35; }
.t-boutique .chips a { border-radius: 0; border: 0; border-bottom: 1px solid transparent; padding: 6px 4px; margin-right: 12px; background: none; letter-spacing: .08em; }
.t-boutique .chips a[aria-current] { background: none; color: var(--text); border-bottom-color: var(--text); }
.t-boutique .page-title { text-align: center; font-weight: 500; letter-spacing: .14em; margin: 36px 0; }
.t-boutique .site-footer { background: var(--bg); }

/* =====================================================================
   版型：生鮮市集（溫暖、圓角、像市場攤位的標籤）
   ===================================================================== */
.t-market { --radius: 16px; --radius-sm: 10px; }
.t-market .site-header { background: var(--brand); color: var(--on-brand); border-bottom: 0; }
.t-market .site-header .icon-btn, .t-market .site-header .brand { color: var(--on-brand); }
.t-market .site-header .icon-btn:hover { background: rgba(255,255,255,.15); }
.t-market .count { background: var(--on-brand); color: var(--brand); }
.t-market .nav-main a { color: var(--on-brand); opacity: .85; }
.t-market .nav-main a:hover, .t-market .nav-main a[aria-current] { background: rgba(255,255,255,.18); opacity: 1; color: var(--on-brand); }
.t-market .drawer { color: var(--text); }
.t-market .shop-name { font-size: 20px; }
.t-market .site-header::after { content: ''; display: block; height: 10px; background:
  radial-gradient(circle at 10px -4px, var(--brand) 9px, transparent 10px) 0 0 / 20px 10px repeat-x; position: absolute; left: 0; right: 0; top: 100%; }
.t-market .hero { padding: 26px 0 0; }
.t-market .hero .slides { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); gap: 12px; scroll-padding: 0 var(--gutter); }
.t-market .slide { border-radius: var(--radius); overflow: hidden; background: var(--brand-soft); color: var(--text); min-height: 300px; }
.t-market .slide.has-img { color: #fff; }
.t-market .slide .btn { background: var(--brand); color: var(--on-brand); border-color: var(--brand); border-radius: 999px; }
.t-market .slide-deco { background: var(--brand); opacity: .12; }
.t-market .slide-deco::before { background: var(--brand); opacity: .6; }
.t-market .slide-text .wrap, .t-market .slide-text { padding-left: 28px; padding-right: 28px; }
.t-market .dots button { background: rgba(0,0,0,.18); }
.t-market .dots button[aria-current] { background: var(--brand); }
.t-market .btn { border-radius: 999px; }
.t-market .section-head h2 { font-size: 24px; display: flex; align-items: center; gap: 10px; }
.t-market .section-head h2::before { content: ''; width: 10px; height: 22px; border-radius: 5px; background: var(--brand); }
.t-market .cat-row { display: flex; overflow-x: auto; scrollbar-width: none; gap: 12px; margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter); }
.t-market .cat-tile { flex: 0 0 auto; width: 116px; aspect-ratio: auto; align-items: center; justify-content: flex-start; padding: 0; background: none; text-align: center; overflow: visible; }
.t-market .cat-tile .ci { position: relative; width: 96px; height: 96px; border-radius: 50%; overflow: hidden; background: var(--brand-soft); margin-bottom: 8px; border: 3px solid var(--bg); box-shadow: 0 0 0 2px var(--brand-soft); }
.t-market .cat-tile .ci img, .t-market .cat-tile .ci .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.t-market .cat-tile.has-img::after { display: none; }
.t-market .cat-tile.has-img { color: var(--text); }
.t-market .cat-tile b { font-size: 15px; }
.t-market .card { background: var(--surface); border-radius: var(--radius); padding: 8px; border: 1px solid var(--line); transition: box-shadow .2s, transform .2s; }
.t-market .card:hover { box-shadow: 0 10px 24px rgba(0,0,0,.08); transform: translateY(-2px); }
.t-market .card-img { border-radius: 12px; }
.t-market .card-body { padding: 10px 6px 6px; }
.t-market .card-price .price { display: inline-block; background: var(--brand); color: var(--on-brand); padding: 1px 10px; border-radius: 6px 999px 999px 6px; font-size: 14px; }
.t-market .tag { border-radius: 999px; }
.t-market .promo { border-radius: var(--radius); border: 2px dashed var(--brand); background: var(--brand-softer); color: var(--text); }
.t-market .promo:nth-child(2n) { border-style: solid; background: var(--brand); color: var(--on-brand); }
.t-market .story-wrap { background: var(--brand-softer); }
.t-market .story-img { border-radius: 50% 50% var(--radius) var(--radius); }
.t-market .faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; padding: 0 16px; }
.t-market .faq summary::after { right: 0; }
.t-market .chips a[aria-current] { box-shadow: 0 2px 0 rgba(0,0,0,.08); }
.t-market .val { border-radius: 999px; }
.t-market .panel { border-radius: var(--radius); }
.t-market .site-footer { background: var(--brand-soft); border-top: 0; }
.t-market .ph { background:
  repeating-linear-gradient(45deg, transparent 0 14px, var(--brand-soft) 14px 15px), var(--brand-softer); }

/* 深色背景：照片周圍與表單的細節 */
.tone-dark .slide .btn { background: var(--text); color: var(--bg); }
.tone-dark .tag-out { background: rgba(255,255,255,.85); color: #111; }
.tone-dark .toast { background: #eee; color: #111; }
.tone-dark .toast a { color: #8a3b00; }
