/* ===== enojewelry.com — 现代珠宝饰品展示网站 ===== */
/* 极简设计，移动优先，微信友好 */

:root {
  --primary: #c4956a;
  --primary-light: #e8d5bc;
  --primary-dark: #a67c52;
  --bg: #faf8f5;
  --bg-card: #ffffff;
  --text: #2c2c2c;
  --text-light: #8a8a8a;
  --border: #e8e0d8;
  --gold: #d4a853;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --radius: 12px;
  --max-width: 1200px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== Header / Nav ===== */
.header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 16px;
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 60px;
  gap: 8px;
}
.logo {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
}
.logo-text {
  font-size: 22px;
  font-weight: 700;
}
.logo-text span { font-size: 18px; }
.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.nav a {
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.2s;
  font-weight: 500;
}
.nav a:hover, .nav a.active {
  background: var(--primary-light);
  color: var(--primary-dark);
}
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  color: var(--text);
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--primary-light), #f5efe8);
  padding: 60px 20px 48px;
  text-align: center;
}
.hero h1 { font-size: 28px; color: var(--primary-dark); margin-bottom: 8px; }
.hero p { font-size: 15px; color: var(--text-light); max-width: 400px; margin: 0 auto; }

/* ===== Filter Bar ===== */
.filter-bar {
  max-width: var(--max-width);
  margin: 20px auto 0;
  padding: 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.filter-bar select, .filter-bar input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
  color: var(--text);
  outline: none;
  min-width: 100px;
}
.filter-bar select:focus, .filter-bar input:focus {
  border-color: var(--primary);
}
.filter-bar .price-range {
  display: flex;
  align-items: center;
  gap: 4px;
}
.filter-bar .price-range input {
  width: 60px;
  min-width: unset;
}
.filter-bar .price-range span { font-size: 12px; color: var(--text-light); }
.filter-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}
.filter-btn:hover { background: var(--primary-dark); }
.result-count {
  font-size: 13px;
  color: var(--text-light);
  margin-left: auto;
}

/* ===== Product Grid ===== */
.product-grid {
  max-width: var(--max-width);
  margin: 20px auto 40px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}
.product-card .img-wrap {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #f0ebe4;
  position: relative;
}
.product-card .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.product-card:hover .img-wrap img { transform: scale(1.05); }
.product-card .info {
  padding: 10px 12px 14px;
}
.product-card .name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-card .style-tag {
  font-size: 11px;
  color: var(--primary);
  background: var(--primary-light);
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  margin-bottom: 4px;
}
.product-card .price {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-dark);
}
.product-card .code {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
  font-family: monospace;
}

/* ===== Product Detail (Overlay) ===== */
.detail-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  overflow-y: auto;
  animation: fadeIn 0.2s;
}
.detail-overlay.show { display: block; }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
.detail-content {
  background: #fff;
  max-width: 500px;
  margin: 40px auto;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  animation: slideUp 0.3s;
}
@keyframes slideUp {
  from { transform: translateY(30px); opacity:0; }
  to { transform: translateY(0); opacity:1; }
}
.detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,0.9);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.detail-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #f0ebe4;
}
.detail-body {
  padding: 20px 24px 32px;
}
.detail-body .title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}
.detail-body .name { font-size: 22px; font-weight: 700; }
.detail-body .price { font-size: 20px; font-weight: 700; color: var(--primary-dark); }
.detail-body .style { display: inline-block; background: var(--primary-light); color: var(--primary-dark); padding: 2px 12px; border-radius: 12px; font-size: 12px; margin-bottom: 12px; }
.detail-body .section { margin-bottom: 14px; }
.detail-body .section-title { font-size: 13px; font-weight: 600; color: var(--text-light); margin-bottom: 4px; }
.detail-body .section-text { font-size: 14px; color: var(--text); line-height: 1.7; }
.detail-body .meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0;
}
.detail-body .meta-item {
  background: var(--bg);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
}
.detail-body .meta-item .label { color: var(--text-light); }
.detail-body .meta-item .value { font-weight: 600; font-family: monospace; }
.wechat-btn {
  display: block;
  background: #07c160;
  color: #fff;
  text-align: center;
  padding: 12px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  margin-top: 16px;
  transition: background 0.2s;
}
.wechat-btn:hover { background: #06ad56; }

/* ===== Contact Page ===== */
.contact-page {
  max-width: 500px;
  margin: 40px auto;
  padding: 0 16px;
}
.contact-page h2 { text-align: center; color: var(--primary-dark); margin-bottom: 24px; }
.contact-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  text-align: center;
}
.contact-card .qr-placeholder {
  width: 200px;
  height: 200px;
  background: var(--bg);
  border-radius: 12px;
  margin: 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 13px;
  border: 2px dashed var(--border);
}
.contact-card p { margin: 8px 0; font-size: 14px; color: var(--text); }

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 24px 16px;
  color: var(--text-light);
  font-size: 12px;
  border-top: 1px solid var(--border);
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .hero h1 { font-size: 22px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 12px; }
  .product-card .info { padding: 8px 10px 12px; }
  .product-card .name { font-size: 13px; }
  .filter-bar { gap: 6px; }
  .filter-bar select, .filter-bar input { font-size: 12px; padding: 6px 10px; min-width: 80px; }
  .nav a { font-size: 13px; padding: 6px 10px; }
  .detail-content { margin: 0; border-radius: 0; min-height: 100vh; }
  .detail-body { padding: 16px 20px 28px; }
  .menu-toggle { display: block; }
  .nav { display: none; }
  .nav.open { display: flex; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); padding: 8px; }
}

@media (min-width: 600px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}
@media (min-width: 900px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ===== Loading ===== */
.loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}
.loading::after {
  content: '⏳';
  animation: pulse 1s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ===== Barcode SVG Display ===== */
.barcode-svg { max-width: 100%; height: auto; display: block; margin: 4px 0; }

/* ===== WeChat Page ===== */
.wechat-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.wechat-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 40px 30px;
  max-width: 380px;
  width: 100%;
  text-align: center;
}
.wechat-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
}
.wechat-logo {
  height: 48px;
  width: auto;
  border-radius: 8px;
}
.wechat-header h2 {
  font-size: 24px;
  color: var(--primary-dark);
  margin: 0;
}
.wechat-qr-wrap {
  background: #fff;
  padding: 12px;
  border-radius: 12px;
  border: 2px solid var(--primary-light);
  display: inline-block;
  margin-bottom: 16px;
}
.wechat-qr {
  width: 240px;
  height: auto;
  display: block;
}
.wechat-info {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text);
}
.wechat-info p {
  margin: 6px 0;
}
