/* 订单列表样式 */
:root {
  --primary-color: #ff6b35;
  --secondary-color: #ffd139;
  --text-color: #333333;
  --light-text: #666666;
  --border-color: #e5e5e5;
  --bg-color: #f5f5f5;
  --card-bg: #ffffff;
  --success-color: #52c41a;
  --warning-color: #faad14;
  --danger-color: #ff4d4f;
  --border-radius: 8px;
  --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s ease;
}

/* 全局样式 */
.order-list-container {
  max-width: 1440px;
  margin: 0 auto;
  background-color: var(--bg-color);
  min-height: 100vh;
}

/* 顶部导航 */
.order-tabs {
  display: flex;
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 0 16px;
  margin-bottom: 20px;
  box-shadow: var(--box-shadow);
  overflow-x: auto;
}

.tab-item {
  padding: 16px 24px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--light-text);
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.tab-item.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  font-weight: 600;
}

.tab-item:hover {
  color: var(--primary-color);
}

/* 筛选按钮 */
.filter-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 16px;
  color: var(--light-text);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 订单卡片 */
.order-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 16px;
  overflow: hidden;
  transition: var(--transition);
}

.order-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* 订单头部 */
.order-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.store-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.store-name {
  font-weight: 600;
  color: var(--text-color);
}
/* 订单状态样式 */
.order-status {
  font-size: 14px;
  font-weight: 600;
  color: var(--danger-color);
}

/* 支付方式样式 */
.payment-method {
  font-size: 12px;
  color: var(--light-text);
  margin-bottom: 4px;
}

/* 店铺名称样式 */
.store-name {
  font-weight: 600;
  color: var(--text-color);
  font-size: 14px;
}

/* 订单头部链接样式 */
.order-header a {
  color: var(--text-color);
  text-decoration: none;
}

.order-header a:hover {
  color: var(--primary-color);
}

/* 商品标题样式 */
.goods-title {
  font-size: 14px;
  color: var(--text-color);
  margin-bottom: 8px;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.goods-title a {
  color: var(--text-color);
  text-decoration: none;
  display: block;
}

.goods-title a:hover {
  color: var(--primary-color);
}

/* 价格样式 */
.goods-price {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 4px;
  white-space: nowrap;
}

/* 商品数量样式 */
.goods-quantity {
  font-size: 12px;
  color: var(--light-text);
}

/* 订单商品 */
.order-goods {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  gap: 16px;
}

.goods-image {
  width: 80px;
  height: 80px;
  border-radius: var(--border-radius);
  overflow: hidden;
  flex-shrink: 0;
}

.goods-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.goods-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0; /* 确保容器能收缩以适应内容 */
}

.goods-title {
  font-size: 14px;
  color: var(--text-color);
  margin-bottom: 8px;
  line-height: 1.4;
  word-wrap: break-word; /* 确保长标题能正确换行 */
  overflow-wrap: break-word;
}

.goods-price {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 4px;
  white-space: nowrap;
}

.goods-quantity {
  font-size: 12px;
  color: var(--light-text);
}

.payment-method {
  font-size: 12px;
  color: var(--light-text);
  margin-bottom: 4px;
}

/* 订单优惠 */
.order-discount {
  padding: 16px;
  background-color: #fafafa;
  border-bottom: 1px solid var(--border-color);
  color: var(--light-text);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
}

.discount-text {
  color: #ff6b35;
}

.claim-btn {
  color: #1890ff;
  text-decoration: none;
  font-size: 14px;
}

/* 订单底部操作 */
.order-actions {
  padding: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background-color: #fafafa;
}

.action-btn {
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background-color: var(--card-bg);
  color: var(--text-color);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.action-btn.primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
}

.action-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 空订单状态 */
.empty-orders {
  text-align: center;
  padding: 60px 20px;
  color: var(--light-text);
}

/* 订单详情容器 */
.order-detail-container {
  max-width: 100%;
}

/* 订单商品列表 */
.order-products-list {
  padding: 0;
}

.order-goods {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.order-goods:last-child {
  border-bottom: none;
}

/* 商品选项和详情 */
.goods-options {
  font-size: 13px;
  color: var(--light-text);
  margin: 4px 0;
}

.goods-details {
  font-size: 12px;
  color: var(--light-text);
  margin: 4px 0;
}

/* 配送信息 */
.delivery-info {
  margin-top: 8px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

/* 积分文本样式 */
.points-text {
  font-size: 12px;
  color: var(--light-text);
  margin-left: 4px;
  display: inline; /* 确保是行内元素 */
  white-space: nowrap; /* 防止积分文本内部换行 */
}

/* 配送备注样式 */
.delivery-memo-container {
  margin-top: 8px;
  padding: 12px;
  background-color: #f0f0f0;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
}

.delivery-memo-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 4px;
  display: block;
}

.delivery-memo-text {
  font-size: 13px;
  color: var(--text-color);
  line-height: 1.4;
}

/* 订单价格信息 */
.order-price-info {
  padding: 16px;
  background-color: #fafafa;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
}

.price-row.total-price {
  font-weight: 600;
  border-top: 1px solid var(--border-color);
  margin-top: 8px;
  padding-top: 12px;
}

.price-label {
  color: var(--light-text);
}

.price-value {
  color: var(--text-color);
}

/* 支付信息样式 */
.order-payment-info {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.payment-section {
  background-color: #fafafa;
  padding: 16px;
  border-radius: var(--border-radius);
}

.payment-section h4 {
  margin-bottom: 12px;
  color: var(--text-color);
  font-size: 14px;
  font-weight: 600;
}

.payment-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.payment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.payment-row.total-payment {
  font-weight: 600;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
}

.payment-label {
  color: var(--light-text);
}

.payment-value {
  color: var(--text-color);
}

.status-badge {
  padding: 4px 12px;
  border-radius: 12px;
  background-color: var(--primary-color);
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
}

/* 订单相关人员信息 */
.order-people-info {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.person-section {
  background-color: #fafafa;
  padding: 16px;
  border-radius: var(--border-radius);
}

.person-section h4 {
  margin-bottom: 12px;
  color: var(--text-color);
  font-size: 14px;
  font-weight: 600;
}

.person-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.person-row {
  display: flex;
  gap: 12px;
  font-size: 14px;
}

.person-label {
  width: 80px;
  color: var(--light-text);
  flex-shrink: 0;
}

.person-value {
  color: var(--text-color);
  flex: 1;
}

/* 订单状态时间线 */
.order-status-timeline {
  padding: 16px;
  position: relative;
}

.order-status-timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 16px;
  bottom: 16px;
  width: 2px;
  background-color: var(--border-color);
}

.status-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  position: relative;
  margin-bottom: 24px;
  padding-left: 24px;
}

.status-item:last-child {
  margin-bottom: 0;
}

.status-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--border-color);
  color: var(--light-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.status-item.active .status-icon {
  background-color: var(--primary-color);
  color: #ffffff;
}

.status-item.cancelled .status-icon {
  background-color: var(--danger-color);
  color: #ffffff;
}

.status-content {
  flex: 1;
  min-width: 0;
}

.status-title {
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 4px;
}

.status-time {
  font-size: 12px;
  color: var(--light-text);
}

.status-desc {
  font-size: 13px;
  color: var(--light-text);
  margin-top: 4px;
}

/* 订单后支付表单 */
.order-payment-forms {
  padding: 16px;
  text-align: center;
}

/* 积分记录样式 */
.point-list {
  padding: 0;
}

.point-item {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s ease;
}

.point-item:hover {
  background-color: #fafafa;
}

.point-item:last-child {
  border-bottom: none;
}

.point-content {
  flex: 1;
  min-width: 0;
}

.point-reason {
  font-size: 14px;
  color: var(--text-color);
  margin-bottom: 4px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.point-amount {
  font-size: 16px;
  font-weight: 600;
  margin: 0 20px;
  white-space: nowrap;
}

.point-increase {
  color: var(--success-color);
}

.point-decrease {
  color: var(--danger-color);
}

.point-date {
  font-size: 12px;
  color: var(--light-text);
  white-space: nowrap;
}

/* 空积分记录样式 */
.empty-points {
  text-align: center;
  padding: 60px 20px;
  color: var(--light-text);
}

/* 优惠券样式 */
.coupon-list {
  padding: 0;
}

.coupon-item {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  gap: 16px;
  align-items: center;
  transition: background-color 0.2s ease;
}

.coupon-item:hover {
  background-color: #fafafa;
}

.coupon-item:last-child {
  border-bottom: none;
}

.coupon-image {
  flex-shrink: 0;
  max-width: 200px;
  overflow: hidden;
  border-radius: var(--border-radius);
}

.coupon-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.coupon-info {
  flex: 1;
  min-width: 0;
}

.coupon-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 4px;
}

.coupon-condition {
  font-size: 13px;
  color: var(--light-text);
  margin-bottom: 4px;
}

.coupon-period {
  font-size: 12px;
  color: var(--light-text);
}

.coupon-apply {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.coupon-use {
  font-size: 14px;
  color: var(--text-color);
}

.coupon-discount {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-color);
}

/* 空优惠券样式 */
.empty-coupons {
  text-align: center;
  padding: 60px 20px;
  color: var(--light-text);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .point-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .point-amount {
    margin: 0;
  }
  
  .point-date {
    align-self: flex-start;
  }
  
  /* 优惠券响应式设计 */
  .coupon-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .coupon-image {
    max-width: 100%;
    width: 100%;
  }
  
  .coupon-apply {
    align-self: flex-start;
  }
  
  .coupon-discount {
    font-size: 16px;
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .order-tabs {
    padding: 0 8px;
  }

  .tab-item {
    padding: 12px 16px;
    font-size: 13px;
  }

  .order-goods {
    padding: 12px;
    gap: 12px;
  }

  .goods-image {
    width: 60px;
    height: 60px;
  }

  .goods-title {
    font-size: 13px;
  }

  .order-actions {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .action-btn {
    padding: 6px 12px;
    font-size: 13px;
    flex: 1;
    min-width: 80px;
  }

  .order-payment-info {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .order-people-info {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .payment-row,
  .price-row {
    font-size: 13px;
  }

  .status-item {
    padding-left: 16px;
  }

  .order-status-timeline::before {
    left: 16px;
  }
}

/* 订单列表容器 */
.orders-container {
  max-width: 1440px;
  margin: 0 auto;
  background-color: #fafafa;
  border-radius: var(--border-radius);
  /*min-height: 100vh;*/
  padding: 20px;
  margin-top: 20px;
}
@media (max-width: 768px) {
  .orders-container,.order-list-container {
    padding: 5px;
  }
}
/* 顶部标签栏 */
.order-tabs {
  display: flex;
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 0;
  margin-bottom: 20px;
  box-shadow: var(--box-shadow);
  overflow-x: auto;
}

/* 标签项 */
.tab-item {
  flex: 1;
  text-align: center;
  padding: 16px 0;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--light-text);
  transition: var(--transition);
  white-space: nowrap;
  min-width: 80px;
}

.tab-item.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  font-weight: 600;
}

.tab-item:hover {
  color: var(--primary-color);
}

/* 筛选按钮 */
.filter-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 16px;
  color: var(--light-text);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}
