/* ===== 全局样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: #f5f6fa;
  color: #333;
  padding-top: 50px;
  padding-bottom: 60px;
  -webkit-tap-highlight-color: transparent;
}
.hidden { display: none !important; }

/* ===== 顶部导航 ===== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: linear-gradient(135deg, #e74c1f, #ff6b35);
  color: #fff; height: 50px;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 50px; padding: 0 15px; }
.logo { font-size: 16px; font-weight: bold; cursor: pointer; }
.header-right { display: flex; gap: 15px; align-items: center; }
.phone-btn { font-size: 13px; cursor: pointer; }
.admin-entrance { font-size: 12px; opacity: 0.7; cursor: pointer; }

/* ===== 页面头部 ===== */
.page-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 15px; background: #fff;
  border-bottom: 1px solid #eee; font-size: 16px; font-weight: bold;
}
.back-btn { font-size: 24px; background: none; border: none; cursor: pointer; color: #e74c1f; padding: 0 5px; }

/* ===== Hero横幅 ===== */
.hero {
  position: relative; height: 200px; overflow: hidden;
  background: linear-gradient(135deg, #e74c1f 0%, #ff6b35 50%, #ff9500 100%);
}
.hero-bg {
  position: absolute; inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 200"><rect fill="%23ffffff" opacity="0.05" width="400" height="200"/></svg>');
}
.hero-content { position: relative; z-index: 1; padding: 30px 20px; color: #fff; }
.hero-content h1 { font-size: 22px; margin-bottom: 8px; }
.hero-content p { font-size: 13px; opacity: 0.9; margin-bottom: 20px; }
.hero-btns { display: flex; gap: 10px; }
.btn {
  padding: 8px 20px; border-radius: 20px; border: none;
  font-size: 14px; cursor: pointer; font-weight: bold;
}
.btn-white { background: #fff; color: #e74c1f; }
.btn-outline-white { background: transparent; color: #fff; border: 1px solid #fff; }

/* ===== 数据展示 ===== */
.stats-bar {
  display: flex; background: #fff; padding: 15px 0;
  border-bottom: 1px solid #eee;
}
.stat-item { flex: 1; text-align: center; }
.stat-num { font-size: 22px; font-weight: bold; color: #e74c1f; }
.stat-label { font-size: 12px; color: #999; margin-top: 2px; }

/* ===== 快捷入口 ===== */
.quick-entry { padding: 15px; }
.quick-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-top: 10px;
}
.quick-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: #fff; border-radius: 12px; padding: 15px 5px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05); cursor: pointer;
  font-size: 13px; transition: transform 0.2s;
}
.quick-item:active { transform: scale(0.95); }
.quick-item span:first-child { font-size: 28px; }

/* ===== 通用区块 ===== */
.section { padding: 15px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.section-title { font-size: 16px; font-weight: bold; }
.section-more { font-size: 13px; color: #e74c1f; cursor: pointer; }

/* ===== 产品滚动区 ===== */
.product-scroll {
  display: flex; gap: 12px; overflow-x: auto;
  padding-bottom: 10px; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.product-scroll::-webkit-scrollbar { display: none; }
.product-card {
  flex-shrink: 0; width: 160px; background: #fff; border-radius: 12px;
  overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  cursor: pointer; transition: transform 0.2s; scroll-snap-align: start;
}
.product-card:active { transform: scale(0.97); }
.product-img {
  width: 100%; height: 120px; background: #f0f0f0;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; color: #ccc;
}
.product-info { padding: 10px; }
.product-name { font-size: 13px; font-weight: bold; margin-bottom: 4px; line-height: 1.3; }
.product-price { font-size: 14px; color: #e74c1f; font-weight: bold; }
.product-category { font-size: 11px; color: #999; margin-top: 2px; }

/* ===== 产品列表（产品中心页） ===== */
.category-tabs {
  display: flex; gap: 0; overflow-x: auto; background: #fff;
  border-bottom: 1px solid #eee; padding: 0 10px;
}
.category-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  flex-shrink: 0; padding: 10px 14px; font-size: 13px;
  cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap;
}
.cat-tab.active { color: #e74c1f; border-bottom-color: #e74c1f; font-weight: bold; }
.search-bar { padding: 10px 15px; background: #fff; }
.search-bar input {
  width: 100%; padding: 8px 12px; border: 1px solid #eee;
  border-radius: 20px; font-size: 13px; outline: none;
}
.search-bar input:focus { border-color: #e74c1f; }
.product-list { padding: 10px 15px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.product-list .product-card { width: 100%; }

/* ===== 案例列表 ===== */
.case-list { padding: 10px 15px; }
.case-card {
  background: #fff; border-radius: 12px; overflow: hidden;
  margin-bottom: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  cursor: pointer;
}
.case-img {
  width: 100%; height: 160px; background: linear-gradient(135deg, #e74c1f, #ff6b35);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; font-weight: bold;
}
.case-info { padding: 12px; }
.case-title { font-size: 15px; font-weight: bold; margin-bottom: 6px; }
.case-meta { font-size: 12px; color: #999; display: flex; gap: 15px; }
.case-price { color: #e74c1f; font-weight: bold; margin-top: 6px; font-size: 14px; }

/* ===== 知识列表 ===== */
.knowledge-list { padding: 10px 15px; }
.knowledge-card {
  background: #fff; border-radius: 10px; padding: 15px;
  margin-bottom: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  cursor: pointer;
}
.knowledge-title { font-size: 15px; font-weight: bold; margin-bottom: 6px; line-height: 1.4; }
.knowledge-summary { font-size: 13px; color: #666; line-height: 1.5; margin-bottom: 8px; }
.knowledge-meta { font-size: 12px; color: #999; display: flex; gap: 15px; }

/* ===== 产品卡片视频标记 ===== */
.product-img.has-video { position: relative; }
.video-play-badge {
  position: absolute; bottom: 6px; right: 6px;
  background: rgba(0,0,0,0.6); color: #fff;
  font-size: 10px; padding: 2px 6px; border-radius: 4px;
  pointer-events: none;
}

/* ===== 产品详情 ===== */
.detail-img {
  width: 100%; height: 250px; background: #f0f0f0;
  display: flex; align-items: center; justify-content: center;
  font-size: 60px; color: #ccc;
}
.detail-media-area { background: #000; }
.detail-video-wrap { position: relative; }
.detail-video-wrap video { display: block; background: #000; }
.detail-media-tabs {
  display: flex; gap: 0; background: #222; padding: 0;
}
.media-tab {
  flex: 1; text-align: center; padding: 10px; font-size: 13px;
  color: #aaa; cursor: pointer; border-bottom: 2px solid transparent;
}
.media-tab.active { color: #fff; border-bottom-color: #e74c1f; font-weight: bold; }
.detail-images-wrap { position: relative; background: #000; }
.detail-image-slider {
  display: flex; transition: transform 0.3s ease;
  overflow: hidden; width: 100%;
}
.slider-item {
  width: 100%; flex-shrink: 0; display: none;
}
.slider-item.active { display: block; }
.slider-item img {
  width: 100%; max-height: 300px; object-fit: contain;
  display: block; cursor: pointer;
}
.slider-nav {
  display: flex; justify-content: center; align-items: center; gap: 15px;
  padding: 8px; background: rgba(0,0,0,0.5);
}
.slider-nav button {
  background: rgba(255,255,255,0.2); color: #fff;
  border: none; width: 36px; height: 36px; border-radius: 50%;
  font-size: 18px; cursor: pointer;
}
.slider-nav span { color: #fff; font-size: 13px; }
.detail-body { padding: 15px; background: #fff; }
.detail-name { font-size: 20px; font-weight: bold; margin-bottom: 8px; }
.video-badge {
  display: inline-block; background: #e74c1f; color: #fff;
  font-size: 11px; padding: 2px 8px; border-radius: 4px;
  vertical-align: middle; margin-left: 6px;
}
.detail-price { font-size: 22px; color: #e74c1f; font-weight: bold; margin-bottom: 15px; }
.detail-specs { margin-bottom: 15px; }
.detail-specs h3 { font-size: 14px; color: #999; margin-bottom: 8px; }
.specs-table { width: 100%; border-collapse: collapse; }
.specs-table td { padding: 8px 10px; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
.specs-table td:first-child { color: #999; width: 90px; }
.detail-desc h3 { font-size: 14px; color: #999; margin-bottom: 8px; }
.detail-desc p { font-size: 14px; line-height: 1.6; color: #666; }
/* ===== 产品介绍图文混排 ===== */
.desc-content { margin-top: 10px; }
.desc-text {
  font-size: 15px; line-height: 1.8; color: #444;
  margin-bottom: 12px;
}
.desc-img-wrap {
  margin-bottom: 12px; border-radius: 8px; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.desc-img {
  width: 100%; display: block; cursor: pointer;
  border-radius: 8px; transition: transform 0.2s;
}
.desc-img:active { transform: scale(0.98); }
.detail-actions { padding: 15px; display: flex; gap: 10px; background: #fff; position: sticky; bottom: 60px; }
.detail-actions .btn { flex: 1; padding: 12px; font-size: 15px; }
.btn-primary { background: #e74c1f; color: #fff; border: none; border-radius: 8px; }
.btn-outline { background: #fff; color: #e74c1f; border: 1px solid #e74c1f; border-radius: 8px; }

/* ===== 案例详情 ===== */
.case-detail-img {
  width: 100%; height: 200px; background: linear-gradient(135deg, #e74c1f, #ff6b35);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px;
}
.case-detail-body { padding: 15px; }
.case-detail-body h2 { font-size: 18px; margin-bottom: 10px; }
.case-detail-body h3 { font-size: 14px; color: #999; margin: 15px 0 8px; }
.case-equip-list { background: #f8f8f8; border-radius: 8px; padding: 12px; }
.case-equip-list div { font-size: 13px; padding: 4px 0; }

/* ===== 知识详情 ===== */
.knowledge-detail-body { padding: 15px; }
.knowledge-detail-body h1 { font-size: 20px; margin-bottom: 10px; line-height: 1.4; }
.knowledge-detail-body .article-meta { font-size: 12px; color: #999; margin-bottom: 20px; }
.knowledge-detail-body .article-content { font-size: 15px; line-height: 1.8; color: #444; }
.knowledge-detail-body .article-content p { margin-bottom: 15px; }

/* ===== 联系页面 ===== */
.contact-page { padding: 15px; }
.contact-card { background: #fff; border-radius: 12px; overflow: hidden; margin-bottom: 20px; }
.contact-item {
  display: flex; align-items: center; gap: 12px; padding: 15px;
  border-bottom: 1px solid #f0f0f0; cursor: pointer;
}
.contact-item:last-child { border-bottom: none; }
.contact-icon { font-size: 24px; }
.contact-label { font-size: 12px; color: #999; }
.contact-value { font-size: 15px; font-weight: bold; }
.contact-action { margin-left: auto; color: #e74c1f; font-size: 13px; }
.inquiry-form-section { background: #fff; border-radius: 12px; padding: 15px; }
.inquiry-form-section input,
.inquiry-form-section select,
.inquiry-form-section textarea {
  width: 100%; padding: 10px 12px; margin-bottom: 10px;
  border: 1px solid #eee; border-radius: 8px; font-size: 14px;
  outline: none; font-family: inherit;
}
.inquiry-form-section input:focus,
.inquiry-form-section select:focus,
.inquiry-form-section textarea:focus { border-color: #e74c1f; }
.inquiry-form-section textarea { resize: vertical; }
.btn-block { width: 100%; padding: 12px; font-size: 15px; }

/* ===== 底部导航 ===== */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: #fff; height: 60px; display: flex;
  border-top: 1px solid #eee;
}
.tabbar-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  cursor: pointer; color: #999; font-size: 12px; transition: color 0.2s;
}
.tabbar-item.active { color: #e74c1f; }
.tab-icon { font-size: 20px; }
.tab-label { font-size: 11px; }

/* ===== 弹窗 ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
}
.modal {
  background: #fff; border-radius: 16px; padding: 20px;
  width: 90%; max-width: 400px; max-height: 80vh; overflow-y: auto;
}
.modal-header { font-size: 18px; font-weight: bold; margin-bottom: 15px; text-align: center; }
.modal-btns { display: flex; gap: 10px; margin-top: 15px; }
.btn-gray { background: #f0f0f0; color: #666; border: none; border-radius: 8px; padding: 12px; flex: 1; font-size: 15px; cursor: pointer; }

/* ===== 空状态 ===== */
.empty-tip { text-align: center; padding: 40px 20px; color: #999; font-size: 14px; }

/* ===== 安全区 ===== */
.safe-bottom { height: 20px; }

/* ===== 响应式 ===== */
@media (min-width: 500px) {
  .product-list { grid-template-columns: repeat(3, 1fr); }
}
