/* =============================================================
   To B 下单模块样式（内测版第三个模块）
   尽量沿用 styles.css / inventory.css 的变量与卡片风格
   ============================================================= */

/* 产品卡片网格（店铺客户看的产品目录） */
.b2b-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.b2b-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .15s, transform .15s;
}
.b2b-card:hover {
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.b2b-card-img {
  height: 150px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.b2b-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.b2b-noimg {
  color: #9ca3af;
  font-size: 12px;
  text-align: center;
  line-height: 1.8;
}

.b2b-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.b2b-card-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text, #111827);
  line-height: 1.35;
}
.b2b-card-desc {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 54px;
}
.b2b-card-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed #eef2f7;
}
.b2b-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary, #2563eb);
}

/* 上架弹窗里的照片列表 */
.b2b-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.b2b-photo-item {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
}
.b2b-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.b2b-photo-item button {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  line-height: 1;
  border: none;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.65);
  color: #fff;
  font-size: 11px;
  cursor: pointer;
  padding: 0;
}

/* 客户多选 */
.b2b-cust-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 8px 0;
}
.b2b-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text, #111827);
  cursor: pointer;
  user-select: none;
}
.b2b-check input {
  width: 15px;
  height: 15px;
  cursor: pointer;
}

/* 订单合计 */
.b2b-total {
  margin-top: 10px;
  text-align: right;
  font-size: 14px;
  color: #374151;
}
.b2b-total b {
  font-size: 17px;
  color: var(--primary, #2563eb);
}

/* 手机端：产品卡片两列改一列，照片小一点 */
@media (max-width: 640px) {
  .b2b-grid { grid-template-columns: 1fr; }
  .b2b-card-img { height: 180px; }
  .b2b-card-desc { min-height: 0; }
  .b2b-photo-item { width: 64px; height: 64px; }
}
