/* ===== Fresh 清新果园：薄荷绿 + 暖橙点缀 + 大圆角软阴影；App 式布局（悬浮胶囊 Tabbar、左侧分类栏列表） ===== */
:root {
  --bg: #f1f6f1;
  --surface: #ffffff;
  --surface-2: #e9f2eb;
  --ink: #173b2c;
  --ink-2: #4b6358;
  --ink-3: #8aa096;
  --line: #dfeae2;
  --accent: #ff8a3d;
  --accent-soft: #fff1e6;
  --green: #22a861;
  --green-2: #4cc985;
  --green-soft: #e2f5ea;
  --ok: #22a861;
  --ok-soft: #e2f5ea;
  --radius: 22px;
  --radius-sm: 14px;
  --header-h: 76px;
  --tab-h: 84px;
  --shadow: 0 10px 28px -16px rgba(23, 59, 44, .28);
  --shadow-lg: 0 20px 40px -18px rgba(23, 59, 44, .35);
  --green-grad: linear-gradient(135deg, #1fa463 0%, #3cc47c 60%, #7fd88e 100%);
}
body { background: var(--bg); font-family: "HarmonyOS Sans SC", "PingFang SC", -apple-system, "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif; }

/* ---------- 头部 ---------- */
.fr-head { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); box-shadow: 0 6px 24px -18px rgba(23, 59, 44, .4); }
.fr-head-in { height: var(--header-h); display: flex; align-items: center; gap: 28px; }
.fr-logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; color: var(--green); white-space: nowrap; }
.fr-logo .mark { width: 38px; height: 38px; border-radius: 50% 50% 50% 14px; background: linear-gradient(135deg, var(--green-2), var(--green)); color: #fff; display: grid; place-items: center; font-size: 17px; }
.fr-logo img { height: 36px; }
.fr-search-w { flex: 1; max-width: 560px; }
.fr-search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 4px 0 16px; border: 2px solid var(--green); border-radius: 22px; background: #fff; }
.fr-search svg { color: var(--ink-3); }
.fr-search input { flex: 1; min-width: 0; border: none; outline: none; background: none; }
.fr-search button { height: 34px; padding: 0 20px; border-radius: 17px; background: var(--green); color: #fff; font-weight: 700; }
.fr-hot { display: flex; gap: 12px; margin: 4px 0 0 18px; font-size: 12px; color: var(--ink-3); }
.fr-hot a:hover { color: var(--green); }
.fr-tools { margin-left: auto; display: flex; gap: 8px; }
.fr-pill { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 20px; background: var(--surface-2); color: var(--ink-2); font-weight: 600; white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.fr-pill:hover { background: var(--green-soft); color: var(--green); }
.fr-cart { background: var(--green); color: #fff; box-shadow: 0 8px 18px -10px rgba(34, 168, 97, .9); }
.fr-cart:hover { background: #1c9455; color: #fff; }
.fr-cnt { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #fff; color: var(--green); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.fr-cnt:empty { display: none; }
.fr-back, .fr-htitle { display: none; }

/* ---------- 悬浮胶囊 Tabbar（仅手机） ---------- */
.fr-tabbar { display: none; }

/* ---------- 页脚 ---------- */
.fr-foot { background: #123528; color: rgba(255, 255, 255, .62); padding: 0 0 32px; margin-top: 48px; font-size: 13px; border-radius: 32px 32px 0 0; }
.fr-perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding-top: 28px; padding-bottom: 28px; border-bottom: 1px solid rgba(255, 255, 255, .08); margin-bottom: 28px; }
.fr-perks div { display: flex; align-items: center; justify-content: center; gap: 10px; color: #fff; font-weight: 600; }
.fr-perks svg { color: var(--green-2); width: 26px; height: 26px; }
.fr-foot-in { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; }
.fr-foot-brand { color: #fff; font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.fr-foot-meta p { margin-top: 4px; }

/* ---------- 区块标题 ---------- */
.fr-sec { margin-top: 28px; }
.fr-sec-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.fr-sec-h h2 { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.fr-sec-h h2 .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.fr-sec-h .more { margin-left: auto; display: flex; align-items: center; gap: 2px; font-size: 13px; color: var(--ink-3); background: #fff; padding: 6px 12px; border-radius: 16px; box-shadow: var(--shadow); }
.fr-sec-h .more:hover { color: var(--green); }
.fr-box { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }

/* ---------- 商品卡片 / 商品行 ---------- */
.fr-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.fr-card { background: #fff; border-radius: 20px; padding: 8px 8px 12px; box-shadow: var(--shadow); cursor: pointer; transition: transform .25s, box-shadow .25s; display: flex; flex-direction: column; }
.fr-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.fr-card-img { position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--surface-2); }
.fr-card-img img { width: 100%; height: 100%; object-fit: cover; }
.fr-flag { position: absolute; left: 8px; top: 8px; padding: 2px 9px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; }
.fr-flag.new { background: var(--green); }
.fr-card-name { margin: 10px 4px 0; font-weight: 600; font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.fr-card-tags { display: flex; align-items: center; gap: 5px; margin: 6px 4px 0; font-size: 11px; flex-wrap: wrap; }
.fr-card-tags span { padding: 1px 6px; border-radius: 6px; background: var(--accent-soft); color: #e06a1f; font-weight: 600; }
.fr-card-tags span.g, .fr-card-tags span + span { background: var(--green-soft); color: var(--green); }
.fr-card-tags em { font-style: normal; color: var(--ink-3); }
.fr-card-foot { margin: auto 4px 0; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.n-price { color: #f0602b; font-weight: 800; }
.fr-add { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 14px -6px rgba(34, 168, 97, .9); transition: .2s; }
.fr-add:hover { background: var(--accent); transform: rotate(90deg); }
.fr-add svg { width: 18px; height: 18px; stroke-width: 2.4; }
.fr-row { display: flex; gap: 14px; padding: 12px; background: #fff; border-radius: 18px; box-shadow: var(--shadow); cursor: pointer; transition: .2s; }
.fr-row:hover { box-shadow: var(--shadow-lg); }
.fr-row img { width: 112px; height: 112px; flex: none; border-radius: 14px; object-fit: cover; background: var(--surface-2); }
.fr-row-b { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fr-row-name { font-weight: 700; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fr-row-sub { font-size: 12px; color: var(--ink-3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-row .fr-card-tags, .fr-row .fr-card-foot { margin-left: 0; margin-right: 0; }

/* ---------- 按钮 / 控件 ---------- */
.n-btn-primary { background: var(--green); color: #fff; box-shadow: 0 10px 20px -12px rgba(34, 168, 97, .9); }
.n-btn-primary:not(:disabled):hover { background: #1c9455; }
.n-btn-accent { background: linear-gradient(135deg, #ffb347, #ff7a3d); color: #fff; box-shadow: 0 10px 20px -12px rgba(255, 122, 61, .9); }
.n-btn-line:not(:disabled):hover { border-color: var(--green); color: var(--green); }
.n-panel { border: none; box-shadow: var(--shadow); }
.n-panel-h { border-bottom-color: var(--surface-2); }
.n-input { border-radius: 14px; background: #fbfdfb; }
.n-input:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(34, 168, 97, .12); }
.n-check input { accent-color: var(--green); }
.n-qty button:hover { color: var(--green); }
.n-chip { border: none; box-shadow: 0 4px 12px -8px rgba(23, 59, 44, .35); }
.n-chip:hover { color: var(--green); }
.n-chip.on { background: var(--green); color: #fff; }
.n-pager button { border: none; box-shadow: 0 4px 12px -8px rgba(23, 59, 44, .35); }
.n-pager button.on { background: var(--green); color: #fff; }
.n-status.s3 { background: var(--green-soft); color: var(--green); }
.n-empty .ic { background: var(--green-soft); color: var(--green); }
.n-badge { background: var(--accent); }
.sk { background: linear-gradient(90deg, #e4eee6 25%, #f1f7f2 50%, #e4eee6 75%); background-size: 200% 100%; border-radius: 18px; }
.toast { background: var(--green); }
.n-modal { border-radius: 26px; }

/* ---------- 登录 / 注册：绿色背景 + 顶部标语 + 居中白卡 ---------- */
.n-auth { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 16px; background: var(--green-grad); position: relative; overflow: hidden; }
.n-auth::before, .n-auth::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.n-auth::before { width: 420px; height: 420px; left: -140px; top: -120px; }
.n-auth::after { width: 300px; height: 300px; right: -80px; bottom: -60px; background: rgba(255, 246, 176, .25); }
.n-auth-art { position: relative; z-index: 1; background: none; padding: 0 0 26px; text-align: center; align-items: center; gap: 18px; }
.n-auth-art::after { display: none; }
.n-auth-art .n-logo { color: #fff; }
.n-auth-art .n-logo .mark { background: #fff; color: var(--green); border-radius: 50% 50% 50% 12px; }
.n-auth-art h1 { font-size: 32px; }
.n-auth-art h1 em { color: #fff6b0; }
.n-auth-art p { color: rgba(255, 255, 255, .85); margin-top: 8px; }
.n-auth-form { position: relative; z-index: 1; width: 100%; max-width: 460px; padding: 36px 32px; border-radius: 28px; box-shadow: 0 30px 60px -30px rgba(10, 60, 30, .6); }
.n-auth-box .alt a { color: var(--green); border-color: var(--green); }

/* ---------- 复用 nova 的页面 ---------- */
.item img { border-radius: 16px; }
.item .nm:hover { color: var(--green); }
.step { background: var(--green); }
.addr, .pay { border-radius: 18px; }
.addr.on, .pay.on { border-color: var(--green); background: #f3fbf6; }
.addr.on::after { background-color: var(--green); }
.amount { background: var(--green-grad); border-radius: 28px; }
.amount::after { background: radial-gradient(circle, #fff6b0, transparent 65%); }
.amount .l { color: rgba(255, 255, 255, .8); }
.ring { border-top-color: var(--green); }
.mfoot { border-radius: 20px 20px 0 0; border-top: none !important; box-shadow: 0 -8px 24px -16px rgba(23, 59, 44, .4); }

/* 个人中心：顶部绿色会员卡 + 宫格菜单 */
body[data-panel] .layout { grid-template-columns: minmax(0, 1fr); }
body[data-panel] .side { position: static; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; }
.me { background: var(--green-grad); border-radius: 26px; }
.me::after { background: radial-gradient(circle, #fff6b0, transparent 65%); }
.me .role, .me .bal small { color: rgba(255, 255, 255, .8); }
.menu { border: none; box-shadow: var(--shadow); border-radius: 26px; display: grid; grid-template-columns: repeat(3, 1fr); align-content: center; gap: 6px; padding: 12px; }
.mi { flex-direction: column; gap: 6px; border-radius: 18px; padding: 14px 6px; font-size: 13px; text-align: center; }
.mi svg { width: 26px; height: 26px; padding: 5px; box-sizing: content-box; border-radius: 12px; background: var(--green-soft); color: var(--green); }
.mi.danger svg { background: var(--danger-soft); color: var(--danger); }
.mi .r { display: none; }
.mi.on { background: var(--green-soft); color: var(--green); }
.stat { background: var(--green-soft); border-radius: 18px; }
.stat:hover { background: #d4efdf; }
.stat b { color: var(--green); }
.addr-list .addr { border: none; box-shadow: var(--shadow); }

/* ===================== 响应式 ===================== */
@media (max-width: 1100px) {
  .fr-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fr-tools .fr-pill:not(.fr-cart) { display: none; }
}
@media (max-width: 768px) {
  :root { --header-h: 58px; }
  .fr-head { background: var(--green); box-shadow: none; }
  .fr-head-in { gap: 10px; }
  .fr-logo { color: #fff; font-size: 17px; }
  .fr-logo .mark { width: 32px; height: 32px; background: #fff; color: var(--green); font-size: 14px; }
  .fr-logo .txt { display: none; }
  .fr-search { height: 38px; border: none; }
  .fr-search button, .fr-hot, .fr-tools { display: none; }
  .fr-head.back { background: #fff; box-shadow: 0 1px 0 var(--line); }
  .fr-head.back .fr-logo, .fr-head.back .fr-search-w { display: none; }
  .fr-head.back .fr-back { display: grid; width: 34px; height: 34px; margin-left: -6px; place-items: center; }
  .fr-head.back .fr-htitle { display: block; flex: 1; text-align: center; font-weight: 800; font-size: 16px; margin-right: 28px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .fr-tabbar { display: flex; position: fixed; z-index: 60; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); height: 64px; background: rgba(255, 255, 255, .97); border-radius: 32px; box-shadow: 0 12px 30px -10px rgba(23, 59, 44, .35); }
  .fr-tabbar a { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--ink-3); font-weight: 600; }
  .fr-tabbar a.on { color: var(--green); }
  .fr-tabbar .fr-tab-cart { justify-content: flex-end; padding-bottom: 8px; }
  .fr-tabbar .bub { position: absolute; top: -18px; width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, var(--green-2), var(--green)); color: #fff; display: grid; place-items: center; border: 4px solid var(--bg); box-shadow: 0 8px 16px -6px rgba(34, 168, 97, .8); }
  .fr-tabbar .bub .n-badge { top: -2px; left: 32px; }
  body.no-tab .fr-tabbar { display: none; }

  .fr-foot { padding-bottom: 24px; }
  .fr-perks { grid-template-columns: repeat(2, 1fr); }
  .fr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .fr-card { padding: 5px 5px 10px; border-radius: 16px; }
  .fr-card-img { border-radius: 12px; }
  .fr-card-name { font-size: 13px; }
  .fr-row img { width: 92px; height: 92px; }
  .fr-box { padding: 14px; border-radius: 18px; }
  .fr-sec-h h2 { font-size: 17px; }
  .n-modal, .n-modal.wide { border-radius: 26px 26px 0 0; }

  .n-auth { padding: 40px 14px; min-height: 100vh; justify-content: flex-start; }
  .n-auth-art h1 { font-size: 24px; }
  .n-auth-form { padding: 26px 20px; }

  body[data-panel] .side { grid-template-columns: minmax(0, 1fr); }
}
