/* 产品展示网页版 - 公共样式 */
:root {
  --color-deep-blue: #1B2A4A;
  --color-gold: #C8973A;
  --color-wine: #7C1F36;
  --color-bg: #F4F1EB;
  --color-border: #EDE8DF;
  --color-card-bg: #fff;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  min-height: 100vh;
  color: var(--color-deep-blue);
  font-size: 14px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; border: none; }

/* 顶部导航 */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  background: var(--color-card-bg);
  border-bottom: 1px solid var(--color-border);
}
.brand-name { font-size: 18px; font-weight: 700; color: var(--color-deep-blue); }
.brand-logo { height: 32px; margin-right: 8px; vertical-align: middle; }

/* 底部导航 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: var(--color-card-bg);
  border-top: 1px solid var(--color-border);
  padding: 8px 0;
  z-index: 100;
}
.bottom-nav a {
  flex: 1;
  text-align: center;
  padding: 8px;
  font-size: 12px;
  color: #666;
}
.bottom-nav a.active { color: var(--color-gold); font-weight: 600; }
.bottom-nav .icon { font-size: 20px; margin-bottom: 2px; }

/* 区块 */
.section {
  background: var(--color-card-bg);
  border-radius: 8px;
  padding: 16px;
  margin: 12px;
  box-shadow: 0 1px 4px rgba(27,42,74,0.06);
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 700;
}
.section-title-bar {
  width: 4px;
  height: 16px;
  background: linear-gradient(180deg, var(--color-gold), #e5b96a);
  border-radius: 2px;
  margin-right: 8px;
}
.section-more { font-size: 12px; color: var(--color-gold); }

/* 产品网格 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.product-card {
  background: var(--color-card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(27,42,74,0.07);
  border: 1px solid var(--color-border);
  position: relative;
}
.product-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}
.product-card-info { padding: 10px; }
.product-card-name {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 4px;
}
.product-card-category { font-size: 11px; color: #aaa; margin-bottom: 8px; }
.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.product-card-price { font-size: 14px; font-weight: 700; color: var(--color-gold); }
.product-card-price-unit { font-size: 10px; color: #bbb; font-weight: normal; }
.product-card-price-inquiry { font-size: 11px; color: #999; font-style: italic; }
.product-card-btn {
  background: var(--color-deep-blue);
  color: var(--color-gold);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 标签 */
.tag-hot {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--color-gold);
  color: #fff;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  z-index: 1;
}
.tag-new {
  position: absolute;
  top: 6px;
  left: 0;
  background: var(--color-wine);
  color: #fff;
  font-size: 10px;
  padding: 2px 10px 2px 8px;
  border-radius: 0 10px 10px 0;
  font-weight: 600;
  z-index: 1;
}

/* 查看更多 */
.view-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  padding: 12px;
  background: #FBF6ED;
  border-radius: 8px;
  color: var(--color-gold);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #E8D5A3;
  cursor: pointer;
}
.view-more-btn:hover { background: #f5ecd8; }

/* 搜索入口 */
.search-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-card-bg);
  border-radius: 24px;
  padding: 12px 16px;
  margin: 12px;
  box-shadow: 0 1px 4px rgba(27,42,74,0.06);
  border: 1px solid var(--color-border);
  cursor: pointer;
}
.search-placeholder { font-size: 13px; color: #bbb; flex: 1; }
.search-entry .icon { color: #aaa; font-size: 16px; }

/* 分类网格 */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.category-icon-wrap {
  width: 44px;
  height: 44px;
  background: #FBF6ED;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.category-icon-wrap img { width: 28px; height: 28px; object-fit: cover; }
.category-name { font-size: 12px; color: var(--color-deep-blue); text-align: center; }

/* 加载/空状态 */
.loading-wrap, .empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: skeleton 1.5s infinite; }
@keyframes skeleton { to { background-position: 200% 0; } }

/* 安全底部（移动端） */
.safe-bottom { height: 80px; }
.page-with-nav .safe-bottom { height: 100px; }

/* 小程序入口 */
.miniprogram-entry {
  text-align: center;
  padding: 16px;
  background: #f8f8f8;
  border-radius: 8px;
  margin: 12px;
  font-size: 12px;
  color: #666;
}
.miniprogram-entry img { width: 120px; height: 120px; margin: 0 auto 8px; display: block; }

/* Banner */
.banner-wrap { margin-bottom: 12px; }
.banner-swiper { overflow: hidden; }
.banner-swiper img { width: 100%; height: 180px; object-fit: cover; }
.banner-swiper a { display: block; }

/* 响应式 */
@media (min-width: 768px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .product-card img { height: 180px; }
  .category-grid { grid-template-columns: repeat(8, 1fr); }
  .section { margin: 16px auto; max-width: 1200px; }
}
