/* =============================================================
   淯萱溫室科技農場 —— 樣式表（設計方向：白底生鮮店 —— 大圖主視覺、線條圖示、細框商品格）
   -------------------------------------------------------------
   🎨 設計公司：所有顏色、字級、圓角、陰影都收在下面的 :root 變數。
      改變數就能整站換色，不必逐條找。
      要整份重寫也沒問題 —— HTML 結構在 templates/ 底下，
      class 命名皆為語意化。
   ============================================================= */

:root {
  /* --- 色彩：白底、淺灰細線，綠色用在公告列、按鈕、圖示 --- */
  --c-bg:         #ffffff;   /* 主背景：純白 */
  --c-surface:    #ffffff;
  --c-tint:       #f6f7f5;   /* 輸入框、圖片底色、交錯區塊 */
  --c-tint-deep:  #e9ebe7;

  --c-text:       #252826;   /* 石墨 */
  --c-muted:      #737773;
  --c-border:     #e6e7e4;   /* 細線 */

  --c-accent:     #252826;   /* 互動元素用石墨，不用彩色 */
  --c-accent-dk:  #111312;
  --c-accent-soft:#eceeea;

  --c-leaf:       #1d7f3d;   /* 品牌綠：公告列、綠色區塊上的按鈕，白字對比 5:1 */
  --c-leaf-dk:    #155f2d;
  --c-leaf-soft:  #e3efe5;
  --c-leaf-pale:  #dcebdd;   /* 淺綠：大面積區塊（首頁主視覺、製程） */
  --c-leaf-ink:   #163d26;   /* 淺綠底上的標題，對比 9.8:1 */
  --c-leaf-text:  #3f6b4d;   /* 淺綠底上的內文，對比 5:1 */
  --c-sprout:     #7bb03a;   /* 嫩芽綠：只用在圖示與裝飾線，不放文字 */
  --c-warm:       #a3412a;   /* 錯誤與缺貨 */
  --c-ink:        #1d1f1e;   /* 頁尾 */

  /* --- 排版 --- */
  /* 英文與數字用 Poppins；中文用各裝置的系統字（蘋方、微軟正黑體），圓順且不必下載 */
  --font-sans: "Poppins", "PingFang TC", "Microsoft JhengHei", "Heiti TC",
               "Noto Sans TC", system-ui, sans-serif;
  --wrap:   1200px;
  --radius: 0;
  --radius-sm: 2px;

  /* --- 陰影：Stone 是平面設計，層次靠底色與細線，不靠陰影 --- */
  --shadow-sm: none;
  --shadow-md: none;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--c-text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  background: var(--c-bg);
  accent-color: var(--c-text);   /* 單選、勾選框用石墨色，不用瀏覽器預設藍 */

  /* 內容少的頁面，頁尾仍貼齊視窗底部 */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main { flex: 1; }

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 22px;
}

.muted  { color: var(--c-muted); }
.center { text-align: center; }

/* =============================================================
   公告列：頁首上方的品牌綠細條
   ============================================================= */

.announce {
  background: var(--c-leaf);
  color: #fff;
  font-size: .84rem;
  letter-spacing: .04em;
  text-align: center;
  padding: 8px 0;
}

/* =============================================================
   Header
   ============================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--c-border);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* 標誌（中文在上、英文在下），檔案：public/assets/img/logo.svg */
.brand-logo {
  display: block;
  height: 52px;
  width: auto;
}

/* 標誌（葉片水滴圖形＋中文名＋YH AGRITECH）：public/assets/img/logo9.png */
.brand-logo9 {
  display: block;
  height: 58px;
  width: auto;
  margin-block: 4px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  align-items: stretch;   /* 子項撐到與最寬的那行（中文主標）同寬 */
  line-height: 1.18;
}

.brand-name {
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: .02em;
  color: var(--c-text);
}

/* 副標：逐字均分，撐到與上方中文主標等寬（均等割付）。
   字元由 templates/_brand_sub.php 拆成個別的 span。 */
.brand-sub {
  display: flex;
  justify-content: space-between;
  font-size: .6rem;
  font-weight: 600;
  color: var(--c-muted);
  white-space: nowrap;
}

/* 選單文字：參考 danyunsalad.com —— 思源黑體、18px、一般粗細、深灰，間距寬鬆 */
.site-nav {
  display: flex;
  gap: 38px;
  margin-left: auto;
  flex-wrap: wrap;
}

.site-nav a {
  position: relative;
  color: #333;
  font-family: "Noto Sans TC", var(--font-sans);
  font-size: 1.125rem;
  font-weight: 400;
  letter-spacing: .02em;
  padding: 6px 0;
  transition: color .18s ease;
}

/* 底線由中間展開；目前所在頁面的底線常駐 */
.site-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--c-text);
  transform: translateX(-50%);
  transition: width .22s ease;
}

.site-nav a:hover { color: var(--c-text); }
.site-nav a:hover::after,
.site-nav a.is-active::after { width: 100%; }

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

.cart-link,
.lang-toggle {
  border: 1px solid var(--c-border);
  padding: 7px 15px;
  font-size: .86rem;
  color: var(--c-text);
  background: transparent;
  transition: border-color .18s ease, color .18s ease;
}

.cart-link:hover,
.lang-toggle:hover {
  border-color: var(--c-text);
}

.cart-count {
  display: inline-block;
  min-width: 20px;
  margin-left: 5px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--c-leaf);
  color: #fff;
  font-size: .76rem;
  font-weight: 600;
  text-align: center;
}

/* =============================================================
   Flash 訊息
   ============================================================= */

.flash { padding: 13px 0; font-size: .94rem; }

.flash-success {
  background: var(--c-accent-soft);
  color: var(--c-accent-dk);
  border-bottom: 1px solid var(--c-border);
}

.flash-error {
  background: #fbeee9;
  color: #8c3d21;
  border-bottom: 1px solid rgba(180, 86, 47, .2);
}

/* =============================================================
   Hero
   ============================================================= */

.hero { padding: 28px 0 0; }

/* 🎨 換自家照片時，替換 img/hero-greenhouse.jpg 即可 */
.hero-inner {
  min-height: 460px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  color: #fff;
  background:
    linear-gradient(rgba(14, 24, 16, .34), rgba(14, 24, 16, .46)),
    var(--c-tint-deep) url("../img/hero-greenhouse.jpg") center 60% / cover no-repeat;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: .04em;
  margin: 0 0 12px;
  text-wrap: balance;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .25);
}

.hero-subtitle {
  color: rgba(255, 255, 255, .92);
  font-size: 1.1rem;
  letter-spacing: .06em;
  margin: 0 0 28px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .25);
}

.hero .btn-primary {
  background: var(--c-leaf);
  border-color: var(--c-leaf);
}

.hero .btn-primary:hover {
  background: var(--c-leaf-dk);
  border-color: var(--c-leaf-dk);
}

/* =============================================================
   區塊
   ============================================================= */

.section { padding: 72px 0; }

/* 交錯用的淡色區塊，讓長頁面有節奏 */
.section-alt { background: var(--c-tint); }

.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-align: center;
  margin: 0 0 36px;
}

.section-title::before,
.section-title::after {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--c-sprout);
}

.page-title {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -.015em;
  margin: 0 0 22px;
}

.lead { font-size: 1.1rem; color: var(--c-muted); }

/* =============================================================
   按鈕
   ============================================================= */

.btn {
  display: inline-block;
  padding: 12px 26px;
  border: 1px solid var(--c-text);
  border-radius: 0;
  background: transparent;
  color: var(--c-text);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.btn:hover {
  background: var(--c-text);
  color: #fff;
}

.btn-primary {
  background: var(--c-leaf);
  border-color: var(--c-leaf);
  color: #fff;
}

.btn-primary:hover {
  background: var(--c-leaf-dk);
  border-color: var(--c-leaf-dk);
  color: #fff;
}

.btn-small { padding: 8px 15px; font-size: .86rem; }
.btn-block { display: block; width: 100%; text-align: center; margin-top: 11px; }

/* =============================================================
   商品列表
   ============================================================= */

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);   /* 首頁 8 項 = 4 × 2 */
  gap: 0;
  border-top: 1px solid var(--c-border);
  border-left: 1px solid var(--c-border);
}

.product-grid-3 { grid-template-columns: repeat(3, 1fr); }   /* 商品頁 9 項 = 3 × 3 */

.product-card {
  overflow: hidden;
  background: var(--c-surface);
  border-right: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  padding: 14px;
}

.product-card-media {
  position: relative;
  background: var(--c-tint);
  overflow: hidden;
}

.product-card-media img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.2, .6, .3, 1);
}

.product-card:hover .product-card-media img { transform: scale(1.03); }

.product-card-body    { padding: 14px 4px 6px; text-align: center; }
.product-card-title   { font-size: 1.04rem; font-weight: 500; margin: 0 0 6px; }
.product-card-summary { color: var(--c-muted); font-size: .84rem; margin: 0 0 8px; }

.product-card-price {
  font-weight: 700;
  font-size: 1rem;
  color: var(--c-text);
  margin: 0;
}

.product-card-price .muted { font-weight: 400; font-size: .84rem; }

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: .77rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

.badge-muted { background: rgba(24, 34, 15, .72); color: #fff; }

/* =============================================================
   商品詳情
   ============================================================= */

.product-detail {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 54px;
  align-items: start;
}

.product-detail-media img {
  width: 100%;
  border-radius: var(--radius);
  background: var(--c-tint);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  box-shadow: var(--shadow-md);
}

.variant-list { display: flex; flex-direction: column; gap: 11px; margin: 26px 0; }

.variant {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 17px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}

.variant:hover { border-color: var(--c-accent); }

.variant:has(input:checked) {
  border-color: var(--c-accent);
  background: var(--c-accent-soft);
  box-shadow: inset 0 0 0 1px var(--c-accent);
}

.variant.is-disabled {
  opacity: .55;
  cursor: not-allowed;
  background: var(--c-tint);
}

.variant-label { flex: 1; }
.variant-price { font-weight: 700; color: var(--c-accent-dk); }
.variant .badge { position: static; backdrop-filter: none; }

.buy-row { display: flex; gap: 13px; align-items: center; }

.qty {
  width: 86px;
  padding: 12px 13px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
  font: inherit;
}

.qty:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 1px;
}

.product-body { margin-top: 34px; }

/* =============================================================
   購物車
   ============================================================= */

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 336px;
  gap: 44px;
  align-items: start;
}

.cart-items {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 4px 22px;
  box-shadow: var(--shadow-sm);
}

.cart-row {
  display: grid;
  grid-template-columns: 92px 1fr auto auto auto;
  align-items: center;
  gap: 17px;
  padding: 19px 0;
  border-bottom: 1px solid var(--c-border);
}

.cart-row:last-child { border-bottom: 0; }

.cart-row-media img {
  width: 92px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--c-tint);
}

.cart-row-name  { font-weight: 600; }
.cart-row-name:hover { color: var(--c-accent); }
.cart-row-qty   { display: flex; gap: 8px; align-items: center; }
.cart-row-qty .qty { width: 74px; padding: 9px 11px; }

.cart-row-total {
  font-weight: 700;
  min-width: 92px;
  text-align: right;
  color: var(--c-accent-dk);
}

.link-btn {
  background: none;
  border: 0;
  color: var(--c-muted);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color .16s ease, background .16s ease;
}

.link-btn:hover { color: var(--c-warm); background: #fbeee9; }

.cart-summary {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--c-surface);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 96px;
}

.cart-summary-title { font-size: 1.12rem; margin: 0 0 18px; }

.cart-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  color: var(--c-muted);
}

.cart-line-total {
  border-top: 1px solid var(--c-border);
  margin-top: 12px;
  padding-top: 16px;
  font-weight: 700;
  font-size: 1.22rem;
  color: var(--c-text);
}

.cart-hint {
  background: var(--c-accent-soft);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  font-size: .87rem;
  color: var(--c-accent-dk);
  margin: 8px 0;
}

/* =============================================================
   結帳
   ============================================================= */

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 44px;
  align-items: start;
}

.checkout-form {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.checkout-section-title { font-size: 1.12rem; margin: 0 0 22px; }

.field { margin-bottom: 20px; }

.field label {
  display: block;
  font-weight: 600;
  font-size: .93rem;
  margin-bottom: 7px;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-tint);
  font: inherit;
  color: var(--c-text);
  transition: border-color .16s ease, box-shadow .16s ease;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(37, 40, 38, .1);
}

.field textarea { resize: vertical; }

.field-hint  { color: var(--c-muted); font-size: .84rem; margin: 6px 0 0; }
.field-error { color: var(--c-warm); font-size: .86rem; margin: 6px 0 0; font-weight: 500; }

.checkout-summary {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--c-surface);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 96px;
}

.checkout-items {
  list-style: none;
  margin: 0 0 16px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--c-border);
}

.checkout-items li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 0;
  font-size: .93rem;
}

.checkout-items .muted { font-size: .85rem; margin-left: 4px; }

.checkout-note {
  color: var(--c-muted);
  font-size: .82rem;
  line-height: 1.6;
  margin: 12px 0 0;
}

/* --- 配送方式 --- */

.ship-options { display: flex; flex-direction: column; gap: 11px; margin-bottom: 22px; }

.ship-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-bg);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}

.ship-option:hover { border-color: var(--c-accent); }

.ship-option:has(input:checked) {
  border-color: var(--c-accent);
  background: var(--c-accent-soft);
  box-shadow: inset 0 0 0 1px var(--c-accent);
}

.ship-option-body { display: flex; flex-direction: column; flex: 1; gap: 2px; }
.ship-option-body .muted { font-size: .85rem; }
.ship-option-fee { font-weight: 700; color: var(--c-accent-dk); }

.cvs-box {
  border: 1px dashed var(--c-border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 22px;
  background: var(--c-bg);
}

.cvs-picked { display: flex; flex-direction: column; gap: 3px; margin-bottom: 12px; }
.cvs-picked .muted { font-size: .87rem; }
.cvs-picker { display: flex; gap: 8px; flex-wrap: wrap; }

/* --- 電子發票 --- */

.inv-options { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }

.inv-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-bg);
  cursor: pointer;
  font-size: .92rem;
}

.inv-option:has(input:checked) {
  border-color: var(--c-accent);
  background: var(--c-accent-soft);
  color: var(--c-accent-dk);
  font-weight: 500;
}

.field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-bg);
  font: inherit;
  color: var(--c-text);
}

.field select:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(37, 40, 38, .1);
}

/* --- 訂單結果 --- */

.order-status {
  border-left: 4px solid var(--c-border);
  padding-left: 20px;
  margin-bottom: 30px;
}

.order-status-paid,
.order-status-shipped,
.order-status-completed { border-left-color: var(--c-leaf); }

.order-status-pending   { border-left-color: #d9ae4a; }
.order-status-failed,
.order-status-cancelled { border-left-color: var(--c-warm); }

.order-no { color: var(--c-muted); margin: 0; }
.order-no strong { color: var(--c-text); letter-spacing: .04em; }

/* =============================================================
   會員中心
   ============================================================= */

.account-narrow { max-width: 460px; }

.account-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  align-items: start;
}

.account-alt {
  margin: 18px 0 0;
  text-align: center;
  color: var(--c-muted);
  font-size: .92rem;
}

.account-link { color: var(--c-accent); font-weight: 500; }
.account-link:hover { text-decoration: underline; }

.form-error {
  background: #fbeee9;
  color: #8c3d21;
  border-radius: var(--radius-sm);
  padding: 11px 15px;
  font-size: .92rem;
  margin-bottom: 18px;
}

/* --- 會員次導覽 --- */

.account-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 14px 20px;
  margin-bottom: 30px;
  background: var(--c-tint);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
}

.account-greeting { font-size: .95rem; color: var(--c-muted); }
.account-greeting strong { color: var(--c-text); }

.account-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
  font-size: .94rem;
}

.account-nav a { color: var(--c-muted); }
.account-nav a:hover { color: var(--c-accent); }
.account-nav a.is-active { color: var(--c-accent); font-weight: 600; }

.link-logout {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: .94rem;
  color: var(--c-muted);
  cursor: pointer;
}

.link-logout:hover { color: var(--c-warm); }

/* --- 訂單列表 --- */

.order-list { display: flex; flex-direction: column; gap: 12px; }

.order-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color .16s ease, transform .16s ease;
}

.order-item:hover {
  border-color: var(--c-accent);
  transform: translateY(-2px);
}

.order-item-main { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.order-item-no    { font-weight: 600; letter-spacing: .03em; }
.order-item-main .muted { font-size: .86rem; }
.order-item-total { font-weight: 700; color: var(--c-accent-dk); }

.account-order-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.account-order-head .page-title { margin: 0; letter-spacing: .03em; }

/* --- 狀態標籤 --- */

.status-tag {
  display: inline-block;
  padding: 4px 13px;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 500;
  white-space: nowrap;
}

.status-pending   { background: #fbf1d8; color: #7d6118; }
.status-paid      { background: var(--c-leaf-soft); color: var(--c-leaf-dk); }
.status-shipped   { background: #dde9f3; color: #29506e; }
.status-completed { background: #eceee9; color: #5a6155; }
.status-failed,
.status-cancelled { background: #fae4db; color: #8a3a1f; }

@media (max-width: 560px) {
  .account-bar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .account-nav { margin-left: 0; }
  .order-item  { flex-wrap: wrap; gap: 10px; }
}

/* =============================================================
   FAQ / 買菜須知
   ============================================================= */

.faq-list { margin: 20px 0 40px; }

.faq-item {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  margin-bottom: 11px;
  background: var(--c-surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.faq-item summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  transition: color .16s ease;
}

.faq-item summary:hover { color: var(--c-accent); }
.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  color: var(--c-muted);
  font-weight: 400;
  font-size: 1.35rem;
  line-height: 1;
  transition: transform .2s ease;
}

.faq-item[open] summary::after { content: "−"; }
.faq-item[open] summary { border-bottom: 1px solid var(--c-border); }

.faq-answer { padding: 16px 20px; color: var(--c-muted); }

/* =============================================================
   最新消息
   ============================================================= */

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: 30px;
}

.post-card {
  overflow: hidden;
  background: var(--c-surface);
}



.post-card-media { overflow: hidden; background: var(--c-tint); }

.post-card-media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.2, .6, .3, 1);
}

.post-card:hover .post-card-media img { transform: scale(1.03); }

.post-card-body    { padding: 19px 21px 24px; }
.post-card-title   { font-size: 1.12rem; margin: 7px 0 9px; letter-spacing: -.005em; }
.post-card-excerpt { color: var(--c-muted); font-size: .92rem; margin: 0; }

.post-date {
  color: var(--c-muted);
  font-size: .83rem;
  font-weight: 500;
  letter-spacing: .03em;
}

.post-cover {
  width: 100%;
  border-radius: var(--radius);
  margin: 20px 0 30px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--c-tint);
  box-shadow: var(--shadow-md);
}

.post-body { margin-bottom: 34px; }

/* =============================================================
   內文頁
   ============================================================= */

.prose { max-width: 740px; }
.prose h2 { margin-top: 36px; letter-spacing: -.01em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }

.placeholder-note {
  background: #fdf6e3;
  border-left: 3px solid #d9ae4a;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 11px 16px;
  color: #6f5c22;
  font-size: .9rem;
}

.contact-list dt { font-weight: 700; margin-top: 16px; }
.contact-list dd { margin: 0; color: var(--c-muted); }

/* =============================================================
   信任區塊
   ============================================================= */

.trust-strip {
  background: var(--c-leaf-pale);
  color: var(--c-leaf-ink);
  padding: 44px 0;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
}

.trust-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 12px;
  border-left: 1px solid rgba(22, 61, 38, .16);
}

.trust-item:first-child { border-left: 0; }

.trust-value {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.trust-label {
  font-size: .9rem;
  color: var(--c-leaf-text);
}

/* =============================================================
   製程
   ============================================================= */

.process-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 36px;
}

.process-step {
  text-align: center;
  padding: 0 6px;
}

.process-icon {
  display: block;
  margin: 0 auto 14px;
  color: var(--c-sprout);
}

.process-step h3 {
  font-size: 1.08rem;
  letter-spacing: .1em;
  margin: 0 0 10px;
}

.process-step h3::before { content: "· "; color: var(--c-sprout); }
.process-step h3::after  { content: " ·"; color: var(--c-sprout); }

.process-step p {
  margin: 0;
  color: var(--c-muted);
  font-size: .92rem;
  line-height: 1.85;
}

.section-more { margin: 32px 0 0; text-align: center; }

/* =============================================================
   行動呼籲
   ============================================================= */

.cta-band {
  background: var(--c-surface);
  color: var(--c-text);
  border-top: 1px solid var(--c-border);
  padding: 46px 0;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  flex-wrap: wrap;
}

.cta-title { margin: 0 0 6px; font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; }
.cta-sub   { margin: 0; color: var(--c-muted); font-size: .98rem; }

.btn-light {
  background: #fff;
  border-color: #fff;
  color: var(--c-text);
}

.btn-light:hover {
  background: var(--c-bg);
  border-color: var(--c-bg);
  color: var(--c-text);
}

/* =============================================================
   Footer
   ============================================================= */

.site-footer {
  padding: 52px 0 26px;
  background: var(--c-ink);
  color: rgba(255, 255, 255, .62);
  font-size: .9rem;
}

.site-footer p { margin: 0; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 34px;
  padding-bottom: 34px;
}

/* 深色底用的標誌：public/assets/img/logo-dark.svg（水滴中心是透明的） */
.footer-logo {
  display: block;
  height: 60px;
  width: auto;
}

.footer-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
/* 深色底用：public/assets/img/logo9-dark.png（文字改為白色） */
.footer-logo9 {
  display: block;
  height: 69px;
  width: auto;
}

/* 標語：比說明文字亮一些，作為頁尾的第二層次 */
.footer-slogan {
  margin: 14px 0 0 !important;
  color: rgba(255, 255, 255, .86);
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .02em;
}

.footer-tagline {
  margin-top: 16px !important;
  max-width: 300px;
  line-height: 1.8;
  color: rgba(255, 255, 255, .55);
  font-size: .88rem;
}

.footer-col { display: flex; flex-direction: column; gap: 9px; }

.footer-col h3 {
  margin: 0 0 4px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .45);
  text-transform: uppercase;
}

.footer-col a {
  color: rgba(255, 255, 255, .72);
  font-size: .9rem;
  transition: color .15s ease;
}

.footer-col a:hover { color: #fff; }

.footer-note { color: rgba(255, 255, 255, .45) !important; font-size: .88rem; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-top: 22px;
  color: rgba(255, 255, 255, .42);
  font-size: .85rem;
}

/* 標誌為固定色（實心綠底反白葉），深淺底共用同一份 */
.logo-mark { flex-shrink: 0; }

/* =============================================================
   無障礙
   ============================================================= */

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .product-card:hover,
  .post-card:hover { transform: none; }
  .product-card:hover .product-card-media img,
  .post-card:hover .post-card-media img { transform: none; }
}

/* =============================================================
   響應式
   ============================================================= */

@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 680px) {
  .product-grid,
  .product-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .product-card { padding: 8px; }
  .product-card-summary { display: none; }
}

@media (max-width: 900px) {
  .product-detail   { grid-template-columns: 1fr; gap: 32px; }
  .cart-layout      { grid-template-columns: 1fr; gap: 30px; }
  .checkout-layout  { grid-template-columns: 1fr; gap: 30px; }
  .cart-summary,
  .checkout-summary { position: static; }
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .trust-grid { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
  .trust-item:nth-child(odd) { border-left: 0; }
  .trust-value { font-size: 1.7rem; }

  .hero-inner { min-height: 340px; }
  .section-title::before,
  .section-title::after { width: 18px; }

  .cta-inner  { flex-direction: column; align-items: flex-start; }
  .cta-title  { font-size: 1.28rem; }

  .header-inner {
    flex-wrap: wrap;
    min-height: 0;
    padding-block: 13px;
    gap: 13px;
  }
  .site-nav { margin-left: 0; width: 100%; gap: 22px; }
  .site-nav a { font-size: 1rem; }
  .header-actions { margin-left: auto; }

  .hero    { padding: 16px 0 0; }
  .section { padding: 52px 0; }

  .cart-items     { padding: 4px 16px; }
  .checkout-form  { padding: 20px; }

  .cart-row {
    grid-template-columns: 72px 1fr auto;
    grid-template-areas:
      "media info remove"
      "media qty  total";
    row-gap: 11px;
  }
  .cart-row-media  { grid-area: media; }
  .cart-row-info   { grid-area: info; }
  .cart-row-qty    { grid-area: qty; }
  .cart-row-total  { grid-area: total; }
  .cart-row-media img { width: 72px; }
}

/* =============================================================
   商品介紹（商品頁下半部）
   ============================================================= */

.section-tight { padding-top: 24px; }

.product-facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 18px;
  margin: 26px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--c-border);
  font-size: .92rem;
}

.product-facts dt { color: var(--c-muted); }
.product-facts dd { margin: 0; }

.product-story { max-width: 860px; }

.product-story .section-title {
  margin-top: 12px;
  font-size: 1.85rem;
  color: var(--c-leaf);
}

.product-body {
  margin: 0 0 64px;
  font-size: 1.12rem;
  line-height: 2;
}

.product-body p { margin: 0 0 20px; color: var(--c-text); }

.product-body-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.4rem;
  letter-spacing: .06em;
  color: var(--c-leaf);
  margin: 38px 0 14px;
}

.product-body-heading::before {
  content: "";
  width: 5px;
  height: 1.05em;
  background: var(--c-sprout);
}

.feature-list,
.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.feature-list li {
  position: relative;
  padding-left: 20px;
  color: #3d433e;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .85em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-sprout);
}

.feature-list strong { color: var(--c-leaf-dk); font-weight: 600; }

.check-list li {
  position: relative;
  padding: 12px 16px 12px 44px;
  background: var(--c-leaf-pale);
  color: var(--c-leaf-ink);
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 16px;
  top: 12px;
  color: var(--c-leaf);
  font-weight: 700;
}

.check-list strong { font-weight: 600; }

/* --- 商品頁常見問題：直接展開，不用點擊 --- */

.qa-list { margin: 0; display: grid; gap: 14px; }

.qa-item {
  background: var(--c-tint);
  border-left: 4px solid var(--c-leaf);
  padding: 18px 22px;
}

.qa-item dt {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--c-leaf-dk);
  margin: 0 0 6px;
}

.qa-mark {
  flex-shrink: 0;
  font-weight: 700;
  color: var(--c-sprout);
}

.qa-item dd {
  margin: 0;
  padding-left: 1.6em;
  font-size: 1.08rem;
  line-height: 1.9;
  color: #3d433e;
}

/* =============================================================
   已售完
   ============================================================= */

.badge-soldout {
  background: rgba(37, 40, 38, .82);
  color: #fff;
  font-size: .86rem;
  font-weight: 600;
  letter-spacing: .1em;
  padding: 6px 14px;
}

/* 商品卡：照片變灰、價格變淡，一眼看出買不到 */
.product-card.is-sold-out .product-card-media img { filter: grayscale(1); opacity: .55; }
.product-card.is-sold-out .product-card-price { color: var(--c-muted); }
.product-card.is-sold-out .product-card-title { color: var(--c-muted); }

/* 商品頁 */
.product-detail-media { position: relative; }
.product-detail-media .badge-soldout { top: 16px; left: 16px; font-size: 1rem; padding: 8px 18px; }
.product-detail-media.is-sold-out img { filter: grayscale(1); opacity: .6; }

.soldout-note {
  margin: 18px 0 0;
  padding: 12px 16px;
  background: var(--c-tint);
  border-left: 4px solid var(--c-muted);
  color: var(--c-text);
  font-weight: 500;
}

.btn-soldout,
.btn-soldout:hover {
  background: var(--c-tint-deep);
  border-color: var(--c-tint-deep);
  color: var(--c-muted);
  cursor: not-allowed;
}

/* =============================================================
   關於我們
   ============================================================= */

.about-hero { padding: 28px 0 0; }

.about-hero-inner {
  min-height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  color: #fff;
  background:
    linear-gradient(rgba(14, 24, 16, .38), rgba(14, 24, 16, .5)),
    var(--c-tint-deep) url("../img/hero-greenhouse.jpg") center 55% / cover no-repeat;
}

.about-kicker {
  margin: 0 0 10px;
  font-size: .9rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  opacity: .85;
}

.about-title {
  margin: 0 0 12px;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  letter-spacing: .06em;
  line-height: 1.3;
  text-wrap: balance;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .25);
}

.about-lead {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: .08em;
  opacity: .92;
}

/* --- 名字的由來 --- */

.name-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  max-width: 900px;
  margin: 0 auto;
}

.name-card {
  text-align: center;
  padding: 34px 30px 30px;
  background: var(--c-leaf-pale);
  color: var(--c-leaf-ink);
}

.name-char {
  display: block;
  font-size: 4.2rem;
  line-height: 1;
  font-weight: 700;
  color: var(--c-leaf);
  margin-bottom: 14px;
}

.name-card h3 { margin: 0 0 10px; font-size: 1.3rem; letter-spacing: .1em; }
.name-card p  { margin: 0; font-size: 1.06rem; line-height: 1.95; color: var(--c-leaf-text); }

.name-sum {
  margin: 30px 0 0;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--c-leaf);
}

/* --- 我們的故事 --- */

.story { display: grid; gap: 0; }

.story-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
}

.story-row + .story-row { border-top: 0; }
.story-row-reverse .story-media { order: 2; }

.story-media {
  min-height: 320px;
  background-size: cover;
  background-position: center;
}

.story-text { padding: 40px 44px; align-self: center; }

.story-step {
  display: inline-block;
  font-size: .86rem;
  font-weight: 600;
  letter-spacing: .2em;
  color: var(--c-sprout);
  margin-bottom: 8px;
}

.story-text h3 {
  margin: 0 0 14px;
  font-size: 1.45rem;
  letter-spacing: .04em;
  color: var(--c-leaf);
}

.story-text p {
  margin: 0 0 12px;
  font-size: 1.08rem;
  line-height: 1.95;
  color: #3d433e;
}

/* --- 我們的承諾 --- */

.promise-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.promise {
  border-top: 3px solid var(--c-leaf);
  padding-top: 18px;
}

.promise h3 { margin: 0 0 8px; font-size: 1.25rem; color: var(--c-leaf); letter-spacing: .06em; }
.promise p  { margin: 0; font-size: 1.04rem; line-height: 1.9; color: #3d433e; }

@media (max-width: 760px) {
  .name-grid,
  .promise-grid { grid-template-columns: 1fr; }
  .story-row { grid-template-columns: 1fr; }
  .story-row-reverse .story-media { order: 0; }
  .story-media { min-height: 220px; }
  .story-text { padding: 26px 22px; }
  .about-hero-inner { min-height: 300px; }
}

@media (max-width: 560px) {
  .brand-logo { height: 40px; }
  .brand-logo9 { height: 43px; }
}
