@import '../../mixins.scss';

.pp-goods-theme {
  position: relative;
  box-sizing: border-box;

  &-2,
  &-6 {
    display: flex;
    flex-wrap: wrap;
    .item,
    .goods-theme-box {
      flex: 1;
      width: 100%;
      margin-bottom: var(--pp-goods-spacing);
      &-2,
      &-3 {
        margin-right: var(--pp-goods-spacing);
      }
      &-2 {
        width: calc(50% - var(--pp-goods-spacing) / 2);
        &:nth-child(2n) {
          margin-right: 0;
        }
      }
      &-3 {
        width: calc(33.33% - var(--pp-goods-spacing) / 3 * 2);
        &:nth-child(3n) {
          margin-right: 0;
        }
      }
    }
  }

  &-2 {
    .goods-theme-box {
      margin-bottom: 0;
      .item:last-child {
        margin-bottom: 0;
      }
    }
  }

  &-6 {
    .item {
      flex: none;
      &-1 {
        &:last-child {
          margin-bottom: 0;
        }
      }
      &-2 {
        &:nth-last-child(1),
        &:nth-last-child(2) {
          margin-bottom: 0;
        }
      }
      &-3 {
        &:nth-last-child(1),
        &:nth-last-child(2),
        &:nth-last-child(3) {
          margin-bottom: 0;
        }
      }
    }
  }
}
