/* ============================================
   啡行咖 CAFIATOR — 美化版
   深蓝金光 · Apple级毛玻璃 · 精密排版
   ============================================ */

/* ---------- 变量 ---------- */
:root {
  --deep:         #0B1929;
  --mid:          #0f2133;
  --gold:         #D4AF37;
  --gold-light:   #F5D77A;
  --gold-grad:    linear-gradient(135deg, #D4AF37, #F5D77A);
  --w:            #ffffff;
  --w90:          rgba(255,255,255,0.9);
  --w70:          rgba(255,255,255,0.7);
  --w50:          rgba(255,255,255,0.5);
  --w30:          rgba(255,255,255,0.3);
  --w15:          rgba(255,255,255,0.15);
  --w08:          rgba(255,255,255,0.08);
  --w04:          rgba(255,255,255,0.04);
  --glass-bg:     rgba(20, 40, 65, 0.55);
  --glass-bd:     rgba(212, 175, 55, 0.12);
  --glass-blur:   blur(24px) saturate(180%);
  --nav-h:        64px;
  --ease:         cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- 重置 ---------- */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  background: var(--deep);
  color: var(--w70);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration:none; color:inherit; }
ul, ol { list-style:none; }
img { max-width:100%; display:block; }
button { cursor:pointer; border:none; background:none; font:inherit; color:inherit; }

/* ---------- 星空微光背景 ---------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(59,130,246,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(212,175,55,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(30,60,120,0.2) 0%, transparent 70%);
}

/* ---------- 容器 ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 毛玻璃 ---------- */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-bd);
  border-radius: 20px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.glass-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 40px rgba(212,175,55,0.05);
}

/* ---------- 渐变文字 ---------- */
.gradient-text {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   导航栏
   ============================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 24px;
  height: var(--nav-h);
  background: rgba(11, 25, 41, 0.82);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--w04);
  transition: background 0.3s, box-shadow 0.3s;
}
.navbar .container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-icon {
  width: 36px; height: 36px;
  background: var(--gold-grad);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 2px 12px rgba(212,175,55,0.25);
}
.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--w);
  letter-spacing: 0.03em;
}
.logo-text span { color: var(--gold); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 40px;
}
.nav-links a {
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--w50);
  border-radius: 999px;
  transition: color 0.3s, background 0.3s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--w);
  background: var(--w08);
}

/* 用户按钮 */
.user-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: 12px;
}
.user-btn {
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--w50);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 999px;
  background: rgba(212,175,55,0.04);
  transition: all 0.3s;
}
.user-btn:hover {
  background: rgba(212,175,55,0.1);
  border-color: rgba(212,175,55,0.4);
  color: var(--gold-light);
}
.register-btn {
  background: var(--gold-grad);
  color: var(--deep);
  border: none;
  font-weight: 600;
}
.register-btn:hover {
  box-shadow: 0 4px 16px rgba(212,175,55,0.35);
  transform: translateY(-1px);
  color: var(--deep);
}

/* 购物车图标 */
.cart-icon {
  position: relative;
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--w50);
  border-radius: 12px;
  transition: all 0.3s;
}
.cart-icon:hover {
  background: var(--w08);
  color: var(--gold);
}
.cart-count {
  position: absolute;
  top: 2px; right: 0;
  min-width: 18px; height: 18px;
  background: var(--gold);
  color: var(--deep);
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* 站内消息铃铛 */
.message-icon {
  position: relative;
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--w50);
  border-radius: 12px;
  transition: all 0.3s;
  cursor: pointer;
}
.message-icon:hover {
  background: var(--w08);
  color: var(--gold);
}
.message-count {
  position: absolute;
  top: 2px; right: 0;
  min-width: 18px; height: 18px;
  background: #e74c3c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* 汉堡菜单 */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px; height: 40px;
  gap: 5px;
  margin-left: auto;
  border-radius: 8px;
}
.mobile-toggle:hover { background: var(--w08); }
.mobile-toggle span {
  display: block;
  width: 18px; height: 1.5px;
  background: var(--w70);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ============================================
   Hero
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 40px) 24px 80px;
  position: relative;
  overflow: hidden;
  perspective: 1000px;
}

/* 背景层 */
.plane-trail-bg {
  position: absolute;
  inset: 0;
  background: url('飞机尾迹.jpg') center/cover no-repeat;
  opacity: 0.7;
  mix-blend-mode: screen;
  will-change: transform;
  pointer-events: none;
  z-index: 0;
}
.coffee-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
#coffeeCanvas {
  width: 100%;
  height: 100%;
  opacity: 0.6;
}
.fog-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 30%, rgba(139,90,43,0.4) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 70%, rgba(101,67,33,0.3) 0%, transparent 50%),
    rgba(11,25,41,0.6);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.logo-gradient-bg {
  display: none;
}

/* Hero金色光晕动画 */
.hero::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(212,175,55,0.2) 0%, rgba(212,175,55,0.05) 40%, transparent 70%);
  animation: heroGlow 4s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}
@keyframes heroGlow {
  0% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  100% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

/* Hero 网格布局 */
.hero .container {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero-content { position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(212,175,55,0.15);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 50px;
  color: var(--gold-light);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero h1 {
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}
.hero h1 .line1 {
  display: block;
  color: var(--w);
}
.hero h1 .line2 {
  display: block;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 18px;
  color: var(--w50);
  margin-bottom: 40px;
  max-width: 480px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* 按钮 */
.gold-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--gold-grad);
  border: none;
  border-radius: 999px;
  color: var(--deep);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.35s var(--ease);
  box-shadow: 0 4px 20px rgba(212,175,55,0.3);
  text-decoration: none;
}
.gold-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(212,175,55,0.4);
}
.gold-btn:active { transform: translateY(0) scale(0.97); }

.outline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  background: transparent;
  border: 1.5px solid var(--w15);
  border-radius: 999px;
  color: var(--w70);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.35s var(--ease);
  text-decoration: none;
}
.outline-btn:hover {
  border-color: var(--w30);
  background: var(--w08);
  color: var(--w);
  transform: translateY(-2px);
}
.outline-btn:active { transform: translateY(0) scale(0.97); }

/* Hero 右侧 */
.hero-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  transform-style: preserve-3d;
  transition: transform 0.3s ease-out;
}

/* 居中logo - 放在音标图上方居中部位 */
.hero-logo-center {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 100px;
  height: auto;
  z-index: 10;
  filter: drop-shadow(0 4px 20px rgba(212,175,55,0.4));
}

/* 边缘羽化 */
.hero-image-container {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.1),
    0 0 60px 20px rgba(255,255,255,0.25),
    0 0 120px 60px rgba(255,255,255,0.12),
    0 0 200px 120px rgba(255,255,255,0.05),
    0 25px 80px rgba(0,0,0,0.5),
    0 0 60px rgba(212,175,55,0.15);
}
.hero-image {
  width: 100%;
  height: 500px;
  object-fit: cover;
  display: block;
}
.hero-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 50%,
    rgba(11,25,41,0.8) 100%
  );
}

/* 浮动数据卡片 */
.hero-float-card {
  position: relative;
  margin-top: 24px;
  padding: 20px 24px;
  background: rgba(11,25,41,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  z-index: 10;
}
.hero-float-card .stat { text-align: center; }
.hero-float-card .stat-value {
  font-size: 22px;
  font-weight: 700;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-float-card .stat-label {
  font-size: 11px;
  color: var(--w30);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* 航班动画 */
.flight-animation {
  position: absolute;
  top: 20%; right: -10%;
  width: 300px; height: 300px;
  opacity: 0.6;
  pointer-events: none;
}
.flight-path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1;
  stroke-dasharray: 8 4;
  animation: dash 20s linear infinite;
}
@keyframes dash { to { stroke-dashoffset: -1000; } }
.flight-dot {
  fill: var(--gold);
  animation: fly 8s ease-in-out infinite;
}
@keyframes fly {
  0%, 100% { offset-distance: 0%; opacity: 1; }
  50% { offset-distance: 100%; opacity: 0.5; }
}

/* ============================================
   飞机尾迹动画区域
   ============================================ */
.plane-trail-section {
  width: 100%;
  height: 20px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--deep) 0%, rgba(11,25,41,0.8) 100%);
}
#planeTrailCanvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 20px;
}

/* ============================================
   通用 Section
   ============================================ */
section {
  position: relative;
  z-index: 1;
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--w30);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 12px;
}
.section-header h2 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.section-header p {
  font-size: 17px;
  color: var(--w50);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ============================================
   产品展示
   ============================================ */
.products {
  padding-top: 60px;
  background: linear-gradient(180deg, transparent 0%, rgba(15,33,51,0.4) 50%, transparent 100%);
  scroll-margin-top: 80px;
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.product-card {
  overflow: hidden;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.product-image-wrap {
  overflow: hidden;
  border-radius: 20px 20px 0 0;
}
.product-image {
  width: 100%;
  height: 260px;
  object-fit: cover;
  transition: transform 0.5s var(--ease), filter 0.5s var(--ease);
}
.product-card:hover .product-image {
  transform: scale(1.06);
  filter: brightness(1.08);
}
.product-info {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  width: fit-content;
  margin-bottom: 12px;
  letter-spacing: 0.03em;
}
.roast-dark {
  background: rgba(101,67,33,0.5);
  color: #D4A574;
  border: 1px solid rgba(139,90,43,0.4);
}
.roast-medium {
  background: rgba(166,124,82,0.4);
  color: #E8C9A0;
  border: 1px solid rgba(139,90,43,0.3);
}
.roast-light {
  background: rgba(212,175,55,0.12);
  color: var(--gold-light);
  border: 1px solid rgba(212,175,55,0.25);
}
.product-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--w90);
  margin-bottom: 8px;
  line-height: 1.3;
}
.product-desc {
  font-size: 14px;
  color: var(--w50);
  margin-bottom: 18px;
  line-height: 1.65;
  flex: 1;
}
.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.product-price {
  font-size: 22px;
  font-weight: 800;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.product-price span {
  font-size: 13px;
  font-weight: 400;
  -webkit-text-fill-color: var(--w30);
}
.add-cart-btn {
  width: 42px; height: 42px;
  background: var(--gold-grad);
  border: none;
  border-radius: 50%;
  color: var(--deep);
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--ease);
}
.add-cart-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 20px rgba(212,175,55,0.4);
}
.add-cart-btn:active { transform: scale(0.95); }

/* ============================================
   积分计划
   ============================================ */
.points-section {
  overflow: hidden;
  padding-top: 40px;
  background: linear-gradient(180deg, transparent 0%, rgba(212,175,55,0.02) 50%, transparent 100%);
}
.points-section::before {
  content: '';
  position: absolute;
  left: -30%; top: 50%;
  transform: translateY(-50%);
  width: 60%; height: 100%;
  background: radial-gradient(ellipse, rgba(212,175,55,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.points-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 60px;
}
.point-card {
  padding: 40px 28px;
  text-align: center;
}
.point-icon {
  width: 72px; height: 72px;
  margin: 0 auto 20px;
  background: var(--gold-grad);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 8px 28px rgba(212,175,55,0.2);
}
.point-value {
  font-size: 36px;
  font-weight: 800;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}
.point-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--w90);
  margin-bottom: 10px;
}
.point-desc {
  font-size: 14px;
  color: var(--w30);
  line-height: 1.6;
}

/* ============================================
   品牌故事
   ============================================ */
.story {
  padding: 0;
  background: var(--deep-bg);
}
.story-hero {
  position: relative;
  overflow: hidden;
  min-height: 520px;
}
.story-hero img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  filter: brightness(.7) saturate(1.1);
}
.story-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(6,9,15,.85) 80%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.story-overlay-inner {
  padding: 56px;
  max-width: 600px;
}
.story-year {
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: 80px;
  font-weight: 500;
  background: linear-gradient(135deg, #D4AF37 0%, #F5D77A 50%, #D4AF37 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 12px;
  letter-spacing: -.03em;
}
.story-heading {
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: 32px;
  font-weight: 600;
  color: var(--w95, #f2f2f2);
  margin-bottom: 12px;
}
.story-desc {
  font-size: 16px;
  color: var(--w60, rgba(255,255,255,0.6));
  line-height: 1.7;
}
.story-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 48px;
  margin-bottom: 48px;
}
.story-feature {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 28px 24px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-bd);
  border-radius: 12px;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.story-feature:hover {
  transform: translateY(-2px);
  border-color: rgba(212, 175, 55, 0.2);
}
.story-feature > .icon {
  font-size: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}
.story-feature .feature-text strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--w85, rgba(255,255,255,0.85));
  margin-bottom: 4px;
}
.story-feature .feature-text p {
  font-size: 13px;
  color: var(--w35, rgba(255,255,255,0.35));
  line-height: 1.6;
}

/* ============================================
   页脚
   ============================================ */
.footer {
  padding: 80px 0 40px;
  background: rgba(5,15,30,0.7);
  border-top: 1px solid var(--w04);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 60px;
  margin-bottom: 60px;
}
.footer-brand .logo { margin-bottom: 20px; }
.footer-brand p {
  font-size: 14px;
  color: var(--w30);
  line-height: 1.7;
  max-width: 300px;
}
.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  color: var(--gold);
}
.footer-col li { margin-bottom: 12px; }
.footer-col a {
  font-size: 14px;
  color: var(--w30);
  transition: color 0.3s;
}
.footer-col a:hover { color: var(--gold-light); }
.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--w08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-bottom p {
  font-size: 13px;
  color: var(--w30);
}
.social-links {
  display: flex;
  gap: 10px;
}
.social-links a {
  width: 40px; height: 40px;
  background: var(--w08);
  border: 1px solid var(--glass-bd);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--w50);
  transition: all 0.3s;
  font-size: 16px;
}
.social-links a:hover {
  background: rgba(212,175,55,0.15);
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

/* ============================================
   购物车
   ============================================ */
.cart-sidebar {
  position: fixed;
  top: 0; right: -400px;
  width: 380px;
  max-width: 90vw;
  height: 100vh;
  background: rgba(11,25,41,0.97);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-left: 1px solid var(--w08);
  z-index: 2000;
  transition: right 0.4s var(--ease);
  display: flex;
  flex-direction: column;
}
.cart-sidebar.open { right: 0; }

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid var(--w08);
}
.cart-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--w90);
}
.cart-close {
  width: 36px; height: 36px;
  background: var(--w08);
  border: none;
  border-radius: 50%;
  color: var(--w70);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}
.cart-close:hover {
  background: rgba(212,175,55,0.15);
  color: var(--gold);
}
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}
.cart-empty {
  text-align: center;
  color: var(--w30);
  padding: 60px 0;
  font-size: 15px;
}
.cart-item {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--w08);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-image {
  width: 72px; height: 72px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--w90);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 8px;
}
.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.quantity-btn {
  width: 30px; height: 30px;
  background: var(--w08);
  border: none;
  border-radius: 50%;
  color: var(--w70);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}
.quantity-btn:hover {
  background: var(--w15);
  color: var(--w);
}
.cart-item-quantity {
  font-size: 14px;
  font-weight: 600;
  color: var(--w90);
  min-width: 20px;
  text-align: center;
}
.cart-item-remove {
  background: none;
  border: none;
  color: var(--w30);
  font-size: 20px;
  margin-left: auto;
  transition: color 0.3s;
}
.cart-item-remove:hover { color: #ef4444; }

.cart-footer {
  padding: 24px;
  border-top: 1px solid var(--w08);
}
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 15px;
  color: var(--w50);
}
.total-price {
  font-size: 24px;
  font-weight: 800;
  color: var(--gold);
}
.checkout-btn {
  width: 100%;
  padding: 16px;
  background: var(--gold-grad);
  border: none;
  border-radius: 50px;
  color: var(--deep);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  box-shadow: 0 4px 20px rgba(212,175,55,0.25);
}
.checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(212,175,55,0.35);
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}
.cart-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* 站内消息侧边栏 */
.message-sidebar {
  position: fixed;
  top: 0; right: -400px;
  width: 380px;
  max-width: 90vw;
  height: 100vh;
  background: rgba(11,25,41,0.97);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-left: 1px solid var(--w08);
  z-index: 2000;
  transition: right 0.4s var(--ease);
  display: flex;
  flex-direction: column;
}
.message-sidebar.open { right: 0; }
.message-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid var(--w08);
}
.message-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--w90);
}
.message-close {
  width: 36px; height: 36px;
  background: var(--w08);
  border: none;
  border-radius: 50%;
  color: var(--w70);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  cursor: pointer;
}
.message-close:hover { background: var(--gold); color: var(--deep); }
.message-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}
.message-overlay.show { opacity: 1; visibility: visible; }
.message-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}
.message-item {
  padding: 16px;
  background: var(--w08);
  border-radius: 12px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.3s;
}
.message-item:hover { background: var(--w10); }
.message-item.unread { border-left: 3px solid var(--gold); }
.message-title { font-size: 14px; font-weight: 600; color: var(--w90); margin-bottom: 8px; }
.message-content { font-size: 13px; color: var(--w50); line-height: 1.5; margin-bottom: 8px; }
.message-time { font-size: 12px; color: var(--w30); }
.unread-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--gold);
  border-radius: 50%;
  margin-right: 6px;
}

/* ============================================
   滚动进场动画
   ============================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   响应式 — 平板 (≤968px)
   ============================================ */
@media (max-width: 968px) {
  .hero {
    padding: calc(var(--nav-h) + 20px) 20px 60px;
    min-height: auto;
  }
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  .hero-content { order: 2; }
  .hero-visual {
    order: 1;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }
  .hero-desc {
    margin: 0 auto 28px;
    font-size: 16px;
    max-width: 100%;
  }
  .hero-buttons { justify-content: center; }
  .hero-badge { font-size: 12px; padding: 5px 14px; }
  .hero h1 { font-size: 32px; }
  .hero-image-container { max-width: 340px; }
  .hero-logo-center {
    width: 80px;
    padding: 6px;
    border-radius: 12px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .product-image { height: 200px; }
  .points-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .story-hero { min-height: 360px; }
  .story-overlay-inner { padding: 32px; }
  .story-year { font-size: 52px; }
  .story-features { grid-template-columns: repeat(2, 1fr); }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  .plane-trail-bg { opacity: 0.4; }
}

/* ============================================
   响应式 — 手机 (≤640px)
   ============================================ */
@media (max-width: 640px) {
  :root { --nav-h: 56px; }

  .nav-links { display: none; }
  .mobile-toggle { display: flex; }
  .user-nav { display: none; }
  .navbar { padding: 0 16px; }

  .hero {
    min-height: 100vh;
    padding: calc(var(--nav-h) + 16px) 16px 40px;
  }
  .hero .container { gap: 24px; }
  .hero-content { order: 2; width: 100%; }
  .hero-visual {
    order: 1;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
  .hero-badge {
    font-size: 11px;
    padding: 5px 12px;
    margin-bottom: 14px;
  }
  .hero h1 {
    font-size: 26px;
    line-height: 1.2;
    margin-bottom: 14px;
  }
  .hero-desc {
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.6;
  }
  .hero-buttons {
    flex-direction: column;
    gap: 10px;
  }
  .gold-btn, .outline-btn {
    padding: 13px 24px;
    font-size: 14px;
    width: 100%;
  }
  .hero-image-container {
    max-width: 280px;
    border-radius: 20px;
  }
  .hero-image {
    border-radius: 20px;
    height: auto;
    max-height: 350px;
    object-fit: contain;
  }
  .hero-logo-center {
    width: 64px;
    padding: 5px;
    border-radius: 10px;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 16px;
  }
  .product-image { height: 180px; }
  .product-info { padding: 18px 20px 20px; }

  .story-hero { min-height: 280px; }
  .story-overlay-inner { padding: 24px; }
  .story-year { font-size: 48px; }
  .story-features { grid-template-columns: 1fr; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
    padding: 24px 16px;
  }

  .plane-trail-bg { opacity: 0.3; }
  #coffeeCanvas { opacity: 0.3; }
  .cart-sidebar { width: 100%; max-width: 100%; }
  .message-sidebar { width: 100%; max-width: 100%; }
}
