/* ==========================================================================
   iBUY 全新前端風格 DEMO — 溫潤有機大地風 (Warm Organic · Terracotta & Forest Sage)
   完全獨立之純 HTML/CSS 設計系統，不沿用既有專案任何藍白/黑綠元素
   ========================================================================== */

:root {
  /* 大地有機色票 (Warm Organic Earth Palette) */
  --bg-canvas: #FAF6F0;
  --bg-oat: #F3ECE1;
  --bg-sand: #EAE0D0;
  --surface-card: #FFFFFF;
  --surface-warm: #FDFBF7;
  --surface-glass: rgba(250, 246, 240, 0.86);

  /* 文字色階 (Walnut & Espresso Ink) */
  --ink-primary: #2C221E;
  --ink-secondary: #5C4D44;
  --ink-muted: #8C7A6E;
  --ink-light: #B5A599;

  /* 主色：赤陶暖橘 (Terracotta) */
  --terracotta: #C86D51;
  --terracotta-hover: #B2573C;
  --terracotta-deep: #8F4028;
  --terracotta-soft: #F9EBE6;
  --terracotta-border: #ECC8BC;

  /* 輔色：森林鼠尾草綠 (Forest Sage) */
  --sage: #4A6B53;
  --sage-hover: #3B5843;
  --sage-soft: #E7F0E9;
  --sage-border: #C2D8C7;

  /* 狀態與點綴色：暖琥珀、漿果紅、LINE綠 */
  --ochre: #D1913C;
  --ochre-soft: #FDF3E3;
  --berry: #B84A4A;
  --berry-soft: #FCEAEA;
  --line-green: #06C755;
  --line-green-hover: #05B04B;

  /* 邊框與圓角 (Soft Pebble Geometry) */
  --border-pebble: #E5DAC9;
  --border-subtle: #EFE7DA;
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-xl: 36px;
  --radius-pill: 9999px;

  /* 柔和暖調陰影 */
  --shadow-soft: 0 10px 30px -10px rgba(74, 52, 38, 0.07);
  --shadow-float: 0 20px 45px -15px rgba(74, 52, 38, 0.13);
  --shadow-inner: inset 0 2px 5px rgba(74, 52, 38, 0.04);

  /* 字體設定 (溫潤人文圓體與襯線混搭) */
  --font-sans: "PingFang TC", "Noto Sans TC", "Hiragino Sans", "Microsoft JhengHei", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: "Noto Serif TC", "Songti TC", "PMingLiU", Georgia, serif;

  --transition-smooth: 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-canvas);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-canvas);
  background-image: 
    radial-gradient(circle at 12% 8%, rgba(200, 109, 81, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 88% 22%, rgba(74, 107, 83, 0.06) 0%, transparent 45%);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-smooth);
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

img {
  max-width: 100%;
  display: block;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   頂部有機溫潤跑馬燈與懸浮膠囊導覽列
   ========================================================================== */
.top-Ribbon {
  background: var(--sage);
  color: #FAF6F0;
  font-size: 13px;
  padding: 9px 20px;
  text-align: center;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.top-Ribbon-badge {
  background: rgba(255, 255, 255, 0.18);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
}

.site-header-wrap {
  position: sticky;
  top: 12px;
  z-index: 100;
  padding: 0 20px;
  margin-top: 12px;
}

.site-header {
  max-width: 1240px;
  margin: 0 auto;
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-pebble);
  border-radius: var(--radius-pill);
  padding: 10px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-soft);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--ink-primary);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--terracotta), #DF8A6B);
  color: #FFF;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(200, 109, 81, 0.28);
}

.brand-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-muted);
  display: block;
  line-height: 1.1;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-oat);
  padding: 5px;
  border-radius: var(--radius-pill);
}

.nav-link {
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-secondary);
  transition: all var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover {
  color: var(--ink-primary);
  background: rgba(255, 255, 255, 0.55);
}

.nav-link.active {
  background: var(--surface-card);
  color: var(--terracotta);
  box-shadow: 0 4px 12px rgba(74, 52, 38, 0.08);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border-pebble);
  background: var(--surface-card);
  color: var(--ink-primary);
  transition: all var(--transition-smooth);
}

.header-pill-btn:hover {
  border-color: var(--terracotta);
  transform: translateY(-1px);
}

.header-cart-btn {
  background: var(--terracotta);
  color: #FFF;
  border-color: var(--terracotta);
}

.header-cart-btn:hover {
  background: var(--terracotta-hover);
  border-color: var(--terracotta-hover);
}

.cart-badge {
  background: rgba(255, 255, 255, 0.24);
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   通用容器與排版
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.page-main {
  flex: 1;
  padding: 36px 0 80px;
}

.section-block {
  margin-top: 64px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terracotta);
  background: var(--terracotta-soft);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 10px;
}

.eyebrow.sage {
  color: var(--sage);
  background: var(--sage-soft);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  color: var(--ink-primary);
  line-height: 1.25;
}

.section-desc {
  color: var(--ink-secondary);
  font-size: 15px;
  margin-top: 6px;
}

/* ==========================================================================
   按鈕與表單元件 (Organic Controls)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition-smooth);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background: var(--terracotta);
  color: #FFF;
  box-shadow: 0 8px 20px -6px rgba(200, 109, 81, 0.4);
}

.btn-primary:hover:not(:disabled) {
  background: var(--terracotta-hover);
  transform: translateY(-2px);
}

.btn-sage {
  background: var(--sage);
  color: #FFF;
  box-shadow: 0 8px 20px -6px rgba(74, 107, 83, 0.35);
}

.btn-sage:hover:not(:disabled) {
  background: var(--sage-hover);
  transform: translateY(-2px);
}

.btn-outline {
  background: var(--surface-card);
  border-color: var(--border-pebble);
  color: var(--ink-primary);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--terracotta);
  color: var(--terracotta);
  background: var(--terracotta-soft);
}

.btn-ghost {
  background: var(--bg-oat);
  color: var(--ink-secondary);
  padding: 9px 16px;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-sand);
  color: var(--ink-primary);
}

.btn-line {
  background: var(--line-green);
  color: #FFF;
  font-weight: 700;
  box-shadow: 0 10px 24px -8px rgba(6, 199, 85, 0.45);
}

.btn-line:hover:not(:disabled) {
  background: var(--line-green-hover);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

.input-field, .select-field, .textarea-field {
  width: 100%;
  background: var(--surface-card);
  border: 1.5px solid var(--border-pebble);
  border-radius: var(--radius-sm);
  padding: 11px 15px;
  font-size: 14px;
  color: var(--ink-primary);
  transition: all var(--transition-smooth);
}

.input-field:focus, .select-field:focus, .textarea-field:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 4px rgba(200, 109, 81, 0.14);
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
}

/* ==========================================================================
   標籤與徽章 (Organic Pills & Status)
   ========================================================================== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-oat);
  color: var(--ink-secondary);
}

.tag-terracotta {
  background: var(--terracotta-soft);
  color: var(--terracotta-deep);
}

.tag-sage {
  background: var(--sage-soft);
  color: var(--sage);
}

.tag-ochre {
  background: var(--ochre-soft);
  color: #9A6418;
}

.tag-berry {
  background: var(--berry-soft);
  color: var(--berry);
}

/* ==========================================================================
   首頁：有機大地 Bento 主視覺與代購流程
   ========================================================================== */
.hero-bento {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 24px;
  align-items: stretch;
}

.hero-main-card {
  background: linear-gradient(145deg, #F6EFE4 0%, #EADBC8 100%);
  border: 1px solid var(--border-pebble);
  border-radius: var(--radius-xl);
  padding: 48px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 440px;
}

.hero-main-card::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -60px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 109, 81, 0.16) 0%, transparent 70%);
  pointer-events: none;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4.2vw, 50px);
  line-height: 1.18;
  color: var(--ink-primary);
  margin: 12px 0 18px;
}

.hero-title em {
  font-style: normal;
  color: var(--terracotta);
  text-decoration: underline;
  text-decoration-color: rgba(200, 109, 81, 0.3);
  text-underline-offset: 6px;
}

.hero-lead {
  font-size: 16px;
  color: var(--ink-secondary);
  max-width: 50ch;
  margin-bottom: 32px;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-trust-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px dashed var(--border-pebble);
  flex-wrap: wrap;
}

.hero-trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-trust-num {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--terracotta);
}

.hero-trust-text {
  font-size: 12px;
  color: var(--ink-secondary);
  line-height: 1.3;
}

.hero-side-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-showcase-card {
  flex: 1;
  background: var(--surface-card);
  border: 1px solid var(--border-pebble);
  border-radius: var(--radius-xl);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.hero-arch-visual {
  width: 100%;
  height: 190px;
  border-radius: 90px 90px 24px 24px;
  background: linear-gradient(135deg, #E5D6C3, #D5C0A8);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}

.hero-campaign-card {
  background: var(--sage);
  color: #FAF6F0;
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero-campaign-card h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  margin: 4px 0;
}

.hero-campaign-card p {
  font-size: 13px;
  opacity: 0.88;
}

/* 兩階段代購有機流程卡 */
.journey-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.journey-card {
  background: var(--surface-card);
  border: 1px solid var(--border-pebble);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-smooth);
}

.journey-card:hover {
  transform: translateY(-4px);
}

.journey-step-num {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: var(--terracotta-soft);
  color: var(--terracotta);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 17px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

.journey-card h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.journey-card p {
  font-size: 13.5px;
  color: var(--ink-secondary);
}

/* ==========================================================================
   商城：搜尋篩選工具列與圓拱商品卡
   ========================================================================== */
.filter-shell {
  background: var(--surface-card);
  border: 1px solid var(--border-pebble);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.filter-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 260px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-box input {
  padding-left: 42px;
  border-radius: var(--radius-pill);
  background: var(--bg-canvas);
}

.search-icon {
  position: absolute;
  left: 15px;
  color: var(--ink-muted);
  pointer-events: none;
}

.category-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cat-pill {
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  background: var(--bg-canvas);
  color: var(--ink-secondary);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-smooth);
}

.cat-pill:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
}

.cat-pill.active {
  background: var(--terracotta);
  color: #FFF;
  border-color: var(--terracotta);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.product-card {
  background: var(--surface-card);
  border: 1px solid var(--border-pebble);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-soft);
  transition: all var(--transition-smooth);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-float);
  border-color: var(--terracotta-border);
}

.product-visual {
  height: 220px;
  border-radius: 80px 80px 18px 18px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  cursor: pointer;
}

.product-origin-pill {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-primary);
}

.product-body h3 {
  font-size: 16.5px;
  font-weight: 700;
  margin: 6px 0;
  line-height: 1.4;
  cursor: pointer;
}

.product-body h3:hover {
  color: var(--terracotta);
}

.product-desc-short {
  font-size: 13px;
  color: var(--ink-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
}

.product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.product-price {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--terracotta-deep);
}

.product-price small {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  margin-left: 3px;
}

/* ==========================================================================
   商品詳情與規格彈窗 (Modal)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(44, 34, 30, 0.45);
  backdrop-filter: blur(6px);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  background: var(--surface-card);
  border: 1px solid var(--border-pebble);
  border-radius: var(--radius-xl);
  max-width: 780px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: var(--shadow-float);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-oat);
  color: var(--ink-primary);
  display: grid;
  place-items: center;
  font-size: 18px;
}

.modal-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 28px;
}

.variant-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.variant-chip {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-pebble);
  background: var(--surface-card);
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition-smooth);
}

.variant-chip.active {
  border-color: var(--terracotta);
  background: var(--terracotta-soft);
  color: var(--terracotta-deep);
}

.variant-chip:disabled {
  opacity: 0.4;
  text-decoration: line-through;
  cursor: not-allowed;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--border-pebble);
  border-radius: var(--radius-pill);
  background: var(--bg-canvas);
  overflow: hidden;
}

.qty-control button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.qty-control button:hover:not(:disabled) {
  background: var(--bg-sand);
}

.qty-control span {
  min-width: 38px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
}

/* ==========================================================================
   登入頁：LINE 授權與溫潤歡迎卡
   ========================================================================== */
.login-shell {
  max-width: 940px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  background: var(--surface-card);
  border: 1px solid var(--border-pebble);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-float);
}

.login-story-pane {
  background: linear-gradient(160deg, var(--sage) 0%, #314B38 100%);
  color: #FAF6F0;
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-form-pane {
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mode-switch-pills {
  display: flex;
  gap: 6px;
  background: var(--bg-oat);
  padding: 5px;
  border-radius: var(--radius-pill);
  margin-bottom: 24px;
}

.mode-switch-pills button {
  flex: 1;
  padding: 8px 10px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.mode-switch-pills button.active {
  background: var(--surface-card);
  color: var(--terracotta);
  box-shadow: var(--shadow-soft);
}

/* ==========================================================================
   會員中心：有機側邊欄 + 七階段訂單軌跡 + 集運合併 + 儲值金
   ========================================================================== */
.member-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 28px;
  align-items: start;
}

.member-sidebar {
  background: var(--surface-card);
  border: 1px solid var(--border-pebble);
  border-radius: var(--radius-lg);
  padding: 24px 18px;
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 92px;
}

.member-profile-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 20px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 14px;
}

.member-avatar {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  background: var(--terracotta-soft);
  color: var(--terracotta);
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.member-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.member-menu-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-secondary);
  transition: all var(--transition-smooth);
}

.member-menu-btn:hover {
  background: var(--bg-canvas);
  color: var(--ink-primary);
}

.member-menu-btn.active {
  background: var(--terracotta-soft);
  color: var(--terracotta-deep);
}

.member-Todo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.todo-card {
  background: var(--surface-card);
  border: 1px solid var(--border-pebble);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.todo-card.urgent {
  border-color: var(--terracotta);
  background: linear-gradient(180deg, #FFF 0%, #FDF6F3 100%);
}

/* 七階段訂單進度條 (7-Stage Pipeline) */
.order-card {
  background: var(--surface-card);
  border: 1px solid var(--border-pebble);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-soft);
}

.pipeline-track {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin: 20px 0;
  padding: 16px;
  background: var(--bg-canvas);
  border-radius: var(--radius-md);
}

.pipeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  position: relative;
}

.pipeline-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-card);
  border: 2px solid var(--border-pebble);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted);
  display: grid;
  place-items: center;
  z-index: 1;
}

.pipeline-step.done .pipeline-dot {
  background: var(--sage);
  border-color: var(--sage);
  color: #FFF;
}

.pipeline-step.current .pipeline-dot {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: #FFF;
  box-shadow: 0 0 0 4px rgba(200, 109, 81, 0.2);
}

.pipeline-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
}

.pipeline-step.done .pipeline-label,
.pipeline-step.current .pipeline-label {
  color: var(--ink-primary);
}

/* ==========================================================================
   購物車與結帳三步驟
   ========================================================================== */
.stepper-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.stepper-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--bg-oat);
  color: var(--ink-muted);
  font-size: 14px;
  font-weight: 600;
}

.stepper-item.active {
  background: var(--terracotta);
  color: #FFF;
  box-shadow: var(--shadow-soft);
}

.stepper-item.done {
  background: var(--sage-soft);
  color: var(--sage);
}

.cart-layout {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;
  gap: 28px;
  align-items: start;
}

.cart-panel, .summary-panel {
  background: var(--surface-card);
  border: 1px solid var(--border-pebble);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-soft);
}

.summary-panel {
  position: sticky;
  top: 92px;
  background: linear-gradient(180deg, #FFFFFF 0%, #FAF5EC 100%);
}

.cart-item-row {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.cart-item-row:first-child {
  padding-top: 0;
}

.cart-thumb {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  display: grid;
  place-items: center;
}

.undo-banner {
  background: var(--ochre-soft);
  border: 1px solid #EBD4AF;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
}

.summary-dl {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
  padding: 18px 0;
  border-top: 1px dashed var(--border-pebble);
  border-bottom: 1px dashed var(--border-pebble);
}

.summary-dl div {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--ink-secondary);
}

.summary-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 20px;
}

.summary-total-row strong {
  font-family: var(--font-serif);
  font-size: 26px;
  color: var(--terracotta-deep);
}

/* ==========================================================================
   頁尾與浮動 DEMO 狀態控制器
   ========================================================================== */
.site-footer {
  background: var(--bg-oat);
  border-top: 1px solid var(--border-pebble);
  padding: 48px 0 90px;
  margin-top: auto;
  color: var(--ink-secondary);
  font-size: 13.5px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.demo-switcher-bar {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 250;
  background: rgba(44, 34, 30, 0.92);
  backdrop-filter: blur(12px);
  color: #FAF6F0;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.25);
  max-width: 95vw;
  overflow-x: auto;
}

.demo-switcher-bar button {
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.14);
  color: #FFF;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.demo-switcher-bar button.active {
  background: var(--terracotta);
}

.toast-box {
  position: fixed;
  top: 88px;
  right: 24px;
  z-index: 400;
  background: var(--ink-primary);
  color: #FAF6F0;
  padding: 13px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-float);
  font-size: 13.5px;
  font-weight: 600;
  display: none;
  align-items: center;
  gap: 10px;
}

.toast-box.show {
  display: inline-flex;
}

/* ==========================================================================
   RWD 響應式設計
   ========================================================================== */
@media (max-width: 980px) {
  .hero-bento,
  .login-shell,
  .member-layout,
  .cart-layout,
  .modal-grid {
    grid-template-columns: 1fr;
  }
  .journey-grid,
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .member-Todo-grid {
    grid-template-columns: 1fr;
  }
  .member-sidebar,
  .summary-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .site-header {
    border-radius: var(--radius-lg);
    flex-wrap: wrap;
    padding: 12px 16px;
  }
  .main-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
  }
  .nav-link {
    padding: 7px 12px;
    font-size: 13px;
  }
  .journey-grid,
  .product-grid {
    grid-template-columns: 1fr;
  }
  .hero-main-card {
    padding: 28px 22px;
  }
  .pipeline-track {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }
  .cart-item-row {
    grid-template-columns: 70px 1fr;
  }
}
