/* 明亮中式主题变量 */
:root {
  --bg-paper: #fdfcf7;      /* 宣纸白背景 */
  --bg-card: #ffffff;       /* 卡片纯白 */
  --tea-green: #3b5249;     /* 黛绿（主品牌色） */
  --tea-brown: #b36d32;     /* 茶汤色/高光色 */
  --text-main: #2c3e50;     /* 正文深灰 */
  --text-muted: #7f8c8d;    /* 辅助说明文字 */
  --border-color: #eae3d9;  /* 温暖的边框色 */
  --wechat-green: #07c160;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background-color: var(--bg-paper);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

.serif-title {
  font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
  font-weight: 600;
}

/* 导航栏改用明亮通透风格 */
header {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  padding: 15px 40px; border-radius: 999px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05); z-index: 1000;
  display: flex; gap: 30px;
}
header a { text-decoration: none; color: var(--text-muted); transition: 0.3s; font-size: 15px; font-weight: 500;}
header a.active, header a:hover { color: var(--tea-green); }

/* 头图区 */
.hero-section {
  height: 35vh; display: flex; align-items: center; justify-content: center;
  text-align: center; margin-top: 60px;
}
.hero-content h1 { font-size: 2.8rem; color: var(--tea-green); margin-bottom: 15px; letter-spacing: 2px; }
.hero-content p { color: var(--text-muted); font-size: 1.1rem; letter-spacing: 1px; }

/* 商品网格 */
.shop-container {
  max-width: 1200px; margin: 0 auto; padding: 0 20px 100px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px;
}

/* 明亮版商品卡片 */
.tea-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 8px; overflow: hidden; cursor: pointer;
  transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.tea-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(59, 82, 73, 0.1);
  border-color: var(--tea-green);
}
.card-img { width: 100%; height: 280px; overflow: hidden; background: #f5f5f5; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.tea-card:hover .card-img img { transform: scale(1.05); }
.card-info { padding: 20px; text-align: center; }
.card-info h3 { font-size: 1.2rem; margin-bottom: 8px; color: var(--text-main); }
.card-info .price { color: var(--tea-brown); font-size: 1.1rem; font-weight: bold; }

/* ======== 弹窗整体 ======== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(44, 62, 80, 0.6); backdrop-filter: blur(8px);
  z-index: 2000; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: 0.3s;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal-wrapper {
  width: 1100px; max-width: 95vw; height: 85vh;
  background: var(--bg-paper); border-radius: 12px; position: relative; overflow: hidden;
  box-shadow: 0 25px 50px rgba(0,0,0,0.2);
  transform: translateY(20px); transition: 0.4s cubic-bezier(0.16,1,0.3,1);
}
.modal-overlay.active .modal-wrapper { transform: translateY(0); }

.btn-close {
  position: absolute; top: 20px; right: 20px; z-index: 10;
  background: #fff; border: 1px solid var(--border-color); color: var(--text-main);
  width: 36px; height: 36px; border-radius: 50%; font-size: 16px;
  cursor: pointer; transition: 0.3s; box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.btn-close:hover { background: var(--text-main); color: #fff; transform: rotate(90deg); }

.modal-layout { display: flex; height: 100%; }

/* ====== 左侧：图片展示区 ====== */
.modal-visual { flex: 1.1; display: flex; flex-direction: column; padding: 30px; background: #fff; border-right: 1px solid var(--border-color); }
.main-img-box { flex: 1; border-radius: 8px; overflow: hidden; margin-bottom: 15px; background: #f9f9f9; }
.main-img-box img { width: 100%; height: 100%; object-fit: cover; }
.thumbnail-gallery { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 5px; }
.thumbnail-gallery::-webkit-scrollbar { height: 4px; }
.thumbnail-gallery::-webkit-scrollbar-thumb { background: var(--border-color); }
.thumb-img {
  width: 80px; height: 80px; border-radius: 6px; cursor: pointer;
  object-fit: cover; opacity: 0.6; border: 2px solid transparent; transition: 0.2s;
}
.thumb-img:hover { opacity: 1; }
.thumb-img.active { opacity: 1; border-color: var(--tea-brown); }

/* ====== 右侧：信息与互动区 ====== */
.modal-info { flex: 1.2; padding: 40px; overflow-y: auto; background: var(--bg-paper); }
.modal-info::-webkit-scrollbar { width: 6px; }
.modal-info::-webkit-scrollbar-thumb { background: #dcd6ce; border-radius: 3px; }

.tags-container { display: flex; gap: 8px; margin-bottom: 15px; }
.tag { background: rgba(179, 109, 50, 0.1); color: var(--tea-brown); padding: 4px 10px; font-size: 12px; border-radius: 4px; }

.info-header { margin-bottom: 30px; }
.info-header h2 { font-size: 2.2rem; color: var(--tea-green); margin-bottom: 15px; }
.info-header .price { font-size: 1.8rem; font-weight: bold; color: var(--tea-brown); margin-bottom: 20px; }
.info-header .desc { color: var(--text-main); line-height: 1.8; font-size: 1rem; }

/* 详情分块标题 */
.section-title { font-size: 1.1rem; color: var(--tea-green); margin-bottom: 15px; border-bottom: 1px solid var(--border-color); padding-bottom: 8px; display: flex; align-items: center; gap: 8px; }

/* 参数网格 */
.detail-section { margin-bottom: 30px; }
.specs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.spec-item { display: flex; font-size: 0.95rem; background: #fff; padding: 10px 15px; border-radius: 6px; border: 1px solid var(--border-color); }
.spec-label { color: var(--text-muted); width: 70px; flex-shrink: 0; }
.spec-value { color: var(--text-main); font-weight: 500; }

.brewing-text { font-size: 0.95rem; color: var(--text-main); line-height: 1.6; background: rgba(59, 82, 73, 0.05); padding: 15px; border-radius: 6px; border-left: 3px solid var(--tea-green); }

/* 操作按钮 */
.action-group { display: flex; gap: 15px; margin-bottom: 40px; padding-top: 10px; }
.action-group button {
  flex: 1; padding: 14px 0; border-radius: 8px; font-size: 15px;
  cursor: pointer; transition: 0.3s; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: bold; border: none;
}
.btn-wechat { background: var(--wechat-green); color: #fff; box-shadow: 0 4px 15px rgba(7, 193, 96, 0.2); }
.btn-wechat:hover { background: #06ad56; transform: translateY(-2px); }
.btn-copy { background: #fff; border: 1px solid var(--tea-green); color: var(--tea-green); }
.btn-copy:hover { background: var(--tea-green); color: #fff; transform: translateY(-2px); }

/* 评论区 */
.comments-list { max-height: 250px; overflow-y: auto; margin-bottom: 20px; display: flex; flex-direction: column; gap: 15px; padding-right: 10px; }
.comment-item { display: flex; gap: 12px; background: #fff; padding: 15px; border-radius: 8px; border: 1px solid var(--border-color); }
.comment-avatar { width: 36px; height: 36px; background: var(--tea-green); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; flex-shrink: 0;}
.comment-content .user { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; font-weight: 500; }
.comment-content .text { font-size: 14px; line-height: 1.5; color: var(--text-main); }

.comment-input-box { display: flex; gap: 10px; background: #fff; padding: 8px; border-radius: 30px; border: 1px solid var(--border-color); box-shadow: 0 2px 10px rgba(0,0,0,0.02); }
.comment-input-box input {
  flex: 1; border: none; background: transparent;
  padding: 0 15px; color: var(--text-main); outline: none; font-size: 14px;
}
.comment-input-box button {
  width: 40px; height: 40px; border-radius: 50%; background: var(--tea-brown);
  border: none; color: #fff; cursor: pointer; transition: 0.3s;
}
.comment-input-box button:hover { background: var(--tea-green); transform: scale(1.05); }