/* ============================================================================
 * 旦暮小園（Danmu Orchard）設計系統樣式表
 * 靈感致敬：中川政七商店「靜謐工藝、和紙留白（間 Ma）、編輯雜誌節奏」
 * 融合品牌標誌之沉穩草木綠與旦暮暖陽金，減少視覺雜訊與閱讀壓力
 * ============================================================================ */

:root {
  /* 基礎紙張與大地色系 */
  --bg-paper: #faf8f4;
  --bg-card: #ffffff;
  --bg-linen: #f2efe9;
  --bg-sage-tint: #edf2ea;
  --bg-sun-tint: #fbf5e6;

  /* 墨色與輔助文字 */
  --ink-primary: #2b2b28;
  --ink-secondary: #5c5952;
  --ink-muted: #8a867c;

  /* 品牌主題色（由旦暮小園 Logo 翠綠與旭日金沉澱而成） */
  --brand-green: #4a6b3e;
  --brand-green-dark: #334c2b;
  --brand-green-soft: #6f8f5f;
  --brand-gold: #c29238;
  --brand-gold-soft: #e0bd6d;

  /* 狀態色（低飽和溫潤調性） */
  --status-ok: #3d6b47;
  --status-warn: #a87624;
  --status-danger: #9e3f38;
  --status-danger-bg: #f9eceb;

  /* 髮絲分隔線與空間系統 */
  --line-subtle: #e6e1d6;
  --line-strong: #cfc8b8;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  /* 字體堆疊 */
  --font-handwriting: 'LXGW WenKai TC', 'Klee One', 'BiauKai', 'DFKai-SB', 'KaiTi TC', serif;
  --font-serif: 'Noto Serif TC', 'Songti TC', Georgia, serif;
  --font-sans: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'PingFang TC', sans-serif;

  /* 柔和陰影（克制極輕） */
  --shadow-soft: 0 10px 30px rgba(43, 43, 40, 0.05);
  --shadow-drawer: -8px 0 36px rgba(43, 43, 40, 0.09);

  /* 版面寬度 */
  --container-max: 1120px;
  --container-narrow: 780px;
  --header-height: 78px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  background-color: var(--bg-paper);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: 0.03em;
  -webkit-font-smoothing: antialiased;
}

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

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

a {
  color: inherit;
  text-decoration: none;
}

/* 手寫品牌字體與明體編輯標題 */
.brand-handwriting {
  font-family: var(--font-handwriting);
  font-weight: 700;
  letter-spacing: 0.14em;
}

.serif-heading {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.48;
}

/* 初始載入畫面 */
.boot-loading {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--ink-secondary);
}

.boot-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.boot-title {
  margin: 0;
  font-size: 1.65rem;
  color: var(--ink-primary);
}

.boot-sub {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

/* ----------------------------------------------------------------------------
 * 全站頂部導覽列（極簡、低壓、高辨識）
 * ---------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 248, 244, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-subtle);
}

.admin-maintenance-banner {
  background: var(--bg-sun-tint);
  border-bottom: 1px solid #e7d4a5;
  color: #6b4e16;
  font-size: 0.85rem;
  padding: 8px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
}

.brand-logo-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-subtle);
  background: #fff;
}

.brand-text-group {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  width: max-content;
  line-height: 1.1;
}

.brand-name-display {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.18em;
  font-family: var(--font-handwriting);
  font-size: 1.52rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--ink-primary);
}

.brand-sub-caption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  width: 100%;
  font-family: var(--font-serif);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink-muted);
  margin-top: 4px;
}

.brand-sub-caption span,
.brand-name-display span {
  display: inline-block;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  background: none;
  border: none;
  padding: 6px 2px;
  font-size: 0.94rem;
  color: var(--ink-secondary);
  cursor: pointer;
  position: relative;
  letter-spacing: 0.08em;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--brand-green-dark);
}

.nav-link.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1.5px;
  background: var(--brand-green);
}

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

/* 按鈕系統（克制、細緻、易點擊） */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--brand-green);
  color: #ffffff;
  border-color: var(--brand-green);
}

.btn-primary:hover:not(:disabled) {
  background: var(--brand-green-dark);
  border-color: var(--brand-green-dark);
}

.btn-outline {
  background: transparent;
  color: var(--ink-primary);
  border-color: var(--line-strong);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--brand-green);
  color: var(--brand-green-dark);
  background: rgba(74, 107, 62, 0.04);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-secondary);
  border-color: transparent;
  padding: 8px 12px;
}

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

.btn-danger {
  background: transparent;
  color: var(--status-danger);
  border-color: #dec0bd;
}

.btn-danger:hover:not(:disabled) {
  background: var(--status-danger-bg);
}

.btn-sm {
  padding: 6px 13px;
  font-size: 0.82rem;
}

.btn-google {
  width: 100%;
  background: #ffffff;
  color: #2b2b28;
  border: 1px solid #d5d0c5;
  padding: 12px 18px;
  font-weight: 500;
  border-radius: var(--radius-sm);
}

.btn-google:hover {
  background: #f9f7f2;
  border-color: #b5ae9f;
}

.bag-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--brand-green);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 500;
}

/* ----------------------------------------------------------------------------
 * 容器與留白節奏（中川政七商店「間 Ma」呼吸美學）
 * ---------------------------------------------------------------------------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 24px;
}

.section-block {
  padding: 76px 0;
}

.section-block--compact {
  padding: 48px 0;
}

.section-block--warm {
  background: var(--bg-linen);
  border-top: 1px solid var(--line-subtle);
  border-bottom: 1px solid var(--line-subtle);
}

.section-block--sage {
  background: var(--bg-sage-tint);
  border-top: 1px solid #d7e2d1;
  border-bottom: 1px solid #d7e2d1;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 38px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-subtle);
}

.eyebrow {
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand-green);
  margin: 0 0 8px;
  display: block;
}

.section-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 2.5vw, 1.95rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink-primary);
}

/* ----------------------------------------------------------------------------
 * Hero 主視覺與模組化內容部件（管理者可自由編輯與排序）
 * ---------------------------------------------------------------------------- */
.hero-section {
  padding: 48px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.25fr;
  gap: 52px;
  align-items: center;
}

.hero-copy {
  position: relative;
}

.hero-vertical-accent {
  writing-mode: vertical-rl;
  font-family: var(--font-serif);
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  color: var(--ink-muted);
  margin-bottom: 18px;
  white-space: nowrap;
  border-right: 1px solid var(--line-strong);
  padding-right: 10px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.2vw, 2.55rem);
  font-weight: 500;
  line-height: 1.42;
  letter-spacing: 0.06em;
  margin: 0 0 18px;
  color: var(--ink-primary);
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--ink-secondary);
  margin: 0 0 16px;
  line-height: 1.9;
}

.hero-body {
  font-size: 0.92rem;
  color: var(--ink-muted);
  margin: 0 0 28px;
  line-height: 1.9;
}

.hero-media {
  position: relative;
}

.hero-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-subtle);
}

.manifesto-box {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.manifesto-box h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 2.6vw, 1.95rem);
  font-weight: 500;
  margin: 0 0 14px;
}

.manifesto-box .lead {
  color: var(--brand-green-dark);
  font-size: 0.95rem;
  margin: 0 0 18px;
  letter-spacing: 0.1em;
}

.manifesto-box p {
  color: var(--ink-secondary);
  margin: 0 0 24px;
  line-height: 2;
}

.story-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 54px;
  align-items: center;
}

.story-split img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-subtle);
}

.quote-box {
  max-width: 740px;
  margin: 0 auto;
  padding: 20px 24px;
  border-left: 2px solid var(--brand-gold);
}

.quote-box blockquote {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  line-height: 1.75;
  color: var(--ink-primary);
}

.notice-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.notice-card-copy {
  max-width: 720px;
}

/* ----------------------------------------------------------------------------
 * 文章卡片、閱讀頁與高互動留言區
 * ---------------------------------------------------------------------------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}

.filter-pill {
  background: transparent;
  border: 1px solid var(--line-subtle);
  color: var(--ink-secondary);
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.86rem;
  cursor: pointer;
  letter-spacing: 0.06em;
  transition: all 0.2s ease;
}

.filter-pill:hover {
  border-color: var(--brand-green);
  color: var(--brand-green-dark);
}

.filter-pill.is-active {
  background: var(--brand-green);
  border-color: var(--brand-green);
  color: #ffffff;
}

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

.editorial-card {
  background: var(--bg-card);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, transform 0.25s ease;
  cursor: pointer;
}

.editorial-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.editorial-card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-linen);
}

.editorial-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.editorial-card-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-bottom: 10px;
}

.tag-chip {
  display: inline-block;
  padding: 2px 10px;
  font-size: 0.74rem;
  border-radius: var(--radius-pill);
  background: var(--bg-sage-tint);
  color: var(--brand-green-dark);
  letter-spacing: 0.06em;
}

.tag-chip--gold {
  background: var(--bg-sun-tint);
  color: #7c5915;
}

.editorial-card-title {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 500;
  line-height: 1.55;
  color: var(--ink-primary);
}

.editorial-card-excerpt {
  margin: 0 0 16px;
  font-size: 0.88rem;
  color: var(--ink-secondary);
  line-height: 1.8;
  flex: 1;
}

.editorial-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--line-subtle);
  font-size: 0.8rem;
  color: var(--ink-muted);
}

/* 文章閱讀內頁 */
.article-reader {
  padding: 48px 0 80px;
}

.article-cover {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin: 26px 0 34px;
  border: 1px solid var(--line-subtle);
}

.article-content p {
  margin: 0 0 22px;
  font-size: 1.02rem;
  line-height: 2.05;
  color: var(--ink-primary);
}

.article-interact-bar {
  margin: 36px 0 44px;
  padding: 18px 0;
  border-top: 1px solid var(--line-subtle);
  border-bottom: 1px solid var(--line-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--bg-card);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.like-btn.is-liked {
  background: #f9eceb;
  border-color: #d69d98;
  color: #8f352e;
}

.comments-section {
  margin-top: 16px;
}

.comment-card {
  background: var(--bg-card);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin-bottom: 14px;
}

.comment-card--reply {
  margin-left: 34px;
  background: #fcfbf8;
  border-left: 2px solid var(--brand-green-soft);
}

.comment-card--admin {
  background: var(--bg-sage-tint);
  border-color: #d3e0cd;
}

.comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.comment-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 0.92rem;
}

.avatar-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-linen);
  border: 1px solid var(--line-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  color: var(--brand-green-dark);
  font-family: var(--font-serif);
}

.comment-body {
  margin: 0;
  white-space: pre-wrap;
  font-size: 0.94rem;
  color: var(--ink-primary);
  line-height: 1.8;
}

.comment-actions {
  margin-top: 10px;
  display: flex;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.text-link-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--brand-green-dark);
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ----------------------------------------------------------------------------
 * 產品選物卡片與詳情
 * ---------------------------------------------------------------------------- */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-card-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-linen);
  cursor: pointer;
}

.product-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.product-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-price {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  color: var(--ink-primary);
  font-weight: 500;
  margin: 8px 0 14px;
}

.product-price small {
  font-family: var(--font-sans);
  font-size: 0.76rem;
  color: var(--ink-muted);
  margin-left: 6px;
}

.shipping-rule-banner {
  background: var(--bg-card);
  border: 1px solid var(--line-subtle);
  border-left: 3px solid var(--brand-green);
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  margin-bottom: 32px;
  font-size: 0.9rem;
  color: var(--ink-secondary);
}

/* ----------------------------------------------------------------------------
 * 表單元素與互動區塊
 * ---------------------------------------------------------------------------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-group--full {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.84rem;
  color: var(--ink-secondary);
  letter-spacing: 0.04em;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 10px 13px;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 0.93rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(74, 107, 62, 0.12);
}

.form-textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.75;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

/* ----------------------------------------------------------------------------
 * 維護中專屬頁面（沉靜、典雅、絕不讓訪客焦慮）
 * ---------------------------------------------------------------------------- */
.maintenance-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: radial-gradient(circle at top, #fdfcf9 0%, var(--bg-paper) 75%);
}

.maintenance-card {
  max-width: 540px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-md);
  padding: 52px 40px;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.maintenance-card img {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  margin: 0 auto 18px;
}

.maintenance-status-pill {
  display: inline-block;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-sun-tint);
  color: #7c5915;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  margin-bottom: 16px;
}

/* ----------------------------------------------------------------------------
 * 抽屜（購物袋／結帳）與置中彈窗（登入／商品詳情／信件預覽）
 * ---------------------------------------------------------------------------- */
.overlay-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(34, 34, 30, 0.42);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.overlay-backdrop--drawer {
  justify-content: flex-end;
  padding: 0;
}

.modal-panel {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-paper);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-md);
  padding: 28px 30px;
  box-shadow: var(--shadow-soft);
}

.modal-panel--wide {
  max-width: 760px;
}

.drawer-panel {
  width: 100%;
  max-width: 520px;
  height: 100vh;
  overflow-y: auto;
  background: var(--bg-paper);
  border-left: 1px solid var(--line-subtle);
  padding: 28px 26px 40px;
  box-shadow: var(--shadow-drawer);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line-subtle);
}

.panel-header h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
}

.icon-close-btn {
  background: none;
  border: 1px solid var(--line-subtle);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--ink-secondary);
  font-size: 1.1rem;
  line-height: 1;
}

.icon-close-btn:hover {
  background: var(--bg-linen);
  color: var(--ink-primary);
}

.cart-item-row {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-subtle);
  align-items: center;
}

.cart-item-thumb {
  width: 66px;
  height: 54px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--line-subtle);
}

.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
}

.qty-control button {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.qty-control span {
  min-width: 28px;
  text-align: center;
  font-size: 0.88rem;
}

.price-summary-box {
  background: var(--bg-card);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin: 18px 0;
}

.price-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  margin-bottom: 8px;
  color: var(--ink-secondary);
}

.price-row--total {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-subtle);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink-primary);
}

/* ----------------------------------------------------------------------------
 * 管理者後台（直覺、清晰、低學習門檻）
 * ---------------------------------------------------------------------------- */
.admin-shell {
  padding: 36px 0 80px;
}

.admin-top-bar {
  background: var(--bg-card);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line-subtle);
  padding-bottom: 12px;
}

.admin-tab-btn {
  padding: 8px 16px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--ink-secondary);
}

.admin-tab-btn:hover {
  background: var(--bg-linen);
}

.admin-tab-btn.is-active {
  background: var(--brand-green);
  color: #ffffff;
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-tile {
  background: var(--bg-card);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
}

.stat-tile-label {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.stat-tile-value {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  color: var(--ink-primary);
  margin-top: 4px;
}

.admin-list-item {
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 12px;
  background: #fcfbf9;
}

.switch-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
}

.switch-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand-green);
}

/* ----------------------------------------------------------------------------
 * 頁尾與通知 Toast
 * ---------------------------------------------------------------------------- */
.site-footer {
  margin-top: 60px;
  background: var(--bg-linen);
  border-top: 1px solid var(--line-subtle);
  padding: 56px 0 36px;
  color: var(--ink-secondary);
  font-size: 0.88rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line-subtle);
}

.footer-bottom {
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}

.toast-item {
  background: var(--ink-primary);
  color: #faf8f4;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  box-shadow: var(--shadow-soft);
  border-left: 3px solid var(--brand-gold);
}

.toast-item--error {
  background: #7b2d27;
  border-left-color: #f3b5af;
}

.toast-item--success {
  background: var(--brand-green-dark);
  border-left-color: #a9cc9b;
}

.divider-text {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line-subtle);
}

.pre-wrap-box {
  white-space: pre-wrap;
  background: var(--bg-linen);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: 0.88rem;
  line-height: 1.8;
}

/* ----------------------------------------------------------------------------
 * 後台已訂購資訊確認表與 A4 列印訂購單樣式
 * ---------------------------------------------------------------------------- */
.order-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.order-summary-chip {
  background: var(--bg-linen);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.86rem;
}

.order-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  margin: 10px 0 12px;
  background: #ffffff;
}

.order-items-table th,
.order-items-table td {
  border: 1px solid var(--line-subtle);
  padding: 8px 10px;
  text-align: left;
}

.order-items-table th {
  background: var(--bg-linen);
  font-weight: 500;
  color: var(--ink-secondary);
}

.order-items-table td.num,
.order-items-table th.num {
  text-align: right;
  white-space: nowrap;
}

.print-sheet-root {
  display: none;
}

.print-order-sheet {
  background: #ffffff;
  color: #1f1f1c;
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm);
  padding: 24px 26px;
  margin-bottom: 20px;
}

.print-order-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--ink-primary);
}

.print-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 14px;
  font-size: 0.88rem;
}

.print-info-box {
  border: 1px solid var(--line-subtle);
  border-radius: 4px;
  padding: 12px 14px;
}

.print-sign-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px dashed var(--line-strong);
  font-size: 0.84rem;
  color: var(--ink-secondary);
}

@media print {
  @page {
    size: A4 portrait;
    margin: 14mm;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  #app,
  #overlay-root,
  #toast-container {
    display: none !important;
  }

  #print-sheet-root {
    display: block !important;
  }

  .print-order-sheet {
    border: none;
    padding: 0 0 12mm;
    margin: 0 0 10mm;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .print-order-sheet + .print-order-sheet {
    page-break-before: always;
    break-before: page;
  }
}

/* ----------------------------------------------------------------------------
 * 響應式版面（平板與手機流暢閱讀）
 * ---------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .hero-grid,
  .story-split,
  .cards-grid-3,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .admin-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-vertical-accent {
    display: none;
  }
}

@media (max-width: 720px) {
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 16px;
  }

  .main-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px solid var(--line-subtle);
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .comment-card--reply {
    margin-left: 16px;
  }
}
