/* ============================================
   东半球超跑 — 配件订购系统样式
   配合 unified-layout.css / order.css 使用
   ============================================ */

/* ===== 配件名称动态列表 ===== */
.part-names-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.part-name-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  background: rgba(200, 164, 92, 0.12);
  border: 1px solid rgba(200, 164, 92, 0.3);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--gold, #c8a45c);
}

.part-name-tag .remove-name {
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.part-name-tag .remove-name:hover {
  opacity: 1;
}

.add-part-name-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.add-part-name-row .form-input {
  flex: 1;
}

.add-part-name-btn {
  padding: 0.5rem 1rem;
  background: rgba(200, 164, 92, 0.15);
  border: 1px solid rgba(200, 164, 92, 0.3);
  border-radius: 8px;
  color: var(--gold, #c8a45c);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.add-part-name-btn:hover {
  background: rgba(200, 164, 92, 0.25);
}

/* ===== 配件状态标签 ===== */
.parts-status-badge {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.parts-status-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.parts-status-quoted {
  background: rgba(59, 130, 246, 0.15);
  color: #3B82F6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.parts-status-confirmed {
  background: rgba(139, 92, 246, 0.15);
  color: #8B5CF6;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.parts-status-sourcing {
  background: rgba(249, 115, 22, 0.15);
  color: #F97316;
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.parts-status-fulfilled {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.parts-status-cancelled {
  background: rgba(107, 114, 128, 0.15);
  color: #9CA3AF;
  border: 1px solid rgba(107, 114, 128, 0.3);
}

/* ===== 配件详情页 — 状态头部 ===== */
.parts-status-header {
  padding: 2rem 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  text-align: center;
}

.parts-status-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.5rem;
}

.parts-status-header .order-no {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.parts-status-header .status-label {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  margin-top: 0.75rem;
}

/* ===== 配件信息卡片 ===== */
.parts-info-card {
  background: var(--card, #1e1e1e);
  border: 1px solid var(--border, #2a2a2a);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.parts-info-card .card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold, #c8a45c);
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border, #2a2a2a);
}

.parts-description {
  font-size: 0.9rem;
  color: var(--text, #e0e0e0);
  line-height: 1.6;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: var(--surface, #1a1a1a);
  border-radius: 8px;
}

.parts-names-display {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.parts-names-display .name-tag {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  background: rgba(200, 164, 92, 0.1);
  border: 1px solid rgba(200, 164, 92, 0.2);
  border-radius: 16px;
  font-size: 0.8rem;
  color: var(--gold, #c8a45c);
}

.parts-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.parts-images img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border, #2a2a2a);
  cursor: pointer;
  transition: transform 0.2s;
}

.parts-images img:hover {
  transform: scale(1.05);
}

/* ===== 采购信息 ===== */
.fulfillment-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.fulfillment-item {
  padding: 0.75rem;
  background: var(--surface, #1a1a1a);
  border-radius: 8px;
}

.fulfillment-item .label {
  font-size: 0.75rem;
  color: var(--text-dim, #666);
  margin-bottom: 0.3rem;
}

.fulfillment-item .value {
  font-size: 0.85rem;
  color: var(--text, #e0e0e0);
  font-weight: 500;
}

.fulfillment-item--full {
  grid-column: 1 / -1;
}

/* ===== 配件订单列表项 ===== */
.parts-order-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--card, #1e1e1e);
  border: 1px solid var(--border, #2a2a2a);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
}

.parts-order-item:hover {
  border-color: var(--gold, #c8a45c);
  transform: translateX(4px);
}

.parts-order-item-left {
  flex: 1;
  min-width: 0;
}

.parts-order-item-no {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text, #e0e0e0);
  margin-bottom: 0.3rem;
}

.parts-order-item-desc {
  font-size: 0.8rem;
  color: var(--text-muted, #999);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

.parts-order-item-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.parts-order-item-amount {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold, #c8a45c);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .fulfillment-info {
    grid-template-columns: 1fr;
  }

  .parts-order-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .parts-order-item-right {
    align-self: flex-end;
  }

  .parts-order-item-desc {
    max-width: 100%;
  }

  .parts-images {
    grid-template-columns: repeat(3, 1fr);
  }
}
