/* =================================================================
   雲朵泡芙工房 ｜ 預購單頁樣式 — 史詩級視覺升級版
   風格：溫暖精品 patisserie × 流體玻璃
   （奶油米 × 焦糖棕 × 莓果粉 × 金箔點綴；玻璃質感 / 漸層網格 / 層次陰影 / 微互動）
   作法：Mobile-first；保留所有 JS/HTML class 鉤子；維持 WCAG AA 對比
================================================================= */

/* ---------- 設計變數 ---------- */
:root {
  /* 底色系（暖奶油） */
  --cream:        #FBF2E6;   /* 頁面底 */
  --cream-2:      #F5E5D1;   /* 區塊交替底 */
  --cream-3:      #FCF7EF;   /* 更淺 */
  --card:         #FFFDF9;   /* 卡片底 */
  --glass:        rgba(255, 253, 249, 0.72);  /* 玻璃面 */
  --glass-line:   rgba(255, 255, 255, 0.6);   /* 玻璃高光邊 */

  /* 文字（皆通過 AA） */
  --ink:          #3A2A1E;   /* 主要文字 */
  --ink-soft:     #6E5949;   /* 次要文字（on card ≈6:1） */

  /* 品牌色 */
  --caramel:      #B07A47;
  --caramel-deep: #8A5A2E;   /* 文字/按鈕用 */
  --berry:        #C84B6B;
  --berry-deep:   #A83755;   /* CTA 底/重點文字 */
  --berry-deeper: #8F2C47;
  --honey:        #E7A94F;
  --gold:         #C9962F;   /* 金箔（裝飾/邊框/漸層；非小字） */
  --gold-soft:    #E7C77A;
  --line-green:   #0B8838;   /* LINE 按鈕（AA） */
  --good:         #2F6B3C;
  --bad:          #C0473C;

  /* 邊線 */
  --line:         #ECDAC2;
  --line-soft:    #F2E7D6;

  /* 漸層 */
  --grad-warm:   linear-gradient(135deg, #F8D9A6 0%, #EFB389 45%, #E093A8 100%);
  --grad-berry:  linear-gradient(135deg, #C84B6B 0%, #A83755 100%);
  --grad-gold:   linear-gradient(135deg, #F0D89A 0%, #C9962F 100%);
  --grad-cta:    linear-gradient(135deg, #C84B6B 0%, #9F3350 100%);
  --grad-title:  linear-gradient(120deg, #8A5A2E 0%, #B07A47 40%, #A83755 100%);

  /* 層次陰影（暖色調） */
  --sh-1: 0 1px 2px rgba(120,80,40,.06), 0 2px 6px rgba(120,80,40,.06);
  --sh-2: 0 6px 18px rgba(120,80,40,.10), 0 2px 6px rgba(120,80,40,.06);
  --sh-3: 0 18px 42px rgba(120,80,40,.15), 0 6px 14px rgba(120,80,40,.08);
  --sh-4: 0 34px 80px rgba(120,80,40,.22), 0 10px 24px rgba(120,80,40,.10);
  --glow-berry: 0 10px 30px rgba(200,75,107,.30);
  --glow-gold:  0 8px 24px rgba(201,150,47,.28);

  /* 圓角 */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-xl: 36px;
  --r-pill: 999px;

  /* 版面 */
  --maxw: 1140px;
  --pad: clamp(16px, 5vw, 32px);

  /* 字型 */
  --font-display: "Zen Maru Gothic", "Noto Sans TC", system-ui, sans-serif;
  --font-serif: "Fraunces", "Noto Serif TC", Georgia, serif;
  --font-body: "Noto Sans TC", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ring: 0 0 0 3px rgba(176,122,71,.22);
}

/* ---------- 重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: env(safe-area-inset-bottom);
  overflow-x: hidden;
  /* 暖色漸層網格底（fixed，營造氛圍深度） */
  background-image:
    radial-gradient(60% 50% at 8% -8%, rgba(231,169,79,.20), transparent 60%),
    radial-gradient(55% 45% at 100% 4%, rgba(200,75,107,.13), transparent 55%),
    radial-gradient(50% 40% at 50% 110%, rgba(201,150,47,.10), transparent 60%);
  background-attachment: fixed;
}

/* 細緻顆粒紋理覆蓋（極淡，不影響對比） */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
button { font-family: inherit; }
a { color: var(--caramel-deep); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.22; color: var(--ink); margin: 0; }
::selection { background: rgba(200,75,107,.22); color: var(--ink); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); position: relative; z-index: 1; }
.container-narrow { max-width: 780px; }

/* 無障礙 */
.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 300;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-pill);
}
.skip-link:focus { left: 12px; }
:focus-visible { outline: 3px solid var(--berry); outline-offset: 2px; border-radius: 8px; }

/* 捲動進度條 */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  z-index: 300; background: var(--grad-cta);
  box-shadow: 0 0 10px rgba(200,75,107,.5);
  transition: width .1s linear; border-radius: 0 3px 3px 0;
}

/* =================================================================
   按鈕
================================================================= */
.btn {
  --btn-bg: var(--caramel-deep);
  --btn-fg: #fff;
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 26px;
  border: none; border-radius: var(--r-pill);
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 700; font-size: 1rem; letter-spacing: .01em; text-decoration: none;
  cursor: pointer; isolation: isolate;
  box-shadow: var(--sh-2);
  transition: transform .18s cubic-bezier(.2,.8,.3,1), box-shadow .25s ease, background-color .2s ease, filter .2s ease;
  -webkit-tap-highlight-color: transparent;
}
/* 光澤掃過 */
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.38) 48%, transparent 62%);
  transform: translateX(-130%); transition: transform .6s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--sh-3); }
.btn:hover::after { transform: translateX(130%); }
.btn:active { transform: translateY(0) scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; filter: grayscale(.2); }
.btn:disabled::after { display: none; }

.btn-primary { --btn-bg: var(--berry-deep); background: var(--grad-cta); box-shadow: var(--sh-2), var(--glow-berry); }
.btn-primary:hover { background: var(--grad-cta); filter: brightness(1.04); }

.btn-ghost {
  --btn-bg: transparent; --btn-fg: var(--caramel-deep);
  box-shadow: inset 0 0 0 2px var(--caramel); background: rgba(255,255,255,.4);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover { background: rgba(176,122,71,.12); box-shadow: inset 0 0 0 2px var(--caramel-deep); }

.btn-line { --btn-bg: var(--line-green); --btn-fg: #fff; }
.btn-line:hover { background: #0A7A33; }

.btn-block { width: 100%; }
.btn-mini { padding: 9px 16px; font-size: .92rem; gap: 7px; }

/* =================================================================
   頂部導覽列（玻璃）
================================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(to bottom, rgba(251,242,230,.92), rgba(251,242,230,.66));
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand-mark {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
  background: var(--grad-gold);
  box-shadow: var(--sh-2), inset 0 1px 0 rgba(255,255,255,.5);
}
.brand-mark svg { filter: drop-shadow(0 1px 1px rgba(0,0,0,.12)); }
.brand-text { font-family: var(--font-display); font-weight: 900; font-size: 1.2rem; letter-spacing: .02em; }

.header-nav { display: none; margin-left: auto; gap: 26px; }
.header-nav a { color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: .98rem; position: relative; padding: 8px 4px; transition: color .2s ease; }
.header-nav a::after {
  content: ""; position: absolute; left: 4px; right: 4px; bottom: 2px; height: 2px; width: 0; margin: auto;
  background: var(--grad-cta); border-radius: 2px; transition: width .25s ease;
}
.header-nav a:hover { color: var(--ink); }
.header-nav a:hover::after { width: calc(100% - 8px); }

.header-cta { margin-left: auto; position: relative; }
.header-nav + .header-cta { margin-left: 0; }
.cart-count {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  background: #fff; color: var(--berry-deep); border-radius: var(--r-pill);
  font-weight: 800; font-size: .8rem; box-shadow: inset 0 0 0 1px rgba(168,55,85,.2);
}
.cart-count.bump { animation: countPop .4s cubic-bezier(.2,.9,.3,1.4); }
@keyframes countPop { 0%{transform:scale(1)} 40%{transform:scale(1.45)} 100%{transform:scale(1)} }

/* =================================================================
   Hero
================================================================= */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 8vw, 96px) 0 clamp(56px, 9vw, 104px); }
.hero::after {
  /* 底部柔和過渡到下一區 */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px;
  background: linear-gradient(to bottom, transparent, var(--cream-2));
  pointer-events: none;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(52px); opacity: .6; will-change: transform; }
.blob-1 { width: 360px; height: 360px; background: radial-gradient(circle, #FBD79E, #F4B27E); top: -70px; right: -50px; }
.blob-2 { width: 320px; height: 320px; background: radial-gradient(circle, #F7C4D0, #E59CB4); bottom: -60px; left: -60px; }
.blob-3 { width: 240px; height: 240px; background: radial-gradient(circle, #FBE6BE, #F0C98A); top: 38%; left: 52%; }

.hero-inner { position: relative; z-index: 1; display: grid; gap: clamp(28px, 6vw, 56px); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px;
  padding: 7px 16px 7px 14px; border-radius: var(--r-pill);
  background: var(--grad-cta); color: #fff;
  font-weight: 700; font-size: .82rem; letter-spacing: .06em;
  box-shadow: var(--sh-2), var(--glow-berry);
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.35); }

.hero-title {
  font-size: clamp(2.5rem, 11.5vw, 4.6rem);
  font-weight: 900; letter-spacing: .01em; line-height: 1.06; margin: 0 0 16px;
  background: var(--grad-title); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 1px 0 rgba(255,255,255,.3);
}
.hero-tagline {
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(1.08rem, 4.6vw, 1.5rem); font-weight: 500;
  color: var(--caramel-deep); margin: 0 0 26px; max-width: 30ch;
}

/* 重要日期：玻璃卡 + 金邊 */
.key-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; max-width: 480px; }
.key-date {
  position: relative; overflow: hidden;
  background: var(--glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-radius: var(--r-md); padding: 14px 16px 14px 18px;
  box-shadow: var(--sh-2); border: 1px solid var(--glass-line);
  display: flex; flex-direction: column; gap: 5px;
}
.key-date::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; }
.key-date--deadline::before { background: var(--grad-cta); }
.key-date--pickup::before { background: var(--grad-gold); }
.key-date-label { font-size: .8rem; color: var(--ink-soft); font-weight: 600; letter-spacing: .02em; }
.key-date-value { font-weight: 700; font-size: 1.04rem; color: var(--ink); line-height: 1.35; font-feature-settings: "tnum" 1; }

.countdown {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 26px; padding: 9px 18px;
  background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(8px);
  border-radius: var(--r-pill); box-shadow: var(--sh-1);
}
.countdown-label { font-size: .82rem; color: var(--berry-deep); font-weight: 600; }
.countdown-clock { font-family: var(--font-serif); font-weight: 600; color: var(--berry-deep); font-feature-settings: "tnum" 1; }
.countdown-clock span[data-cd] { display: inline-block; min-width: 1.4em; text-align: center; font-variant-numeric: tabular-nums; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero 主視覺 */
.hero-visual { position: relative; }
.hero-photo {
  /* 主視覺照片（images/hero.jpg）；漸層為載入失敗後備 */
  position: relative; aspect-ratio: 4 / 3; min-height: 240px;
  border-radius: var(--r-xl);
  background: url("images/hero.jpg") center center / cover no-repeat, var(--grad-warm);
  box-shadow: var(--sh-4), inset 0 1px 0 rgba(255,255,255,.5);
  display: grid; place-items: end center; padding: 20px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.4);
}
.hero-photo::after {
  /* 底部柔和漸層，讓徽章在亮照片上清晰可讀 */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(44,32,20,.5), transparent 48%);
}
/* 已改用真實主視覺照片：隱藏手繪佔位插圖與卡通裝飾貼紙 */
.hero-puff { display: none; }
.hero-puff svg { width: 52%; max-width: 230px; filter: drop-shadow(0 14px 22px rgba(122,75,34,.28)); }
.hero-photo-badge {
  position: relative; z-index: 2;
  background: rgba(58,42,30,.82); color: #fff; padding: 9px 18px; border-radius: var(--r-pill);
  font-size: .85rem; font-weight: 600; letter-spacing: .04em; backdrop-filter: blur(2px);
  box-shadow: var(--sh-2);
}
.sticker { display: none; position: absolute; z-index: 3; filter: drop-shadow(0 6px 10px rgba(0,0,0,.16)); animation: float 6s ease-in-out infinite; }
.sticker svg { display: block; }
.sticker-1 { top: -16px; left: -10px; width: 56px; }
.sticker-2 { top: 28%; right: -16px; width: 46px; animation-delay: 1s; }
.sticker-3 { bottom: -18px; left: 28%; width: 50px; animation-delay: 2s; }
@keyframes float { 0%,100% { transform: translateY(0) rotate(-5deg); } 50% { transform: translateY(-14px) rotate(5deg); } }

/* =================================================================
   區塊通用
================================================================= */
.section { padding: clamp(54px, 9vw, 100px) 0; position: relative; }
.section.menu { background: var(--cream-2); }
.section.order { background: var(--cream); }
.section.info { background: var(--cream-2); }
.section.faq { background: var(--cream); }

.section-head { text-align: center; max-width: 660px; margin: 0 auto clamp(32px, 5vw, 52px); }
.section-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-serif); font-weight: 600; letter-spacing: .24em;
  color: var(--caramel-deep); font-size: .78rem; margin: 0 0 12px; text-transform: uppercase;
}
.section-eyebrow::before, .section-eyebrow::after {
  content: ""; width: 26px; height: 1.5px; background: linear-gradient(90deg, transparent, var(--gold)); border-radius: 2px;
}
.section-eyebrow::after { background: linear-gradient(90deg, var(--gold), transparent); }
.section-title { font-size: clamp(1.8rem, 6.5vw, 2.6rem); font-weight: 900; margin: 0 0 12px; letter-spacing: .01em; }
.section-sub { color: var(--ink-soft); margin: 0; font-size: 1.02rem; }
.section-sub strong { color: var(--berry-deep); }

/* =================================================================
   商品菜單卡片
================================================================= */
.product-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }

.product-card {
  position: relative; background: var(--card); border-radius: var(--r-lg);
  border: 1px solid var(--line); box-shadow: var(--sh-2);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .25s cubic-bezier(.2,.8,.3,1), box-shadow .3s ease, border-color .3s ease;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--sh-4); border-color: rgba(201,150,47,.4); }

.product-media {
  position: relative; aspect-ratio: 16 / 11; min-height: 170px; overflow: hidden;
  background: var(--ph-grad, var(--grad-warm));
}
.product-media::before {
  /* 頂部柔光 */
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(120% 80% at 50% -20%, rgba(255,255,255,.5), transparent 60%);
}
.product-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; transition: transform .5s ease; }
.product-card:hover .product-media img { transform: scale(1.06); }
.product-media-puff {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 1;
  transition: transform .5s ease;
}
.product-media-puff svg { width: 44%; max-width: 128px; filter: drop-shadow(0 8px 14px rgba(122,75,34,.22)); }
.product-card:hover .product-media-puff { transform: scale(1.07) rotate(-3deg); }

.badge-soldout {
  position: absolute; top: 12px; left: 12px; z-index: 3;
  background: var(--ink); color: #fff; font-size: .78rem; font-weight: 700;
  padding: 6px 13px; border-radius: var(--r-pill); box-shadow: var(--sh-2);
}
/* 商品緞帶（CONFIG.products[].tag） */
.product-tag {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  background: var(--grad-gold); color: #2E2008; font-size: .76rem; font-weight: 800;
  padding: 6px 13px; border-radius: var(--r-pill); box-shadow: var(--sh-2);
  letter-spacing: .02em;
}

.product-body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.product-name { font-size: 1.22rem; font-weight: 700; }
.product-desc { color: var(--ink-soft); font-size: .95rem; margin: 0; flex: 1; line-height: 1.65; }
.product-allergens { display: flex; flex-wrap: wrap; gap: 6px; }
.allergen-tag {
  font-size: .76rem; color: var(--caramel-deep); font-weight: 600;
  background: rgba(176,122,71,.13); padding: 3px 10px; border-radius: var(--r-pill);
}
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.price {
  position: relative; font-family: var(--font-serif); font-weight: 600; font-size: 1.4rem; color: var(--berry-deep);
  font-feature-settings: "tnum" 1;
}
.price small { font-family: var(--font-body); font-size: .8rem; color: var(--ink-soft); font-weight: 400; }

/* 數量 stepper（玻璃） */
.stepper { display: inline-flex; align-items: center; gap: 2px; background: var(--cream); border-radius: var(--r-pill); padding: 4px; box-shadow: inset 0 0 0 1px var(--line); }
.stepper button {
  width: 38px; height: 38px; border: none; border-radius: 50%;
  background: var(--card); color: var(--caramel-deep);
  font-size: 1.3rem; font-weight: 700; line-height: 1; cursor: pointer;
  display: grid; place-items: center; box-shadow: var(--sh-1);
  transition: background-color .15s ease, color .15s ease, transform .12s ease;
}
.stepper button:hover { background: var(--caramel-deep); color: #fff; }
.stepper button:active { transform: scale(.88); }
.stepper button:disabled { opacity: .4; cursor: not-allowed; background: var(--card); color: var(--ink-soft); }
.stepper .qty { min-width: 34px; text-align: center; font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums; }

.product-card.is-soldout .product-media { filter: grayscale(.55); opacity: .6; }
.product-card.is-soldout .product-name { color: var(--ink-soft); }

/* =================================================================
   預購表單
================================================================= */
.order-layout { display: block; }
.hero-copy { min-width: 0; }
.order-form {
  position: relative; background: var(--card); border-radius: var(--r-xl);
  border: 1px solid var(--line); box-shadow: var(--sh-3);
  padding: clamp(20px, 5vw, 38px); display: grid; gap: 28px;
}
.order-form::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}
.form-block { border: none; padding: 0; margin: 0; min-width: 0; }
.form-block legend {
  font-family: var(--font-display); font-weight: 700; font-size: 1.12rem;
  padding: 0; margin-bottom: 15px; color: var(--ink);
  display: flex; align-items: center; gap: 10px;
}
.form-block legend::before { content: ""; width: 6px; height: 22px; border-radius: 3px; background: var(--grad-cta); display: inline-block; box-shadow: var(--glow-berry); }

/* 購物明細 */
.cart-lines { display: grid; gap: 10px; }
.cart-line {
  display: grid; grid-template-columns: 1fr auto 4.75rem; align-items: center; gap: 10px;
  padding: 13px 14px; background: var(--cream-3); border: 1px solid var(--line-soft); border-radius: var(--r-md);
  animation: lineIn .3s ease;
}
@keyframes lineIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.cart-line-name { font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.cart-line-name small { display: block; color: var(--ink-soft); font-size: .82rem; }
.cart-line-sub { font-family: var(--font-serif); font-weight: 600; color: var(--ink); font-feature-settings: "tnum" 1; white-space: nowrap; text-align: right; }
/* 明細列用「真實」較小的 stepper（transform 不會縮小 layout 盒，會在窄螢幕爆版） */
.cart-line .stepper { padding: 3px; }
.cart-line .stepper button { width: 30px; height: 30px; font-size: 1.1rem; }
.cart-line .stepper .qty { min-width: 24px; font-size: .95rem; }
.cart-empty { color: var(--ink-soft); background: var(--cream-3); border: 1px dashed var(--line); padding: 18px; border-radius: var(--r-md); text-align: center; margin: 0; }

.totals { margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 16px; display: grid; gap: 9px; }
.totals-row { display: flex; justify-content: space-between; align-items: baseline; color: var(--ink-soft); }
.totals-row span:last-child { font-family: var(--font-serif); font-weight: 600; color: var(--ink); font-feature-settings: "tnum" 1; }
.totals-row--grand {
  font-size: 1.18rem; color: var(--ink); padding: 14px 16px; margin-top: 6px;
  background: linear-gradient(120deg, rgba(231,169,79,.14), rgba(200,75,107,.12));
  border-radius: var(--r-md); border: 1px solid var(--line-soft);
}
.totals-row--grand span:last-child { color: var(--berry-deep); font-size: 1.5rem; }

/* 切換式取貨方式（滑動指示） */
.segmented {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  background: var(--cream); padding: 6px; border-radius: var(--r-pill);
  box-shadow: inset 0 0 0 1px var(--line);
}
.seg-option { position: relative; }
.seg-option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg-option span {
  display: block; text-align: center; padding: 12px; border-radius: var(--r-pill);
  font-weight: 700; color: var(--ink-soft); transition: all .25s cubic-bezier(.2,.8,.3,1); cursor: pointer;
}
.seg-option input:checked + span { background: var(--caramel-deep); color: #fff; box-shadow: var(--sh-2); }
.seg-option input:focus-visible + span { outline: 3px solid var(--berry); outline-offset: 2px; }

.hint { font-size: .88rem; color: var(--ink-soft); margin: 11px 2px 0; }

/* 到店自取說明（取代原取貨方式切換） */
.pickup-note {
  display: flex; align-items: center; gap: 11px; margin: 0;
  background: var(--cream-3); border: 1px solid var(--line-soft); border-radius: var(--r-md);
  padding: 14px 16px; color: var(--ink-soft); font-size: .95rem;
}
.pickup-note svg { flex: 0 0 auto; width: 22px; height: 22px; color: var(--caramel-deep); }
.pickup-note strong { color: var(--ink); }

/* 欄位 */
.field { display: flex; flex-direction: column; gap: 7px; margin-top: 15px; }
.field:first-child { margin-top: 0; }
.field label { font-weight: 600; font-size: .94rem; }
.req { color: var(--berry); }
.opt { color: var(--ink-soft); font-weight: 400; font-size: .82rem; }
.field input, .field select {
  width: 100%; padding: 13px 15px; font-size: 1rem; font-family: inherit;
  color: var(--ink); background: var(--cream-3);
  border: 1.5px solid var(--line); border-radius: var(--r-md);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.field input::placeholder { color: var(--ink-soft); opacity: 1; }
.field input:focus, .field select:focus {
  outline: none; border-color: var(--caramel); background: #fff; box-shadow: var(--ring);
}
.field.has-error input, .field.has-error select { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(192,71,60,.14); }
.error-text { color: var(--bad); font-size: .82rem; margin: 0; min-height: 1px; font-weight: 500; }
.error-text:empty { display: none; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 0; }

/* 送出狀態 */
.form-status { margin: 0; padding: 13px 16px; border-radius: var(--r-md); font-weight: 600; }
.form-status.is-sending { background: rgba(231,169,79,.16); color: var(--caramel-deep); }
.form-status.is-success { background: rgba(47,107,60,.12); color: var(--good); }
.form-status.is-error { background: rgba(192,71,60,.12); color: var(--bad); }

.order-actions { display: grid; gap: 12px; }
.order-actions-note { text-align: center; font-size: .85rem; color: var(--ink-soft); margin: 0; }

/* =================================================================
   取貨與付款資訊
================================================================= */
.info-grid { display: grid; grid-template-columns: 1fr; gap: 20px; max-width: 860px; margin-inline: auto; }
.info-card {
  background: var(--card); border-radius: var(--r-lg); border: 1px solid var(--line);
  box-shadow: var(--sh-2); padding: 26px 24px; transition: transform .25s ease, box-shadow .3s ease;
}
.info-card:hover { transform: translateY(-4px); box-shadow: var(--sh-3); }
.info-card h3 { font-size: 1.16rem; margin-bottom: 14px; display: flex; align-items: center; gap: 11px; }
.info-ico {
  flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(231,199,122,.45), rgba(201,150,47,.22));
  color: var(--caramel-deep); box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
.info-ico svg { width: 22px; height: 22px; }
.info-strong { font-weight: 700; font-size: 1.05rem; margin: 0 0 4px; }
.info-muted { color: var(--ink-soft); margin: 4px 0; font-size: .92rem; }
.info-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 9px; }
.info-list li { display: flex; align-items: center; gap: 9px; }
.info-list li::before { content: ""; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--grad-gold); }

.bank-box { background: var(--cream-3); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 16px; margin-top: 8px; }
.bank-line { display: flex; align-items: center; gap: 10px; margin: 7px 0; }
.bank-line span { color: var(--ink-soft); min-width: 42px; font-size: .9rem; }
.bank-line strong { font-family: var(--font-serif); letter-spacing: .02em; font-feature-settings: "tnum" 1; }
.copy-mini {
  margin-left: auto; border: none; background: var(--caramel-deep); color: #fff;
  padding: 8px 14px; min-height: 36px; border-radius: var(--r-pill); font-size: .8rem; font-weight: 700; cursor: pointer;
  transition: background-color .15s ease, transform .12s ease;
}
.copy-mini:hover { background: #6F4824; }
.copy-mini:active { transform: scale(.94); }

/* =================================================================
   FAQ Accordion
================================================================= */
.accordion { display: grid; gap: 13px; }
.acc-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--sh-1); transition: box-shadow .25s ease; }
.acc-item:hover { box-shadow: var(--sh-2); }
.acc-trigger {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 19px 22px; font-size: 1.02rem; font-weight: 700; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; font-family: var(--font-display);
}
.acc-trigger .acc-icon {
  flex: 0 0 auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(176,122,71,.12); color: var(--caramel-deep); font-size: 1.3rem; line-height: 1;
  transition: transform .3s cubic-bezier(.2,.8,.3,1), background-color .25s ease;
}
.acc-trigger[aria-expanded="true"] .acc-icon { transform: rotate(135deg); background: var(--grad-cta); color: #fff; }
.acc-panel { max-height: 0; overflow: hidden; transition: max-height .35s cubic-bezier(.2,.8,.3,1); }
.acc-panel-inner { padding: 0 22px 20px; color: var(--ink-soft); line-height: 1.75; }

/* =================================================================
   頁尾
================================================================= */
.site-footer {
  position: relative; background: linear-gradient(160deg, #41301F, #2C2014); color: #F3E6D6;
  padding: clamp(48px, 8vw, 72px) 0 calc(28px + env(safe-area-inset-bottom));
  margin-bottom: calc(84px + env(safe-area-inset-bottom));
}
.site-footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--grad-gold);
}
.footer-inner { display: grid; gap: 28px; }
.footer-brand .brand-text { color: #fff; font-size: 1.45rem; }
.footer-tagline { color: #cbb9a6; margin: 8px 0 0; font-family: var(--font-serif); font-style: italic; }
.footer-contact { display: grid; gap: 10px; }
.footer-contact a { color: #F3E6D6; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; padding: 8px 0; min-height: 44px; transition: color .2s ease; }
.footer-contact a svg { flex: 0 0 auto; width: 20px; height: 20px; color: var(--gold-soft); }
.footer-contact a strong { color: #fff; font-weight: 700; }
.footer-contact a:hover { color: var(--honey); }
.footer-contact a:hover svg { color: var(--honey); }
.footer-copy { color: #b09e8c; font-size: .85rem; margin: 0; border-top: 1px solid rgba(255,255,255,.14); padding-top: 18px; }

/* =================================================================
   手機底部固定預購列（玻璃）
================================================================= */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: flex; align-items: center; gap: 12px;
  padding: 11px var(--pad) calc(11px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(255,253,249,.96), rgba(255,253,249,.82));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 30px rgba(120,80,40,.14);
  transform: translateY(130%); transition: transform .35s cubic-bezier(.2,.8,.3,1);
}
.mobile-bar.is-visible { transform: translateY(0); }
.mobile-bar-info { display: flex; flex-direction: column; line-height: 1.2; }
.mobile-bar-count { font-size: .8rem; color: var(--ink-soft); }
.mobile-bar-total { font-family: var(--font-serif); font-weight: 600; font-size: 1.35rem; color: var(--berry-deep); font-feature-settings: "tnum" 1; }
.mobile-bar-btn { margin-left: auto; }

/* =================================================================
   Modal（訂單摘要）
================================================================= */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(44,32,20,.6); backdrop-filter: blur(4px); animation: fade .25s ease; }
.modal-card {
  position: relative; z-index: 1; width: 100%; max-width: 470px; max-height: 88vh; overflow-y: auto;
  background: var(--card); border-radius: var(--r-xl); padding: 32px 26px;
  box-shadow: var(--sh-4); text-align: center; border: 1px solid var(--glass-line);
  animation: pop .35s cubic-bezier(.2,.9,.3,1.25);
}
.modal-x { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; display: grid; place-items: center; border: none; background: none; font-size: 1.8rem; line-height: 1; color: var(--ink-soft); cursor: pointer; border-radius: 50%; }
.modal-x:hover { background: var(--cream); }
.modal-emoji { font-size: 3.2rem; }
.modal-title { font-size: 1.55rem; margin: 10px 0 6px; }
.modal-sub { color: var(--ink-soft); margin: 0 0 18px; font-size: .94rem; }
.modal-sub strong { color: var(--berry-deep); }
.order-summary {
  text-align: left; white-space: pre-wrap; word-break: break-word;
  background: var(--cream-3); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 16px; font-family: "Noto Sans TC", monospace; font-size: .9rem; line-height: 1.75;
  color: var(--ink); margin: 0 0 18px; max-height: 40vh; overflow-y: auto;
}
.modal-actions { display: grid; gap: 10px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.95); } to { opacity: 1; transform: none; } }

/* =================================================================
   Toast
================================================================= */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(20px);
  z-index: 210; background: var(--ink); color: #fff;
  padding: 13px 22px; border-radius: var(--r-pill); box-shadow: var(--sh-4);
  font-weight: 600; font-size: .92rem; opacity: 0; pointer-events: none;
  transition: opacity .28s ease, transform .28s cubic-bezier(.2,.8,.3,1); max-width: 90vw; text-align: center;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.is-error { background: var(--bad); }
.toast.is-success { background: var(--good); }

/* =================================================================
   進場動畫（reveal）
================================================================= */
.reveal { opacity: 0; transform: translateY(24px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.3,1); }
.hero .reveal:nth-child(1).in { transition-delay: .05s; }
.hero .reveal:nth-child(2).in { transition-delay: .13s; }
.hero .reveal:nth-child(3).in { transition-delay: .21s; }
.hero .reveal:nth-child(4).in { transition-delay: .29s; }
.hero .reveal:nth-child(5).in { transition-delay: .37s; }
.hero .reveal:nth-child(6).in { transition-delay: .45s; }

/* =================================================================
   響應式
================================================================= */
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; gap: 16px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 26px; }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .key-dates { max-width: none; }
}
@media (min-width: 940px) {
  .header-nav { display: flex; }
  .header-cta { margin-left: 0; }
  .hero-inner { grid-template-columns: 1.05fr .95fr; align-items: center; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .order-form { max-width: 780px; margin: 0 auto; }
  .mobile-bar { display: none !important; }
  .site-footer { margin-bottom: 0; }
  .toast { bottom: 32px; }
  .footer-inner { grid-template-columns: 1.2fr 1fr; align-items: start; }
}

/* =================================================================
   減少動態偏好
================================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .blob { transform: none !important; }
}

/* 舊瀏覽器後備：不支援 aspect-ratio 時用 min-height 撐高 */
@supports not (aspect-ratio: 1 / 1) {
  .hero-photo { min-height: 280px; }
  .product-media { min-height: 190px; }
}
