/* ==========================================================================
   番茄屋 · 视觉系统
   小清新唯美风 / 纯白背景 / 淡雅配色
   ========================================================================== */

/* ---------------------------------------------------------------- 字体 */
@font-face {
  font-family: 'FQYuanTi';
  src: url('../fonts/FQYuanTi-B.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* 站名字体（方正粗宋简） */
@font-face {
  font-family: 'FZCSJW';
  src: url('../fonts/FZCSJW.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------------- 变量 */
:root {
  /* 色彩 —— 主色是熟透的番茄，辅色是薄荷与奶油，整体保持白底淡雅 */
  --c-tomato: #f26e5c;
  --c-tomato-deep: #e0574a;
  --c-tomato-soft: #ff9e8b;
  --c-blush: #ffe6de;
  --c-blush-2: #fff4ef;
  --c-mint: #8fcbaf;
  --c-mint-deep: #63ab8d;
  --c-mint-2: #e9f5ef;
  --c-cream: #fffbf7;
  --c-butter: #fff6e4;
  --c-sky: #a8c8e8;

  --ink: #2e2926;
  --ink-2: #6e635e;
  --ink-3: #a79b95;
  --ink-4: #c9bdb7;
  --line: #f1e8e2;
  --line-2: #f7f1ed;
  --bg: #ffffff;
  --bg-soft: #fffbf9;

  --shadow-xs: 0 1px 2px rgba(180, 130, 112, .06);
  --shadow-sm: 0 4px 16px rgba(190, 140, 120, .09);
  --shadow-md: 0 12px 34px rgba(190, 140, 120, .13);
  --shadow-lg: 0 24px 60px rgba(180, 125, 105, .16);

  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-pill: 999px;

  --font-display: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --font-body: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Hiragino Sans GB", -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-num: "Optima", "Songti SC", "Georgia", serif;

  --w: 1220px;
  --ease: cubic-bezier(.22, .8, .3, 1);
}

/* ---------------------------------------------------------------- 基础 */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.85;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; border-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: .03em; margin: 0; line-height: 1.4; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.4em; }
hr { border: 0; border-top: 1px dashed var(--line); margin: 2.4rem 0; }
::selection { background: var(--c-blush); color: var(--c-tomato-deep); }

/* 细腻滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #f0e2db; border-radius: 999px; border: 3px solid #fff; }
::-webkit-scrollbar-thumb:hover { background: #e6d2c8; }

.wrap { width: 100%; max-width: var(--w); margin: 0 auto; padding: 0 26px; }
.wrap-narrow { max-width: 860px; }
.center { text-align: center; }
.hidden { display: none !important; }

/* ---------------------------------------------------------------- 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line-2);
}
.topbar-inner { display: flex; align-items: center; gap: 26px; height: 72px; }

.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand img { width: 38px; height: 38px; border-radius: 50%; box-shadow: 0 3px 12px rgba(226, 110, 92, .25); }
.brand-txt { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: 'FZCSJW', 'FQYuanTi', var(--font-display);
  font-size: 40px; font-weight: 700; letter-spacing: .14em; color: var(--c-tomato);
  text-shadow: 0 2px 12px rgba(242, 110, 92, .16);
}
.footer-brand-name {
  font-family: 'FZCSJW', 'FQYuanTi', var(--font-display);
  font-size: 32px; font-weight: 700; letter-spacing: .14em; color: var(--c-tomato);
}
.brand-sub { font-size: 10.5px; color: var(--ink-3); letter-spacing: .32em; text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: 6px; flex: 1; }
.nav a {
  position: relative; padding: 8px 15px; border-radius: var(--r-pill);
  font-size: 14.5px; color: var(--ink-2); transition: .25s var(--ease);
}
.nav a:hover { color: var(--c-tomato); background: var(--c-blush-2); }
.nav a.on { color: var(--c-tomato-deep); font-weight: 600; }
.nav a.on::after {
  content: ""; position: absolute; left: 50%; bottom: 1px; transform: translateX(-50%);
  width: 16px; height: 3px; border-radius: 3px; background: var(--c-tomato-soft);
}

.top-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  color: var(--ink-2); transition: .25s var(--ease); position: relative;
}
.icon-btn:hover { background: var(--c-blush-2); color: var(--c-tomato); transform: translateY(-1px); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .dot {
  position: absolute; top: 4px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--c-tomato); color: #fff; font-size: 10px;
  line-height: 16px; text-align: center; font-family: var(--font-body);
}

/* 顶部搜索浮层 */
.quick-search {
  display: none; padding: 18px 0 22px; border-top: 1px dashed var(--line);
  animation: slideDown .35s var(--ease);
}
.quick-search.open { display: block; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- 公告条 */
.notice-bar {
  background: linear-gradient(90deg, var(--c-blush-2), #fff 40%, var(--c-mint-2));
  border-bottom: 1px solid var(--line-2);
}
.notice-inner {
  display: flex; align-items: center; gap: 10px; min-height: 40px;
  font-size: 13px; color: var(--ink-2); padding: 8px 0;
}
.notice-tag {
  flex: none; font-size: 11px; letter-spacing: .12em; color: var(--c-tomato-deep);
  background: #fff; border: 1px solid var(--c-blush); padding: 1px 9px; border-radius: var(--r-pill);
}

/* 离线（未启动本地服务）提示条 */
.offline-hint {
  background: #FFF6E4; border-bottom: 1px solid #F7E3BA; color: #A97A1F;
  font-size: 13px; line-height: 1.75; padding: 9px 0;
}
.offline-hint b { color: #8A6114; }

/* ---------------------------------------------------------------- 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 22px; border-radius: var(--r-pill);
  font-size: 14px; letter-spacing: .04em; border: 1px solid transparent;
  transition: .25s var(--ease); white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn-main { background: var(--c-tomato); color: #fff; box-shadow: 0 6px 18px rgba(226, 110, 92, .28); }
.btn-main:hover { background: var(--c-tomato-deep); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(226, 110, 92, .34); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--c-tomato-soft); color: var(--c-tomato-deep); background: var(--c-blush-2); }
.btn-mint { background: var(--c-mint-2); color: var(--c-mint-deep); border-color: #d8ece1; }
.btn-mint:hover { background: #dcf0e6; transform: translateY(-2px); }
.btn-lg { height: 50px; padding: 0 30px; font-size: 15.5px; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; box-shadow: none; }

/* ---------------------------------------------------------------- 表单 */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 12.5px; color: var(--ink-3); letter-spacing: .06em; }
.input, select.input, textarea.input {
  height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fff; transition: .22s var(--ease); outline: none; width: 100%;
}
textarea.input { height: auto; padding: 12px 16px; line-height: 1.75; resize: vertical; min-height: 96px; }
.input:focus { border-color: var(--c-tomato-soft); box-shadow: 0 0 0 4px var(--c-blush-2); }
.input::placeholder { color: var(--ink-4); }

.search-box { display: flex; align-items: center; gap: 10px; }
.search-box .input { height: 48px; border-radius: var(--r-pill); padding-left: 20px; }
.search-wrap { position: relative; flex: 1; }
.search-wrap svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-3); }
.search-wrap .input { padding-left: 44px; }

/* ---------------------------------------------------------------- 章节标题 */
.sec { padding: 62px 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 34px; }
.sec-eyebrow {
  font-size: 11.5px; letter-spacing: .38em; text-transform: uppercase;
  color: var(--c-tomato-soft); margin-bottom: 8px;
}
.sec-title { font-size: 30px; position: relative; display: inline-block; }
.sec-title .wave { display: block; width: 100%; height: 9px; margin-top: 4px; color: var(--c-blush); }
.sec-desc { color: var(--ink-3); font-size: 13.5px; margin-top: 12px; max-width: 620px; }
.sec-more { font-size: 13.5px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; transition: .25s var(--ease); }
.sec-more:hover { color: var(--c-tomato); gap: 10px; }

/* ---------------------------------------------------------------- 首页 Hero */
.hero { position: relative; overflow: hidden; padding: 76px 0 68px; }
.hero-blob { position: absolute; border-radius: 50%; filter: blur(46px); opacity: .55; pointer-events: none; }
.hero-blob.b1 { width: 420px; height: 420px; background: var(--c-blush); top: -150px; right: -80px; }
.hero-blob.b2 { width: 320px; height: 320px; background: var(--c-mint-2); bottom: -140px; left: -90px; }
.hero-blob.b3 { width: 220px; height: 220px; background: var(--c-butter); top: 90px; left: 42%; opacity: .5; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--c-tomato-deep);
  background: var(--c-blush-2); border: 1px solid var(--c-blush); padding: 5px 15px; border-radius: var(--r-pill);
  letter-spacing: .12em; margin-bottom: 22px;
}
.hero h1 { font-size: 52px; line-height: 1.28; letter-spacing: .02em; }
.hero h1 em { font-style: normal; color: var(--c-tomato); position: relative; white-space: nowrap; }
.hero h1 em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 12px; z-index: -1;
  background: var(--c-blush); border-radius: 4px;
}
.hero-lede { color: var(--ink-2); font-size: 16px; margin: 22px 0 30px; max-width: 520px; line-height: 2; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-stats { display: flex; gap: 34px; margin-top: 44px; padding-top: 26px; border-top: 1px dashed var(--line); }
.hero-stats b { display: block; font-family: 'FQYuanTi', var(--font-num); font-size: 30px; color: var(--ink); }
.hero-stats span { font-size: 12.5px; color: var(--ink-3); letter-spacing: .08em; }

/* Hero 右侧卡片组 */
.hero-art { position: relative; height: 420px; }
.art-card {
  position: absolute; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-md); overflow: hidden; transition: .5s var(--ease);
}
.art-card img { width: 100%; height: 100%; object-fit: cover; }
.art-card.c1 { width: 232px; height: 292px; top: 6px; left: 30px; transform: rotate(-3.5deg); }
.art-card.c2 { width: 206px; height: 260px; bottom: 12px; right: 6px; transform: rotate(4deg); }
.art-card:hover { transform: rotate(0) translateY(-6px) scale(1.02); z-index: 5; }
.art-tag {
  position: absolute; background: #fff; border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 7px 15px; font-size: 12.5px; color: var(--ink-2); box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 7px;
}
.art-tag.t1 { top: 246px; left: 2px; }
.art-tag.t2 { bottom: 74px; left: 32%; color: var(--c-mint-deep); }
.art-tag.t3 { top: 30px; right: 10px; color: var(--c-tomato-deep); }

/* ---------------------------------------------------------------- 分类卡 */
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.cat-card {
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px 16px; text-align: center;
  background: #fff; transition: .32s var(--ease); display: block;
}
.cat-card:hover { transform: translateY(-5px); border-color: var(--c-blush); box-shadow: var(--shadow-sm); background: var(--bg-soft); }
.cat-emoji { font-size: 28px; line-height: 1; margin-bottom: 12px; display: block; }
.cat-name { display: block; font-family: var(--font-display); font-size: 15.5px; font-weight: 600; }
.cat-desc { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 6px; line-height: 1.6; }

/* ---------------------------------------------------------------- 商品卡 */
.grid-products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.pcard {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  overflow: hidden; display: flex; flex-direction: column;
  transition: .34s var(--ease);
}
.pcard:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: #f6ded6; }
.pcard-media { position: relative; aspect-ratio: 1 / 1; background: #fff; overflow: hidden; }
.pcard-media img { width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: .7s var(--ease); }
.pcard:hover .pcard-media img { transform: scale(1.06); }
.pcard-badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.badge {
  font-size: 11px; padding: 3px 9px; border-radius: var(--r-pill); letter-spacing: .06em;
  background: rgba(255, 255, 255, .94); color: var(--ink-2); border: 1px solid var(--line);
  backdrop-filter: blur(4px);
}
.badge.tm { color: #c8382f; border-color: #fbdcd7; background: rgba(255, 244, 242, .95); }
/* 店铺类型（不同颜色标签） */
.badge.shop-tm { color: var(--c-tomato); background: #fff; border-color: #f9d6cd; }
.badge.shop-tb { color: var(--c-tomato); background: #fff; border-color: #f9d6cd; }
.badge.shop-tb3 { color: var(--c-tomato); background: #fff; border-color: #f9d6cd; }
.shop-type {
  display: inline-flex; align-items: center; font-size: 11px; line-height: 1.6;
  padding: 1px 7px; border-radius: 5px; letter-spacing: .06em; flex: none;
  background: #fff; color: var(--c-tomato); border: 1px solid #f9d6cd;
}
.shop-type.tm { background: #fff; color: var(--c-tomato); border-color: #f9d6cd; }
.shop-type.tb { background: #fff; color: var(--c-tomato); border-color: #f9d6cd; }
.shop-type.tb3 { background: #fff; color: var(--c-tomato); border-color: #f9d6cd; }

/* 品牌标签（仅当商品有品牌时展示） */
.pcard-brand {
  display: flex; align-items: center; gap: 6px; margin: -6px 0 10px;
  font-size: 12px; color: var(--ink-2); overflow: hidden;
}
.pcard-brand .brand-tag {
  flex: none; font-size: 10.5px; line-height: 1.6; padding: 1px 7px; border-radius: 5px;
  color: var(--c-tomato); background: var(--c-blush-2); border: 1px solid var(--c-blush);
  letter-spacing: .06em;
}
.pcard-brand .brand-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge.coupon { color: #fff; background: var(--c-tomato); border-color: var(--c-tomato); }
.badge.mint { color: var(--c-mint-deep); border-color: #d9ece3; background: rgba(242, 251, 246, .95); }
.pcard-fav { position: absolute; top: 10px; right: 10px; z-index: 3; }
.fav-btn {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .94); border: 1px solid var(--line); color: var(--ink-3);
  transition: .25s var(--ease); backdrop-filter: blur(4px);
}
.fav-btn svg { width: 16px; height: 16px; }
.fav-btn:hover { color: var(--c-tomato); transform: scale(1.08); }
.fav-btn.on { color: #fff; background: var(--c-tomato); border-color: var(--c-tomato); }

.pcard-body { padding: 15px 16px 17px; display: flex; flex-direction: column; flex: 1; }
.pcard-title {
  font-size: 14px; line-height: 1.65; color: var(--ink); height: 46px; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-bottom: 9px;
}
.pcard:hover .pcard-title { color: var(--c-tomato-deep); }
.pcard-shop { font-size: 11.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; margin-bottom: 12px; overflow: hidden; }
.pcard-shop .shop-name-txt { color: var(--c-mint-deep); white-space: nowrap; }
.pcard-shop .shop-name-txt:hover { color: var(--c-mint); }
.pcard-shop .shop-name-txt.long { font-size: 10.5px; }
.pcard-shop .shop-name-txt.xlong { font-size: 9.5px; letter-spacing: -.2px; }
.pcard-price { display: flex; align-items: baseline; gap: 9px; margin-top: auto; }
.price-now {
  color: var(--c-tomato); font-family: 'FQYuanTi', var(--font-num);
  font-size: 26px; font-weight: 700; letter-spacing: -.01em;
}
.price-now i { font-size: 14px; font-style: normal; margin-right: 1px; font-family: 'FQYuanTi', var(--font-body); }
.price-old { color: var(--ink-4); font-size: 13px; text-decoration: line-through; font-family: 'FQYuanTi', var(--font-body); }
.pcard-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 11px; font-size: 11.5px; color: var(--ink-3);
}
.pcard-meta .meta-shop,
.pcard-meta .meta-sales,
.pcard-meta .meta-level {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px;
  border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--ink-3);
}
.pcard-meta .meta-sales b { color: var(--ink-2); font-weight: 700; font-family: 'FQYuanTi', var(--font-num); }
.pcard-meta .meta-shop b { color: var(--c-tomato); font-weight: 700; font-family: 'FQYuanTi', var(--font-num); }
.pcard-meta .meta-level b { font-weight: 600; }
.pcard-meta .meta-level svg { width: 11px; height: 11px; flex: none; }
.pcard-meta .meta-level { gap: 2px; }
.pcard-meta .meta-level.heart { color: #f26e5c; border-color: #f9d6cd; background: #fff7f5; }
.pcard-meta .meta-level.diamond { color: #4f9dc4; border-color: #cfe6f0; background: #f3f9fc; }
.pcard-meta .meta-level.crown { color: #4f7fc4; border-color: #cfe0f5; background: #f4f8fd; }
.pcard-meta .meta-level.gold { color: #d99b0b; border-color: #f3e0a8; background: #fffbf0; }
.coupon-chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--c-tomato-deep);
  border: 1px dashed var(--c-tomato-soft); border-radius: 6px; padding: 1px 8px; background: var(--c-blush-2);
}
.pcard-actions {
  display: flex; gap: 8px; margin-top: 13px; padding-top: 13px; border-top: 1px dashed var(--line-2);
}
.pcard-actions .btn { flex: 1; height: 34px; padding: 0 10px; font-size: 12.5px; }
.pcard-actions .btn svg { width: 14px; height: 14px; }

/* 骨架屏 */
.skeleton { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.sk-media { aspect-ratio: 1/1; background: linear-gradient(100deg, #fbf6f3 30%, #f5ece7 50%, #fbf6f3 70%); background-size: 220% 100%; animation: sk 1.5s infinite; }
.sk-line { height: 11px; border-radius: 5px; margin: 12px 16px; background: linear-gradient(100deg, #fbf6f3 30%, #f5ece7 50%, #fbf6f3 70%); background-size: 220% 100%; animation: sk 1.5s infinite; }
.sk-line.w60 { width: 60%; }
.sk-line.w40 { width: 40%; }
@keyframes sk { from { background-position: 120% 0; } to { background-position: -40% 0; } }

/* ---------------------------------------------------------------- 集市页 */
.shop-head { padding: 40px 0 26px; }
.shop-title { font-size: 34px; }
.filter-bar {
  background: #fff;
  border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
  padding: 14px 0; margin-bottom: 30px;
}
.filter-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-row + .filter-row { margin-top: 12px; }
.chip-group { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 6px 15px; border-radius: var(--r-pill); border: 1px solid var(--line);
  font-size: 13px; color: var(--ink-2); transition: .22s var(--ease); background: #fff;
}
.chip:hover { border-color: var(--c-tomato-soft); color: var(--c-tomato); }
.chip.on { background: var(--c-tomato); border-color: var(--c-tomato); color: #fff; box-shadow: 0 4px 12px rgba(226, 110, 92, .24); }
.chip.sm { padding: 4px 12px; font-size: 12.5px; }
.filter-sep { width: 1px; height: 22px; background: var(--line); }
.price-range { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); }
.price-range input { width: 66px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-xs); text-align: center; }
.result-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; font-size: 13px; color: var(--ink-3); flex-wrap: wrap; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 44px; }
.pagination button {
  min-width: 38px; height: 38px; padding: 0 13px; border-radius: var(--r-xs);
  border: 1px solid var(--line); color: var(--ink-2); font-size: 13.5px; transition: .22s var(--ease); background: #fff;
}
.pagination button:hover:not(:disabled) { border-color: var(--c-tomato-soft); color: var(--c-tomato); }
.pagination button.on { background: var(--c-tomato); border-color: var(--c-tomato); color: #fff; }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }

/* ---------------------------------------------------------------- 文章 */
.grid-posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.post-card {
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: #fff;
  display: flex; flex-direction: column; transition: .34s var(--ease);
}
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.post-cover { aspect-ratio: 16 / 10; background: var(--c-cream); overflow: hidden; position: relative; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; transition: .8s var(--ease); }
.post-card:hover .post-cover img { transform: scale(1.05); }
.post-cover.no-img { display: grid; place-items: center; background: linear-gradient(135deg, var(--c-blush-2), var(--c-mint-2)); }
.post-cover.no-img span { font-family: var(--font-display); font-size: 30px; color: var(--c-tomato-soft); letter-spacing: .2em; }
.post-body { padding: 20px 21px 22px; display: flex; flex-direction: column; flex: 1; }
.post-cat { font-size: 11.5px; letter-spacing: .16em; color: var(--c-tomato); margin-bottom: 10px; }
.post-title { font-size: 18.5px; line-height: 1.5; margin-bottom: 10px; }
.post-card:hover .post-title { color: var(--c-tomato-deep); }
.post-sum { font-size: 13px; color: var(--ink-2); line-height: 1.85; margin-bottom: 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--ink-3); padding-top: 14px; border-top: 1px dashed var(--line); }
.post-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag-pill { font-size: 11.5px; color: var(--c-mint-deep); background: var(--c-mint-2); padding: 1px 9px; border-radius: var(--r-pill); }

/* 文章列表（横向） */
.post-row { display: flex; gap: 24px; padding: 26px 0; border-bottom: 1px dashed var(--line); }
.post-row:last-child { border-bottom: 0; }
.post-row-cover { width: 210px; height: 140px; flex: none; border-radius: var(--r-sm); overflow: hidden; background: var(--c-cream); }
.post-row-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-row:hover .post-title { color: var(--c-tomato-deep); }

/* 文章正文 */
.article { padding: 46px 0 20px; }
.article-head { text-align: center; max-width: 760px; margin: 0 auto 40px; }
.article-title { font-size: 36px; line-height: 1.4; margin: 16px 0 20px; }
.article-meta { font-size: 13px; color: var(--ink-3); display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; align-items: center; }
.article-body { font-size: 16.5px; line-height: 2.1; color: #3a3330; }
.article-body > p { margin: 0 0 1.6em; }
.article-body h2 { font-size: 24px; margin: 2.2em 0 .9em; padding-left: 16px; border-left: 4px solid var(--c-blush); }
.article-body h3 { font-size: 19px; margin: 1.8em 0 .7em; }
.article-body img { border-radius: var(--r-sm); margin: 1.6em auto; box-shadow: var(--shadow-sm); }
.article-body blockquote {
  margin: 1.8em 0; padding: 18px 24px; background: var(--c-blush-2);
  border-left: 3px solid var(--c-tomato-soft); border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--ink-2); font-size: 15.5px;
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body code {
  background: var(--c-cream); border: 1px solid var(--line); border-radius: 5px;
  padding: 1px 6px; font-size: 13.5px; color: var(--c-tomato-deep);
  font-family: "Cascadia Code", Consolas, monospace;
}
.article-body pre {
  background: #fdf9f7; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 18px 20px; overflow: auto; font-size: 13.5px; line-height: 1.8;
}
.article-body pre code { background: none; border: 0; padding: 0; color: var(--ink); }
.article-body a { color: var(--c-tomato-deep); border-bottom: 1px solid var(--c-blush); }
.article-body a:hover { border-bottom-color: var(--c-tomato); }
.article-body ul, .article-body ol { padding-left: 1.5em; }
.article-body li { margin-bottom: .5em; }
.article-body hr { margin: 2.6em 0; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 14.5px; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.article-body th { background: var(--c-cream); font-weight: 600; }

.article-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 46px 0 0; padding-top: 26px; border-top: 1px dashed var(--line); }

/* ---------------------------------------------------------------- 评论/留言 */
.comment-box { margin-top: 40px; }
.comment-form { display: grid; gap: 12px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; }
.comment-form .row { display: flex; gap: 12px; }
.comment-form .input { background: #fff; }
.comment-list { margin-top: 26px; display: flex; flex-direction: column; }
.comment-item { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px dashed var(--line); }
.comment-item:last-child { border-bottom: 0; }
.avatar-dot {
  width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 16px; color: #fff; background: var(--c-tomato-soft);
}
.comment-main { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.comment-name { font-size: 13.5px; font-weight: 600; }
.comment-time { font-size: 11.5px; color: var(--ink-4); }
.comment-text { font-size: 14.5px; color: var(--ink-2); line-height: 1.9; word-break: break-word; }

/* ---------------------------------------------------------------- 商品详情 */
.pd { display: grid; grid-template-columns: 460px 1fr; gap: 52px; padding: 44px 0; align-items: start; }
.pd-gallery { position: sticky; top: 96px; }
.pd-main { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; aspect-ratio: 1/1; background: var(--c-cream); }
.pd-main img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.pd-thumb { width: 68px; height: 68px; border-radius: var(--r-xs); overflow: hidden; border: 2px solid transparent; background: var(--c-cream); transition: .2s var(--ease); }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumb.on { border-color: var(--c-tomato); }
.pd-info h1 { font-size: 27px; line-height: 1.5; margin-bottom: 14px; }
.pd-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.pd-price-card {
  background: linear-gradient(120deg, var(--c-blush-2), #fff 70%);
  border: 1px solid var(--c-blush); border-radius: var(--r-md); padding: 22px 24px; margin-bottom: 22px;
}
.pd-price { display: flex; align-items: baseline; gap: 12px; }
.pd-price .now { color: var(--c-tomato); font-family: 'FQYuanTi', var(--font-num); font-size: 44px; font-weight: 700; }
.pd-price .now i { font-size: 20px; font-style: normal; font-family: 'FQYuanTi', var(--font-body); }
.pd-price .old { color: var(--ink-4); text-decoration: line-through; font-size: 14px; font-family: 'FQYuanTi', var(--font-body); }
.pd-price-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; color: var(--ink-3); }
.pd-coupon {
  display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px dashed var(--c-tomato-soft);
  border-radius: var(--r-xs); padding: 5px 12px; color: var(--c-tomato-deep); font-size: 13px;
}
.pd-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 20px; margin-bottom: 24px; font-size: 13.5px; }
.pd-facts div { display: flex; gap: 10px; color: var(--ink-2); min-width: 0; }
.pd-facts span { color: var(--ink-3); flex: none; width: 62px; }
/* 详情页店铺名称：单行完整显示，过长自动缩字 */
.pd-facts .pd-shop-name { color: var(--c-mint-deep); white-space: nowrap; overflow: hidden; min-width: 0; font-weight: 600; }
.pd-facts .pd-shop-name.long { font-size: 12.5px; }
.pd-facts .pd-shop-name.xlong { font-size: 11.5px; letter-spacing: -.2px; }
.pd-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.pd-tip { font-size: 12.5px; color: var(--ink-3); background: var(--c-mint-2); border-radius: var(--r-sm); padding: 12px 16px; }
.pd-promo-list { margin-top: 22px; }
.pd-promo-list h4 { font-size: 14px; margin-bottom: 10px; }
.pd-promo { display: flex; gap: 12px; font-size: 13px; color: var(--ink-2); padding: 8px 0; border-bottom: 1px dashed var(--line-2); }
.pd-promo b { color: var(--c-tomato-deep); font-weight: 600; flex: none; }
.pd-promo .t { color: var(--ink-4); font-size: 12px; margin-left: auto; flex: none; }

/* 转链结果弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(60, 45, 40, .32); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-mask.open { display: flex; animation: fadeIn .22s var(--ease); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff; border-radius: var(--r-lg); width: 100%; max-width: 520px;
  box-shadow: var(--shadow-lg); max-height: 86vh; display: flex; flex-direction: column; overflow: hidden;
  animation: popIn .3s var(--ease);
}
@keyframes popIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 14px; }
.modal-head h3 { font-size: 18px; }
.modal-body { padding: 4px 24px 24px; overflow: auto; }
.modal-foot { padding: 16px 24px 22px; display: flex; gap: 12px; justify-content: flex-end; border-top: 1px solid var(--line-2); }
.copy-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 14px; margin-bottom: 10px; background: var(--bg-soft); }
.copy-row .k { font-size: 12px; color: var(--ink-3); width: 74px; flex: none; }
.copy-row .v {
  flex: 1; font-size: 13px; word-break: break-all; max-height: 62px; overflow: auto;
  font-family: "Cascadia Code", Consolas, monospace; color: var(--ink-2);
}
.copy-btn { flex: none; }

/* Toast */
.toast-wrap { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast {
  background: rgba(46, 41, 38, .93); color: #fff; font-size: 13.5px; padding: 11px 22px;
  border-radius: var(--r-pill); box-shadow: var(--shadow-md); animation: toastIn .3s var(--ease);
  display: flex; align-items: center; gap: 8px;
}
.toast.err { background: rgba(200, 56, 47, .95); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- 空状态 */
.empty { text-align: center; padding: 70px 20px; color: var(--ink-3); }
.empty .emoji { font-size: 46px; margin-bottom: 14px; }
.empty h3 { font-size: 18px; color: var(--ink-2); margin-bottom: 8px; }
.empty p { font-size: 13.5px; }

/* ---------------------------------------------------------------- 页脚 */
.footer { margin-top: 70px; background: var(--bg-soft); border-top: 1px solid var(--line-2); }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; padding: 56px 0 40px; }
.footer h4 { font-size: 14.5px; margin-bottom: 18px; letter-spacing: .08em; }
.footer-links { display: flex; flex-direction: column; gap: 11px; font-size: 13.5px; color: var(--ink-2); }
.footer-links a:hover { color: var(--c-tomato); }
.footer-about { font-size: 13.5px; color: var(--ink-2); line-height: 2; }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center;
  color: var(--ink-2); transition: .25s var(--ease); background: #fff;
}
.footer-social a:hover { color: #fff; background: var(--c-tomato); border-color: var(--c-tomato); transform: translateY(-3px); }
.footer-social svg { width: 17px; height: 17px; }
.footer-bottom {
  border-top: 1px dashed var(--line); padding: 22px 0 30px; font-size: 12.5px; color: var(--ink-3);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.footer-bottom a:hover { color: var(--c-tomato); }

/* ---------------------------------------------------------------- 页面通用块 */
.page-head { padding: 52px 0 34px; text-align: center; position: relative; overflow: hidden; }
.page-head h1 { font-size: 40px; }
.page-head p { color: var(--ink-3); margin-top: 14px; font-size: 14.5px; }

/* 分页：页码 + 跳页 */
.pager-info { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 30px; font-size: 13px; color: var(--ink-3); }
.pager-jump { display: inline-flex; align-items: center; gap: 6px; }
.pager-jump input {
  width: 62px; height: 34px; text-align: center; border: 1px solid var(--line);
  border-radius: var(--r-xs); background: #fff;
}
.pager-jump button { height: 34px; padding: 0 14px; border-radius: var(--r-xs); border: 1px solid var(--line); background: #fff; color: var(--ink-2); }
.pager-jump button:hover { border-color: var(--c-tomato-soft); color: var(--c-tomato); }

/* 优选开关 */
.quality-toggle {
  display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-2);
  background: var(--c-mint-2); border: 1px solid #d9ece3; border-radius: var(--r-pill); padding: 5px 15px 5px 8px;
  cursor: pointer; user-select: none;
}
.quality-toggle .sw {
  width: 34px; height: 20px; border-radius: 999px; background: #d8d0cb; position: relative; transition: .25s var(--ease); flex: none;
}
.quality-toggle .sw::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff;
  top: 2px; left: 2px; transition: .25s var(--ease); box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
}
.quality-toggle.on .sw { background: var(--c-mint); }
.quality-toggle.on .sw::after { left: 16px; }
.badge.quality { color: #fff; background: var(--c-mint-deep); border-color: var(--c-mint-deep); }
.crumb { font-size: 12.5px; color: var(--ink-3); margin-bottom: 14px; }
.crumb a:hover { color: var(--c-tomato); }

.panel { border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; padding: 26px 28px; }
.panel + .panel { margin-top: 22px; }
.panel-title { font-size: 17px; margin-bottom: 6px; display: flex; align-items: center; gap: 9px; }
.panel-sub { font-size: 12.5px; color: var(--ink-3); margin-bottom: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.note {
  font-size: 12.5px; color: var(--ink-2); background: var(--c-butter);
  border-radius: var(--r-sm); padding: 12px 16px; border: 1px solid #fbeccd;
}
.note.mint { background: var(--c-mint-2); border-color: #d9ece3; }
.note.blush { background: var(--c-blush-2); border-color: var(--c-blush); }
.tag-line { display: flex; gap: 10px; align-items: center; font-size: 12.5px; color: var(--ink-3); flex-wrap: wrap; }

.data-source {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-3);
}
.data-source .live { color: var(--c-mint-deep); }
.data-source .demo { color: #c99a2f; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.8s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ---------------------------------------------------------------- 入场动画 */
.rise { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.rise.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rise { opacity: 1; transform: none; } * { animation: none !important; } }

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1080px) {
  .grid-products { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { height: 330px; max-width: 460px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 30px; }
  .grid-posts { grid-template-columns: repeat(2, 1fr); }
  .pd { grid-template-columns: 1fr; gap: 34px; }
  .pd-gallery { position: static; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .wrap { padding: 0 18px; }
  .topbar-inner { height: 62px; gap: 12px; }
  .brand-sub { display: none; }
  .nav { display: none; }
  .hero { padding: 44px 0; }
  .hero h1 { font-size: 34px; }
  .hero-stats { gap: 22px; }
  .sec { padding: 44px 0; }
  .sec-title { font-size: 24px; }
  .grid-products, .grid-posts, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .post-row { flex-direction: column; gap: 14px; }
  .post-row-cover { width: 100%; height: 180px; }
  .article-title { font-size: 26px; }
  .article-body { font-size: 16px; }
  .footer-top { grid-template-columns: 1fr; gap: 26px; padding: 40px 0 28px; }
  .modal-foot { flex-direction: column-reverse; }
  .modal-foot .btn { width: 100%; }
}
