/* ===================================================
   食材頁 Ingredient Page v4.6.1 – FoodNo1
   Stable build for ALL ingredient iPages
   Last updated: 2025-12-09
   Location: /media/fno1/css/ingredient.css
   =================================================== */

.ingredient-page {
    font-size: 15px;
    line-height: 1.7;
}

/* ========== 頂部：圖片 + 簡介 ========== */
.ingredient-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin: 0 0 24px;
    align-items: flex-start;
}

.ingredient-hero-img img {
    max-width: 260px;
    width: 100%;
    border-radius: 8px;
    display: block;
}

.ingredient-hero-text {
    flex: 1;
    min-width: 220px;
}

.ingredient-hero-text h1 {
    margin: 0 0 8px;
    font-size: 1.8rem;
}

.ingredient-hero-text .tagline {
    font-weight: 600;
    margin-bottom: 6px;
}

.ingredient-hero-text .intro {
    color: #444;
}

/* ========== 區塊大標題：①～⑤ ========== */
.ingredient-section-title {
    font-size: 1.32rem;
    font-weight: 700;
    margin: 26px 0 12px;
    color: #a96820;
    border-left: 5px solid #d9a25a;
    padding-left: 10px;
}

/* 區塊內容縮排 */
.section-block {
    margin-left: 24px;
}

.section-block table {
    margin-left: 6px;
}

/* ========== 表格樣式 ========== */
.ingredient-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
    font-size: 0.96rem;
}

.ingredient-table th,
.ingredient-table td {
    padding: 8px 10px;
    vertical-align: top;
}

.ingredient-table th {
    width: 150px;
    font-weight: 700;
    color: #444;
    border-right: 1px solid #eee;
}

.ingredient-table td {
    color: #333;
}

/* 梅花間竹底色 */
.ingredient-table tr:nth-child(odd)  { background: #fffdfa; }
.ingredient-table tr:nth-child(even) { background: #f9f1e2; }

.ingredient-note {
    font-size: 0.9rem;
    color: #777;
    margin-top: 6px;
}

/* ========== RWD ========== */
@media (max-width: 768px) {
    .ingredient-hero {
        flex-direction: column;
    }
    .ingredient-hero-img img {
        max-width: 100%;
    }
}

/* ========== 小標題可自動換行（v4.6.1） ========== */
/* 套用在所有 th，包括 <th class="signal-title"> */
.ingredient-table th,
.ingredient-table th.signal-title {
    white-space: normal !important;  /* 允許自動換行，蓋過 nowrap 類設定 */
    word-break: keep-all;            /* 中文自然分行 */
    line-height: 1.45;
    vertical-align: top;
    padding-top: 8px;
}

/* ============================
   炒乜菜？ Netflix-style Ingredient Row
   ============================ */

.fai-stirfry-row {
    margin: 24px 0 8px;
}

.fai-stirfry-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
}

/* 橫向滾動容器 */
.fai-stirfry-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 2px 12px;
    scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;   /* ✅ iOS 手指掃更順 */
}

/* Horizontal Scroll 卡片基本寬度（desktop 約 3～4 張） */
.fai-stirfry-scroll .fai-card {
    flex: 0 0 220px;
    max-width: 220px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    text-decoration: none;
    color: #333;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 圖片區：用背景圖 + 固定比例盒 */
.fai-card-img {
    width: 100%;
    padding-top: 72%;            /* 4:3 左右比例 */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* 名稱 + tags */
.fai-card-name {
    font-weight: 700;
    padding: 8px 10px 2px;
}

.fai-card-tags {
    font-size: 0.9rem;
    color: #777;
    padding: 0 10px 10px;
}

/* 手機時少少收窄 */
@media (max-width: 768px) {
    .fai-stirfry-scroll .fai-card {
        flex: 0 0 180px;
        max-width: 180px;
    }
}
/* NFW H-scroll 基本樣式 */
.nfw-scroll-wrapper {
  margin: 2.5rem 0;
  padding: 1rem 0;
  border-top: 1px solid #e5ddcf;
  border-bottom: 1px solid #e5ddcf;
}

.nfw-scroll-title {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.nfw-scroll-controls {
  text-align: right;
  margin-bottom: 0.5rem;
}

.nfw-scroll-btn {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #A68B5B;
  background: #fffaf0;
  color: #A68B5B;
  font-size: 0.85rem;
  cursor: pointer;
}

.nfw-scroll-btn:hover {
  background: #A68B5B;
  color: #fff;
}

.nfw-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 0.5rem;
}

.nfw-scroll::-webkit-scrollbar {
  height: 6px;
}
.nfw-scroll::-webkit-scrollbar-thumb {
  background: #d5c4a1;
  border-radius: 999px;
}

.nfw-scroll-card {
  flex: 0 0 180px;
  background: #fffdf7;
  border-radius: 16px;
  border: 1px solid #efe4d2;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 5px rgba(0,0,0,0.04);
}

.nfw-scroll-card img {
  width: 100%;
  display: block;
}

.nfw-scroll-info {
  padding: 0.5rem 0.7rem 0.7rem;
}

.nfw-scroll-no {
  font-size: 0.8rem;
  color: #A68B5B;
  font-weight: 600;
}

.nfw-scroll-cat {
  display: block;
  font-size: 0.75rem;
  margin-top: 0.1rem;
  color: #8A7B60;
}

.nfw-scroll-title {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.9rem;
  line-height: 1.3;
}
/* 滑鼠拖 Netflix Feel */
.nfw-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 8px 4px 16px;
}

.nfw-card {
  flex: 0 0 auto;
  min-width: 140px;
  padding: 14px 12px;
  background: #fff;
  border-radius: 12px;
  text-decoration: none;
  color: #333;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  white-space: nowrap;
}
.nfw-scroll-wrapper { margin: 20px 0; }
.nfw-row { margin-bottom: 28px; }
.nfw-row h3 { margin: 8px 0 12px; }

.nfw-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
}

.nfw-card {
  min-width: 180px;
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  scroll-snap-align: start;
  white-space: nowrap;
  text-decoration: none;
  color: #333;
  font-weight: 600;
}

.nfw-card:hover { transform: translateY(-2px); }
/* NFW Netflix Landing Page – Final Version 20251212-1010 */
.nfw-landing {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.nfw-hero h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.nfw-note {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 20px;
}

.nfw-row {
  margin-bottom: 40px;
}

.nfw-row-title {
  font-size: 1.4rem;
  margin-bottom: 5px;
  color: #333;
}

.nfw-row-sub {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 12px;
}

.nfw-scroll {
  display: flex;
  overflow-x: auto;
  gap: 14px;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
}

.nfw-card {
  flex: 0 0 180px; /* narrower card width = Netflix effect */
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  text-decoration: none !important;
  color: #333;
  scroll-snap-align: start;
  transition: transform .2s;
}

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

.nfw-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.nfw-card-title {
  font-size: 1rem;
  font-weight: bold;
  margin: 8px;
}

.nfw-card-desc {
  font-size: 0.85rem;
  color: #777;
  margin: 0 8px 8px 8px;
  min-height: 38px;
}

.nfw-mini {
  display: block;
  font-size: 0.75rem;
  color: #0099cc;
  padding: 0 8px 10px 8px;
}
/* 🔧 修正 NFW 詳細頁圖片手機過大問題 */
.nfw-detail-img {
    float: left;
    width: 260px;
    max-width: 40%;
    margin: 0 18px 12px 0;
    border-radius: 10px;
}

/* 📱 手機版：取消浮動＋縮窄圖片 */
@media (max-width: 768px) {
  .nfw-detail-img {
      float: none;
      width: 100%;
      max-width: 100%;
      margin: 0 0 14px 0;
  }
}
