/* ==========================================================
   山茶集 — 样式表
   新中式配色：米白底 / 茶绿 / 赭石
   ========================================================== */

/* ---------- 1. 颜色变量 ---------- */
:root {
  --cream:        #F5EFE3;   /* 米白底 */
  --cream-2:      #EAE0CC;   /* 深米白 */
  --paper:        #FBF7EE;   /* 卡片底 */
  --paper-2:      #F9F2E1;
  --tea:          #4A6A4F;   /* 茶绿主色 */
  --tea-dark:     #2F4533;   /* 茶绿深 */
  --tea-light:    #7A967E;   /* 茶绿浅 */
  --ocher:        #B85C38;   /* 赭石 */
  --ocher-dark:   #8A4429;   /* 赭石深 */
  --ocher-light:  #E6B89A;   /* 赭石浅 */
  --ink:          #2A2826;   /* 主文字 */
  --ink-soft:     #6B6660;   /* 次文字 */
  --line:         #D9CFB8;   /* 分割线 */
  --danger:       #C0392B;   /* 错误红 */
  --success:      #4A6A4F;   /* 成功提示(用茶绿) */
  --shadow-sm:    0 2px 8px rgba(74, 106, 79, 0.08);
  --shadow-md:    0 8px 24px rgba(74, 106, 79, 0.10);
  --shadow-lg:    0 16px 40px rgba(74, 106, 79, 0.14);

  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 20px;

  --max-width: 1200px;
  --header-h:  72px;

  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-sans:  -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- 2. Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--tea); outline-offset: 2px; }

/* ---------- 3. 通用容器 / 区块 ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
  position: relative;
}

.section-head {
  text-align: center;
  margin-bottom: 56px;
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--ocher);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 600;
  color: var(--tea-dark);
  letter-spacing: 4px;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 15px;
  color: var(--ink-soft);
  margin-bottom: 24px;
}

.section-divider {
  display: block;
  width: 48px;
  height: 2px;
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, var(--ocher), transparent);
}

/* ---------- 4. 顶部导航 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: rgba(245, 239, 227, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  z-index: 100;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(245, 239, 227, 0.95);
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.nav-wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--tea-dark);
  letter-spacing: 2px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--tea);
  color: var(--cream);
  font-size: 18px;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-link {
  position: relative;
  font-size: 15px;
  color: var(--ink);
  padding: 6px 0;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--ocher);
  transition: width 0.25s ease, left 0.25s ease;
}

.nav-link:hover { color: var(--ocher); }
.nav-link:hover::after { width: 100%; left: 0; }

/* 汉堡菜单按钮 - 默认在窄屏显示 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  gap: 5px;
  border-radius: var(--radius-sm);
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--tea-dark);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.is-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- 5. Hero 首屏 ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(ellipse at top left, rgba(74, 106, 79, 0.10), transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(184, 92, 56, 0.10), transparent 60%),
    linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%);
  padding: calc(var(--header-h) + 40px) 24px 80px;
  overflow: hidden;
}

.hero-decor {
  position: absolute;
  font-size: 120px;
  opacity: 0.10;
  pointer-events: none;
  user-select: none;
}

.hero-decor--leaf {
  top: 12%;
  left: 6%;
  transform: rotate(-18deg);
}

.hero-decor--cup {
  bottom: 10%;
  right: 8%;
  transform: rotate(15deg);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.hero-eyebrow {
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 6px;
  color: var(--ocher);
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 96px;
  font-weight: 600;
  color: var(--tea-dark);
  letter-spacing: 24px;
  text-indent: 24px;     /* 抵消字间距造成的左偏 */
  margin-bottom: 16px;
  line-height: 1.1;
}

.hero-slogan {
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--tea);
  letter-spacing: 8px;
  text-indent: 8px;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.9;
  margin-bottom: 48px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  padding: 14px 32px;
  font-size: 15px;
  letter-spacing: 2px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  transition: all 0.25s ease;
  cursor: pointer;
}

.btn--primary {
  background: var(--tea);
  color: var(--cream);
  border-color: var(--tea);
}
.btn--primary:hover {
  background: var(--tea-dark);
  border-color: var(--tea-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--ghost {
  background: transparent;
  color: var(--tea-dark);
  border-color: var(--tea);
}
.btn--ghost:hover {
  background: var(--tea);
  color: var(--cream);
  transform: translateY(-2px);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--ink-soft);
}

.hero-scroll-line {
  display: block;
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, var(--ocher), transparent);
  animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- 6. 品牌故事 ---------- */
.section--story { background: var(--paper); }

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

.story-media {
  position: relative;
  height: 420px;
}

.story-media-card {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  color: #fff;
}

.story-media-card--1 {
  width: 60%;
  height: 70%;
  top: 0;
  left: 0;
  background: linear-gradient(135deg, #5A7A5F 0%, #3A5A40 100%);
}
.story-media-card--2 {
  width: 50%;
  height: 50%;
  bottom: 0;
  right: 6%;
  background: linear-gradient(135deg, #B85C38 0%, #8A4429 100%);
}
.story-media-card--3 {
  width: 36%;
  height: 36%;
  top: 8%;
  right: 0;
  background: linear-gradient(135deg, #E6B89A 0%, #D49A7A 100%);
  color: var(--tea-dark);
}

.story-text p {
  font-size: 16px;
  line-height: 1.95;
  color: var(--ink);
  margin-bottom: 20px;
  text-align: justify;
}

.story-text p:first-child::first-letter {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 600;
  color: var(--ocher);
  float: left;
  line-height: 1;
  margin: 6px 12px 0 0;
}

/* ---------- 7. 菜单 ---------- */
.section--menu { background: var(--cream); }

.tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.tab {
  padding: 12px 28px;
  font-size: 15px;
  letter-spacing: 2px;
  color: var(--ink-soft);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: transparent;
  transition: all 0.25s ease;
}

.tab:hover {
  color: var(--tea-dark);
  border-color: var(--tea-light);
}

.tab.is-active {
  background: var(--tea);
  color: var(--cream);
  border-color: var(--tea);
}

.tab-panels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.tab-panels[hidden] { display: none; }

.product-card {
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.product-cover {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.product-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.25), transparent 60%);
  pointer-events: none;
}

.product-cover--tea   { background: linear-gradient(135deg, #5A7A5F 0%, #3A5A40 100%); }
.product-cover--spring{ background: linear-gradient(135deg, #F4B6A8 0%, #E08A7A 100%); }
.product-cover--summer{ background: linear-gradient(135deg, #F6D785 0%, #E0A85B 100%); }
.product-cover--autumn{ background: linear-gradient(135deg, #D17B5C 0%, #A0522D 100%); }
.product-cover--winter{ background: linear-gradient(135deg, #B9C9D6 0%, #7A95A8 100%); }
.product-cover--snack { background: linear-gradient(135deg, #C8A878 0%, #8B6F47 100%); }

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

.product-name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--tea-dark);
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.product-desc {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}

.product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.product-price {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--ocher);
  font-weight: 600;
}

.product-price::before {
  content: "¥";
  font-size: 14px;
  margin-right: 2px;
}

.product-tag {
  font-size: 12px;
  color: var(--tea);
  background: rgba(74, 106, 79, 0.10);
  padding: 4px 10px;
  border-radius: 999px;
}

/* ---------- 8. 门店 ---------- */
.section--stores { background: var(--paper); }

.filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 10px 24px;
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--ink-soft);
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  transition: all 0.25s ease;
}

.filter-btn:hover {
  color: var(--tea-dark);
  border-color: var(--tea-light);
}

.filter-btn.is-active {
  background: var(--ocher);
  color: var(--cream);
  border-color: var(--ocher);
}

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

.store-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 24px 24px 22px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--tea);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.store-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.store-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.store-city {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--ocher);
  background: rgba(184, 92, 56, 0.10);
  padding: 3px 10px;
  border-radius: 999px;
}

.store-name {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--tea-dark);
  letter-spacing: 1px;
}

.store-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-soft);
}

.store-info-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}

.store-info-icon {
  flex-shrink: 0;
  width: 18px;
  text-align: center;
  color: var(--tea);
}

.store-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 0;
  color: var(--ink-soft);
  font-size: 14px;
}

/* ---------- 9. 表单 ---------- */
.section--contact { background: var(--cream); }

.contact-form {
  max-width: 720px;
  margin: 0 auto;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: var(--shadow-md);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 4px;
}

.form-field {
  margin-bottom: 20px;
}

.form-field label {
  display: block;
  font-size: 14px;
  color: var(--tea-dark);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.req { color: var(--ocher); margin-left: 2px; }

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--ink);
  background: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--tea);
  box-shadow: 0 0 0 3px rgba(74, 106, 79, 0.12);
}

.contact-form input.has-error,
.contact-form select.has-error,
.contact-form textarea.has-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.10);
}

.contact-form textarea {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
}

.form-error {
  display: none;
  margin-top: 6px;
  font-size: 13px;
  color: var(--danger);
  min-height: 18px;
}

.form-error.is-show { display: block; }

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

/* ---------- 10. 页脚 ---------- */
.site-footer {
  background: var(--tea-dark);
  color: rgba(245, 239, 227, 0.85);
  padding: 48px 0 32px;
  text-align: center;
}

.footer-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--cream);
  letter-spacing: 2px;
}

.footer-brand .brand-mark {
  background: var(--ocher);
  color: var(--cream);
}

.footer-brand-name { font-weight: 600; }

.footer-text {
  font-family: var(--font-serif);
  font-size: 15px;
  color: rgba(245, 239, 227, 0.7);
  letter-spacing: 3px;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(245, 239, 227, 0.6);
}

.footer-sep { opacity: 0.5; }

/* ---------- 11. Toast ---------- */
.toast-stack {
  position: fixed;
  top: calc(var(--header-h) + 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--tea-dark);
  color: var(--cream);
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 1px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.is-show {
  opacity: 1;
  transform: translateY(0);
}

.toast--success { background: var(--tea); }
.toast--error   { background: var(--danger); }

/* ---------- 12. 响应式 (max-width: 768px) ---------- */
@media (max-width: 768px) {
  .container { padding: 0 16px; }

  .section { padding: 64px 0; }
  .section-head { margin-bottom: 40px; }
  .section-title { font-size: 28px; letter-spacing: 3px; }

  /* 汉堡菜单 */
  .nav-toggle { display: flex; }
  .primary-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--cream);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 16px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-110%);
    transition: transform 0.3s ease;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .primary-nav.is-open {
    transform: translateY(0);
  }
  .nav-link {
    padding: 14px 24px;
    font-size: 16px;
    text-align: center;
  }
  .nav-link::after { display: none; }

  /* Hero */
  .hero { padding: calc(var(--header-h) + 24px) 20px 60px; }
  .hero-title { font-size: 56px; letter-spacing: 12px; text-indent: 12px; }
  .hero-slogan { font-size: 20px; letter-spacing: 4px; }
  .hero-sub { font-size: 14px; margin-bottom: 36px; }
  .hero-decor { font-size: 72px; opacity: 0.08; }
  .hero-decor--leaf { top: 6%; left: -4%; }
  .hero-decor--cup { bottom: 6%; right: -4%; }

  .btn { min-width: 140px; padding: 12px 24px; font-size: 14px; }

  /* 故事 */
  .story-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .story-media { height: 240px; }
  .story-media-card { font-size: 48px; }

  /* 菜单 - 单列 */
  .tab-panels { grid-template-columns: 1fr; gap: 16px; }
  .tab { padding: 10px 20px; font-size: 14px; }

  /* 门店 - 单列 */
  .store-grid { grid-template-columns: 1fr; }
  .filter-btn { padding: 8px 16px; font-size: 13px; }

  /* 表单 - 单列 */
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .contact-form { padding: 28px 20px; }
  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; }
}

/* ---------- 13. 更小屏 ---------- */
@media (max-width: 420px) {
  .hero-title { font-size: 44px; letter-spacing: 8px; text-indent: 8px; }
  .hero-slogan { font-size: 17px; }
  .section-title { font-size: 24px; }
}
