/* === 字體：台北黑體 (Taipei Sans TC Beta) === */
@font-face {
  font-family: 'Taipei Sans TC Beta';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/gh/max32002/taipei-sans-tc-beta@1.0/dist/TaipeiSansTCBeta-Regular.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/gh/max32002/taipei-sans-tc-beta@1.0/dist/TaipeiSansTCBeta-Regular.woff') format('woff');
}
@font-face {
  font-family: 'Taipei Sans TC Beta';
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/gh/max32002/taipei-sans-tc-beta@1.0/dist/TaipeiSansTCBeta-Light.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/gh/max32002/taipei-sans-tc-beta@1.0/dist/TaipeiSansTCBeta-Light.woff') format('woff');
}
@font-face {
  font-family: 'Taipei Sans TC Beta';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/gh/max32002/taipei-sans-tc-beta@1.0/dist/TaipeiSansTCBeta-Bold.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/gh/max32002/taipei-sans-tc-beta@1.0/dist/TaipeiSansTCBeta-Bold.woff') format('woff');
}
@font-face {
  font-family: 'Taipei Sans TC Beta';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/gh/max32002/taipei-sans-tc-beta@1.0/dist/TaipeiSansTCBeta-Bold.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/gh/max32002/taipei-sans-tc-beta@1.0/dist/TaipeiSansTCBeta-Bold.woff') format('woff');
}

/* === 基礎 === */
:root {
  /* 主色：從 Logo 萃取的綠色系 */
  --primary: #2D6B3D;            /* 鴿子主色 - 森林深綠 */
  --primary-dark: #1F4F2D;       /* 更深 - 重點/hover */
  --primary-light: #4A9A4F;      /* 鴿子亮部 - 草綠 */
  --primary-soft: #9CCFA3;       /* 淺綠 hover */

  /* 質感點綴 */
  --gold: #B8956A;               /* 細金色分隔線 */
  --gold-soft: #D4BB95;          /* 淺金 */

  /* 背景與文字 */
  --bg: #FAFBF9;                 /* 米白底，帶一點綠 */
  --bg-soft: #EEF4EE;            /* 極淺綠卡片底 */
  --bg-deep: #F4F6F2;            /* 深一點的背景 */
  --text: #1A2E22;               /* 近黑帶綠 */
  --text-soft: #4A5953;          /* 灰綠副文字 */
  --text-muted: #7A857F;         /* 更淡的提示文字 */
  --line: #DDE5DD;               /* 極淺綠分隔線 */
  --white: #ffffff;

  /* 陰影 */
  --shadow-sm: 0 1px 2px rgba(31,79,45,.06);
  --shadow: 0 2px 12px rgba(31,79,45,.08);
  --shadow-lg: 0 8px 32px rgba(31,79,45,.10);

  --radius: 4px;                 /* 質感款用小圓角 */
  --radius-lg: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Taipei Sans TC Beta", "Microsoft JhengHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.02em;
}

/* 標題用台北黑體粗體 */
h1, h2, h3, .serif {
  font-family: "Taipei Sans TC Beta", "Microsoft JhengHei", sans-serif;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-dark); }

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* === 金色細分隔線 === */
.divider {
  display: block;
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 24px auto;
}

.divider-left {
  width: 48px;
  height: 1px;
  background: var(--gold);
  margin: 16px 0;
}

/* === Header === */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 84px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
}

.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-text {
  line-height: 1.3;
  font-family: "Noto Serif TC", serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: 0.08em;
}

.brand-text small {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.15em;
  margin-top: 2px;
  font-family: "Noto Sans TC", sans-serif;
}

.nav {
  display: flex;
  gap: 8px;
}

.nav a {
  padding: 10px 20px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-soft);
  letter-spacing: 0.08em;
  position: relative;
  transition: color .15s;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 0;
  height: 1px;
  background: var(--gold);
  transform: translateX(-50%);
  transition: width .25s;
}

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

.nav a.active::after,
.nav a:hover::after {
  width: 24px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary);
  cursor: pointer;
}

/* === Hero（質感款：文字排版主導，不放圖）=== */
.hero {
  background: var(--white);
  padding: 120px 0 140px;
  position: relative;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

/* 微妙背景紋理（極淺綠斜線） */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(74,154,79,0.04), transparent 50%),
    radial-gradient(circle at 85% 80%, rgba(45,107,61,0.05), transparent 50%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
}

.hero .established {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 0.78rem;
  letter-spacing: 0.35em;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 32px;
  font-family: "Noto Sans TC", sans-serif;
  text-transform: uppercase;
}

.hero .established::before,
.hero .established::after {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--gold);
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 600;
  margin-bottom: 28px;
  letter-spacing: 0.12em;
  color: var(--text);
  line-height: 1.4;
}

.hero .subtitle {
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  color: var(--text-soft);
  max-width: 640px;
  margin: 0 auto;
  line-height: 2;
  letter-spacing: 0.05em;
}

.hero .divider {
  margin: 32px auto 0;
  width: 80px;
}

/* === 入口卡片（質感款）=== */
.entry-section {
  padding: 100px 0;
  background: var(--bg);
}

.section-title {
  text-align: center;
  margin-bottom: 64px;
}

.section-title h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--primary-dark);
  margin-bottom: 12px;
  letter-spacing: 0.12em;
}

.section-title p {
  color: var(--text-muted);
  font-size: 0.92rem;
  letter-spacing: 0.15em;
}

.section-title .divider {
  margin-top: 20px;
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  counter-reset: entry-counter;
}

.entry-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 48px 32px;
  text-align: center;
  transition: all .3s ease;
  display: block;
  color: var(--text);
  position: relative;
  overflow: hidden;
  counter-increment: entry-counter;
}

/* 用數字編號取代 emoji，更有質感 */
.entry-card::before {
  content: counter(entry-counter, decimal-leading-zero);
  display: block;
  font-family: "Noto Serif TC", serif;
  font-size: 2.4rem;
  font-weight: 500;
  color: var(--gold);
  margin-bottom: 8px;
  letter-spacing: 0.08em;
  line-height: 1;
}

.entry-card .entry-icon {
  display: none;  /* 隱藏原本的 emoji */
}

.entry-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gold);
  transform: translateX(-50%);
  transition: width .3s ease;
}

.entry-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  color: var(--text);
  border-color: var(--primary-soft);
}

.entry-card:hover::after {
  width: 100%;
}

.entry-card h3 {
  font-size: 1.25rem;
  color: var(--primary-dark);
  margin-bottom: 16px;
  margin-top: 16px;
  letter-spacing: 0.12em;
  position: relative;
}

.entry-card h3::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto 20px;
}

.entry-card p {
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.9;
  margin-bottom: 24px;
}

.entry-card .arrow {
  color: var(--primary);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* === Page hero（次頁面）=== */
.page-hero {
  background: var(--white);
  padding: 100px 0 80px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(74,154,79,0.04), transparent 60%);
  pointer-events: none;
}

.page-hero h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin-bottom: 16px;
  letter-spacing: 0.15em;
  color: var(--primary-dark);
  position: relative;
  z-index: 1;
}

.page-hero p {
  color: var(--text-muted);
  letter-spacing: 0.1em;
  position: relative;
  z-index: 1;
}

.page-hero .divider {
  margin-top: 24px;
}

/* === Content === */
.content-section {
  padding: 80px 0;
}

.content-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 48px 56px;
  margin-bottom: 24px;
  position: relative;
  transition: border-color .2s;
}

.content-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 64px;
  background: var(--primary);
}

.content-card:hover {
  border-color: var(--primary-soft);
}

.content-card h2 {
  color: var(--primary-dark);
  font-size: 1.4rem;
  margin-bottom: 20px;
  padding-bottom: 16px;
  position: relative;
  letter-spacing: 0.1em;
}

.content-card h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 1px;
  background: var(--gold);
}

.content-card h3 {
  color: var(--primary);
  font-size: 1.1rem;
  margin: 24px 0 12px;
  letter-spacing: 0.1em;
}

.content-card p {
  color: var(--text-soft);
  margin-bottom: 14px;
  line-height: 1.95;
  font-size: 0.95rem;
}

.content-card ul {
  padding-left: 22px;
  color: var(--text-soft);
}

.content-card ul li {
  margin-bottom: 8px;
  font-size: 0.95rem;
}

/* === 聯絡資訊卡 === */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 36px;
  position: relative;
  transition: border-color .2s;
}

.contact-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 36px;
  right: 36px;
  height: 2px;
  background: var(--primary);
}

.contact-card:hover {
  border-color: var(--primary-soft);
}

.contact-card h2 {
  color: var(--primary-dark);
  font-size: 1.25rem;
  margin-bottom: 28px;
  letter-spacing: 0.1em;
  padding-bottom: 16px;
  position: relative;
}

.contact-card h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 1px;
  background: var(--gold);
}

.contact-list {
  list-style: none;
  padding: 0;
}

.contact-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  color: var(--text-soft);
  font-size: 0.93rem;
}

.contact-list li:last-child { border-bottom: none; }

.contact-list .label {
  color: var(--primary);
  font-weight: 500;
  min-width: 84px;
  flex-shrink: 0;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
}

.contact-list .value { flex: 1; word-break: break-all; letter-spacing: 0.03em; }

.map-link {
  display: inline-block;
  margin-top: 24px;
  padding: 10px 20px;
  background: var(--white);
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  transition: all .2s;
}

.map-link:hover {
  background: var(--primary);
  color: var(--white);
}

/* === Products page === */
.products-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  padding: 60px 0;
}

.category-sidebar {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.category-sidebar h3 {
  font-size: 1rem;
  color: var(--primary-dark);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  letter-spacing: 0.12em;
  position: relative;
}

.category-sidebar h3::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 32px;
  height: 1px;
  background: var(--gold);
}

.category-list {
  list-style: none;
  padding: 0;
}

.category-list li button {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 12px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-soft);
  font-size: 0.92rem;
  font-family: inherit;
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: 0.05em;
  transition: all .15s;
}

.category-list li button:hover {
  background: var(--bg-soft);
  color: var(--primary-dark);
}

.category-list li button.active {
  background: var(--primary);
  color: var(--white);
}

.category-list .count {
  font-size: 0.78rem;
  opacity: .85;
  background: rgba(255,255,255,.18);
  padding: 2px 10px;
  border-radius: 12px;
}

.category-list li button:not(.active) .count {
  background: var(--bg-deep);
  color: var(--text-muted);
}

.products-main {
  min-width: 0;
}

.products-toolbar {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 24px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 220px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.93rem;
  font-family: inherit;
  background: var(--bg-deep);
  color: var(--text);
  letter-spacing: 0.05em;
  transition: all .15s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(45,107,61,.12);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.result-count {
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

.product-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .25s;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-soft);
}

.product-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--bg-soft);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-image .placeholder {
  color: var(--primary-light);
  font-size: 2rem;
  opacity: .35;
}

.product-info {
  padding: 14px 16px 16px;
}

.product-info h4 {
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 6px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-info .product-cat {
  font-size: 0.72rem;
  color: var(--primary);
  background: var(--bg-soft);
  padding: 2px 9px;
  border-radius: 10px;
  display: inline-block;
  letter-spacing: 0.05em;
}

.empty-state {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 80px 20px;
  text-align: center;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  opacity: .3;
}

/* === Modal === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31,79,45,.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(6px);
}

.modal-overlay.show { display: flex; }

.modal {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255,255,255,.95);
  border: 1px solid var(--line);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  z-index: 1;
  color: var(--text);
}

.modal-image {
  width: 100%;
  min-height: 180px;
  background: var(--bg-soft);
  display: grid;
  place-items: center;
  padding: 24px 20px;
}

/* 圖維持原始大小，不放大超過自然尺寸 */
.modal-image img {
  max-width: 240px;
  max-height: 200px;
  width: auto;
  height: auto;
  display: block;
}

.modal-body { padding: 36px; }
.modal-body h2 { color: var(--primary-dark); margin-bottom: 12px; letter-spacing: 0.1em; }
.modal-body .cat-tag {
  display: inline-block;
  background: var(--bg-soft);
  color: var(--primary);
  padding: 4px 14px;
  border-radius: 14px;
  font-size: 0.82rem;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}
.modal-body p { color: var(--text-soft); margin-bottom: 14px; line-height: 1.9; }

/* === Footer === */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,.85);
  padding: 56px 0 24px;
  margin-top: 80px;
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 60px;
  height: 2px;
  background: var(--gold);
  transform: translateX(-50%);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px;
  margin-bottom: 32px;
}

.footer-grid h4 {
  color: var(--white);
  margin-bottom: 16px;
  font-size: 0.98rem;
  letter-spacing: 0.12em;
  position: relative;
  padding-bottom: 12px;
  font-family: "Noto Serif TC", serif;
}

.footer-grid h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 24px;
  height: 1px;
  background: var(--gold);
}

.footer-grid p,
.footer-grid li {
  font-size: 0.88rem;
  color: rgba(255,255,255,.72);
  line-height: 2;
  letter-spacing: 0.03em;
}

.footer-grid ul { list-style: none; padding: 0; }

.footer-grid a { color: rgba(255,255,255,.85); }
.footer-grid a:hover { color: var(--gold-soft); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,.5);
  letter-spacing: 0.1em;
}

/* === Responsive === */
@media (max-width: 768px) {
  .container { padding: 0 20px; }

  .nav {
    display: none;
    position: absolute;
    top: 84px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 12px;
    box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--line);
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px; }
  .nav-toggle { display: block; }

  .hero { padding: 80px 0 80px; }
  .entry-section { padding: 60px 0; }
  .content-card { padding: 32px 24px; }
  .contact-card { padding: 32px 24px; }

  .products-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 0;
  }
  .category-sidebar {
    position: static;
    max-height: 280px;
    overflow-y: auto;
  }

  .brand-text { font-size: 0.95rem; }
  .brand-logo { width: 44px; height: 44px; }
}
