/* ============================================================
   海珍坊 · 视觉系统 V2.1（高端食材品牌 / 杂志编辑感）
   纸白 + 墨黑 + 暗朱点缀；直角、细线、大留白
   注：本文件为主样式（原 style.css 因权限异常只读，已迁移至此）
   ============================================================ */

:root {
  --paper: #f8f6f1;
  --white: #ffffff;
  --ink: #1a1a16;
  --muted: #6b665c;
  --dim: #8e8878;
  --hair: #d9d3c6;
  --hair-light: #efebe2;
  --accent: #9c3a2c;
  --accent-soft: #c08063;
  --dark: #1f201b;
  --dark-2: #2c2d26;
  --photo: #e2dcd0;

  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, SimSun, serif;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --num: "Inter", "Helvetica Neue", Arial, sans-serif;

  --pad: 48px;
  --maxw: 1440px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

/* ---------- 顶部信息条 ---------- */
.topbar {
  background: var(--dark);
  color: #b9b2a4;
  font-size: 11px;
  letter-spacing: .06em;
}
.topbar .wrap {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ---------- 主导航 ---------- */
.nav {
  background: var(--white);
  border-bottom: 1px solid var(--hair);
  position: relative;
}
.nav .wrap {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; flex-direction: column; gap: 6px; }
.brand-cn {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: .16em;
  line-height: 1;
}
.brand-en {
  font-family: var(--num);
  font-size: 9px;
  letter-spacing: .3em;
  color: var(--accent);
  font-weight: 500;
}
.nav-menu { display: flex; align-items: center; gap: 44px; }
.nav-menu a {
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--muted);
  transition: color .18s;
}
.nav-menu a:hover, .nav-menu a.active { color: var(--ink); }
.nav-menu a.active { font-weight: 500; }
.nav-acts { display: flex; align-items: center; gap: 26px; font-size: 12px; letter-spacing: .1em; color: var(--muted); }
.nav-acts a:hover { color: var(--ink); }
.nav-acts .cart { color: var(--ink); font-weight: 500; }

/* ---------- 移动端汉堡导航 ---------- */
.nav-burger {
  display: none;
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; padding: 12px 11px;
  border: 0; background: none;
  flex-direction: column; justify-content: center; gap: 5px;
  z-index: 5;
}
.nav-burger i { display: block; height: 1.5px; background: var(--ink); }
.m-mask {
  position: fixed; inset: 0; background: rgba(26,26,22,.42);
  opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 90;
}
.m-mask.show { opacity: 1; pointer-events: auto; }
.m-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(78vw, 320px);
  background: var(--paper); z-index: 95;
  transform: translateX(100%); transition: transform .28s ease;
  display: flex; flex-direction: column;
  padding: 0 24px 28px; overflow-y: auto;
}
.m-drawer.open { transform: translateX(0); }
.m-head {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; margin: 0 -24px 6px; padding: 0 20px;
  border-bottom: 1px solid var(--hair);
}
.m-brand { font-family: var(--serif); font-weight: 700; font-size: 20px; letter-spacing: .16em; }
.m-x { border: 0; background: none; font-size: 26px; color: var(--muted); padding: 0 4px; line-height: 1; }
.m-links { display: flex; flex-direction: column; padding: 14px 0 10px; }
.m-links a {
  padding: 14px 2px; font-size: 15px; letter-spacing: .08em; color: var(--ink);
  border-bottom: 1px solid var(--hair-light);
}
.m-links a.active { color: var(--accent); font-weight: 500; }
.m-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 16px; }
.m-foot a { font-size: 13px; color: var(--muted); padding: 12px 2px; letter-spacing: .06em; }
.m-foot a:first-child { color: var(--accent); font-weight: 500; }

/* ---------- 首屏 ---------- */
.hero {
  display: grid;
  grid-template-columns: 640px 1fr;
  height: 660px;
  border-bottom: 1px solid var(--hair);
}
.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 64px 0 var(--pad);
  gap: 32px;
}
.kicker {
  font-family: var(--num);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .34em;
  color: var(--accent);
}
.hero-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 66px;
  line-height: 1.24;
  letter-spacing: .02em;
  margin: 0;
}
.hero-title em { font-style: normal; color: var(--accent); }
.hero-desc {
  font-size: 15px;
  line-height: 1.95;
  color: var(--muted);
  max-width: 432px;
  letter-spacing: .02em;
  margin: 0;
}
.hero-acts { display: flex; align-items: center; gap: 36px; margin-top: 4px; }
.btn-text {
  font-size: 14px;
  letter-spacing: .12em;
  font-weight: 500;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: none;
  padding: 0;
  transition: opacity .18s;
}
.btn-text:hover { opacity: .62; }
.btn-text.muted { color: var(--muted); font-weight: 400; }

.hero-media {
  background: var(--photo);
  position: relative;
  overflow: hidden;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media .mark {
  position: absolute; left: 36px; top: 32px;
  font-family: var(--num); font-size: 11px; color: var(--dim);
}
.hero-media .label {
  position: absolute; left: 36px; bottom: 32px;
  font-size: 10px; letter-spacing: .18em; color: var(--dim);
}

/* ---------- 区块通用 ---------- */
.section { padding: 96px var(--pad) 88px; }
.section.tight { padding-top: 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 44px;
}
.section-head .left { display: flex; align-items: baseline; gap: 18px; }
.sec-idx {
  font-family: var(--num);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--accent);
}
.sec-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 34px;
  letter-spacing: .06em;
  margin: 0;
}
.sec-note {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .06em;
}

/* ---------- 品类 ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
.cat-item { display: flex; flex-direction: column; gap: 16px; }
.cat-photo {
  height: 400px;
  background: var(--photo);
  overflow: hidden;
}
.cat-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.cat-item:hover .cat-photo img { transform: scale(1.03); }
.cat-name { display: flex; align-items: baseline; gap: 10px; }
.cat-name .idx { font-family: var(--num); font-size: 11px; font-weight: 500; color: var(--accent); }
.cat-name h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 21px;
  letter-spacing: .06em;
  margin: 0;
}
.cat-note { font-size: 12px; line-height: 1.8; color: var(--muted); letter-spacing: .04em; margin: 0; }
.cat-price { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.price-num { font-family: var(--num); font-size: 14px; font-weight: 500; }
.price-num small { font-size: 11px; font-weight: 400; color: var(--dim); letter-spacing: .02em; }
.cat-link { font-size: 11px; letter-spacing: .08em; color: var(--dim); }

/* ---------- 商品卡（让利区） ---------- */
.sale-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.pcard { display: flex; flex-direction: column; gap: 14px; }
.pcard-photo { height: 330px; background: var(--photo); overflow: hidden; position: relative; }
.pcard-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.pcard:hover .pcard-photo img { transform: scale(1.03); }
.pcard-badge {
  position: absolute; left: 0; top: 0;
  background: var(--accent); color: #fff;
  font-family: var(--num); font-size: 11px; font-weight: 500;
  letter-spacing: .08em; padding: 5px 10px;
}
.pcard-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 16px;
  letter-spacing: .04em;
  margin: 0;
}
.pcard-price { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pcard-price .now { font-family: var(--num); font-size: 18px; font-weight: 500; color: var(--accent); }
.pcard-price .was { font-size: 11px; color: var(--dim); letter-spacing: .04em; }

/* ---------- 产地故事 ---------- */
.story {
  background: var(--dark);
  display: grid;
  grid-template-columns: 700px 1fr;
  height: 560px;
}
.story-photo { background: var(--dark-2); overflow: hidden; }
.story-photo img { width: 100%; height: 100%; object-fit: cover; opacity: .92; }
.story-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 26px;
  padding: 0 72px 0 64px;
}
.story-text .kicker { color: #b9b2a4; letter-spacing: .3em; }
.story-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 38px;
  line-height: 1.35;
  letter-spacing: .04em;
  color: var(--paper);
  margin: 0;
}
.story-body {
  font-size: 14px;
  line-height: 2.1;
  color: #b9b2a4;
  letter-spacing: .02em;
  max-width: 420px;
  margin: 0;
}
.story-stat {
  font-family: var(--num);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  color: var(--accent-soft);
}
.story-link { font-size: 13px; letter-spacing: .12em; color: var(--accent-soft); font-weight: 500; }

/* ---------- 服务承诺 ---------- */
.guarantees {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 92px;
  padding: 0 var(--pad);
  max-width: var(--maxw);
  margin: 0 auto;
  border-top: 1px solid var(--hair);
}
.guarantees span { font-size: 11px; letter-spacing: .14em; color: var(--muted); }

/* ---------- 页脚 ---------- */
.footer { background: var(--dark); color: #d9d3c6; }
.footer .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 64px var(--pad) 44px;
  display: flex;
  flex-direction: column;
  gap: 42px;
}
.footer-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 48px; }
.footer-brand { display: flex; flex-direction: column; gap: 16px; }
.footer-brand .cn {
  font-family: var(--serif); font-size: 26px; letter-spacing: .18em; color: var(--paper);
}
.footer-brand .en { font-family: var(--num); font-size: 9px; letter-spacing: .28em; color: var(--dim); }
.footer-cols { display: flex; gap: 76px; }
.footer-col { display: flex; flex-direction: column; gap: 13px; }
.footer-col h4 {
  font-size: 10px; font-weight: 400; letter-spacing: .2em; color: var(--dim); margin: 0;
}
.footer-col a, .footer-col span { font-size: 12px; letter-spacing: .06em; color: #d9d3c6; }
.footer-col a:hover { color: #fff; }
.footer-line { height: 1px; background: #3a3b33; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10px; letter-spacing: .08em; color: #6b665c;
}

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 26px;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink);
  font-size: 13px; letter-spacing: .12em;
  transition: opacity .18s;
}
.btn:hover { opacity: .84; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); opacity: 1; }
.btn.accent { background: var(--accent); border-color: var(--accent); }
.btn[disabled] { opacity: .4; cursor: not-allowed; }

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 10px; }
.field > label {
  font-size: 11px; letter-spacing: .14em; color: var(--dim);
}
.input, .select, .textarea {
  height: 46px;
  border: 1px solid var(--hair);
  background: var(--white);
  padding: 0 14px;
  font-size: 14px;
  font-family: var(--sans);
  color: var(--ink);
  outline: none;
  transition: border-color .18s;
  width: 100%;
}
.textarea { height: auto; padding: 12px 14px; line-height: 1.8; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--ink); }
.input::placeholder, .textarea::placeholder { color: #b5afa2; }

/* ---------- 提示 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 20px);
  background: var(--ink); color: var(--paper);
  font-size: 13px; letter-spacing: .06em;
  padding: 12px 22px; opacity: 0; pointer-events: none;
  transition: all .28s ease; z-index: 999;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--accent); }

.empty {
  padding: 64px 0; text-align: center;
  font-size: 13px; color: var(--dim); letter-spacing: .08em;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1200px) {
  .hero { grid-template-columns: 1fr; height: auto; }
  .hero-text { padding: 72px var(--pad); }
  .hero-media { height: 420px; }
  .hero-title { font-size: 48px; }
  .story { grid-template-columns: 1fr; height: auto; }
  .story-photo { height: 380px; }
  .story-text { padding: 56px var(--pad); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .sale-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-menu { display: none; }
  .nav-burger { display: flex; }
  .footer-cols { gap: 40px; flex-wrap: wrap; }
}

/* 手机端（≤720px） */
@media (max-width: 720px) {
  :root { --pad: 20px; }

  /* 顶栏与导航 */
  .topbar { display: none; }
  .nav .wrap { height: 64px; gap: 12px; }
  .brand-cn { font-size: 21px; }
  .brand-en { letter-spacing: .2em; }
  .nav-acts { gap: 14px; font-size: 11px; }
  .nav-acts > a:not(.cart):not(#navUser) { display: none; }
  .nav-acts .cart { white-space: nowrap; }

  /* 首屏 */
  .hero-text { padding: 40px var(--pad) 34px; gap: 18px; }
  .hero-title { font-size: 30px; line-height: 1.4; }
  .hero-desc { font-size: 13px; line-height: 1.9; }
  .hero-acts { gap: 22px; margin-top: 2px; }
  .hero-media { height: 280px; }
  .hero-media .mark, .hero-media .label { left: 20px; }
  .hero-media .mark { top: 18px; }
  .hero-media .label { bottom: 18px; }

  /* 区块 */
  .section { padding: 52px var(--pad) 44px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 26px; }
  .sec-title { font-size: 24px; }

  /* 品类：手机 2 列网格 */
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 22px 14px; }
  .cat-photo { height: 180px; }
  .cat-name { gap: 7px; }
  .cat-name h3 { font-size: 16px; }
  .cat-note { display: none; }
  .cat-price { flex-direction: column; align-items: flex-start; gap: 5px; }

  /* 让利：单列大图 */
  .sale-grid { grid-template-columns: 1fr; gap: 30px; }
  .pcard-photo { height: 240px; }

  /* 产地故事 */
  .story-text { padding: 40px var(--pad) 46px; gap: 16px; }
  .story-title { font-size: 24px; line-height: 1.5; }
  .story-body { font-size: 13px; max-width: none; }
  .story-photo { height: 300px; }

  /* 服务承诺与页脚 */
  .guarantees { flex-direction: column; align-items: flex-start; height: auto; padding: 18px var(--pad); gap: 10px; }
  .footer .inner { padding: 42px var(--pad) 28px; gap: 26px; }
  .footer-top { flex-direction: column; gap: 26px; }
  .footer-cols { gap: 28px; flex-wrap: wrap; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }

  /* 弹层与提示 */
  .toast { width: max-content; max-width: 86vw; text-align: center; }
}
