/* ==========================================================
   永慶協官網  style.css  — 香港傳統品牌風格
   主色：#A00018 (logo 深紅)  點綴金：#C9A063
   ========================================================== */

/* ----------------------------------------------------------
   内容加载策略（配合 data-render.js）：
   ① html.js 标记由页面顶部内联脚本添加 —— 无 JS 访客不受任何影响
   ② 数据就绪（html.content-ready）前隐藏页面，显示品牌加载屏，
      避免「先闪默认图文、再跳最新内容」的突兀感
   ③ data-render.js 有 1.5s 强制兜底，弱网/接口异常最多加载屏 1.5 秒
   ---------------------------------------------------------- */
html.js:not(.content-ready) body { opacity: 0; }
html.js body { transition: opacity .35s ease; }
html.js:not(.content-ready)::after {
  content: "永 慶 協";
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: #FBF8F2; color: #A00018;
  font-family: var(--serif); font-size: 34px; letter-spacing: 14px;
  text-indent: 14px;   /* 抵消最后一个字的字距，保证视觉居中 */
  transition: opacity .35s ease;
}
html.js:not(.content-ready)::before {
  content: "";
  position: fixed; z-index: 9999;
  left: 50%; top: calc(50% + 42px);
  width: 56px; height: 2px; margin-left: -28px;
  background: linear-gradient(90deg, transparent, #C9A063, transparent);
  animation: loadbar 1.1s ease-in-out infinite;
}
@keyframes loadbar {
  0% { transform: scaleX(.2); opacity: .4; }
  50% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(.2); opacity: .4; }
}
html.js.content-ready::after, html.js.content-ready::before {
  opacity: 0; pointer-events: none;
}
html.js.content-done::after, html.js.content-done::before { display: none; }

:root {
  --primary: #A00018;
  --primary-dark: #7A0012;
  --primary-deep: #4E000C;
  --gold: #C9A063;
  --gold-light: #E8D5A8;
  --ink: #33231D;
  --ink-light: #6E5A4E;
  --cream: #FAF4EA;
  --cream-2: #F3E9D6;
  --white: #FFFFFF;
  --line: #E3D3BC;
  /* 字体栈：全部走系统自带字体，零外部请求、零加载延迟。
     中文衬线用宋体（macOS Songti SC / Windows SimSun），标题用楷体感字体；
     若访客本机装了思源宋体（Noto Serif SC）也会被自动优先采用。 */
  --serif: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif SC", "SimSun", "宋体", serif;
  --kai: "Kaiti SC", "STKaiti", "KaiTi", "楷体", "Source Han Serif SC", "Noto Serif SC", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", "Noto Sans SC", "Heiti SC", sans-serif;
  --shadow: 0 12px 34px rgba(80, 12, 22, .12);
  --shadow-sm: 0 4px 14px rgba(80, 12, 22, .08);
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.85;
  font-size: 15px;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

/* 定宽布局：PC 固定 1200px 居中（窗口 ≥1240 时完全固定，素材比例恒定）；
   窗口 768-1239 自动收缩（max 1200）；移动端固定视口宽度 */
.container { width: 1200px; margin: 0 auto; }
@media (max-width: 1240px) { .container { width: 100%; max-width: 1200px; padding: 0 24px; } }
@media (max-width: 768px) { .container { width: 100%; max-width: 100%; padding: 0 16px; } }

/* ============ 雲紋 / 回紋 背景裝飾 ============ */
.pattern-cloud {
  background-color: var(--cream);
  background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23C9A063' stroke-opacity='0.16' stroke-width='1'%3E%3Cpath d='M20 40c8-10 24-10 32 0s8 14 0 18c-6 3-10 0-14-4'/%3E%3Cpath d='M70 90c8-10 24-10 32 0s8 14 0 18c-6 3-10 0-14-4'/%3E%3Ccircle cx='30' cy='95' r='4'/%3E%3Ccircle cx='95' cy='25' r='4'/%3E%3C/g%3E%3C/svg%3E");
}
.pattern-gold {
  background-color: var(--primary-deep);
  background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23C9A063' stroke-opacity='0.12' stroke-width='1'%3E%3Cpath d='M20 40c8-10 24-10 32 0s8 14 0 18c-6 3-10 0-14-4'/%3E%3Cpath d='M70 90c8-10 24-10 32 0s8 14 0 18c-6 3-10 0-14-4'/%3E%3Ccircle cx='30' cy='95' r='4'/%3E%3Ccircle cx='95' cy='25' r='4'/%3E%3C/g%3E%3C/svg%3E");
}

/* ============ 頂部信息條 ============ */
.topbar {
  background: linear-gradient(90deg, var(--primary-deep), var(--primary-dark) 40%, var(--primary-deep));
  color: rgba(255,255,255,.88);
  font-size: 12.5px;
  letter-spacing: 1px;
  padding: 7px 0;
  border-bottom: 2px solid var(--gold);
}
.topbar-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 16px; }
.topbar-slogan { color: var(--gold-light); }
.topbar-contact { display: flex; gap: 12px; align-items: center; }
.topbar-contact .divider { opacity: .35; }

/* ============ 導航 ============ */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s;
}
.header.scrolled { box-shadow: 0 4px 20px rgba(80,12,22,.1); }
.nav-inner { display: flex; justify-content: space-between; align-items: center; height: 78px; }

/* ==========================================================
   頂欄排版（寬屏）：logo 靠左、導航居中偏右且均勻分佈
   做法：
   1) 讓頂部兩條（聯繫條 / 導航條）不再受 1200px 內容容器限制，
      內容鋪滿視口只留安全邊距 —— logo 才真正靠左，兩條也彼此對齊
   2) 導航用 space-around 在剩餘空間內均勻鋪開，並限制最大寬度；
      因為 logo 已佔住左側，剩餘空間裏居中天然就是「居中偏右」
   ========================================================== */
@media (min-width: 1241px) {
  .topbar .topbar-inner,
  .header .nav-inner {
    width: 100%; max-width: 100%;
    padding: 0 clamp(28px, 3.2vw, 64px);
  }
  .header .nav {
    flex: 1;
    justify-content: space-around;
    gap: 0;
    max-width: 940px;
    margin: 0 auto;
    padding: 0;
  }
  .header .nav-link { padding: 8px clamp(12px, 1.2vw, 20px); }
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-name { font-family: var(--kai); font-weight: 900; font-size: 25px; color: var(--primary); letter-spacing: 5px; }
.brand-sub { font-size: 10.5px; color: var(--gold); letter-spacing: 2.5px; }

.nav { display: flex; gap: 4px; }
.nav-link {
  position: relative;
  padding: 8px 16px;
  font-size: 15px;
  letter-spacing: 2px;
  color: var(--ink);
  transition: color .25s;
}
.nav-link::after {
  content: ""; position: absolute; left: 50%; bottom: 2px;
  width: 0; height: 2px; background: var(--primary);
  transform: translateX(-50%); transition: width .3s;
}
.nav-link:hover, .nav-link.active { color: var(--primary); }
.nav-link:hover::after, .nav-link.active::after { width: 60%; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--primary); transition: transform .3s, opacity .3s; }
/* 菜单打开时汉堡图标变成 ✕，给用户明确反馈 */
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
/* 抽屉菜单的半透明遮罩：点它可关闭菜单。
   z-index 必须低于 .header(100) —— 抽屉菜单在 .header 内部，
   .header 因 z-index + backdrop-filter 形成了独立层叠上下文，
   所以菜单自身的 z-index:200 只在 header 内部生效、对外整体仍是 100 层。
   遮罩若高于 100，就会把整个抽屉一起盖住，导致菜单项点不动。 */
.nav-backdrop {
  position: fixed; inset: 0; background: rgba(30, 10, 10, .45);
  opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s;
  z-index: 90; cursor: pointer;
}
.nav-backdrop.show { opacity: 1; visibility: visible; }
/* 菜单展开时锁住背景滚动，避免手指滑动穿透到页面 */
body.nav-open { overflow: hidden; }

/* ============ HERO 輪播 ============ */
.hero { position: relative; height: min(80vh, 700px); min-height: 500px; overflow: hidden; }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1s ease, visibility 1s; }
.hero-slide.active { opacity: 1; visibility: visible; z-index: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0;
  /* 左深右透：0~34% 保证左侧文字可读，58% 起快速衰减，82% 之后完全无遮罩、还原图像原色 */
  background: linear-gradient(90deg,
    rgba(40,6,12,.88) 0%,
    rgba(40,6,12,.62) 34%,
    rgba(40,6,12,.22) 58%,
    rgba(78,0,12,0) 82%);
}
.hero-content {
  position: absolute; z-index: 2;
  left: 0; right: 0; top: 50%; transform: translateY(-50%);
  padding: 0 6%;
  max-width: 680px; color: #fff;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12.5px; letter-spacing: 3px; color: var(--gold-light);
  margin-bottom: 18px;
}
.hero-tag::before, .hero-tag::after { content: ""; width: 26px; height: 1px; background: var(--gold); }
.hero-title {
  font-family: var(--kai); font-weight: 900;
  font-size: clamp(30px, 4.6vw, 52px); line-height: 1.35;
  margin-bottom: 18px; text-shadow: 0 2px 14px rgba(0,0,0,.45);
  letter-spacing: 3px;
}
.hero-desc { font-size: 15px; color: rgba(255,255,255,.88); margin-bottom: 30px; max-width: 560px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 12px 32px;
  font-size: 14.5px; letter-spacing: 2px; border-radius: 4px;
  transition: all .3s; border: 1.5px solid transparent;
}
.btn-solid { background: var(--primary); color: #fff; box-shadow: 0 6px 18px rgba(160,0,24,.4); }
.btn-solid:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-ghost { border-color: rgba(255,255,255,.75); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.16); transform: translateY(-2px); }
.btn-gold { background: linear-gradient(180deg, var(--gold-light), var(--gold)); color: var(--primary-deep); box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.btn-gold:hover { transform: translateY(-2px); filter: brightness(1.05); }

.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,.12); border: 1.5px solid rgba(255,255,255,.5);
  color: #fff; font-size: 18px; line-height: 1; transition: .3s; backdrop-filter: blur(4px);
}
.hero-arrow:hover { background: var(--primary); border-color: var(--primary); }
.hero-arrow-left { left: 24px; }
.hero-arrow-right { right: 24px; }
.hero-dots { position: absolute; z-index: 3; bottom: 28px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; }
.hero-dots .dot { width: 28px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.4); border: none; transition: .3s; padding: 0; }
.hero-dots .dot.active { background: var(--gold); width: 44px; }

/* 港式邊框裝飾 */
.hk-frame { position: relative; border: 2px solid var(--gold); }
.hk-frame::before {
  content: ""; position: absolute; inset: 5px;
  border: 1px solid rgba(201,160,99,.45); pointer-events: none;
}

/* ============ 標語條 ============ */
.slogan-band { background: var(--primary); padding: 26px 0; text-align: center; position: relative; overflow: hidden; }
.slogan-band::before, .slogan-band::after {
  content: ""; position: absolute; top: 50%; transform: translateY(-50%);
  width: 140px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-light));
}
.slogan-band::before { left: 4%; }
.slogan-band::after { right: 4%; }
.slogan-band-text { font-family: var(--kai); font-size: clamp(14px, 1.8vw, 17px); color: var(--gold-light); letter-spacing: 3px; }

/* ============ 通用 Section ============ */
.section { padding: 92px 0; }
.section-light { background: var(--white); }
.section-cream { background: var(--cream); }
.section-dark { background: var(--primary-deep); position: relative; }

.section-head { text-align: center; margin-bottom: 56px; position: relative; }
.section-kicker { font-size: 12px; letter-spacing: 6px; color: var(--gold); text-transform: uppercase; }
.section-title {
  font-family: var(--kai); font-weight: 900;
  font-size: clamp(28px, 3.4vw, 40px);
  color: var(--primary); margin: 10px 0 16px; letter-spacing: 6px;
}
.section-line { display: flex; justify-content: center; align-items: center; gap: 8px; margin-bottom: 16px; }
.section-line::before, .section-line::after { content: ""; width: 46px; height: 1px; background: var(--gold); }
.section-line span { width: 9px; height: 9px; background: var(--primary); transform: rotate(45deg); }
.section-sub { color: var(--ink-light); font-size: 14.5px; max-width: 660px; margin: 0 auto; }
.section-head.light .section-title { color: #fff; }
.section-head.light .section-sub { color: rgba(255,255,255,.75); }
.section-head.light .section-kicker { color: var(--gold-light); }
.section-head.light .section-line::before, .section-head.light .section-line::after { background: var(--gold); }

/* 章頭印章 */
.chop {
  width: 52px; height: 52px; margin: 0 auto 14px;
  border-radius: 6px; border: 2px solid var(--primary);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--primary); font-family: var(--kai); font-weight: 900;
  font-size: 13px; line-height: 1.3; letter-spacing: 1px;
  transform: rotate(-6deg);
}
.chop span { display: block; }

/* ============ 數據條 ============ */
.stats-band { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); position: relative; overflow: hidden; }
.stats-band::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 22px 22px;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 48px 0; position: relative; z-index: 1; }
.stat-item { text-align: center; color: #fff; padding: 10px; border-right: 1px solid rgba(255,255,255,.15); }
.stat-item:last-child { border-right: none; }
.stat-num { font-family: var(--serif); font-weight: 900; font-size: clamp(34px, 4vw, 48px); color: var(--gold-light); line-height: 1.2; }
.stat-num em { font-style: normal; font-size: .5em; color: #fff; margin-left: 3px; }
.stat-label { font-size: 13.5px; letter-spacing: 2px; color: rgba(255,255,255,.85); margin-top: 6px; }

/* ============ 暢銷產品 ============ */
.featured-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.featured-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .35s, box-shadow .35s; position: relative;
}
.featured-card:hover { transform: translateY(-7px); box-shadow: var(--shadow); }
.featured-card::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 0;
  height: 3px; background: linear-gradient(90deg, var(--primary), var(--gold));
  transform: scaleX(0); transform-origin: left; transition: transform .4s;
}
.featured-card:hover::after { transform: scaleX(1); }
.featured-img { position: relative; aspect-ratio: 4/3.4; overflow: hidden; }
.featured-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.featured-card:hover .featured-img img { transform: scale(1.07); }
.featured-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--primary); color: #fff;
  font-size: 11.5px; letter-spacing: 1px; padding: 3px 12px; border-radius: 999px;
  box-shadow: 0 3px 10px rgba(160,0,24,.35);
}
.featured-body { padding: 20px 22px 24px; }
.featured-body h3 { font-family: var(--serif); font-size: 17px; margin-bottom: 8px; color: var(--ink); }
.featured-body p { font-size: 13.5px; color: var(--ink-light); margin-bottom: 12px; }
.text-link { color: var(--primary); font-size: 13.5px; letter-spacing: 1px; }
.text-link:hover { color: var(--primary-dark); }

/* ============ 最新動態 ============ */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; position: relative; z-index: 1; }
.news-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.15); border-radius: var(--radius);
  overflow: hidden; transition: transform .35s, background .35s;
}
.news-card:hover { transform: translateY(-7px); background: rgba(255,255,255,.11); }
.news-img { aspect-ratio: 16/8.6; overflow: hidden; position: relative; }
.news-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.news-card:hover .news-img img { transform: scale(1.06); }
.news-body { padding: 22px 24px 26px; }
.news-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.news-cat { background: var(--gold); color: var(--primary-deep); font-size: 11px; padding: 2px 12px; border-radius: 999px; letter-spacing: 1px; font-weight: 500; }
.news-date { color: rgba(255,255,255,.6); font-size: 12px; letter-spacing: 1px; }
.news-body h3 { color: #fff; font-family: var(--serif); font-size: 17.5px; margin-bottom: 10px; line-height: 1.5; }
.news-body p { color: rgba(255,255,255,.7); font-size: 13.5px; }
.news-more { text-align: center; margin-top: 40px; }

/* ============ 最新动态列表页：浅色横排卡片（手机自动堆叠） ============ */
.news-row {
  display: flex; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: box-shadow .3s, transform .3s;
}
.news-row:hover { box-shadow: var(--shadow-sm); transform: translateY(-3px); }
.news-row.hide { display: none !important; }
.news-row-media { flex: 0 0 300px; overflow: hidden; }
.news-row-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.news-row:hover .news-row-media img { transform: scale(1.04); }
.news-row-body { padding: 26px 30px; flex: 1; min-width: 0; }
.news-row-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.news-row-cat {
  background: var(--primary); color: #fff; font-size: 11.5px; padding: 3px 13px;
  border-radius: 999px; letter-spacing: 1px; white-space: nowrap;
}
.news-row-date { color: var(--ink-light); font-size: 12.5px; white-space: nowrap; }
.news-row-body h3 { color: var(--ink); font-family: var(--serif); font-size: 19px; margin-bottom: 10px; line-height: 1.5; }
.news-row-body p { color: var(--ink-light); font-size: 13.5px; line-height: 1.8; }
.news-row-link { display: inline-block; margin-top: 12px; color: var(--primary); font-size: 13px; }
/* 手机端：图片与文字改为上下堆叠，并让图片自适应宽度（原固定 300px 会撑破屏幕） */
@media (max-width: 768px) {
  .news-row { flex-direction: column; }
  .news-row-media { flex: 0 0 auto; width: 100%; aspect-ratio: 16/9; }
  .news-row-body { padding: 18px 20px 20px; }
  .news-row-body h3 { font-size: 17px; }
}

/* ============ 品牌故事預覽 ============ */
.story-band { position: relative; padding: 0; overflow: hidden; }
.story-band-grid { display: grid; grid-template-columns: 1fr 1.1fr; min-height: 520px; }
.story-band-img { position: relative; min-height: 380px; }
.story-band-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story-band-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(250,244,234,.9) 96%); }
.story-band-text { display: flex; flex-direction: column; justify-content: center; padding: 70px 8% 70px 40px; position: relative; }
.story-band-text .section-title { text-align: left; }
.story-band-text .section-line { justify-content: flex-start; }
.story-quote {
  font-family: var(--kai); font-size: 15.5px; color: var(--primary-dark);
  border-left: 4px solid var(--gold); padding: 12px 0 12px 18px;
  margin: 14px 0 20px; background: rgba(201,160,99,.14); border-radius: 0 8px 8px 0;
}
.story-band-text p { color: var(--ink-light); font-size: 14.5px; margin-bottom: 13px; text-align: justify; }
.story-band-text strong { color: var(--primary); }

/* ============ 品牌故事頁 ============ */
.story-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 52px; align-items: center; }
.story-title { font-family: var(--kai); font-size: 28px; color: var(--primary); margin-bottom: 18px; letter-spacing: 3px; }
.story-text p { color: var(--ink-light); font-size: 14.5px; margin-bottom: 14px; text-align: justify; }
.story-text strong { color: var(--primary); }
.story-sign { font-family: var(--kai); color: var(--primary); font-size: 16px; }
.story-img-wrap { position: relative; }
.story-img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.story-seal {
  position: absolute; right: -16px; top: -16px;
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--primary); color: var(--gold-light);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  font-family: var(--kai); font-size: 14px; letter-spacing: 2px; line-height: 1.5;
  box-shadow: 0 8px 22px rgba(160,0,24,.45);
  border: 2px dashed var(--gold-light);
  animation: sealPulse 3s ease-in-out infinite;
}
@keyframes sealPulse { 0%,100% { transform: rotate(0) scale(1);} 50% { transform: rotate(2.5deg) scale(1.05);} }

/* ============ DNA ============ */
.dna-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.dna-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px; position: relative; overflow: hidden;
  transition: transform .35s, box-shadow .35s;
}
.dna-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  transform: scaleX(0); transform-origin: left; transition: transform .4s;
}
.dna-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.dna-card:hover::before { transform: scaleX(1); }
.dna-num {
  font-family: var(--kai); font-size: 30px; font-weight: 900;
  color: rgba(160,0,24,.16); margin-bottom: 8px; letter-spacing: 2px;
}
.dna-card h3 { font-family: var(--serif); font-size: 17.5px; color: var(--primary); margin-bottom: 10px; }
.dna-card p { font-size: 13.5px; color: var(--ink-light); }

/* ============ 大事記 ============ */
.timeline { position: relative; max-width: 880px; margin: 0 auto; padding: 10px 0; }
.timeline::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0;
  width: 2px; background: linear-gradient(180deg, transparent, var(--gold), var(--primary), transparent);
  transform: translateX(-50%);
}
.tl-item { position: relative; display: flex; margin-bottom: 36px; width: 50%; }
.tl-item:nth-child(odd) { left: 0; padding-right: 48px; text-align: right; }
.tl-item:nth-child(even) { left: 50%; padding-left: 48px; }
.tl-dot {
  position: absolute; top: 8px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--primary); border: 3px solid var(--gold);
  box-shadow: 0 0 0 4px rgba(160,0,24,.15);
}
.tl-item:nth-child(odd) .tl-dot { right: -7px; }
.tl-item:nth-child(even) .tl-dot { left: -7px; }
.tl-year {
  font-family: var(--serif); font-weight: 900; font-size: 32px;
  color: transparent; -webkit-text-stroke: 1.5px var(--primary);
  line-height: 1.1; margin-bottom: 6px; letter-spacing: 2px;
}
.tl-content { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; box-shadow: var(--shadow-sm); }
.tl-content h3 { font-family: var(--serif); font-size: 17px; color: var(--primary); margin-bottom: 8px; }
.tl-content p { font-size: 13.5px; color: var(--ink-light); text-align: justify; }
.tl-item:last-child .tl-content { border-color: var(--gold); background: linear-gradient(180deg, #FFFDF8, var(--cream)); }

/* ============ 生產與工藝 ============ */
.craft-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 50px; align-items: center; position: relative; z-index: 1; }
.craft-img { position: relative; }
.craft-img img { width: 100%; border-radius: var(--radius); box-shadow: 0 16px 42px rgba(0,0,0,.5); }
.craft-img-cap {
  position: absolute; bottom: 14px; left: 14px;
  background: rgba(78,0,12,.78); color: var(--gold-light);
  font-size: 12.5px; letter-spacing: 1px; padding: 5px 16px; border-radius: 4px;
  backdrop-filter: blur(4px); border: 1px solid rgba(201,160,99,.4);
}
.craft-lead { font-family: var(--kai); font-size: 15.5px; color: #fff; margin-bottom: 28px; line-height: 2.1; }
.craft-item { margin-bottom: 26px; }
.craft-item h3 { color: var(--gold-light); font-family: var(--serif); font-size: 18px; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.craft-icon { color: var(--gold); font-size: 18px; }
.craft-item p { color: rgba(255,255,255,.78); font-size: 14px; }
.craft-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; position: relative; z-index: 1; margin-top: 56px; }
.craft-card {
  background: rgba(255,255,255,.07); border: 1px solid rgba(201,160,99,.35);
  border-radius: var(--radius); padding: 26px 22px; text-align: center;
  transition: background .35s, transform .35s;
}
.craft-card:hover { background: rgba(255,255,255,.13); transform: translateY(-5px); }
.craft-card .cc-num { font-family: var(--kai); font-size: 30px; color: var(--gold); font-weight: 900; }
.craft-card h4 { color: #fff; font-family: var(--serif); font-size: 16px; margin: 8px 0 8px; }
.craft-card p { color: rgba(255,255,255,.65); font-size: 13px; }

/* ============ 產品列表 ============ */
.product-tabs { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 44px; }
.ptab {
  padding: 10px 30px; border-radius: 4px;
  border: 1.5px solid var(--primary); background: transparent;
  color: var(--primary); font-size: 14.5px; letter-spacing: 2px;
  transition: all .3s;
}
.ptab:hover { background: rgba(160,0,24,.06); }
.ptab.active { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(160,0,24,.32); }

.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.product-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .35s, box-shadow .35s, opacity .4s;
}
.product-card:hover { transform: translateY(-7px); box-shadow: var(--shadow); }
.product-card.hide { display: none; }
.news-card.hide { display: none !important; }
.product-img { position: relative; aspect-ratio: 4/3.2; overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.product-card:hover .product-img img { transform: scale(1.06); }
.product-cat {
  position: absolute; top: 12px; right: 12px;
  background: rgba(78,0,12,.82); color: var(--gold-light);
  font-size: 11px; letter-spacing: 1px; padding: 3px 12px; border-radius: 999px;
  backdrop-filter: blur(3px);
}
.product-body { padding: 20px 22px 24px; }
.product-body h3 { font-family: var(--serif); font-size: 16.5px; margin-bottom: 8px; color: var(--ink); }
.product-body p { font-size: 13.5px; color: var(--ink-light); margin-bottom: 12px; }
.product-body .btn { padding: 8px 22px; font-size: 13px; }

/* ============ 產品詳情頁 ============ */
.page-hero {
  position: relative; padding: 60px 0 54px;
  background: linear-gradient(135deg, var(--primary-deep), var(--primary-dark) 60%, var(--primary));
  color: #fff; overflow: hidden;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23C9A063' stroke-opacity='0.14' stroke-width='1'%3E%3Cpath d='M20 40c8-10 24-10 32 0s8 14 0 18c-6 3-10 0-14-4'/%3E%3Cpath d='M70 90c8-10 24-10 32 0s8 14 0 18c-6 3-10 0-14-4'/%3E%3C/g%3E%3C/svg%3E");
}
.page-hero .container { position: relative; z-index: 1; }
.crumb { font-size: 13px; color: rgba(255,255,255,.65); margin-bottom: 14px; letter-spacing: 1px; }
.crumb a { color: var(--gold-light); }
.crumb a:hover { text-decoration: underline; }
.crumb .sep { margin: 0 8px; opacity: .5; }
.page-hero h1 { font-family: var(--kai); font-size: clamp(28px, 3.4vw, 40px); letter-spacing: 4px; font-weight: 900; }
.page-hero .ph-sub { color: rgba(255,255,255,.75); margin-top: 10px; font-size: 14.5px; letter-spacing: 1px; }

.pd-layout { display: grid; grid-template-columns: 1fr 1.25fr; gap: 54px; padding: 60px 0 30px; align-items: start; }
.pd-gallery { position: sticky; top: 100px; }
.pd-main-img {
  border: 2px solid var(--gold); border-radius: var(--radius);
  overflow: hidden; background: #fff; box-shadow: var(--shadow);
  aspect-ratio: 1/1;
}
.pd-main-img img { width: 100%; height: 100%; object-fit: cover; }
.pd-reg {
  margin-top: 18px; text-align: center;
  background: var(--primary); color: var(--gold-light);
  padding: 12px; border-radius: 8px; font-size: 13.5px; letter-spacing: 1px;
}
.pd-reg strong { display: block; font-family: var(--serif); font-size: 17px; color: #fff; letter-spacing: 2px; margin-top: 2px; }

.pd-info h2 { font-family: var(--kai); font-size: 22px; color: var(--primary); margin: 34px 0 16px; letter-spacing: 2px; position: relative; padding-left: 16px; }
.pd-info h2::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 5px; background: linear-gradient(180deg, var(--primary), var(--gold)); border-radius: 3px; }
.pd-info h2:first-child { margin-top: 0; }
.pd-info p { color: var(--ink-light); font-size: 14.5px; margin-bottom: 12px; text-align: justify; }

.pd-features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.pd-feature {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--cream); border: 1px solid var(--line);
  border-radius: 10px; padding: 16px 18px;
}
.pd-feature .pf-icon {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.pd-feature h4 { font-size: 14.5px; color: var(--ink); margin-bottom: 3px; font-family: var(--serif); }
.pd-feature p { font-size: 12.5px; color: var(--ink-light); margin: 0; }

.pd-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-sm); }
.pd-table th, .pd-table td { padding: 14px 20px; font-size: 14px; text-align: left; border-bottom: 1px solid var(--line); }
.pd-table th { background: var(--primary); color: #fff; font-family: var(--serif); letter-spacing: 2px; font-weight: 500; width: 160px; }
.pd-table tr:last-child td { border-bottom: none; }
.pd-table td { color: var(--ink-light); }

.pd-notes li { position: relative; padding-left: 22px; margin-bottom: 10px; font-size: 14px; color: var(--ink-light); }
.pd-notes li::before { content: "※"; position: absolute; left: 0; color: var(--primary); font-weight: 700; }

.pd-sale-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pd-sale { text-align: center; background: var(--cream); border: 1px solid var(--line); border-radius: 10px; padding: 22px 14px; }
.pd-sale .ps-icon { font-size: 30px; margin-bottom: 8px; }
.pd-sale h4 { font-family: var(--serif); font-size: 15px; color: var(--primary); margin-bottom: 5px; }
.pd-sale p { font-size: 12.5px; color: var(--ink-light); margin: 0; }

.pd-ingredients { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pd-ingredient { display: flex; align-items: center; gap: 12px; background: var(--cream); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
.pd-ingredient .pi-dot { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--gold)); flex: none; }
.pd-ingredient strong { font-family: var(--serif); font-size: 14.5px; color: var(--ink); white-space: nowrap; }
.pd-ingredient span { font-size: 12.5px; color: var(--ink-light); }

/* 相關產品 */
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.related-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .3s, box-shadow .3s; }
.related-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-sm); }
.related-card .rc-img { aspect-ratio: 4/3; overflow: hidden; }
.related-card .rc-img img { width: 100%; height: 100%; object-fit: cover; }
.related-card .rc-body { padding: 16px 18px; }
.related-card h4 { font-family: var(--serif); font-size: 15px; color: var(--ink); margin-bottom: 4px; }
.related-card p { font-size: 12.5px; color: var(--ink-light); }

/* ============ FAQ ============ */
.faq-wrap { max-width: 880px; margin: 0 auto; }
.faq-group { margin-bottom: 40px; }
.faq-group-title {
  font-family: var(--kai); font-size: 20px; color: var(--primary);
  padding-left: 18px; border-left: 4px solid var(--gold);
  margin-bottom: 16px; letter-spacing: 2px;
}
.faq-item { margin-bottom: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 17px 22px; background: #fff; border: none;
  font-size: 14.5px; color: var(--ink); text-align: left; transition: background .3s;
}
.faq-q:hover { background: var(--cream); }
.faq-icon { font-size: 20px; color: var(--primary); transition: transform .3s; font-weight: 400; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .4s ease; }
.faq-a p { padding: 0 22px 18px; font-size: 14px; color: var(--ink-light); }
.faq-item.open .faq-a { max-height: 320px; }
.faq-item.open .faq-q { background: var(--cream); color: var(--primary); font-weight: 500; }

/* ============ 聯絡我們 ============ */
.contact-grid { display: grid; grid-template-columns: 0.82fr 1.35fr; gap: 46px; align-items: start; }
.contact-info-card { background: var(--primary); color: #fff; border-radius: var(--radius); padding: 34px 30px; position: relative; overflow: hidden; }
.contact-info-card::after {
  content: ""; position: absolute; right: -40px; bottom: -40px; width: 180px; height: 180px;
  border: 2px solid rgba(201,160,99,.35); border-radius: 50%;
}
.contact-info-card h3 { font-family: var(--kai); font-size: 24px; margin-bottom: 20px; letter-spacing: 3px; }
.ci-row { display: flex; gap: 16px; margin-bottom: 22px; align-items: flex-start; }
.ci-row .ci-icon {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.14); border: 1px solid rgba(201,160,99,.5);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.ci-row strong { display: block; font-size: 13px; color: var(--gold-light); letter-spacing: 1px; margin-bottom: 3px; }
.ci-row span { font-size: 14.5px; color: rgba(255,255,255,.9); }
.contact-form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 40px 36px; box-shadow: var(--shadow-sm); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13.5px; color: var(--ink); margin-bottom: 8px; letter-spacing: 1px; }
.form-group label b { color: var(--primary); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 16px; border: 1.5px solid var(--line);
  border-radius: 8px; font-size: 14px; font-family: inherit; color: var(--ink);
  background: var(--cream); transition: border-color .3s, background .3s; outline: none;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--primary); background: #fff; }
.form-group textarea { resize: vertical; min-height: 130px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* ============ 頁腳 ============ */
.footer { background: var(--primary-deep); color: rgba(255,255,255,.8); }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.5fr; gap: 40px; padding: 62px 0 46px; }
.footer-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-logo img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.footer-logo span { font-family: var(--kai); font-weight: 900; font-size: 23px; color: #fff; letter-spacing: 4px; }
.footer-brand p { font-size: 13px; color: rgba(255,255,255,.6); line-height: 2.1; }
.footer-col h4 { color: var(--gold-light); font-size: 15px; letter-spacing: 3px; margin-bottom: 16px; font-family: var(--serif); }
.footer-col ul li { margin-bottom: 9px; }
.footer-col ul li a { font-size: 13.5px; color: rgba(255,255,255,.7); transition: color .3s, padding-left .3s; }
.footer-col ul li a:hover { color: var(--gold-light); padding-left: 5px; }
.footer-contact li { font-size: 13.5px; color: rgba(255,255,255,.7); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; text-align: center; }
.footer-bottom p { font-size: 12.5px; color: rgba(255,255,255,.5); }

/* ============ 回到頂部 ============ */
/* z-index 85：低于抽屉遮罩(90)、低于 header(100)，菜单展开时会被遮罩盖住，视觉才干净 */
.back-top {
  position: fixed; right: 26px; bottom: 30px; z-index: 85;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 20px;
  border: 2px solid var(--gold); box-shadow: 0 6px 20px rgba(160,0,24,.4);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: all .35s;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { background: var(--primary-dark); }

/* ============ 立即購買按鈕 ============ */
.btn-buy {
  display: block; width: 100%; margin-top: 18px;
  padding: 14px 20px; border: none; border-radius: 8px;
  background: linear-gradient(135deg, #07C160, #06AD56);
  color: #fff; font-size: 16px; font-weight: 700; letter-spacing: 3px;
  box-shadow: 0 8px 20px rgba(7,193,96,.35);
  transition: transform .3s, box-shadow .3s, filter .3s;
}
.btn-buy:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 12px 26px rgba(7,193,96,.45); }
.btn-buy .buy-icon { margin-right: 6px; }

/* ============ 微信二维码弹窗 ============ */
.wechat-modal {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  background: rgba(30,10,10,.6); backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s;
  padding: 20px;
}
.wechat-modal.open { opacity: 1; visibility: visible; }
.wechat-box {
  position: relative; width: min(360px, 92vw);
  background: #fff; border-radius: 16px; padding: 34px 30px 30px;
  text-align: center; transform: translateY(24px) scale(.96);
  transition: transform .35s;
  border: 2px solid var(--gold);
}
.wechat-modal.open .wechat-box { transform: translateY(0) scale(1); }
.wechat-close {
  position: absolute; top: 10px; right: 12px;
  width: 32px; height: 32px; border: none; border-radius: 50%;
  background: var(--cream); color: var(--ink); font-size: 18px;
  transition: background .3s, color .3s;
}
.wechat-close:hover { background: var(--primary); color: #fff; }
.wechat-box h3 { font-family: var(--kai); font-size: 21px; color: var(--primary); letter-spacing: 3px; margin-bottom: 6px; }
.wechat-box .wechat-sub { font-size: 13px; color: var(--ink-light); margin-bottom: 18px; }
.wechat-qr-wrap {
  width: 210px; height: 210px; margin: 0 auto 16px;
  border: 2px solid var(--line); border-radius: 12px; overflow: hidden;
  padding: 8px; background: #fff;
}
.wechat-qr-wrap img { width: 100%; height: 100%; object-fit: contain; }
.wechat-box .wechat-tip { font-size: 13.5px; color: var(--ink); margin-bottom: 4px; }
.wechat-box .wechat-tip b { color: var(--primary); }
.wechat-box .wechat-hint { font-size: 12px; color: var(--ink-light); margin-top: 10px; }

/* ============ 滾動顯現 ============ */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============ 響應式 ============ */
@media (max-width: 1024px) {
  .featured-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .dna-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item { border-right: none; }
  .story-grid, .craft-grid { grid-template-columns: 1fr; gap: 36px; }
  .story-band-grid { grid-template-columns: 1fr; }
  .story-band-img { min-height: 300px; }
  .story-band-text { padding: 50px 6%; }
  .pd-layout { grid-template-columns: 1fr; }
  .pd-gallery { position: static; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .section { padding: 66px 0; }
  .topbar-contact { display: none; }
  /* 抽屉菜单：用 clip-path 做「从左揭开」的滑入效果。
     关键点：元素位置恒定在 right:0（完全在视口内），只靠裁剪控制可见性 ——
     既不会把文档撑宽（right:-100% 会让 390px 视口变成 780px），
     也不会破坏 header 的 sticky（overflow-x:hidden/clip 都会让吸顶失效）。 */
  .nav {
    position: fixed; top: 0; right: 0; width: 250px; height: 100vh;
    background: #fff; flex-direction: column; padding: 92px 30px 30px;
    box-shadow: -8px 0 30px rgba(0,0,0,.14);
    clip-path: inset(0 0 0 100%);
    visibility: hidden;
    transition: clip-path .4s ease, visibility .4s ease;
    z-index: 200;
  }
  .nav.open { clip-path: inset(0 0 0 0); visibility: visible; }
  /* 手机端菜单项：文字居中；隐掉桌面端那条左起的下划线装饰
     （居中后它和分隔线会视觉打架，当前项已用深红色文字区分） */
  .nav-link { font-size: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); text-align: center; }
  .nav-link::after { display: none; }
  .nav-toggle { display: flex; z-index: 210; }
  .featured-grid, .news-grid, .dna-grid, .product-grid, .related-grid, .craft-cards, .pd-features, .pd-ingredients, .pd-sale-points, .form-row { grid-template-columns: 1fr; }
  /* Hero 在手机竖屏下的重新排版：
     1) 降低高度，避免 PC 横幅图被 cover 放大近 3 倍只露出中间一条
     2) 遮罩改为「上浅下深」的竖向渐变 —— 文字移到底部后正好落在深色区，
        图片上部依然可见，也不再和海报图里自带的文字叠在一起
     3) 文字尺寸适配窄屏 */
  .hero { height: 58vh; min-height: 400px; }
  .hero-overlay {
    background: linear-gradient(to bottom,
      rgba(40,6,12,.30) 0%,
      rgba(40,6,12,.58) 46%,
      rgba(40,6,12,.93) 100%);
  }
  .hero-content { top: auto; bottom: 0; transform: none; padding: 0 7% 54px; max-width: none; }
  /* 手机端去掉 tag 两侧的金色短横线（窄屏下显得多余、和背景横纹打架） */
  .hero-tag { font-size: 11.5px; letter-spacing: 2px; margin-bottom: 10px; gap: 0; }
  .hero-tag::before, .hero-tag::after { display: none; }
  .hero-title { font-size: clamp(23px, 6.2vw, 30px); letter-spacing: 2px; margin-bottom: 10px; }
  .hero-desc { font-size: 13px; line-height: 1.75; margin-bottom: 20px; }
  .hero-actions { gap: 10px; }
  .hero-actions .btn { padding: 11px 24px; font-size: 13.5px; }
  .hero-arrow { display: none; }
  .timeline::before { left: 10px; }
  .tl-item, .tl-item:nth-child(odd), .tl-item:nth-child(even) {
    width: 100%; left: 0; padding: 0 0 0 46px; text-align: left;
  }
  .tl-item:nth-child(odd) .tl-dot, .tl-item:nth-child(even) .tl-dot { left: 3px; right: auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .story-seal { right: 8px; top: -14px; width: 62px; height: 62px; font-size: 12px; }
  .pd-table th { width: 110px; }
}

/* ============ 品牌简介：左右排版 + 三字解读横向拉满 ============ */
.heritage-story-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.heritage-story-img { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.heritage-story-img picture img { width: 100%; display: block; }
.three-char-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
.three-char-card {
  background: linear-gradient(160deg, #FFFDF8, #F6EFE3); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px 26px; text-align: center; position: relative; overflow: hidden;
}
.three-char-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
}
.three-char-card .tc-char {
  width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%;
  background: var(--primary); color: var(--gold-light);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--kai); font-size: 26px; font-weight: 900;
  box-shadow: 0 6px 16px rgba(160,0,24,.3);
}
.three-char-card h4 { font-family: var(--serif); font-size: 17px; color: var(--primary); margin-bottom: 8px; letter-spacing: 1px; }
.three-char-card p { font-size: 13.5px; color: var(--ink-light); }

/* ============ 岐黄厚壤 / 百年堂训：平衡排版 ============ */
.env-lead {
  text-align: center; max-width: 760px; margin: 0 auto 36px;
  font-family: var(--kai); font-size: 17px; color: var(--primary-dark); letter-spacing: 1px;
}
.env-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; margin-bottom: 30px; }
.env-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; position: relative; overflow: hidden;
}
.env-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--primary), var(--gold));
}
.env-card h3 { font-family: var(--serif); font-size: 18px; color: var(--primary); margin-bottom: 10px; }
.env-card p { font-size: 14px; color: var(--ink-light); text-align: justify; }
.env-banner { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-top: 24px; }
.env-banner picture img { width: 100%; max-height: 260px; object-fit: cover; display: block; }

.tx-lead { text-align: center; max-width: 720px; margin: 0 auto 34px; font-family: var(--kai); font-size: 17px; color: var(--primary-dark); }
.tx-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; margin-bottom: 28px; }
.tx-card {
  background: linear-gradient(160deg, #FFFDF8, #F6EFE3); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 36px 32px; border-top: 4px solid var(--primary);
}
.tx-card h3 { font-size: 19px; }
.tx-card p { font-size: 14.5px; line-height: 2; }
.tx-card h3 { font-family: var(--serif); font-size: 17px; color: var(--primary); margin-bottom: 10px; }
.tx-card p { font-size: 14px; color: var(--ink-light); text-align: justify; }
.tx-remark {
  text-align: center; max-width: 100%; margin: 26px 0 0; font-size: 13.5px;
  color: #8A5A1E; background: #F6EFE3; border-radius: 10px; padding: 18px 26px;
}

/* ============ 名医良方：logo+简介 / 名医卡片 / 流派卡片 ============ */
.mingyi-intro-wrap { display: grid; grid-template-columns: 230px 1fr; gap: 40px; align-items: center; }
.mingyi-intro-logo {
  border: 2px solid var(--gold); border-radius: var(--radius); overflow: hidden;
  background: #fff; padding: 18px; box-shadow: var(--shadow); text-align: center;
}
.mingyi-intro-logo picture img { width: 100%; object-fit: contain; }
.expert-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .35s, box-shadow .35s;
}
.expert-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.expert-card .ec-img { aspect-ratio: 4/3.4; overflow: hidden; background: var(--cream); }
.expert-card .ec-img picture img { width: 100%; height: 100%; object-fit: cover; }
.expert-card .ec-body { padding: 18px 20px 22px; text-align: center; }
.expert-card .ec-body h3 { font-family: var(--serif); font-size: 17px; color: var(--ink); }
.expert-card .ec-title { font-size: 12.5px; color: var(--gold); margin: 4px 0 2px; }
.expert-card .ec-spec { font-size: 12px; color: #8A5A1E; margin-bottom: 8px; }
.expert-card .ec-body p { font-size: 13px; color: var(--ink-light); text-align: justify; }

.school-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: block; transition: transform .35s, box-shadow .35s;
}
.school-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.school-card .sc-img { aspect-ratio: 16/9; overflow: hidden; }
.school-card .sc-img picture img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.school-card:hover .sc-img picture img { transform: scale(1.06); }
.school-card .sc-body { padding: 20px 22px 24px; }
.school-card .sc-body h3 { font-family: var(--serif); font-size: 17px; color: var(--ink); }
.school-card .sc-body .sc-region { font-size: 12px; color: var(--gold); margin: 4px 0 8px; }
.school-card .sc-body p { font-size: 13.5px; color: var(--ink-light); }
.school-card .sc-more { color: var(--primary); font-size: 13px; margin-top: 10px; display: inline-block; }

/* ============ 流派详情页 ============ */
.school-hero {
  background: linear-gradient(135deg, var(--primary-deep), var(--primary)); color: #fff;
  padding: 54px 0 48px; position: relative; overflow: hidden;
}
.school-hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23C9A063' stroke-opacity='0.14' stroke-width='1'%3E%3Cpath d='M20 40c8-10 24-10 32 0s8 14 0 18c-6 3-10 0-14-4'/%3E%3Cpath d='M70 90c8-10 24-10 32 0s8 14 0 18c-6 3-10 0-14-4'/%3E%3C/g%3E%3C/svg%3E");
}
.school-hero .container { position: relative; z-index: 1; }
.school-hero h1 { font-family: var(--kai); font-size: clamp(26px, 3vw, 36px); letter-spacing: 3px; }
.school-hero .sh-region { color: var(--gold-light); margin-top: 8px; font-size: 14px; }
.school-hero .sh-desc { color: rgba(255,255,255,.85); margin-top: 14px; max-width: 780px; font-size: 14.5px; line-height: 1.9; }

.school-main { display: grid; grid-template-columns: 1fr 1.35fr; gap: 40px; align-items: start; }
.school-img { border: 2px solid var(--gold); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.school-img picture img { width: 100%; }
.school-tree-title, .school-gallery-title, .school-books-title {
  font-family: var(--kai); font-size: 21px; color: var(--primary); letter-spacing: 2px;
  margin-bottom: 16px; padding-left: 14px; border-left: 4px solid var(--gold);
}
.school-tree { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.school-tree picture img { width: 100%; display: block; }
.school-content { display: grid; grid-template-columns: 1fr 1.4fr; gap: 36px; align-items: start; }
.school-gallery-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}
.school-gallery-item { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.school-gallery-item .gi-media { aspect-ratio: 4/3; overflow: hidden; background: #F6EFE3; }
.school-gallery-item .gi-media img { width: 100%; height: 100%; object-fit: cover; }
.school-gallery-item .gi-media video { width: 100%; height: 100%; object-fit: contain; }
/* 视频位：未设封面时用深色底，避免露出空白框（contain 留的边也靠它填充） */
.school-gallery-item .gi-media-video { background: #2A1216; position: relative; }
/* 视频播放失败时的兜底提示（编码不支持 / 内置浏览器受限） */
.video-fallback {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: rgba(42, 18, 22, .92); color: #E8D5A8;
  padding: 9px 12px; font-size: 12.5px; line-height: 1.6; text-align: center;
}
.video-fallback a { color: #E8D5A8; text-decoration: underline; margin-left: 6px; white-space: nowrap; }
.school-gallery-item .gi-desc { padding: 10px 14px; font-size: 12.5px; color: var(--ink-light); }
.school-book-list { display: flex; flex-direction: column; gap: 14px; }
.school-book {
  display: flex; gap: 16px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; padding: 14px; align-items: flex-start; transition: box-shadow .3s, transform .3s;
}
.school-book:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.school-book .sb-cover { flex: 0 0 84px; }
.school-book .sb-cover img { width: 84px; height: 118px; object-fit: cover; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.school-book .sb-info h4 { font-family: var(--serif); font-size: 15.5px; color: var(--ink); margin-bottom: 6px; }
.school-book .sb-info p { font-size: 13px; color: var(--ink-light); }
.school-book .sb-info .sb-link { color: var(--primary); font-size: 12.5px; margin-top: 6px; display: inline-block; }

/* ============ 非遗专家顾问：半身照大图 ============ */
.advisor-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-align: center; transition: transform .35s, box-shadow .35s;
}
.advisor-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.advisor-card .ac-img { aspect-ratio: 4/3.2; overflow: hidden; background: var(--cream); }
.advisor-card .ac-img picture img { width: 100%; height: 100%; object-fit: cover; }
.advisor-card .ac-body { padding: 18px 20px 22px; }
.advisor-card .ac-body h3 { font-family: var(--serif); font-size: 17px; color: var(--ink); }
.advisor-card .ac-body .ac-title { font-size: 12.5px; color: var(--gold); margin: 4px 0 8px; }
.advisor-card .ac-body p { font-size: 13px; color: var(--ink-light); text-align: justify; }

@media (max-width: 1024px) {
  .heritage-story-wrap, .mingyi-intro-wrap { grid-template-columns: 1fr; }
  .school-main, .school-content { grid-template-columns: 1fr; }
  .env-grid, .tx-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .three-char-strip { grid-template-columns: 1fr; }
  .school-gallery-grid { grid-template-columns: 1fr; }
}

/* ============ 传承图谱：时间轴 ============ */
.genealogy-timeline { position: relative; max-width: 860px; margin: 0 auto; padding: 10px 0; }
.genealogy-timeline::before {
  content: ""; position: absolute; left: 40px; top: 10px; bottom: 10px;
  width: 2px; background: linear-gradient(180deg, var(--gold), var(--primary), transparent);
}
.genealogy-item { position: relative; display: flex; gap: 0; margin-bottom: 26px; padding-left: 84px; }
.genealogy-avatar {
  position: absolute; left: 0; top: 0;
  width: 80px; height: 80px; border-radius: 50%; overflow: hidden;
  border: 3px solid var(--gold); background: #fff;
  box-shadow: 0 6px 16px rgba(160,0,24,.18);
  z-index: 2;
}
.genealogy-avatar img { width: 100%; height: 100%; object-fit: cover; }
.genealogy-line { position: absolute; left: 40px; top: 0; bottom: 0; width: 2px; }
.genealogy-dot {
  position: absolute; top: 36px; left: -7px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--primary); border: 3px solid var(--gold);
}
.genealogy-body {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 20px 24px; box-shadow: 0 4px 14px rgba(80,12,22,.06); flex: 1;
}
.genealogy-gen { font-size: 12px; color: var(--gold); letter-spacing: 2px; margin-bottom: 4px; }
.genealogy-body h4 { font-family: var(--serif); font-size: 17px; color: var(--primary); margin-bottom: 8px; }
.genealogy-body p { font-size: 13.5px; color: var(--ink-light); text-align: justify; }
.genealogy-more {
  margin-top: 12px; border: none; background: var(--primary); color: #fff;
  font-size: 12.5px; padding: 6px 18px; border-radius: 999px; cursor: pointer;
  transition: background .25s;
}
.genealogy-more:hover { background: var(--primary-dark); }

/* ============ 传承人详细介绍气泡 ============ */
.gdetail-modal {
  position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center;
  background: rgba(30,10,10,.6); backdrop-filter: blur(4px); padding: 20px;
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.gdetail-modal.open { opacity: 1; visibility: visible; }
.gdetail-box {
  position: relative; width: min(440px, 92vw); background: #fff; border-radius: 16px;
  padding: 34px 32px 30px; text-align: center; border: 2px solid var(--gold);
  transform: translateY(20px); transition: transform .3s;
}
.gdetail-modal.open .gdetail-box { transform: translateY(0); }
.gdetail-close {
  position: absolute; top: 10px; right: 12px; width: 32px; height: 32px;
  border: none; border-radius: 50%; background: var(--cream); color: var(--ink);
  font-size: 18px; cursor: pointer;
}
.gdetail-close:hover { background: var(--primary); color: #fff; }
.gdetail-avatar { width: 130px; height: 130px; margin: 0 auto 16px; border-radius: 50%; overflow: hidden; border: 3px solid var(--gold); }
.gdetail-avatar img { width: 100%; height: 100%; object-fit: cover; }
.gdetail-box h3 { font-family: var(--kai); font-size: 22px; color: var(--primary); letter-spacing: 2px; margin-bottom: 12px; }
.gdetail-box p { font-size: 14px; color: var(--ink-light); text-align: justify; line-height: 1.9; }

/* ============ 图片放大查看 ============ */
.lightbox {
  position: fixed; inset: 0; z-index: 350; display: flex; align-items: center; justify-content: center;
  background: rgba(20,8,8,.88); padding: 30px;
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox-close {
  position: absolute; top: 18px; right: 22px; width: 44px; height: 44px;
  border: 2px solid rgba(255,255,255,.5); border-radius: 50%; background: rgba(255,255,255,.1);
  color: #fff; font-size: 24px; cursor: pointer;
}
.lightbox-close:hover { background: var(--primary); border-color: var(--primary); }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }

/* ============ 著述：一排2个 ============ */
.school-book-grid .school-book { height: 100%; }
.school-book-grid .sb-cover { flex: 0 0 100px; }
.school-book-grid .sb-cover img { width: 100px; height: 140px; object-fit: cover; }

@media (max-width: 768px) {
  .genealogy-timeline::before { left: 26px; }
  .genealogy-item { padding-left: 62px; }
  .genealogy-avatar { width: 56px; height: 56px; }
  .genealogy-line { left: 26px; }
  .school-book-grid { grid-template-columns: 1fr !important; }
}

/* ============ 流派详情：左传承图谱 + 右名医风采/著述 双栏 ============ */
.school-side-layout {
  display: grid; grid-template-columns: 1fr 1.45fr; gap: 44px;
  margin-top: 56px; align-items: start;
}
.school-side-left, .school-side-right { min-width: 0; }
.school-side-right { display: flex; flex-direction: column; gap: 46px; }
.school-side-left .genealogy-timeline { max-width: 100%; margin: 0; }
.school-side-right .school-gallery-grid { grid-template-columns: repeat(2, 1fr); }
.school-side-right .school-book-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.school-side-left .school-tree-title, .school-side-right .school-gallery-title, .school-side-right .school-books-title {
  margin-bottom: 18px;
}
@media (max-width: 1024px) {
  .school-side-layout { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 768px) {
  .school-side-right .school-gallery-grid { grid-template-columns: 1fr; }
  .school-side-right .school-book-grid { grid-template-columns: 1fr; }
}

/* ============ 名医/专家顾问：一行 4 个 ============ */
.expert-grid, .advisor-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
@media (max-width: 1100px) {
  .expert-grid, .advisor-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .expert-grid, .advisor-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .expert-grid, .advisor-grid { grid-template-columns: 1fr; }
}

/* ============ 页面横幅：上传背景图时加深色遮罩保证文字可读 ============ */
.page-hero.has-bg::before {
  content: ""; position: absolute; inset: 0;
  background: rgba(45, 8, 14, .48);
}
.page-hero.has-bg::after { opacity: .55; }

/* ============ 浅色背景上的新闻卡片（相关动态/浅色区块） ============ */
.news-light .news-card {
  background: #fff;
  border: 1px solid var(--line);
}
.news-light .news-card:hover { background: #fff; }
.news-light .news-body h3 { color: var(--ink); }
.news-light .news-body p { color: var(--ink-light); }
.news-light .news-date { color: #8a7a6d; }
.news-light .news-cat { background: var(--gold); color: var(--primary-deep); }

/* ============ 非遗工艺卡片：不足 3 个时整体居中 ============ */
.craft-cards {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 20px; position: relative; z-index: 1; margin-top: 56px;
}
.craft-card { flex: 0 1 calc((100% - 40px) / 3); min-width: 250px; }
@media (max-width: 768px) {
  .craft-card { flex-basis: 100%; min-width: 0; }
}
