/* ============================================================
   CoffeeWeGift 咖啡有礼 — 二级聚合页 / 产品详情页 共享样式
   VI 配色：浅蓝 #EAF4FC / 米白 #FFFEF2 / 天蓝 #87BCE6 / 琥珀棕 #945C26
   ============================================================ */
:root {
  --paper: #FFFEF2;
  --paper-2: #F7F6EA;
  --mist: #EAF4FC;
  --mist-deep: #DCEEFB;
  --ink: #232323;
  --text-body: #4A4942;
  --text-muted: #8C8A7E;
  --accent: #87BCE6;
  --accent-deep: #4E87C0;
  --amber: #945C26;
  --amber-soft: #C49A6A;
  --white: #FFFFFF;
  --line: rgba(35, 35, 35, 0.09);
  --line-soft: #E7E6DA;
  --radius: 20px;
  --radius-sm: 13px;
  --max-width: 1140px;
  --shadow-sm: 0 1px 3px rgba(35, 35, 35, 0.04);
  --shadow-md: 0 10px 30px rgba(35, 35, 35, 0.07);
  --shadow-lg: 0 18px 50px rgba(35, 35, 35, 0.10);
  --font-sans: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-brand: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", "Helvetica Neue", Arial, sans-serif;
  --font-heading: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--text-body);
  background: var(--paper);
  line-height: 1.85;
  font-size: 14px;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ========== NAV ========== */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 254, 242, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 62px;
}
.nav-brand {
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 9px;
}
.nav-brand em {
  font-style: normal;
  color: var(--accent-deep);
  font-family: var(--font-brand);
  font-size: 15px;
  white-space: nowrap;
}
.logo-nav { height: 26px; width: auto; object-fit: contain; vertical-align: middle; }
.nav-links { display: flex; gap: 4px; list-style: none; }
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 8px 17px;
  border-radius: 30px;
  transition: all 0.25s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--ink); background: var(--paper-2); }
.nav-links a.active { color: #fff; background: var(--accent-deep); }
.nav-toggle { display: none; background: none; border: none; color: var(--ink); font-size: 20px; cursor: pointer; }

/* ========== PAGE HERO ========== */
.page-hero {
  background: linear-gradient(135deg, var(--mist) 0%, var(--paper) 60%);
  border-bottom: 1px solid var(--line);
  padding: 56px 28px 44px;
}
.page-hero-inner { max-width: var(--max-width); margin: 0 auto; }
.page-hero .eyebrow {
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--accent-deep);
  font-weight: 600;
  margin-bottom: 12px;
}
.page-hero h1 {
  font-family: var(--font-heading);
  font-size: 34px;
  color: var(--ink);
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}
.page-hero p {
  font-size: 14.5px;
  color: var(--text-body);
  max-width: 720px;
}
.breadcrumb {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 28px 0;
  font-size: 12.5px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.breadcrumb a { color: var(--accent-deep); }
.breadcrumb a:hover { text-decoration: underline; }

/* ========== CATALOG：左侧筛选栏 + 右侧产品网格（参考 paperlesspost） ========== */
.catalog {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 26px 28px 70px;
  display: grid;
  grid-template-columns: 232px 1fr;
  gap: 34px;
  align-items: start;
}

/* --- 左侧筛选栏 --- */
.filter-sidebar {
  position: sticky;
  top: 86px;
  border-right: 1px solid var(--line);
  padding-right: 22px;
}
.fs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.fs-head-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.06em;
}
.fs-head-title svg { width: 18px; height: 18px; color: var(--amber); }
.fs-clear {
  background: none;
  border: none;
  font-size: 12px;
  color: var(--accent-deep);
  cursor: pointer;
  letter-spacing: 0.03em;
  padding: 2px 4px;
}
.fs-clear:hover { text-decoration: underline; }
.fs-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 18px;
}
.fs-search svg { width: 15px; height: 15px; color: var(--text-muted); flex: none; }
.fs-search input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--ink);
  font-family: var(--font-sans);
  width: 100%;
}
.fs-group { border-bottom: 1px solid var(--line); padding: 4px 0 10px; }
.fs-group:last-child { border-bottom: none; }
.fs-group-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.05em;
  padding: 8px 0;
  text-align: left;
}
.fs-chev {
  font-size: 13px;
  color: var(--text-muted);
  transition: transform 0.22s ease;
  line-height: 1;
}
.fs-group:not(.open) .fs-chev { transform: rotate(-90deg); }
.fs-group-body { padding: 2px 0 6px; }
.fs-group:not(.open) .fs-group-body { display: none; }
.fs-link {
  display: block;
  font-size: 13px;
  color: var(--text-body);
  padding: 6px 10px;
  border-radius: 8px;
  letter-spacing: 0.03em;
  transition: all 0.18s;
}
.fs-link:hover { color: var(--accent-deep); background: var(--mist); }
.fs-link.active { color: var(--accent-deep); font-weight: 600; background: var(--mist); }
.fs-check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--text-body);
  padding: 6px 2px;
  cursor: pointer;
  letter-spacing: 0.02em;
  user-select: none;
}
.fs-check:hover { color: var(--ink); }
.fs-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent-deep);
  cursor: pointer;
  flex: none;
}
.fs-empty { font-size: 12.5px; color: var(--text-muted); }

/* --- 右侧：工具条 + 网格 --- */
.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.result-count { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; }
.sort-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  white-space: nowrap;
}
.sort-box select {
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  outline: none;
}

/* ========== PRODUCT GRID ========== */
.product-section { max-width: var(--max-width); margin: 0 auto; padding: 34px 28px 70px; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.pcard {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  display: flex;
  flex-direction: column;
}
.pcard:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.pcard-img {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--mist);
  overflow: hidden;
}
.pcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.pcard:hover .pcard-img img { transform: scale(1.05); }
.pcard-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(35, 35, 35, 0.62);
  color: #fff;
  font-size: 11.5px;
  padding: 3px 10px;
  border-radius: 30px;
  backdrop-filter: blur(4px);
}
.pcard-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pcard-title {
  font-family: var(--font-heading);
  font-size: 17px;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.pcard-sub { font-size: 13px; color: var(--text-body); line-height: 1.7; }
.pcard-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.pcard-tags span {
  font-size: 11px;
  padding: 3px 10px;
  background: var(--paper-2);
  border-radius: 30px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}
.pcard-more {
  margin-top: auto;
  font-size: 13px;
  color: var(--accent-deep);
  letter-spacing: 0.04em;
  font-weight: 500;
}
.pcard:hover .pcard-more { text-decoration: underline; }
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 70px 20px;
  color: var(--text-muted);
  font-size: 15px;
}

/* ========== PRODUCT DETAIL ========== */
.detail-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 30px 28px 80px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: start;
}
.gallery { position: sticky; top: 90px; }
.gallery-main {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--mist);
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumbs button {
  width: 76px; height: 60px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  background: var(--mist);
  cursor: pointer;
  padding: 0;
  transition: border-color 0.2s;
}
.gallery-thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs button.active { border-color: var(--accent-deep); }

.detail-info .eyebrow {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--accent-deep);
  font-weight: 600;
  margin-bottom: 10px;
}
.detail-info h1 {
  font-family: var(--font-heading);
  font-size: 30px;
  color: var(--ink);
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}
.detail-info .summary {
  font-size: 15px;
  color: var(--text-body);
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--line-soft);
}
.detail-info .tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 22px; }
.detail-info .tags span {
  font-size: 12px;
  padding: 4px 12px;
  background: var(--paper-2);
  border-radius: 30px;
  color: var(--text-body);
}
.detail-info .desc-title {
  font-family: var(--font-heading);
  font-size: 16px;
  color: var(--amber);
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}
.detail-info .desc {
  font-size: 14.5px;
  color: var(--text-body);
  line-height: 1.95;
  white-space: pre-line;
}
.detail-actions { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 14px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.25s;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent-deep); color: #fff; }
.btn-primary:hover { background: var(--amber); }
.btn-ghost { background: transparent; border-color: var(--line-soft); color: var(--text-body); }
.btn-ghost:hover { border-color: var(--accent-deep); color: var(--accent-deep); }

/* ========== RELATED ========== */
.related { max-width: var(--max-width); margin: 0 auto; padding: 0 28px 80px; }
.related h2 {
  font-family: var(--font-heading);
  font-size: 21px;
  color: var(--ink);
  margin-bottom: 22px;
  letter-spacing: 0.02em;
}
.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.rel-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s, box-shadow 0.25s;
}
.rel-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.rel-card-img { aspect-ratio: 4 / 3; background: var(--mist); overflow: hidden; }
.rel-card-img img { width: 100%; height: 100%; object-fit: cover; }
.rel-card-body { padding: 12px 14px 16px; }
.rel-card-body h4 { font-family: var(--font-heading); font-size: 14.5px; color: var(--ink); margin-bottom: 4px; }
.rel-card-body p { font-size: 12px; color: var(--text-muted); }

/* ========== FOOTER ========== */
.footer {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  padding: 44px 28px 38px;
  text-align: center;
}
.footer p {
  color: var(--text-muted);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  line-height: 1.95;
}
.footer-brand {
  color: var(--ink) !important;
  font-family: var(--font-brand);
  font-size: 16px !important;
  margin-bottom: 16px !important;
  letter-spacing: 0.08em !important;
}
.footer-brand em { font-style: normal; color: var(--accent-deep); }
.logo-footer { height: 28px; }

/* ========== FAB + BACK TO TOP ========== */
.fab-group { position: fixed; right: 26px; bottom: 92px; display: flex; flex-direction: column; gap: 12px; z-index: 950; }
.fab {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: var(--accent-deep);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  transition: all 0.25s;
}
.fab:hover { background: var(--amber); transform: translateY(-2px); }
.fab svg { width: 22px; height: 22px; }
.entry-hidden { display: none; }
.back-to-top {
  position: fixed;
  right: 26px;
  bottom: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--white);
  color: var(--accent-deep);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  z-index: 950;
}
.back-to-top.show { opacity: 1; pointer-events: auto; }
.back-to-top svg { width: 22px; height: 22px; }

/* ========== RESPONSIVE ========== */
@media (max-width: 980px) {
  .catalog { grid-template-columns: 1fr; gap: 20px; padding-top: 18px; }
  .filter-sidebar {
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding-right: 0;
    padding-bottom: 14px;
  }
}
@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-wrap { grid-template-columns: 1fr; gap: 26px; }
  .gallery { position: static; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 62px; left: 0; right: 0;
    background: var(--paper);
    padding: 8px;
    gap: 2px;
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open a { padding: 9px 16px; }
  .page-hero { padding: 40px 20px 32px; }
  .page-hero h1 { font-size: 26px; }
  .catalog { padding: 16px 18px 56px; }
  .product-section { padding: 24px 18px 56px; }
  .product-grid { grid-template-columns: 1fr; gap: 18px; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .detail-wrap { padding: 22px 18px 60px; }
}

/* 注册商标符号：右上角小字 */
.reg{
  font-size: .46em;
  font-weight: 500;
  line-height: 0;
  vertical-align: super;
  position: relative;
  top: -.12em;
  margin-left: .06em;
  letter-spacing: 0;
  font-style: normal;
}


/* 卡片圆角收敛：顶部小圆角、底部直角（与首页模块卡片语言一致） */
.pcard { border-radius: 8px 8px 0 0; }
