/* 客户端前台 · 蓝色主题商城 */
:root {
  --blue: #1e6fd9;
  --blue-dark: #15559c;
  --blue-bg: #eef4fc;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; background: #f5f7fa; }

.site-header { background: linear-gradient(90deg, var(--blue-dark), var(--blue)); color: #fff; }
.site-header .inner { max-width: 1180px; margin: 0 auto; height: 60px; display: flex;
  align-items: center; gap: 18px; padding: 0 16px; }
.site-header .logo { font-size: 20px; font-weight: 700; letter-spacing: 1px; cursor: pointer; }
.site-header .search { flex: 1; max-width: 480px; }
.site-header .spacer { flex: 1; }
.site-header .nav-btn { color: #fff; cursor: pointer; font-size: 14px; padding: 6px 10px;
  border-radius: 4px; position: relative; }
.site-header .nav-btn:hover { background: rgba(255,255,255,.15); }
.badge { position: absolute; top: -2px; right: -4px; background: #f56c6c; color: #fff;
  font-size: 11px; border-radius: 9px; padding: 0 5px; line-height: 16px; }

.page { max-width: 1180px; margin: 18px auto; padding: 0 16px; }

/* 分类条 */
.cat-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.cat-chip { padding: 6px 16px; background: #fff; border: 1px solid #dfe6ef; border-radius: 18px;
  font-size: 13px; cursor: pointer; color: #606266; }
.cat-chip.active, .cat-chip:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

/* 产品卡片 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 16px; }
.product-card { background: #fff; border: 1px solid #e8edf3; border-radius: 10px; overflow: hidden;
  cursor: pointer; transition: all .18s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(30,111,217,.16);
  border-color: var(--blue); }
.product-thumb { height: 150px; background: linear-gradient(135deg, var(--blue-bg), #dcebfc);
  display: flex; align-items: center; justify-content: center; font-size: 44px; color: var(--blue);
  overflow: hidden; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-info { padding: 10px 12px 12px; }
.product-info .name { font-size: 14px; color: #303133; height: 40px; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product-info .price { color: #e64545; font-size: 18px; font-weight: 700; margin-top: 6px; }
.product-info .price small { font-size: 12px; }
.product-info .meta { font-size: 12px; color: #909399; margin-top: 4px; display: flex; justify-content: space-between; }

/* 详情 */
.detail-card { background: #fff; border-radius: 10px; padding: 26px; display: flex; gap: 30px; flex-wrap: wrap; }
.detail-thumb { width: 340px; height: 300px; border-radius: 8px; flex-shrink: 0; }
.detail-main { flex: 1; min-width: 280px; }
.detail-main h2 { margin: 0 0 8px; }
.detail-price { color: #e64545; font-size: 30px; font-weight: 700; margin: 12px 0; }
.detail-row { font-size: 14px; color: #606266; margin: 8px 0; }
.desc-block { background: #fff; border-radius: 10px; padding: 20px 26px; margin-top: 16px;
  font-size: 14px; color: #606266; line-height: 1.9; }

/* 购物车/订单 */
.block-card { background: #fff; border-radius: 10px; padding: 20px 24px; margin-bottom: 16px; }
.block-card h3 { margin: 0 0 14px; color: var(--blue-dark);
  border-left: 4px solid var(--blue); padding-left: 10px; font-size: 16px; }
.cart-footer { display: flex; justify-content: flex-end; align-items: center; gap: 18px; margin-top: 16px; }
.cart-total { font-size: 15px; }
.cart-total b { color: #e64545; font-size: 22px; }

.order-card { border: 1px solid #e8edf3; border-radius: 8px; margin-bottom: 14px; overflow: hidden; }
.order-head { background: var(--blue-bg); padding: 10px 16px; font-size: 13px; color: #606266;
  display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.order-body { padding: 10px 16px; }
.order-line { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 0;
  border-bottom: 1px dashed #eef1f5; }
.order-line:last-child { border-bottom: none; }
.order-foot { padding: 10px 16px; display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid #eef1f5; font-size: 14px; }

/* 结算弹窗 · 常用地址卡片 */
.addr-item { display: flex; align-items: flex-start; gap: 8px; padding: 8px 12px; margin-bottom: 6px;
  border: 1px solid #dfe6ef; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.addr-item:hover { border-color: var(--blue); }
.addr-item.active { border-color: var(--blue); background: var(--blue-bg); }
.addr-item .addr-ops { flex-shrink: 0; }

.login-box { max-width: 400px; margin: 60px auto; background: #fff; border-radius: 10px;
  padding: 32px; box-shadow: 0 8px 30px rgba(21,85,156,.12); }
.login-box h2 { color: var(--blue-dark); margin: 0 0 20px; }
.login-box .switch { font-size: 13px; color: var(--blue); cursor: pointer; margin-top: 12px; display: inline-block; }
.empty { text-align: center; color: #909399; padding: 60px 0; }

/* ---------- 移动端适配 ---------- */
@media (max-width: 640px) {
  .site-header .inner { flex-wrap: wrap; height: auto; padding: 10px 12px; gap: 6px 8px; }
  .site-header .logo { font-size: 17px; white-space: nowrap; }
  .site-header .search { order: 10; flex: 1 1 100%; max-width: none; }
  .site-header .nav-btn { padding: 4px 6px; font-size: 13px; white-space: nowrap; }
  .page { margin: 12px auto; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .product-thumb { height: 120px; }
  .detail-card { padding: 16px; gap: 16px; }
  .detail-thumb { width: 100%; height: 220px; }
  .block-card { padding: 14px 12px; }
  .el-dialog { width: 94% !important; }
}
