/* ==================== 传人商贸 - 手机版样式表 ==================== */
/* 设计原则：单列布局、大按钮、大字体、快速加载 */

/* 基础重置 */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #2C3E50;
  background: #F8F9FA;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  padding-bottom: 70px; /* 底部导航栏高度 */
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }

/* 变量 */
:root {
  --primary: #FF6B35;
  --primary-dark: #E55A2B;
  --secondary: #2C3E50;
  --accent: #F7931E;
  --light: #F8F9FA;
  --white: #FFFFFF;
  --gray: #6C757D;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* ==================== 顶部导航 ==================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  padding: 14px 16px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(255,107,53,0.3);
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-size: 18px;
  font-weight: 700;
}
.header-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.header-phone {
  background: rgba(255,255,255,0.2);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 主内容区 */
.main { padding-top: 60px; }

/* ==================== 首页 Hero ==================== */
.hero {
  background: linear-gradient(135deg, var(--secondary) 0%, #1A1A2E 100%);
  padding: 30px 20px;
  text-align: center;
  color: white;
}
.hero h1 { font-size: 24px; margin-bottom: 10px; }
.hero p { font-size: 14px; opacity: 0.85; line-height: 1.7; }
.hero-btns { margin-top: 20px; display: flex; gap: 10px; justify-content: center; }

/* 按钮 */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 25px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s ease;
  border: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  box-shadow: 0 4px 15px rgba(255,107,53,0.4);
}
.btn-secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-block { width: 100%; display: block; }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-call {
  background: #16a34a;
  color: white;
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 16px 0;
  box-shadow: 0 4px 15px rgba(22,163,74,0.3);
}

/* ==================== 卡片网格 ==================== */
.section { padding: 20px 16px; }
.section-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::before {
  content: '';
  width: 4px;
  height: 20px;
  background: var(--primary);
  border-radius: 2px;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.card:active { transform: scale(0.97); }
.card-img {
  width: 100%;
  height:150px;
  object-fit: cover;
  background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}
.card-body { padding: 12px; }
.card-body h3 { font-size: 15px; margin-bottom: 4px; }
.card-body p { font-size: 12px; color: var(--gray); }

/* 业务卡片 */
.biz-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
}
.biz-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}
.biz-info h3 { font-size: 16px; margin-bottom: 4px; }
.biz-info p { font-size: 13px; color: var(--gray); line-height: 1.5; }

/* ==================== 产品列表 ==================== */
.product-list { display: flex; flex-direction: column; gap: 12px; }
.product-item {
  background: white;
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 12px;
}
.product-img {
  width:150px;
  height:150px;
  border-radius: 8px;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
}
.product-info { flex: 1; }
.product-info h3 { font-size: 15px; margin-bottom: 4px; }
.product-info p { font-size: 12px; color: var(--gray); margin-bottom: 6px; }
.product-price {
  color: var(--primary);
  font-size: 17px;
  font-weight: 700;
}
.product-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: #FFF3ED;
  color: var(--primary);
}

/* 分类标签 */
.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px;
  background: white;
  -webkit-overflow-scrolling: touch;
}
.category-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  background: #f0f0f0;
  color: var(--gray);
  border: none;
  cursor: pointer;
}
.cat-tab.active {
  background: var(--primary);
  color: white;
}

/* ==================== 表单 ==================== */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--secondary);
}
.form-control {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  font-size: 16px;
  transition: border-color 0.2s;
  background: white;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,107,53,0.1);
}
textarea.form-control { min-height: 100px; resize: vertical; }

/* ==================== 底部导航栏 ==================== */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  background: white;
  display: flex;
  border-top: 1px solid #eee;
  z-index: 999;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}
.tab-item {
  flex: 1;
  text-align: center;
  padding: 8px 0 6px;
  font-size: 10px;
  color: var(--gray);
  cursor: pointer;
  border: none;
  background: none;
  transition: color 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.tab-item.active { color: var(--primary); }
.tab-item .tab-icon { font-size: 22px; }

/* ==================== 快捷操作栏 ==================== */
.quick-bar {
  position: fixed;
  bottom: 70px;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
  padding: 10px 16px;
  background: white;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  z-index: 998;
}
.quick-bar .btn { flex: 1; padding: 12px; font-size: 14px; border-radius: 10px; }

/* ==================== 页面通用 ==================== */
.page-header {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  padding: 70px 20px 24px;
  color: white;
  text-align: center;
}
.page-header h1 { font-size: 22px; margin-bottom: 6px; }
.page-header p { font-size: 13px; opacity: 0.85; }

.info-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin: 16px;
  box-shadow: var(--shadow);
}
.info-card h3 { font-size: 16px; margin-bottom: 10px; color: var(--secondary); }
.info-card p { font-size: 14px; color: var(--gray); line-height: 1.8; }

/* 统计数字 */
.stats-row {
  display: flex;
  gap: 12px;
  margin: 16px 0;
}
.stat-box {
  flex: 1;
  background: white;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-num { font-size: 24px; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 12px; color: var(--gray); margin-top: 4px; }

/* 列表样式 */
.list-item {
  background: white;
  padding: 14px 16px;
  border-bottom: 1px solid #f5f5f5;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.list-item:last-child { border-bottom: none; }
.list-item .label { font-size: 14px; color: var(--gray); }
.list-item .value { font-size: 14px; font-weight: 600; color: var(--secondary); }

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray);
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* 加载动画 */
.loading {
  text-align: center;
  padding: 40px;
  font-size: 14px;
  color: var(--gray);
}

/* Toast 提示 */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.75);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  animation: fadeInOut 2s ease forwards;
}
@keyframes fadeInOut {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  85% { opacity: 1; }
  100% { opacity: 0; }
}

/* 底部信息 */
.footer-info {
  text-align: center;
  padding: 24px 16px;
  font-size: 12px;
  color: var(--gray);
  line-height: 1.8;
}
.footer-info a { color: var(--primary); }

/* 搜索栏 */
.search-bar {
  padding: 12px 16px;
  background: white;
  position: sticky;
  top: 58px;
  z-index: 99;
}
.search-input {
  width: 100%;
  padding: 12px 16px 12px 40px;
  border: 1.5px solid #e0e0e0;
  border-radius: 25px;
  font-size: 14px;
  background: #f8f9fa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat 14px center;
}
.search-input:focus { outline: none; border-color: var(--primary); }

/* 徽标 */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 600;
  margin-left: 2px;
}

/* 价格高亮 */
.price-hot { color: #dc2626; }
.price-normal { color: var(--primary); }

/* 分割线 */
.divider { height: 8px; background: #f5f5f5; }

/* 安全区域适配（iPhone X+） */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .tabbar { padding-bottom: env(safe-area-inset-bottom); }
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
}
