@import '../../../../styles/mixins/text-ellipsis.scss';

.nut-card {
  width: 100%;
  display: flex;
  background-color: inherit;
  border-radius: $card-border-radius;

  &-left {
    width: scale-px(120px);
    height: scale-px(120px);
    flex-shrink: 0;

    > img {
      display: block;
      width: 100%;
      height: 100%;
      border-radius: $card-border-radius;
    }
  }

  &-right {
    flex: 1;
    padding: 0 scale-px(10px) scale-px(8px);

    &-title {
      @include moreline-ellipsis();
      line-height: $line-height-2xl;
      font-size: $font-size-base;
      color: $color-title;
    }

    &-price {
      display: flex;
      align-items: center;
      height: scale-px(18px);
      line-height: scale-px(18px);
      margin-top: scale-px(9px);

      &-origin {
        &.nut-price {
          margin-left: scale-px(2px);
          .nut-price-symbol,
          .nut-price-integer,
          .nut-price-decimal {
            color: #d2a448;
          }
        }
      }
    }

    &-other {
      display: flex;
      align-items: center;
      padding: scale-px(5px) 0 scale-px(2px);

      .nut-tag {
        padding: 0 scale-px(2px);
        margin-right: scale-px(5px);
        font-size: $font-size-xs;
      }
    }

    &-shop {
      display: flex;
      justify-content: space-between;
      align-items: center;

      &-name {
        line-height: $line-height-xl;
        color: $color-text;
        font-size: $font-size-s;
        padding-top: scale-px(4px);
      }
    }
  }
}

[dir='rtl'] .nut-card,
.nut-rtl .nut-card {
  &-right {
    &-price {
      &-origin {
        &.nut-price {
          margin-left: 0;
          margin-right: scale-px(2px);
        }
      }
    }

    &-other {
      .nut-tag {
        margin-right: 0;
        margin-left: scale-px(5px);
      }
    }
  }
}
