/* 商戶店面樣式。主色 --accent 由商店設定決定。 */
:root {
  --accent: #b4301f;
  --paper: #faf4ea;
  --card: #fffdf8;
  --ink: #2a1d17;
  --muted: #6e5b4e;
  --line: #e2d5bf;
  --line-strong: #9a846b;
  --soft: #f1e7d6;
  --gold: #e3a52b;
  --gold-tint: #fbefd2;
  --bad: #8c2416;
  --ok: #4f6b3a;
  --radius: 10px;
  --r-sm: 8px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);
  /* 辣度用的小辣椒剪影 */
  --chili-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M10.5 9.5c3.5-2 7.5-.5 9.5 3 2.6 4.5 4.6 10.5 9.5 15.5-7.5.8-14.5-2.6-18.2-8.2-2.2-3.4-3.3-7.7-.8-10.3z'/%3E%3Cpath d='M8 11.5c.4-2.6 3.2-4 6-3.2-.8 1.9-3.4 3.4-6 3.2z'/%3E%3Cpath d='M11 8.6C10.6 6 11.6 3.8 14 2.5' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E");
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.3; margin: 0; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.main { flex: 1; padding-top: 24px; padding-bottom: 56px; }
.muted { color: var(--muted); font-size: 14px; }
.pre { white-space: pre-line; margin: 0; }
.narrow { max-width: 560px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 公告與頁首 */
.announce { background: var(--accent); color: #fff; text-align: center; font-size: 14px; padding: 8px 16px; }
.hdr { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 20; transition: box-shadow .3s ease, background-color .3s ease; }
.hdr.is-stuck { background: color-mix(in srgb, var(--paper) 86%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); box-shadow: 0 10px 30px -22px rgba(42, 29, 23, .6); }
.hdr-row { display: flex; align-items: center; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; text-decoration: none; margin-right: auto; min-width: 0; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand img { border-radius: 8px; object-fit: cover; width: 36px; height: 36px; }
.search { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--soft); }
.search input { border: 0; background: none; padding: 8px 14px; font: inherit; font-size: 16px; width: 180px; min-width: 0; min-height: 42px; }
.search input:focus { outline: none; }
.search:focus-within { border-color: var(--accent); }
.search button { border: 0; background: none; padding: 0 12px; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.cart-link { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; }
.cart-link:hover { background: var(--soft); }
shop-cart-count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.cats { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 0; font-size: 15px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats a { text-decoration: none; white-space: nowrap; color: var(--muted); padding: 10px 0; }
.cats a:hover { color: var(--accent); }

/* 按鈕 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border: 1px solid var(--accent); border-radius: var(--r-sm); background: var(--accent); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: filter .15s, transform .2s var(--ease-out), box-shadow .25s ease; }
.btn:hover { filter: brightness(1.08); }
@media (hover: hover) { .btn:hover:not(:disabled) { box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--accent) 80%, #000); transform: translateY(-1px); } }
.btn .arr { transition: transform .3s var(--ease-out); }
.btn:hover .arr, .more:hover .arr, .promo:hover .arr { transform: translateX(4px); }
.btn:disabled { background: #e6dccb; border-color: #e6dccb; color: #6e5b4e; cursor: not-allowed; filter: none; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn.is-added { animation: pop .3s cubic-bezier(.34, 1.56, .64, 1); }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 17px; }
.btn-block { width: 100%; }
.btn-ghost { background: var(--card); color: var(--accent); }

/* 首頁標題列 */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.sec-head a { font-size: 14px; color: var(--accent); }
.sec-title { font-size: 22px; margin: 40px 0 16px; }
.sec-head .sec-title { margin-top: 40px; }
.page-title { font-size: clamp(24px, 4vw, 32px); margin: 8px 0 20px; }
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.empty { color: var(--muted); padding: 32px 0; }

/* 商品卡 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px 20px; }
.card { text-decoration: none; display: block; }
.card-img { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--soft); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out), opacity .45s ease; }
.card-img .card-alt { position: absolute; inset: 0; opacity: 0; }
.card { transition: transform .35s var(--ease-out); }
@media (hover: hover) {
  .card:hover { transform: translateY(-4px); }
  .card:hover .card-img img { transform: scale(1.05); }
  .card.has-alt:hover .card-alt { opacity: 1; }
}
.card.is-out .card-img img { opacity: .55; }
.badge { position: absolute; top: 10px; left: 10px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-out { background: #1d1d1b; color: #fff; }
.badge-sale { background: var(--gold); color: var(--ink); }
.badge-bulk { background: var(--ink); color: var(--gold-tint); }
.card-name { margin-top: 10px; font-weight: 500; }
.card-price { display: flex; gap: 8px; align-items: baseline; }
.card-price s, .price-row s { color: var(--muted); font-size: 14px; }
.price-sale { color: var(--bad); font-weight: 700; }

/* 列表頁 */
.list-layout { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: start; }
shop-filters { display: block; position: sticky; top: 120px; }
.filter-toggle { display: none; }
.filters { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.filters fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.filters legend { font-weight: 700; font-size: 14px; margin-bottom: 6px; padding: 0; }
.filters select, .range input { width: 100%; min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
.opt { display: flex; align-items: center; gap: 8px; padding: 10px 0; margin: 0; font-size: 15px; font-weight: 400; cursor: pointer; }
.opt input { accent-color: var(--accent); width: 16px; height: 16px; }
.range { display: flex; align-items: center; gap: 6px; }
.clear { display: block; text-align: center; margin-top: 10px; font-size: 14px; color: var(--muted); }
.count { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.tag { font-size: 14px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--muted); }
.tag:hover, .tag.is-on { border-color: var(--accent); color: var(--accent); }
.tag.is-on { background: color-mix(in srgb, var(--accent) 10%, #fff); }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 32px; font-size: 15px; color: var(--muted); }
.pager a { color: var(--accent); }

/* 商品頁 */
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; margin-top: 16px; }
.gallery-main { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; background: var(--soft); }
.thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.thumbs button { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: none; cursor: pointer; }
.thumbs button.is-on { border-color: var(--accent); }
.thumbs img { width: 64px; height: 64px; object-fit: cover; }
.info h1 { font-size: clamp(24px, 3.5vw, 32px); }
.price-row { display: flex; align-items: baseline; gap: 10px; margin: 10px 0 14px; }
.price { font-size: 26px; font-weight: 700; }
.variants { border: 0; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.variants legend { font-weight: 700; font-size: 14px; margin-bottom: 8px; padding: 0; }
.variant input { position: absolute; opacity: 0; }
.variant span { display: inline-block; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.variant input:checked + span { border-color: var(--accent); background: var(--accent); color: #fff; }
.variant input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.variant.is-out span { color: #aaa; text-decoration: line-through; cursor: not-allowed; }
.buy { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.buy .btn { flex: 1; min-width: 180px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; height: 52px; }
.qty button { width: 44px; height: 100%; border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--ink); }
.qty button:hover:not(:disabled) { background: var(--soft); }
.qty button:disabled { color: #c9c5bc; cursor: not-allowed; }
.qty input, .qty-n { width: 44px; text-align: center; border: 0; font: inherit; font-weight: 600; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stock-note { color: #b3261e; font-size: 14px; min-height: 22px; margin: 8px 0 0; }
.desc { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; }
.desc h2 { font-size: 16px; margin-bottom: 8px; }
.plain { list-style: none; padding: 0; margin: 0 0 8px; }
.plain li { padding: 4px 0; }
.plain small { color: var(--muted); }

/* 購物車 */
.cart-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.cart-line { display: grid; grid-template-columns: 80px 1fr auto 96px auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-img img { width: 80px; height: 80px; object-fit: cover; border-radius: 10px; }
.cart-info { display: flex; flex-direction: column; min-width: 0; }
.cart-info a { font-weight: 600; text-decoration: none; }
.cart-info small { color: var(--muted); }
.cart-line .qty { height: 44px; }
.cart-line .qty button { width: 44px; }
.cart-total { text-align: right; }
.remove { border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; padding: 8px 4px; }
.cart-foot { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; margin-top: 24px; }
.cart-foot p { margin: 0; font-size: 18px; }
.cart-foot .muted { font-size: 14px; margin-bottom: 8px; }
.back { font-size: 14px; color: var(--muted); margin-top: 8px; text-align: center; display: block; }
.notice { background: #fff6e0; border: 1px solid #f0d58a; border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-size: 14px; }
.notice p { margin: 2px 0; }

/* 結帳 */
.checkout { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start; }
.co-form section { margin-bottom: 28px; }
.co-form h2, .co-summary h2 { font-size: 18px; margin-bottom: 12px; }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
label input:not([type=radio]):not([type=checkbox]), textarea, .coupon input { display: block; width: 100%; margin-top: 4px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 8px; font: inherit; font-size: 16px; font-weight: 400; background: var(--card); }
input, select, textarea { font-size: 16px; }
[aria-invalid=true] { border-color: var(--bad) !important; }
.field-error { display: block; color: var(--bad); font-size: 14px; margin-top: 4px; }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.pick { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-weight: 400; cursor: pointer; margin-bottom: 8px; }
.pick:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, #fff); }
.pick input { margin-top: 5px; accent-color: var(--accent); }
.pick small { color: var(--muted); }
.co-summary { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; position: sticky; top: 120px; }
.sum-lines { list-style: none; padding: 0; margin: 0 0 12px; font-size: 14px; }
.sum-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.coupon { display: flex; gap: 8px; }
.coupon input { margin: 0; text-transform: uppercase; }
.coupon .btn { min-height: 44px; flex-shrink: 0; }
.coupon-msg { font-size: 13px; min-height: 20px; margin: 4px 0 8px; }
.coupon-msg.is-ok { color: var(--ok); }
.coupon-msg.is-bad { color: var(--bad); }
.totals { margin: 0 0 12px; }
.totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.totals dd { margin: 0; }
.totals .grand { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; font-size: 18px; font-weight: 700; }
.form-error { color: var(--bad); font-size: 14px; margin: 0 0 8px; }
.form-error:empty { display: none; }

/* 訂單頁 */
.order { max-width: 640px; }
.order h2 { font-size: 17px; margin: 28px 0 8px; }
.order-kicker { color: var(--accent); font-weight: 700; margin: 0; }
.status { display: inline-block; padding: 2px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--soft); }
.status-pending { background: #fff1d0; color: #7a5200; }
.status-paid { background: #dcefe8; color: #17543f; }
.status-shipped { background: #dde8f5; color: #23487a; }
.status-completed { background: #e6e6e6; color: #333; }
.status-cancelled { background: #f7dedc; color: #8a1c15; }
.pay-box { border: 1px solid var(--accent); border-radius: var(--radius); padding: 16px 20px; margin: 20px 0; background: color-mix(in srgb, var(--accent) 5%, #fff); }
.pay-box h2 { margin-top: 0; }
.order-table { width: 100%; border-collapse: collapse; }
.order-table td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.order-table .num { text-align: right; white-space: nowrap; padding-left: 16px; }
.order .totals { max-width: 320px; margin-left: auto; margin-top: 12px; }
.order .btn { margin-top: 24px; }

/* 頁尾與提示 */
.ftr { border-top: 1px solid var(--line); background: var(--soft); padding: 32px 0 20px; font-size: 14px; }
.ftr-row { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.ftr p { margin: 4px 0; color: var(--muted); }
.ftr nav { display: flex; flex-direction: column; gap: 6px; }
.powered { margin-top: 20px; color: var(--muted); font-size: 13px; }
.toast a { color: var(--gold); margin-left: 12px; font-weight: 700; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: #1d1d1b; color: #fff; padding: 10px 20px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; max-width: calc(100vw - 32px); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* 食品資訊 */
.card-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); margin-top: 2px; }
.spice { display: inline-flex; align-items: center; gap: 3px; }
.spice i {
  width: 13px; height: 13px; background: #e2d5bf;
  -webkit-mask: var(--chili-mask) center / contain no-repeat; mask: var(--chili-mask) center / contain no-repeat;
}
.spice i.on { background: var(--accent); }
.spice b { margin-left: 6px; font-size: 14px; color: var(--accent); }
.facts { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 4px 0 12px; }
.fact { font-size: 14px; color: var(--muted); border-left: 1px solid var(--line-strong); padding-left: 14px; }
.bulk-box { display: flex; flex-direction: column; gap: 2px; background: var(--gold-tint); border: 1px dashed var(--gold); border-radius: var(--r-sm); padding: 10px 14px; margin: 8px 0 4px; font-size: 15px; }
.bulk-box small { color: var(--muted); }
.choice { display: block; margin-top: 18px; font-weight: 700; font-size: 14px; }
.choice select { display: block; width: 100%; margin-top: 6px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--card); font-weight: 400; }
.is-shake { animation: shake .35s ease; }
.food { margin: 0; }
.food div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.food div:last-child { border-bottom: 0; }
.food dt { color: var(--muted); font-size: 14px; }
.food dd { margin: 0; }
.free-gap { margin: -4px 0 12px; font-size: 14px; color: var(--accent); font-weight: 700; }
.buy-bar { display: none; }
shop-cart-count.is-bump { animation: pop .35s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

@media (max-width: 820px) {
  .buy-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -8px 20px -14px rgba(42, 29, 23, .45); transform: translateY(110%); transition: transform .24s ease-out; }
  .buy-bar[hidden] { display: none; }
  .buy-bar.is-on { transform: none; }
  .buy-bar div { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
  .buy-bar strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .buy-bar .btn { flex-shrink: 0; }
  .list-layout, .product, .checkout { grid-template-columns: 1fr; gap: 24px; }
  .list-layout { gap: 16px; }
  shop-filters, .co-summary { position: static; }
  .filter-toggle { display: flex; }
  shop-filters.is-ready .filters:not(.is-open) { display: none; }
  shop-filters.is-ready .filters { margin-top: 12px; }
  .hdr-row { flex-wrap: wrap; row-gap: 8px; }
  .search { order: 3; flex-basis: 100%; }
  .search input { flex: 1; width: auto; }
  .brand { font-size: 18px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .cart-line { grid-template-columns: 64px 1fr auto; gap: 10px 12px; }
  .cart-img img { width: 64px; height: 64px; }
  .cart-line .qty { grid-column: 2; justify-self: start; }
  .cart-total { grid-column: 3; grid-row: 1; }
  .remove { grid-column: 3; justify-self: end; }
}

/* ================= 首頁：大 banner ================= */
.main-home { padding-top: 0; }
.hero-x { position: relative; overflow: hidden; isolation: isolate; background: radial-gradient(120% 90% at 80% 30%, color-mix(in srgb, var(--accent) 14%, var(--soft)) 0, var(--soft) 58%); }
.hero-track { display: grid; position: relative; z-index: 1; }
.slide { grid-area: 1 / 1; position: relative; isolation: isolate; display: flex; align-items: center; min-height: clamp(480px, 70vh, 700px); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .9s ease, visibility 0s linear .9s; }
.slide.is-on { opacity: 1; visibility: visible; transition: opacity .9s ease; }
.slide.is-on a, .slide.is-on button { pointer-events: auto; }
.slide-inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; padding-top: 56px; padding-bottom: 96px; }
.kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 13px; font-weight: 800; letter-spacing: .16em; color: var(--accent); }
.kicker::before { content: ""; width: 26px; height: 2px; background: currentColor; border-radius: 2px; }
.slide-title { font-size: clamp(38px, 6.4vw, 80px); font-weight: 900; line-height: 1.06; letter-spacing: -.015em; margin: 0 0 20px; }
.ln { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.ln > span { display: block; transition: transform 1s var(--ease-out) calc(var(--i, 0) * 110ms + 180ms); }
.slide .ln > span { transform: translateY(108%); }
.slide.is-on .ln > span { transform: none; }
.slide-sub { color: var(--muted); font-size: clamp(16px, 1.5vw, 19px); max-width: 28em; margin: 0 0 30px; }
.slide-copy > .kicker, .slide-copy > .slide-sub, .slide-copy > .btn { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .8s var(--ease-out); }
.slide-copy > .kicker { transition-delay: .1s; }
.slide-copy > .slide-sub { transition-delay: .5s; }
.slide-copy > .btn { transition-delay: .65s, .65s; }
.is-on .slide-copy > .kicker, .is-on .slide-copy > .slide-sub, .is-on .slide-copy > .btn { opacity: 1; transform: none; }
.slide-media { position: relative; justify-self: end; width: 100%; max-width: 520px; isolation: isolate; }
.slide-media::before { content: ""; position: absolute; inset: 7% -5% -5% 7%; z-index: -1; border-radius: 36px 36px 36px 140px; background: var(--accent); transform: rotate(5deg) scale(.9); opacity: 0; transition: transform 1.2s var(--ease-back) .2s, opacity .6s ease .2s; }
.is-on .slide-media::before { transform: rotate(4deg); opacity: 1; }
.slide-frame { aspect-ratio: 1; border-radius: 36px 36px 36px 140px; overflow: hidden; background: var(--card); box-shadow: 0 40px 80px -40px rgba(42, 29, 23, .6); transform: rotate(3deg) scale(.94); transition: transform 1.3s var(--ease-out); }
.is-on .slide-frame { transform: rotate(-1.5deg); }
.slide-frame img, .slide-bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.14); transition: transform 7s cubic-bezier(.1, .6, .3, 1); }
.is-on .slide-frame img, .is-on .slide-bg img { transform: scale(1); }
.slide-full { color: #fff; }
.slide-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.slide-bg picture { display: block; height: 100%; }
.slide-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(24, 14, 9, .78) 0%, rgba(24, 14, 9, .38) 55%, rgba(24, 14, 9, .1) 100%); }
.slide-full .slide-inner { grid-template-columns: minmax(0, 660px); }
.slide-full .kicker { color: var(--gold); }
.slide-full .slide-sub { color: rgba(255, 255, 255, .86); }
.hero-plain { padding: 96px 0 104px; text-align: left; }
.hero-plain .slide-sub { margin-top: 12px; }

/* 輪播控制：圓點本身就是倒數計時條，動畫跑完就換下一張 */
.hero-ctrl { position: absolute; left: 0; right: 0; bottom: 28px; z-index: 3; display: flex; align-items: center; gap: 12px; pointer-events: none; }
.hero-ctrl > * { pointer-events: auto; }
.hero-dots { display: flex; gap: 8px; }
.hero-dot { width: 34px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; align-items: center; }
.hero-dot i { display: block; height: 4px; border-radius: 4px; background: color-mix(in srgb, var(--ink) 18%, transparent); overflow: hidden; position: relative; }
.hero-dot i::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.hero-dot.is-on i::after { animation: dot-fill var(--hero-dur, 6s) linear forwards; }
.hero-x.is-paused .hero-dot.is-on i::after { animation-play-state: paused; }
.hero-x.is-full .hero-dot i { background: rgba(255, 255, 255, .35); }
.hero-x.is-full .hero-dot i::after { background: #fff; }
.hero-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); background: color-mix(in srgb, var(--card) 70%, transparent); color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer; transition: transform .2s var(--ease-out), background-color .2s; }
.hero-btn:hover { background: var(--card); transform: scale(1.06); }
@keyframes dot-fill { to { transform: scaleX(1); } }

/* 漂浮的辣椒與花椒：跟著滑鼠輕輕移動，點了會爆開 */
.floaters { position: absolute; inset: 0; z-index: 0; }
.floater { position: absolute; width: var(--s); height: var(--s); cursor: pointer; transform: translate(calc(var(--mx, 0) * var(--depth) * 10px), calc(var(--my, 0) * var(--depth) * 10px)) rotate(var(--r)); transition: transform .6s var(--ease-out), opacity .3s; animation: bob 5.5s ease-in-out var(--d) infinite alternate; filter: drop-shadow(0 8px 10px rgba(42, 29, 23, .18)); }
.floater svg { width: 100%; height: 100%; display: block; }
.floater.is-popped { opacity: 0; scale: .2; transition: opacity .2s, scale .2s; }
@keyframes bob { from { translate: 0 -8px; } to { translate: 0 10px; } }

/* 跑馬燈 */
.marquee { background: var(--ink); color: var(--gold-tint); overflow: hidden; }
.mq-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .mq-track { animation-play-state: paused; }
.mq-run { display: flex; align-items: center; gap: 26px; padding: 13px 13px; flex-shrink: 0; }
.mq-run span { white-space: nowrap; font-weight: 700; letter-spacing: .08em; font-size: 15px; }
.mq-run .chili-ico { width: 20px; height: 20px; flex-shrink: 0; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* 首頁區塊 */
.home-sec { margin-top: 72px; }
.home-sec .sec-title { margin: 0 0 20px; font-size: clamp(24px, 3vw, 32px); font-weight: 900; }
.sec-en { margin: 0 0 4px; font-size: 12px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.more { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 24px; font-weight: 700; text-decoration: none; }

.cat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.cat-tile { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 20px; overflow: hidden; background: var(--soft); text-decoration: none; color: #fff; }
.cat-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.cat-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(24, 14, 9, .72)); }
.cat-name { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; display: flex; flex-direction: column; font-weight: 800; font-size: 17px; line-height: 1.3; transition: transform .4s var(--ease-out); }
.cat-name small { font-weight: 500; font-size: 13px; opacity: .8; }
@media (hover: hover) { .cat-tile:hover img { transform: scale(1.07); } .cat-tile:hover .cat-name { transform: translateY(-4px); } }

.promos { display: grid; gap: 20px; }
.promos-2 { grid-template-columns: 1fr 1fr; }
.promos-3 { grid-template-columns: repeat(3, 1fr); }
.promo { position: relative; display: block; min-height: 340px; border-radius: 28px; overflow: hidden; background: var(--ink); color: #fff; text-decoration: none; isolation: isolate; }
.promo picture, .promo img { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.promo img { object-fit: cover; transition: transform 1s var(--ease-out); }
.promo::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(200deg, transparent 30%, rgba(24, 14, 9, .8)); }
.promo-copy { position: absolute; left: 28px; right: 28px; bottom: 26px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.promo .kicker { color: var(--gold); margin: 0; }
.promo-title { font-size: clamp(24px, 2.8vw, 34px); font-weight: 900; line-height: 1.15; }
.promo-sub { opacity: .85; }
.promo-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 8px 16px; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 700; font-size: 15px; }
@media (hover: hover) { .promo:hover img { transform: scale(1.06); } }

.story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; padding: 56px; border-radius: 32px; background: var(--card); border: 1px solid var(--line); }
.story-media { aspect-ratio: 4 / 5; border-radius: 24px 24px 24px 96px; overflow: hidden; }
.story-media picture { display: block; height: 100%; }
.story-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); }
.story-title { font-size: clamp(30px, 4vw, 48px); font-weight: 900; line-height: 1.12; margin: 0 0 18px; }
.story-copy .pre { color: var(--muted); margin-bottom: 24px; font-size: 17px; }
@supports (animation-timeline: view()) {
  .story-media img { animation: parallax linear both; animation-timeline: view(); }
  @keyframes parallax { from { transform: translateY(-7%) scale(1.15); } to { transform: translateY(7%) scale(1.15); } }
}

/* 捲入畫面時淡入（沒有腳本時保持顯示） */
.will-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease var(--delay, 0ms), transform .8s var(--ease-out) var(--delay, 0ms); }
.will-reveal.is-in { opacity: 1; transform: none; }
.will-reveal .ln > span { transform: translateY(108%); }
.will-reveal.is-in .ln > span { transform: none; }

/* ================= 辣椒互動 ================= */
.spice-pop { border: 0; background: none; font: inherit; padding: 6px 10px; margin: -6px -10px; border-radius: 999px; cursor: pointer; transition: background-color .2s; }
.spice-pop:hover { background: var(--gold-tint); }
.spice-pop:hover i.on, .spice-pop.is-hot i.on { animation: wiggle .5s ease calc(var(--i) * 45ms); }
@keyframes wiggle { 0%, 100% { transform: none; } 30% { transform: rotate(-18deg) scale(1.25); } 60% { transform: rotate(12deg) scale(1.1); } }
.fx-layer { position: fixed; inset: 0; z-index: 60; pointer-events: none; overflow: hidden; }
.fx-chili { position: absolute; left: 0; top: 0; width: var(--s, 22px); height: var(--s, 22px); will-change: transform, opacity; }
.fx-chili svg { width: 100%; height: 100%; display: block; }
.fx-puff { position: absolute; left: 0; top: 0; width: 10px; height: 10px; border-radius: 50%; background: color-mix(in srgb, var(--muted) 45%, #fff); will-change: transform, opacity; }
.fx-fly { position: fixed; left: 0; top: 0; z-index: 61; overflow: hidden; pointer-events: none; background: var(--card); border: 3px solid #fff; box-shadow: 0 18px 40px -12px rgba(42, 29, 23, .55); will-change: transform, border-radius; }
.fx-fly img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cart-link.is-hot { animation: hot .65s cubic-bezier(.36, .07, .19, .97); color: var(--accent); }
@keyframes hot { 0%, 100% { transform: none; } 15% { transform: scale(1.22) rotate(-12deg); } 35% { transform: scale(1.15) rotate(10deg); } 55% { transform: scale(1.08) rotate(-6deg); } 75% { transform: rotate(3deg); } }

@media (max-width: 820px) {
  .slide { min-height: 0; align-items: stretch; }
  .slide-inner { grid-template-columns: 1fr; gap: 22px; padding-top: 22px; padding-bottom: 76px; }
  .slide-split .slide-media { order: -1; justify-self: center; max-width: 300px; width: 68%; }
  .slide-sub { margin-bottom: 22px; }
  .slide-full { min-height: 520px; align-items: flex-end; }
  .slide-full .slide-bg::after { background: linear-gradient(180deg, rgba(24, 14, 9, .15) 20%, rgba(24, 14, 9, .82) 100%); }
  .slide-title { font-size: clamp(34px, 10vw, 48px); }
  .hero-ctrl { bottom: 18px; }
  .hero-btn { display: none; }
  .floater:nth-child(n + 4) { display: none; }
  .floater { --s: 26px !important; }
  .home-sec { margin-top: 48px; }
  .cat-tiles { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 42%; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .cat-tiles::-webkit-scrollbar { display: none; }
  .cat-tile { scroll-snap-align: start; }
  .promos-2, .promos-3 { grid-template-columns: 1fr; }
  .promo { min-height: 280px; border-radius: 22px; }
  .story { grid-template-columns: 1fr; gap: 28px; padding: 20px; border-radius: 24px; }
  .story-media { aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .will-reveal { opacity: 1; transform: none; }
  .ln > span, .will-reveal .ln > span { transform: none; }
  .slide-copy > * { opacity: 1 !important; transform: none !important; }
  .floater { transform: rotate(var(--r)); }
}
