/* ==========================================================================
   全自動咖啡機銷售網站 - 奢華深色系設計系統 (style.css)
   ========================================================================== */

/* 註：字體已在 index.html 透過 Google Fonts <link> 引入 */

/* --------------------------------------------------------------------------
   1. 變數宣告 (Design Tokens) - 方針：定義配色、毛玻璃與陰影
   -------------------------------------------------------------------------- */
:root {
  /* 奢華暗色調背景 - 優化為選項 A：奢華金沙與深焙暖棕 */
  --bg-dark-base: #0f0b08;       /* 極深焙暖曜黑底色 */
  --bg-dark-card: #1c1511;       /* 深烘焙咖啡卡片底色 */
  --bg-dark-hover: #2a201b;      /* 暖棕色懸停底色 */
  
  /* 品牌奢華點綴色 */
  --primary-gold: #c5a880;       /* 皇家香檳金沙色，優雅且具職人溫度 */
  --primary-gold-hover: #e2d1bc; /* 亮金沙色，用於懸停 */
  --accent-amber: #b8956b;       /* 暖琥珀棕，用於星等與重點特色 */
  
  /* 語意色彩 (Semantic Colors) - 標準無障礙配色 */
  --color-success: #4e8c5a;      /* 經典翡翠綠 (成功) */
  --color-error: #c05c55;        /* 典雅朱砂紅 (錯誤) */
  --color-warning: #cca043;      /* 暖金黃 (警告) */
  
  /* 文字顏色 */
  --text-primary: #f6f3ee;       /* 暖玉白，高閱讀對比度 */
  --text-secondary: #d1c7bd;     /* 燕麥麥芽灰，用於說明文字 */
  --text-muted: #93867a;         /* 岩灰褐，用於次要細節 */
  
  /* 毛玻璃效果與邊框 */
  --glass-bg: rgba(28, 21, 17, 0.85);
  --glass-border: rgba(197, 168, 128, 0.2); /* 帶有微金光的細邊框 */
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.6);
  
  /* 轉場動畫時間 */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

/* --------------------------------------------------------------------------
   2. 全域基礎重設 (Reset & Global Styles)
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 代碼字體定義：程式碼區塊與等寬文字使用 JetBrains Mono 或 Fira Code */
code, pre, kbd, samp {
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, Monaco, 'Andale Mono', monospace;
  font-size: 0.9em;
}

html {
  scroll-behavior: smooth;
}

body {
  /* 使用原版經典字型系統：Noto Sans TC 與 Montserrat */
  font-family: 'Noto Sans TC', 'Montserrat', sans-serif;
  background-color: var(--bg-dark-base);
  color: var(--text-primary);
  line-height: 1.75;             /* 優化內文行高至 1.75，提高易讀性 */
  letter-spacing: 0.05em;        /* 適度字距調整，呈現精品報紙的高質感 */
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(197, 168, 128, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(184, 149, 107, 0.04) 0%, transparent 40%);
  background-attachment: fixed;
  /* 平滑的主題變色動畫過渡 */
  transition: background-color 0.5s cubic-bezier(0.16, 1, 0.3, 1), color 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

button, input, select {
  font-family: inherit;
}

ul {
  list-style: none;
}

/* 捲軸美化 */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark-base);
}
::-webkit-scrollbar-thumb {
  background: #3a2e26;           /* 改為暖深褐色滑塊 */
  border-radius: 5px;
  border: 2px solid var(--bg-dark-base);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-gold);
}

/* --------------------------------------------------------------------------
   2.5 淺色尊榮模式適配 (Light Theme Variables)
   -------------------------------------------------------------------------- */
body.light-theme {
  --bg-dark-base: #fcfbfa;       /* 極致暖白象牙底色 */
  --bg-dark-card: #ffffff;       /* 純白卡片底色 */
  --bg-dark-hover: #f5f0e8;      /* 懸停白底色 */
  
  /* 淺色模式專屬文字顏色 */
  --text-primary: #2e2621;       /* 深褐黑，取代原本的象牙白 */
  --text-secondary: #63534b;     /* 中灰褐，取代煙燻灰 */
  --text-muted: #948277;         /* 淺灰褐，取代暗灰褐 */
  
  /* 淺色毛玻璃與高質感微投影 */
  --glass-bg: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(197, 168, 128, 0.25);
  --glass-shadow: 0 8px 32px 0 rgba(148, 130, 119, 0.12);
  
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(197, 168, 128, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(184, 149, 107, 0.03) 0%, transparent 40%);
}

/* 淺色模式下特定精緻元件的微調 */
body.light-theme .coffee-cup {
  border-color: #2c2521;
}
body.light-theme .coffee-cup::after {
  border-color: #2c2521;
}
body.light-theme .cart-drawer {
  background: #fcfbfa;
}
body.light-theme .cart-footer {
  background: #f5f2ec;
}
body.light-theme .modal-container {
  background: #ffffff;
}
body.light-theme .feature-tag {
  background: rgba(44, 37, 33, 0.05);
  color: var(--text-secondary);
}
body.light-theme .roast-item {
  background: rgba(44, 37, 33, 0.02);
  border-color: rgba(44, 37, 33, 0.05);
}
body.light-theme .roast-item:hover {
  background: rgba(44, 37, 33, 0.04);
}

/* 主題切換按鈕樣式 */
.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--primary-gold);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
  transform: translateY(-2px);
}

.theme-toggle-btn i {
  font-size: 1.2rem;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 點擊切換時圖示會微微旋轉 */
.theme-toggle-btn:active i {
  transform: rotate(45deg) scale(0.9);
}

/* --------------------------------------------------------------------------
   3. 高質感毛玻璃導覽列 (Navbar)
   -------------------------------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
  z-index: 1000;
  box-shadow: var(--glass-shadow);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--primary-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-logo i {
  color: var(--primary-gold);
  -webkit-text-fill-color: initial; /* 讓 FontAwesome 圖示正常上色 */
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  position: relative;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-gold);
}

/* 底部滑動線條特效 */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-gold);
  transition: var(--transition-fast);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* 購物車按鈕樣式 */
.cart-btn {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition-smooth);
}

.cart-btn:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--primary-gold);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
  transform: translateY(-2px);
}

.cart-btn i {
  font-size: 1.2rem;
}

/* 購物車數量紅點提示 */
.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background-color: var(--accent-amber);
  color: #000;
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 4px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* --------------------------------------------------------------------------
   4. 首頁英雄介紹區 (Hero Section)
   -------------------------------------------------------------------------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 120px 8% 60px 8%;
  gap: 40px;
  position: relative;
}

.hero-content {
  flex: 1;
  max-width: 600px;
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-subtitle {
  color: var(--primary-gold);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 15px;
  display: block;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 25px;
  background: linear-gradient(to right, #ffffff, #e5be85);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.hero-buttons {
  display: flex;
  gap: 20px;
}

/* 奢華香檳金主按鈕 */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-gold) 0%, #9a7f5a 100%);
  color: #000;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 20px rgba(197, 168, 128, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(197, 168, 128, 0.5);
  color: #000;
}

/* 質感幽暗外框按鈕 */
.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-weight: 600;
  padding: 14px 32px;
  border-radius: 30px;
  border: 1px solid var(--glass-border);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-primary);
  transform: translateY(-3px);
}

/* 右側奢華視覺展示區 */
.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  animation: fadeIn 1.5s ease-out forwards;
}

.hero-glow-bg {
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(197, 168, 128, 0.12) 0%, transparent 70%);
  z-index: 1;
}

.hero-image-wrapper {
  position: relative;
  z-index: 2;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transform: rotate(-2deg);
  transition: var(--transition-smooth);
}

.hero-image-wrapper:hover {
  transform: rotate(0deg) scale(1.03);
}

.hero-image {
  width: 100%;
  max-width: 450px;
  height: 450px;
  object-fit: cover;
  display: block;
}

/* 浮動的特色指標卡片 */
.hero-floating-card {
  position: absolute;
  bottom: 30px;
  left: -20px;
  z-index: 3;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: var(--glass-shadow);
  animation: float 4s ease-in-out infinite;
}

.hero-floating-card i {
  color: var(--primary-gold);
  font-size: 2rem;
}

.hero-floating-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.hero-floating-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   5. 品牌切換與產品展示區 (Showcase Section)
   -------------------------------------------------------------------------- */
.showcase-container {
  padding: 80px 8%;
  background-color: rgba(10, 9, 8, 0.6);
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 15px;
  letter-spacing: 2px;
}

.section-header h2 span {
  color: var(--primary-gold);
}

.section-header p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* 品牌切換頁籤 (Tabs) */
.brand-tabs {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.tab-btn {
  background: var(--bg-dark-card);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.tab-btn:hover {
  border-color: var(--primary-gold);
  color: var(--text-primary);
  background: rgba(212, 175, 55, 0.05);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--primary-gold) 0%, #b89225 100%);
  color: #000;
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
}

/* 產品卡片 Grid 佈局 */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* 咖啡機產品卡片樣式 */
.product-card {
  background: var(--bg-dark-card);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
  position: relative;
}

.product-card:hover {
  transform: translateY(-8px);
  border-color: rgba(212, 175, 55, 0.3);
  box-shadow: 0 12px 30px rgba(0,0,0,0.6);
}

/* 產品圖片包裝器 */
.prod-img-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background-color: #1a1614;
}

.prod-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.product-card:hover .prod-img {
  transform: scale(1.08);
}

/* 品牌標誌水貼與評分水貼 */
.prod-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(10, 9, 8, 0.85);
  backdrop-filter: blur(5px);
  border: 1px solid var(--glass-border);
  color: var(--primary-gold);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  letter-spacing: 1px;
}

.prod-rating {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(10, 9, 8, 0.85);
  backdrop-filter: blur(5px);
  color: var(--accent-amber);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 產品資訊主體 */
.prod-info {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.prod-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
  color: var(--text-primary);
}

.prod-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.feature-tag {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.03);
}

/* 底部價格與操作按鈕區 */
.prod-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.prod-price {
  display: flex;
  flex-direction: column;
}

.prod-price-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.prod-price-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-gold);
}

.prod-actions {
  display: flex;
  gap: 8px;
}

.btn-icon-detail {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition-fast);
}

.btn-icon-detail:hover {
  background: var(--text-primary);
  color: #000;
  border-color: var(--text-primary);
  transform: translateY(-2px);
}

.btn-add-cart {
  background: linear-gradient(135deg, var(--primary-gold) 0%, #b89225 100%);
  color: #000;
  font-weight: 700;
  padding: 0 16px;
  height: 40px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.btn-add-cart:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.35);
}

/* --------------------------------------------------------------------------
   5.5 寰宇尋豆產區展示區 (Coffee Beans Section)
   -------------------------------------------------------------------------- */
.beans-section {
  padding: 100px 8%;
  background: rgba(10, 9, 8, 0.4);
  border-top: 1px solid var(--glass-border);
}

/* 咖啡豆精品品質與烘焙度知識庫 Grid */
.beans-knowledge-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto 60px auto;
}

@media (max-width: 992px) {
  .beans-knowledge-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

.knowledge-card {
  background: var(--bg-dark-card);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-smooth);
}

.knowledge-card:hover {
  border-color: rgba(212, 175, 55, 0.25);
  transform: translateY(-4px);
}

.knowledge-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-gold);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.knowledge-card h3 i {
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

.knowledge-card .subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 30px;
}

/* 品質指標列表 */
.quality-list {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.quality-list li {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.q-icon {
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.2);
  color: var(--primary-gold);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.quality-list li:hover .q-icon {
  background: var(--primary-gold);
  color: #000;
  transform: scale(1.08) rotate(5deg);
}

.q-content h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.q-content p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* 烘焙度光譜指南 */
.roast-spectrum {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.roast-item {
  display: flex;
  gap: 20px;
  background: rgba(255,255,255,0.01);
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 12px;
  padding: 18px;
  transition: var(--transition-smooth);
}

.roast-item:hover {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.08);
  padding-left: 24px;
}

.roast-badge-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: #000;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.roast-light {
  background: linear-gradient(135deg, #e5be85 0%, #c29d66 100%);
  box-shadow: 0 0 10px rgba(229, 190, 133, 0.4);
}

.roast-medium {
  background: linear-gradient(135deg, #e5a93b 0%, #a07120 100%);
  box-shadow: 0 0 10px rgba(229, 169, 59, 0.4);
}

.roast-dark {
  background: linear-gradient(135deg, #4e3629 0%, #20130c 100%);
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 0 10px rgba(78, 54, 41, 0.4);
}

.roast-details {
  flex-grow: 1;
}

.roast-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
  gap: 5px;
}

.roast-meta h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.roast-meta span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary-gold);
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
}

.roast-details p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.beans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 35px;
  max-width: 1200px;
  margin: 0 auto;
}

.bean-card {
  background: var(--bg-dark-card);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.bean-card:hover {
  transform: translateY(-8px);
  border-color: rgba(212, 175, 55, 0.3);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.bean-img-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background-color: #1a1614;
}

.bean-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.bean-card:hover .bean-img {
  transform: scale(1.05);
}

.bean-region-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(10, 9, 8, 0.85);
  backdrop-filter: blur(5px);
  border: 1px solid var(--primary-gold);
  color: var(--primary-gold);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  letter-spacing: 1px;
}

.bean-body {
  padding: 30px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.bean-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.bean-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 風味進度條樣式 */
.flavor-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 5px 0;
}

.flavor-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.flavor-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.progress-bar {
  background: #25201c;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  width: 100%;
}

.progress-fill {
  background: linear-gradient(90deg, var(--primary-gold) 0%, var(--accent-amber) 100%);
  height: 100%;
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
  transition: var(--transition-smooth);
}

/* 推薦機型看板樣式 */
.bean-match {
  background: rgba(212, 175, 55, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: 12px;
  padding: 15px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  line-height: 1.5;
  margin-top: auto;
}

.bean-match i {
  color: var(--primary-gold);
  font-size: 1.1rem;
  margin-top: 2px;
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.bean-match span {
  flex: 1;
}

/* --------------------------------------------------------------------------
   6. 咖啡特調客製化互動區 (Coffee Customizer)
   -------------------------------------------------------------------------- */
.customizer-section {
  padding: 100px 8%;
  background: linear-gradient(180deg, rgba(10, 9, 8, 0.6) 0%, rgba(22, 20, 18, 0.8) 100%);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

.customizer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

/* 左側控制面板 */
.custom-panel {
  background: var(--bg-dark-card);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--glass-shadow);
}

.custom-panel h3 {
  font-size: 1.8rem;
  color: var(--primary-gold);
  margin-bottom: 15px;
}

.custom-panel p.intro {
  color: var(--text-secondary);
  margin-bottom: 30px;
  font-size: 0.95rem;
}

.control-group {
  margin-bottom: 25px;
}

.control-label-wrapper {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 0.95rem;
}

.control-value {
  color: var(--primary-gold);
}

/* 美化 Range 滑塊 */
input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
}

input[type=range]:focus {
  outline: none;
}

input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: #332d29;
  border-radius: 3px;
  border: none;
}

input[type=range]::-webkit-slider-thumb {
  height: 18px;
  width: 18px;
  border-radius: 50%;
  background: var(--primary-gold);
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -6px;
  box-shadow: 0 0 8px var(--primary-gold);
  transition: var(--transition-fast);
}

input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: var(--primary-gold-hover);
}

/* 右側模擬咖啡杯視覺效果 */
.cup-preview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* 蒸汽煙霧效果 */
.steams {
  display: flex;
  gap: 15px;
  margin-bottom: 10px;
  height: 40px;
}

.steam-line {
  width: 3px;
  height: 100%;
  background: rgba(245, 240, 235, 0.25);
  border-radius: 3px;
  filter: blur(1px);
}

.steam-line:nth-child(1) { animation: steamMove 2.5s infinite ease-in-out; }
.steam-line:nth-child(2) { animation: steamMove 2s infinite ease-in-out 0.5s; }
.steam-line:nth-child(3) { animation: steamMove 3s infinite ease-in-out 0.2s; }

/* 杯體 HTML 模型 */
.coffee-cup {
  width: 180px;
  height: 200px;
  border: 8px solid var(--text-primary);
  border-bottom-left-radius: 40px;
  border-bottom-right-radius: 40px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
  box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

/* 杯耳 */
.coffee-cup::after {
  content: '';
  position: absolute;
  right: -40px;
  top: 40px;
  width: 45px;
  height: 90px;
  border: 8px solid var(--text-primary);
  border-left: none;
  border-top-right-radius: 30px;
  border-bottom-right-radius: 30px;
}

/* 咖啡各層液體，透過變數動態調整高度 */
.liquid-layer {
  width: 100%;
  transition: height 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.layer-foam {
  background: linear-gradient(to right, #ece3d5, #d2c1aa);
  height: var(--foam-height, 20%);
}

.layer-milk {
  background: linear-gradient(to right, #fdfbf7, #f3ede2);
  height: var(--milk-height, 30%);
}

.layer-coffee {
  background: linear-gradient(to right, #38220f, #221408);
  height: var(--coffee-height, 40%);
}

/* 調配推薦卡片 */
.recipe-result-card {
  margin-top: 30px;
  background: var(--bg-dark-card);
  border: 1px solid var(--primary-gold);
  border-radius: 12px;
  padding: 15px 25px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.1);
  width: 100%;
  max-width: 320px;
}

.recipe-result-card span {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 5px;
}

.recipe-result-card h4 {
  font-size: 1.4rem;
  color: var(--primary-gold);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   7. 模擬購物車側邊欄 (Cart Drawer)
   -------------------------------------------------------------------------- */
.cart-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.cart-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -450px; /* 預設在螢幕右側外 */
  width: 100%;
  max-width: 420px;
  height: 100%;
  background: #110f0d;
  border-left: 1px solid var(--glass-border);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
  z-index: 2001;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.cart-drawer.open {
  right: 0;
}

/* 購物車頭部 */
.cart-header {
  padding: 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.cart-header h3 i {
  color: var(--primary-gold);
  margin-right: 8px;
}

.btn-close-cart {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-close-cart:hover {
  color: var(--primary-gold);
  transform: rotate(90deg);
}

/* 購物車品項列表區 */
.cart-items-list {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 空購物車狀態 */
.cart-empty-state {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  color: var(--text-muted);
  gap: 15px;
  text-align: center;
}

.cart-empty-state i {
  font-size: 3rem;
  color: #332d29;
}

/* 單個購物車商品卡 */
.cart-item {
  display: flex;
  gap: 15px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 12px;
}

.cart-item-img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
}

.cart-item-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cart-item-name {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
}

.cart-item-price {
  color: var(--primary-gold);
  font-weight: 600;
  font-size: 0.95rem;
}

/* 數量控制按鈕 */
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.8rem;
  transition: var(--transition-fast);
}

.qty-btn:hover {
  background: var(--primary-gold);
  color: #000;
  border-color: var(--primary-gold);
}

.qty-val {
  font-size: 0.9rem;
  min-width: 20px;
  text-align: center;
}

.btn-remove-item {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition-fast);
  padding: 5px;
}

.btn-remove-item:hover {
  color: #ff5252;
}

/* 購物車底部結帳區 */
.cart-footer {
  padding: 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: #0d0b0a;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.cart-total-label {
  color: var(--text-secondary);
}

.cart-total-value {
  color: var(--primary-gold);
  font-weight: 700;
  font-size: 1.3rem;
}

.btn-checkout {
  width: 100%;
  background: linear-gradient(135deg, var(--primary-gold) 0%, #b89225 100%);
  color: #000;
  border: none;
  border-radius: 25px;
  padding: 14px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.btn-checkout:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

/* --------------------------------------------------------------------------
   8. 產品詳細介紹彈窗 (Modal)
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: var(--bg-dark-card);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  transform: scale(0.9);
  transition: var(--transition-smooth);
}

.modal-overlay.open .modal-container {
  transform: scale(1);
}

.btn-close-modal {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  z-index: 10;
  transition: var(--transition-fast);
}

.btn-close-modal:hover {
  background: var(--primary-gold);
  color: #000;
  transform: rotate(90deg);
}

/* Modal 內容佈局 */
.modal-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 40px;
}

@media (max-width: 768px) {
  .modal-content-grid {
    grid-template-columns: 1fr;
    padding: 30px 20px;
    gap: 30px;
  }
}

.modal-image {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
}

.modal-info {
  display: flex;
  flex-direction: column;
}

.modal-brand {
  color: var(--primary-gold);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 1px;
  margin-bottom: 5px;
}

.modal-name {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 15px;
}

.modal-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 25px;
  line-height: 1.6;
}

/* 規格清單 */
.modal-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 30px;
  background: rgba(255,255,255,0.02);
  padding: 15px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.04);
}

.spec-item {
  display: flex;
  flex-direction: column;
}

.spec-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.spec-value {
  font-size: 0.9rem;
  font-weight: 600;
}

.modal-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.modal-price {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-gold);
}

/* --------------------------------------------------------------------------
   9. 頁尾設計 (Footer)
   -------------------------------------------------------------------------- */
.footer {
  background: #090706;           /* 極致深焙黑，襯托頁尾資訊 */
  border-top: 1px solid var(--glass-border);
  padding: 60px 8% 30px 8%;
  color: var(--text-secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

.footer-brand h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-brand h3 i {
  color: var(--primary-gold);
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-links h4,
.footer-contact h4 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 20px;
  font-weight: 600;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a:hover {
  color: var(--primary-gold);
  padding-left: 5px;
}

.footer-contact p {
  font-size: 0.9rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-contact i {
  color: var(--primary-gold);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-gold-text {
  color: var(--primary-gold);
}

/* --------------------------------------------------------------------------
   10. 動態特效 Keyframes 宣告
   -------------------------------------------------------------------------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes float {
  0% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-10px) rotate(-2deg); }
  100% { transform: translateY(0) rotate(-2deg); }
}

@keyframes steamMove {
  0% {
    transform: translateY(0) scaleY(1);
    opacity: 0;
  }
  20% {
    opacity: 0.6;
  }
  50% {
    transform: translateY(-15px) scaleY(1.2) skewX(5deg);
    opacity: 0.3;
  }
  80% {
    opacity: 0.1;
  }
  100% {
    transform: translateY(-30px) scaleY(0.8);
    opacity: 0;
  }
}

/* 響應式優化 */
@media (max-width: 992px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 140px;
  }
  
  .hero-content {
    max-width: 100%;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .hero-image-wrapper {
    transform: rotate(0deg);
  }
  
  .hero-floating-card {
    left: 10px;
  }
  
  .customizer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}
