.order-list-page {
  display: flex;
  flex-direction: column;
}

// 页面标题
.page-header {
  background-color: #ffffff;
  padding: 40rpx 32rpx 20rpx;
  box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.03);

  .page-title {
    font-size: 36rpx;
    font-weight: 600;
    color: #333;
  }
}

// 状态筛选
.status-filter {
  white-space: nowrap;
  padding: 20rpx 32rpx;
  background-color: #ffffff;
  border-bottom: 1rpx solid #f0f0f0;

  .filter-item {
    display: inline-block;
    padding: 12rpx 28rpx;
    margin-right: 20rpx;
    font-size: 28rpx;
    color: #666;
    background-color: #f8f8f8;
    border-radius: 40rpx;

    &:last-child {
      margin-right: 60rpx;
    }

    &.active {
      background-color: #e6f7ff;
      color: #1890ff;
      font-weight: 500;
    }
  }
}

// 订单列表容器
.order-list-container {
  flex: 1;
  padding: 0 24rpx;
  box-sizing: border-box;
}

// 加载骨架屏
.loading-container {
  padding: 24rpx 0;

  .loading-item {
    background-color: #fff;
    border-radius: 16rpx;
    padding: 32rpx;
    margin-bottom: 24rpx;
    display: flex;

    .skeleton-image {
      width: 160rpx;
      height: 160rpx;
      background-color: #f0f0f0;
      border-radius: 12rpx;
    }

    .skeleton-text-container {
      flex: 1;
      margin-left: 24rpx;
      display: flex;
      flex-direction: column;
      justify-content: space-between;

      .skeleton-text-line {
        height: 30rpx;
        background-color: #f0f0f0;
        border-radius: 6rpx;

        &.short {
          width: 60%;
        }

        &.medium {
          width: 80%;
        }

        &.long {
          width: 100%;
        }
      }
    }
  }
}

// 订单列表
.order-list {
  padding: 24rpx 0;
}

// 订单卡片
.order-card {
  background-color: #fff;
  border-radius: 20rpx;
  margin-bottom: 24rpx;
  padding: 32rpx;
  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.03);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;

  &:active {
    transform: translateY(-2rpx);
    box-shadow: 0 6rpx 24rpx rgba(0, 0, 0, 0.05);
  }
}

// 订单头部
.order-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28rpx;
  padding-bottom: 20rpx;
  border-bottom: 1rpx solid #f5f5f5;

  .order-info {
    display: flex;
    flex-direction: column;

    .order-number {
      font-size: 28rpx;
      color: #333;
      font-weight: 500;
      margin-bottom: 8rpx;
    }

    .order-time {
      font-size: 24rpx;
      color: #999;
    }
  }

  .order-status {
    .status-label {
      padding: 6rpx 16rpx;
      border-radius: 20rpx;
      font-size: 22rpx;
      font-weight: 500;
    }

    // 状态颜色定义
    .status-wait-pay {
      background-color: #fff0f0;
      color: #ff4d4f;
    }

    .status-paid {
      background-color: #f0f9ff;
      color: #1890ff;
    }

    .status-cancelled {
      background-color: #f5f5f5;
      color: #999;
    }

    .status-completed {
      background-color: #f0fff0;
      color: #52c41a;
    }

    .status-group {
      background-color: #fff5f0;
      color: #fa8c16;
    }

    .status-wait-ship {
      background-color: #f0f5ff;
      color: #2f54eb;
    }

    .status-shipped {
      background-color: #f0f5ff;
      color: #2f54eb;
    }

    .status-wait-receive {
      background-color: #f0f5ff;
      color: #2f54eb;
    }

    .status-received {
      background-color: #f0fff0;
      color: #52c41a;
    }

    .status-refunded {
      background-color: #f5f5f5;
      color: #999;
    }
  }
}

// 商品项
.goods-item {
  display: flex;
  margin-bottom: 24rpx;

  &:last-child {
    margin-bottom: 0;
  }

  .goods-image {
    width: 160rpx;
    height: 160rpx;
    border-radius: 12rpx;
    background-color: #f5f5f5;
  }

  .goods-info {
    flex: 1;
    margin-left: 24rpx;
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    .goods-name {
      font-size: 28rpx;
      color: #333;
      line-height: 1.4;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
      overflow: hidden;
    }

    .goods-spec {
      font-size: 24rpx;
      color: #999;
      margin-top: 4rpx;
    }

    .goods-price-info {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: 6rpx;

      .goods-price {
        font-size: 28rpx;
        color: #ff4d4f;
        font-weight: 500;
      }

      .goods-quantity {
        font-size: 26rpx;
        color: #666;
      }
    }
  }
}

// 订单统计
.order-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28rpx;
  padding-top: 24rpx;
  border-top: 1rpx solid #f5f5f5;

  .total-quantity {
    font-size: 26rpx;
    color: #666;
  }

  .price-section {
    display: flex;
    align-items: center;

    .total-label {
      font-size: 26rpx;
      color: #666;
      margin-right: 8rpx;
    }

    .total-price {
      font-size: 32rpx;
      color: #ff4d4f;
      font-weight: 600;
    }
  }
}

// 卡片底部装饰线
.card-footer {
  margin-top: 24rpx;

  .decorative-line {
    height: 2rpx;
    background: linear-gradient(
      to right,
      transparent,
      #e6f7ff 20%,
      #e6f7ff 80%,
      transparent
    );
    border-radius: 2rpx;
  }
}

// 底部按钮
.bottom-btn {
  margin-top: 16rpx;
  display: flex;
  justify-content: end;
  button {
    margin: 0;
    border-radius: 80rpx;
    width: 180rpx;
    height: 60rpx;
    line-height: 60rpx;
    font-size: 26rpx;
    color: #333333;
    background: #fff;
    border: 2rpx solid #d4dae0;
    box-sizing: border-box;
    &:after {
      display: none;
    }
  }
}
