:root {
  --van-card-padding: var(--van-padding-xs) var(--van-padding-md);
  --van-card-font-size: var(--van-font-size-sm);
  --van-card-text-color: var(--van-text-color);
  --van-card-background: var(--van-background);
  --van-card-thumb-size: 88px;
  --van-card-thumb-radius: var(--van-radius-lg);
  --van-card-title-line-height: 16px;
  --van-card-desc-color: var(--van-text-color-2);
  --van-card-desc-line-height: var(--van-line-height-md);
  --van-card-price-color: var(--van-text-color);
  --van-card-origin-price-color: var(--van-text-color-2);
  --van-card-num-color: var(--van-text-color-2);
  --van-card-origin-price-font-size: var(--van-font-size-xs);
  --van-card-price-font-size: var(--van-font-size-sm);
  --van-card-price-integer-font-size: var(--van-font-size-lg);
  --van-card-price-font: var(--van-price-font);
}

.van-card {
  position: relative;
  box-sizing: border-box;
  padding: var(--van-card-padding);
  color: var(--van-card-text-color);
  font-size: var(--van-card-font-size);
  background: var(--van-card-background);

  &:not(:first-child) {
    margin-top: var(--van-padding-xs);
  }

  &__header {
    display: flex;
  }

  &__thumb {
    position: relative;
    flex: none;
    width: var(--van-card-thumb-size);
    height: var(--van-card-thumb-size);
    margin-right: var(--van-padding-xs);

    img {
      border-radius: var(--van-card-thumb-radius);
    }
  }

  &__content {
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0; /* hack for flex box ellipsis */
    min-height: var(--van-card-thumb-size);

    &--centered {
      justify-content: center;
    }
  }

  &__title,
  &__desc {
    word-wrap: break-word;
  }

  &__title {
    max-height: 32px;
    font-weight: var(--van-font-bold);
    line-height: var(--van-card-title-line-height);
  }

  &__desc {
    max-height: var(--van-card-desc-line-height);
    color: var(--van-card-desc-color);
    line-height: var(--van-card-desc-line-height);
  }

  &__bottom {
    line-height: var(--van-line-height-md);
  }

  &__price {
    display: inline-block;
    color: var(--van-card-price-color);
    font-weight: var(--van-font-bold);
    font-size: var(--van-card-price-font-size);
  }

  &__price-integer {
    font-size: var(--van-card-price-integer-font-size);
    font-family: var(--van-card-price-font);
  }

  &__price-decimal {
    font-family: var(--van-card-price-font);
  }

  &__origin-price {
    display: inline-block;
    margin-left: 5px;
    color: var(--van-card-origin-price-color);
    font-size: var(--van-card-origin-price-font-size);
    text-decoration: line-through;
  }

  &__num {
    float: right;
    color: var(--van-card-num-color);
  }

  &__tag {
    position: absolute;
    top: 2px;
    left: 0;
  }

  &__footer {
    flex: none;
    text-align: right;

    .van-button {
      margin-left: 5px;
    }
  }
}
