/* 发卡网 - 主样式 (蓝色简洁版) */
:root {
  --primary: #1e88e5;
  --primary-dark: #1565c0;
  --primary-light: #e3f2fd;
  --primary-light2: #bbdefb;
  --success: #43a047;
  --danger: #e53935;
  --warning: #fb8c00;
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #eeeeee;
  --gray-300: #e0e0e0;
  --gray-400: #bdbdbd;
  --gray-500: #9e9e9e;
  --gray-600: #757575;
  --gray-700: #616161;
  --gray-800: #424242;
  --gray-900: #212121;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(30, 136, 229, 0.08);
  --shadow-md: 0 8px 24px rgba(30, 136, 229, 0.15);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: linear-gradient(180deg, #e3f2fd 0%, #fafafa 30%);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ===== 顶部导航 ===== */
.navbar {
  background: #fff;
  box-shadow: 0 2px 12px rgba(30, 136, 229, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.navbar-brand {
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary) 0%, #42a5f5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 8px;
}
.navbar-brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary) 0%, #42a5f5 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
}
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.navbar-nav a {
  padding: 8px 18px;
  border-radius: 8px;
  color: var(--gray-600);
  font-size: 14px;
  font-weight: 500;
  transition: all .2s;
}
.navbar-nav a:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* ===== 主容器 ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== 分类标签 ===== */
.category-tabs {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0 8px;
  margin: 24px auto;
  max-width: 1100px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
}
.category-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: all .2s;
}
.cat-tab:hover { color: var(--primary); }
.cat-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

/* ===== 区块标题 ===== */
.section {
  padding: 20px 0 40px;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 20px;
  background: linear-gradient(180deg, var(--primary) 0%, #64b5f6 100%);
  border-radius: 2px;
}

/* ===== 商品网格 ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

/* ===== 商品卡片 ===== */
.product-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: 1px solid var(--gray-100);
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light2);
}
.product-card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, #42a5f5 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}
.product-card-icon {
  width: 100%;
  height: 120px;
  background: linear-gradient(135deg, var(--primary-light) 0%, #e3f2fd 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  position: relative;
}
.product-card-body {
  padding: 18px;
}
.product-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
}
.product-card-desc {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--gray-100);
}
.product-price {
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary) 0%, #42a5f5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.product-price span {
  font-size: 13px;
  font-weight: 400;
  color: var(--gray-500);
}
.product-stock {
  font-size: 12px;
  color: var(--gray-500);
  background: var(--gray-100);
  padding: 4px 10px;
  border-radius: 20px;
}
.product-stock.low { 
  background: #fff3e0;
  color: var(--warning);
}
.product-stock.out { 
  background: #ffebee;
  color: var(--danger);
}
.btn-buy {
  padding: 8px 18px;
  background: linear-gradient(135deg, var(--primary) 0%, #42a5f5 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.btn-buy:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
}
.btn-buy:disabled {
  background: var(--gray-300);
  cursor: not-allowed;
}

/* ===== 商品详情页 ===== */
.product-detail {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 32px;
  margin: 24px 0;
}
.product-detail-header {
  display: flex;
  gap: 28px;
  margin-bottom: 24px;
}
.product-detail-icon {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, var(--primary-light) 0%, #e3f2fd 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  flex-shrink: 0;
}
.product-detail-info {
  flex: 1;
}
.product-detail-info h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--gray-800);
}
.product-detail-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.meta-item {
  font-size: 13px;
  color: var(--gray-500);
}
.meta-item strong { color: var(--gray-700); }
.price-big {
  font-size: 36px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary) 0%, #42a5f5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 20px 0;
}
.price-big small {
  font-size: 16px;
  font-weight: 400;
  color: var(--gray-500);
}
.product-desc {
  background: var(--gray-50);
  border-radius: 12px;
  padding: 20px;
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.8;
}

/* ===== 表单 ===== */
.form-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 28px;
  margin: 24px 0;
}
.form-card h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 8px;
}
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  font-size: 14px;
  transition: all .2s;
  outline: none;
  background: #fff;
}
.form-control:focus { 
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.form-hint { font-size: 12px; color: var(--gray-400); margin-top: 6px; }

/* ===== 支付方式 ===== */
.pay-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.pay-method {
  border: 2px solid var(--gray-200);
  border-radius: 14px;
  padding: 18px;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}
.pay-method:hover { border-color: var(--primary-light2); }
.pay-method.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}
.pay-method input[type="radio"] { position: absolute; opacity: 0; }
.pay-method-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.pay-method-icon.wechat { 
  background: linear-gradient(135deg, #07c160 0%, #06ad56 100%); 
}
.pay-method-icon.alipay { 
  background: linear-gradient(135deg, #1677ff 0%, #4096ff 100%); 
}
.pay-method-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-700);
}
.pay-method-desc { font-size: 12px; color: var(--gray-400); }

/* ===== 数量选择 ===== */
.qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  overflow: hidden;
  width: fit-content;
}
.qty-btn {
  width: 40px;
  height: 40px;
  background: var(--gray-100);
  border: none;
  font-size: 18px;
  cursor: pointer;
  transition: background .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-btn:hover { background: var(--primary-light); color: var(--primary); }
.qty-input {
  width: 60px;
  height: 40px;
  border: none;
  border-left: 2px solid var(--gray-200);
  border-right: 2px solid var(--gray-200);
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  outline: none;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #42a5f5 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(30, 136, 229, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 136, 229, 0.4);
  color: #fff;
}
.btn-block { width: 100%; }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover { background: var(--primary-light); }

/* ===== 订单摘要 ===== */
.order-summary {
  background: var(--gray-50);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 20px;
}
.order-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 6px 0;
  color: var(--gray-600);
}
.order-summary-row.total {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
  border-top: 1px solid var(--gray-200);
  margin-top: 10px;
  padding-top: 12px;
}
.order-summary-row.total .price { 
  background: linear-gradient(135deg, var(--primary) 0%, #42a5f5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===== 成功页 ===== */
.success-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 40px;
  text-align: center;
  margin: 40px auto;
  max-width: 560px;
}
.success-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin: 0 auto 24px;
}
.success-card h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 8px;
}
.cards-list {
  background: var(--gray-50);
  border-radius: 12px;
  padding: 18px;
  margin: 24px 0;
  text-align: left;
}
.card-item {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: var(--gray-700);
  word-break: break-all;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-item:last-child { margin-bottom: 0; }
.copy-btn {
  padding: 6px 14px;
  background: var(--primary-light);
  color: var(--primary);
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
}
.copy-btn:hover { 
  background: var(--primary); 
  color: #fff; 
}

/* ===== 提示框 ===== */
.alert {
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-danger { background: #ffebee; border: 1px solid #ffcdd2; color: #c62828; }
.alert-success { background: #e8f5e9; border: 1px solid #c8e6c9; color: #2e7d32; }
.alert-info { background: #e3f2fd; border: 1px solid #bbdefb; color: #1565c0; }
.alert-warning { background: #fff3e0; border: 1px solid #ffe0b2; color: #e65100; }

/* ===== 面包屑 ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-500);
  padding: 16px 0;
}
.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { color: var(--gray-300); }

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-400);
}
.empty-state-icon { font-size: 56px; margin-bottom: 16px; }
.empty-state p { font-size: 15px; }

/* ===== 页脚 ===== */
.footer {
  background: #fff;
  border-top: 1px solid var(--gray-100);
  padding: 32px 20px;
  margin-top: 60px;
  text-align: center;
}
.footer a { color: var(--gray-500); margin: 0 12px; }
.footer a:hover { color: var(--primary); }
.footer-copy { 
  font-size: 13px; 
  color: var(--gray-400); 
  margin-top: 16px;
}

/* ===== 标签 ===== */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: #e8f5e9; color: var(--success); }
.badge-danger { background: #ffebee; color: var(--danger); }
.badge-warning { background: #fff3e0; color: var(--warning); }
.badge-gray { background: var(--gray-100); color: var(--gray-500); }

/* ===== 查询页 ===== */
.query-card {
  max-width: 480px;
  margin: 60px auto;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .hero h1 { font-size: 24px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .product-detail-header { flex-direction: column; }
  .pay-methods { grid-template-columns: 1fr; }
  .form-card { padding: 20px; }
  .success-card { padding: 24px; margin: 20px; }
  .navbar-inner { padding: 0 16px; }
  .container { padding: 0 16px; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .navbar-brand { font-size: 18px; }
}
