/* 苹果果园自然风 —— 米白 + 苹果红 + 叶绿 */

:root {
  --bg: #faf6ef;
  --surface: #ffffff;
  --ink: #3e2f23;
  --muted: #8a7a6b;
  --red: #b23a2a;
  --red-deep: #8c2d20;
  --red-soft: #f7e8e0;
  --green: #5a7a3a;
  --green-soft: #edf2e2;
  --border: rgba(62, 47, 35, 0.12);
  --radius: 18px;
  --shadow: 0 10px 30px rgba(62, 47, 35, 0.08);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- 顶栏 ---------- */
#top {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: rgba(250, 246, 239, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border 0.2s;
}
#top.scrolled { border-bottom-color: var(--border); }
.logo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--red);
  display: grid;
  place-items: center;
  flex: none;
}
.logo svg { width: 20px; height: 20px; }
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: 0.5px; }
.brand-slogan { font-size: 12px; color: var(--muted); margin-top: -2px; }

/* ---------- 主体列 ---------- */
main { max-width: 680px; margin: 0 auto; padding: 0 16px; }
section { margin: 44px 0; }
h2.sec-title {
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 6px;
}
h2.sec-title::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 20px;
  border-radius: 4px;
  background: var(--red);
  margin-right: 10px;
  vertical-align: -3px;
}
.sec-sub { color: var(--muted); font-size: 14px; margin-bottom: 18px; }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #e9e2d5;
  margin-top: 16px;
}
.hero video {
  width: 100%;
  aspect-ratio: 9 / 14;
  object-fit: cover;
  display: block;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px 18px;
  background: linear-gradient(to top, rgba(40, 22, 10, 0.72), rgba(40, 22, 10, 0) 55%);
  color: #fff;
}
.hero-overlay h1 { font-size: 26px; font-weight: 700; letter-spacing: 1px; }
.hero-overlay p { font-size: 13px; opacity: 0.9; margin-top: 4px; max-width: 34em; }
.hero-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
}

/* ---------- 卖点 ---------- */
#chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--green-soft);
  color: var(--green);
  font-size: 13px;
  padding: 5px 14px;
  border-radius: 999px;
  font-weight: 500;
}

/* ---------- 相册 ---------- */
#gallery {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}
#gallery::-webkit-scrollbar { height: 4px; }
#gallery::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.gal-item {
  flex: 0 0 72%;
  scroll-snap-align: center;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.gal-item img { width: 100%; aspect-ratio: 3 / 3.6; object-fit: cover; }
.gal-item figcaption {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  padding: 10px;
}

/* ---------- 品种卡片 ---------- */
#varieties { display: flex; flex-direction: column; gap: 16px; }
.var-card {
  display: flex;
  gap: 0;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.var-img { width: 38%; object-fit: cover; flex: none; }
.var-body { padding: 16px 16px 14px; flex: 1; min-width: 0; }
.var-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.var-head h3 { font-size: 19px; }
.var-tag {
  font-size: 11px;
  color: var(--red);
  background: var(--red-soft);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.var-desc { font-size: 13.5px; color: #6b5a4b; margin: 6px 0 8px; }
.var-flavor { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.var-flavor span {
  font-size: 12px;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 6px;
  padding: 2px 8px;
}
.var-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.var-price { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; line-height: 1.3; }
.var-price b { font-size: 20px; color: var(--red); }
.var-price i { font-style: normal; font-size: 11px; }

/* ---------- 按钮 ---------- */
.btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  border-radius: 12px;
  transition: transform 0.1s, opacity 0.15s;
}
.btn:active { transform: scale(0.96); }
.btn-primary {
  background: var(--red);
  color: #fff;
  font-size: 15px;
  padding: 13px 26px;
  box-shadow: 0 6px 16px rgba(178, 58, 42, 0.3);
}
.btn-sm { background: var(--red); color: #fff; font-size: 13px; padding: 8px 14px; }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--border); font-size: 15px; padding: 13px 22px; }

/* ---------- 价格表 ---------- */
.price-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 14px;
}
.price-table th {
  background: var(--red);
  color: #fff;
  font-weight: 600;
  padding: 12px 8px;
  text-align: center;
  font-size: 13.5px;
}
.price-table td { padding: 13px 8px; text-align: center; border-top: 1px solid var(--border); }
.price-table td:first-child { font-weight: 700; }
.price-table .num { font-variant-numeric: tabular-nums; }
.price-table .strong { color: var(--red); font-weight: 700; }
.price-note { font-size: 12.5px; color: var(--muted); margin-top: 12px; }
.price-notice {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--red-deep);
  background: var(--red-soft);
  border-radius: 10px;
  padding: 8px 14px;
}

/* ---------- 下单 ---------- */
.order-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 18px;
}
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field select,
.field input,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 14px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a7a6b' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.field select:focus,
.field input:focus,
.field textarea:focus { border-color: var(--red); }
.field textarea { resize: none; height: 64px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.qty-row { display: flex; align-items: center; gap: 14px; }
.qty-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 20px;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
}
.qty-btn:active { background: var(--red-soft); }
#order-qty { font-size: 18px; font-weight: 700; min-width: 40px; text-align: center; }
.unit-price { margin-left: auto; color: var(--muted); font-size: 14px; }
.unit-price b { color: var(--red); font-size: 20px; }

.order-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px dashed var(--border);
  margin-top: 16px;
  padding-top: 16px;
}
#order-total { font-size: 22px; font-weight: 700; color: var(--red); }
.order-actions { margin-top: 16px; display: flex; gap: 10px; }
.order-actions .btn-primary { flex: 1; }
#copy-tip {
  font-size: 13px;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 10px;
  padding: 9px 14px;
  margin-top: 12px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
#copy-tip.show { opacity: 1; }

/* ---------- 付款与联系 ---------- */
.contact-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.pay-box,
.chat-box {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  text-align: center;
}
.pay-box h3, .chat-box h3 { font-size: 15px; margin-bottom: 12px; }
#pay-qr, #qr-empty { width: 150px; height: 150px; margin: 0 auto; }
#qr-empty {
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border);
  border-radius: 14px;
  color: var(--muted);
  font-size: 12px;
  padding: 10px;
  text-align: center;
}
.pay-hint { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.chat-box p { font-size: 14px; font-weight: 700; }
.chat-box .small { font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 4px; }
.notice-list { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.notice-list p {
  background: var(--surface);
  border-left: 3px solid var(--green);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: #6b5a4b;
  box-shadow: var(--shadow);
}

/* ---------- 页脚 ---------- */
footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 30px 0 90px;
}
footer b { color: var(--ink); }

/* ---------- 底部操作栏 ---------- */
#bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(250, 246, 239, 0.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  max-width: 680px;
  margin: 0 auto;
}
#bar .btn { flex: 1; }
#bar-tel { text-align: center; text-decoration: none; display: block; line-height: 44px; }

/* ---------- 桌面端微调 ---------- */
@media (min-width: 700px) {
  .gal-item { flex: 0 0 46%; }
  .hero video { aspect-ratio: 16 / 10; }
  .hero-overlay { padding: 34px 30px; }
  .hero-overlay h1 { font-size: 32px; }
  .contact-card { grid-template-columns: 220px 1fr; align-items: start; }
}
