/* --- 基礎變數與重設 --- */
:root {
  --primary: #4A3C31;       /* 深可可色 */
  --accent: #B08D57;        /* 金古銅色 */
  --bg: #FFFDF4;            /* 象牙白 */
  --text: #5A5048;          /* 暖灰褐 */
  --shadow: 0 10px 30px rgba(74, 60, 49, 0.08);
  
  --color-main: #4A3C31;    /* 主食 - 深褐 */
  --color-dessert: #E6B422; /* 開胃菜 - 金黃 */
  --color-tea: #6B8E23;     /* 茶點 - 草本綠 */
}

* { box-sizing: border-box; }

body {
  font-family: "Playfair Display", "Noto Serif TC", serif;
  background: linear-gradient(180deg, #F8F4EE 0%, #FFFDF4 100%);
  color: var(--text);
  margin: 0;
  line-height: 1.7;
}

.container { width: 92%; max-width: 1100px; margin: 0 auto; }

/* --- 頁首 (桌機與行動版響應式標題) --- */
.top-header { 
  background: rgba(255, 253, 244, 0.95); 
  padding: 15px 0; border-bottom: 1px solid #e0d8c8; 
  position: sticky; top: 0; z-index: 100; backdrop-filter: blur(10px);
}

.header-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }

.page-logo img { max-width: 120px; height: auto; transition: 0.3s; }

.brand { text-align: left; flex: 1; margin-left: 25px; }

/* 標題與 Logo 並列，寬度隨螢幕縮放 */
.desktop-title { 
  display: block; 
  font-size: clamp(1.6rem, 3.5vw, 2.5rem); 
  margin: 0; 
  color: var(--primary); 
  white-space: nowrap; 
  line-height: 1.2;
}
.desktop-subtitle { 
  display: block; 
  font-size: clamp(0.85rem, 1.5vw, 1.1rem); 
  margin: 0; 
  color: var(--accent); 
  font-weight: bold; 
  letter-spacing: 3px; 
}
.mobile-title, .mobile-subtitle { display: none; }

/* 桌機版分頁置於標題下 */
.nav-tabs-container { width: 100%; margin-top: 20px; display: flex; justify-content: center; }
.nav-tabs { display: flex; gap: 15px; }

.nav-link { 
  background: transparent; 
  border: none; 
  padding: 12px 30px; 
  cursor: pointer;
  font-size: 1.15rem; 
  font-weight: bold; 
  color: var(--primary); 
  transition: 0.4s; 
  border-bottom: 3px solid transparent; 
  font-family: "Noto Serif TC", serif;
}
.nav-link.active { color: var(--accent); border-bottom-color: var(--accent); }

/* --- 內容區域共通樣式 (白底卡片) --- */
.content-area { padding:0; }
.tab-panel { display: none; animation: fadeIn 0.8s ease; }
.tab-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

/* 統一所有分頁為白底搭配虛線飾線 */
.theme-card.menu-style {
  background: #fff;
  padding: 45px 35px;
  border: 1px solid #e0d8c8;
  position: relative;
  text-align: center;
  margin-bottom: 30px;
  transition: all 0.4s ease;
}

.theme-card.menu-style::before {
  content: "";
  position: absolute;
  top: 15px; left: 15px; right: 15px; bottom: 15px;
  border: 1px dashed #ccc; 
  pointer-events: none;
}

.menu-heading { cursor: pointer; border-bottom: 1px solid #eee; margin-bottom: 25px; padding-bottom: 15px; }
.en-label { font-family: 'Playfair Display', serif; font-style: italic; color: var(--accent); letter-spacing: 4px; text-transform: uppercase; }
.menu-desc { font-size: 0.95rem; color: #777; font-style: italic; margin-bottom: 30px; }

/* 子分類垂直排版 */
.sub-category-list { display: flex; flex-direction: column; align-items: center; gap: 20px; border-top: 1px dashed #ccc; padding-top: 30px; }
.sub-item { cursor: pointer; width: 100%; color: var(--primary); }
.sub-item small { display: block; font-family: 'Playfair Display', serif; font-style: italic; font-size: 0.8rem; color: var(--accent); }

/* --- 主廚推薦 Mixer 特殊美化 --- */
#tab-mixer h2.section-title{text-align:center;}
.slider-group { padding: 20px 0; }
.slider-item { margin-bottom: 35px; }
.slider-info { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.slider-info > span{font-family:"arial";}
.range-slider { width: 100%; height: 6px; border-radius: 3px; appearance: none; outline: none; background: #eee; }

/* 3種主題不同顏色的拖曳點 */
.slider-main::-webkit-slider-thumb { appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--color-main); cursor: pointer; }
.slider-dessert::-webkit-slider-thumb { appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--color-dessert); cursor: pointer; }
.slider-tea::-webkit-slider-thumb { appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--color-tea); cursor: pointer; }

/* 美化「立即上菜」按鈕 */
.btn-primary-v2 {
  display: block;
  width: 100%;
  max-width: 280px;
  margin: 30px auto 0;
  padding: 15px 0;
  background: linear-gradient(135deg, var(--primary) 0%, #6d5a4b 100%);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: bold;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(74, 60, 49, 0.3);
  font-family: "Noto Serif TC", serif;
  text-align: center;
}

.btn-primary-v2:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 60, 49, 0.4);
  background: linear-gradient(135deg, #5A5048 0%, var(--primary) 100%);
}

/* --- 推薦書單與按鈕 --- */
.recommend-header { 
  display: flex; 
  justify-content: space-between; 
  align-items: flex-end; 
  border-bottom: 2px solid var(--primary); 
  padding-bottom: 15px; 
  margin-bottom: 40px; 
}

/* 電腦版按鈕樣式 */
@media (min-width: 769px) {
  .btn-menu-more {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end; 
    text-decoration: none;
    padding: 8px 25px;
    border: 1px solid var(--primary);
    background-color: #fff;
    transition: all 0.3s ease;
    border-radius: 4px;
    line-height: 1.2;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  }
  .btn-menu-more {
    font-size: 1rem;
    font-weight: bold;
    color: var(--primary);
  }
  .en-label-btn {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 2px;
    letter-spacing: 1px;
  }
  .btn-menu-more:hover {
    background-color: var(--primary);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(74, 60, 49, 0.15);
  }
  .btn-menu-more:hover .en-label-btn { color: #fff; }
}

/* 書單網格設定 */
/* 預設 (手機) 為 1 欄 */
.book-grid { 
  display: grid; 
  grid-template-columns: 1fr; 
  gap: 20px; 
}
/* 平板 (小尺寸) 改為 2 欄 */
@media (min-width: 600px) { 
  .book-grid { grid-template-columns: repeat(2, 1fr); } 
}
/* 桌機維持 4 欄 */
@media (min-width: 768px) { 
  .book-grid { grid-template-columns: repeat(4, 1fr); } 
}

.book-item { background: white; padding: 15px; border: 1px solid #f0f0f0; text-align: center; }
.book-item img { width: 100%; height: auto; margin-bottom: 10px; }

/* --- 推薦書單細節設定 (新需求) --- */
.book-title {
  margin: 10px 0 5px;
  font-size: 1.15rem;      /* 字體大一點點 */
  color: #2c2c2c;          /* 黑色 (深黑) */
  line-height: 1.4;
  font-family: "Noto Serif TC", serif;
}

.book-main-cat {
  font-size: 0.9rem;       /* 字體小一點 */
  color: #B08D57;          /* 古銅金 */
  font-weight: bold;
  margin-bottom: 3px;
}

.book-sub-cat {
  font-size: 0.85rem;      /* 字體小一點 */
  color: #888;             /* 灰色 */
  display: block;          /* 確保換行 */
}

/* --- Footer 美化 (縮小區塊) --- */
.bottom-footer {
  background-color: var(--primary); 
  color: #fff; 
  padding: 30px 0; 
  margin-top: 40px; 
  text-align: center;
  font-family: "Noto Serif TC", serif;
}

.bottom-footer a {
  color: var(--accent); 
  text-decoration: none;
  font-weight: bold;
  border-bottom: 1px dashed var(--accent);
  padding-bottom: 2px;
  transition: 0.3s;
}

.bottom-footer a:hover {
  color: #fff;
  border-bottom-color: #fff;
}

.bottom-footer p {
  margin-top: 20px;
  font-size: 0.9rem;
  opacity: 0.8; 
  letter-spacing: 1px;
}

/* --- 行動版特定樣式 (768px 以下) --- */
@media (max-width: 768px) {
  .page-logo img { max-width: 40px; margin-right: 10px; }
  .brand { display: flex; justify-content: space-between; align-items: baseline; flex: 1; margin-left: 0; }
  .desktop-title, .desktop-subtitle { display: none; }
  .mobile-title { display: block; font-size: 1.1rem; color: var(--primary); white-space: nowrap; }
  .mobile-subtitle { display: block; font-size: 0.65rem; color: var(--accent); text-align: right; white-space: nowrap; }

  .nav-tabs-container { margin-top: 10px; border-top: 1px solid #f2eee6; width: 100%; }
  .nav-tabs { width: 100%; justify-content: space-between; gap: 0; }
  .nav-link { flex: 1; text-align: center; padding: 10px 0; font-size: 0; }
  .nav-link::after { font-size: 0.85rem; }
  .nav-link[data-tab="about"]::after { content: "介紹"; }
  .nav-link[data-tab="themes"]::after { content: "目錄"; }
  .nav-link[data-tab="mixer"]::after { content: "推薦"; }
  .nav-link[data-tab="recommend"]::after { content: "清單"; }

  .btn-menu-more {
    position: fixed; bottom: 25px; right: 20px;
    width: 60px; height: 60px; border-radius: 50%;
    background: var(--primary); color: #fff;
    display: flex; justify-content: center; align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); z-index: 999;
    font-size: 0; text-decoration: none;
  }
  .btn-menu-more::after { content: "More"; font-family: 'Playfair Display', serif; font-style: italic; font-size: 1rem; }
}