@import '../helpers/helpers';
@import '../components/big-wins';

// sass-lint:disable no-vendor-prefixes, no-duplicate-properties
.pdp {
  &__title {
    padding-bottom: 0;

    @include media-breakpoint-only(md) {
      padding-right: 0;
    }
  }

  &__reviews_small {
    padding-bottom: 0;
    display: flex;
    align-items: baseline;

    @include media-breakpoint-only(md) {
      margin-top: 20px;
      margin-bottom: 20px;
      padding-left: 0;
    }

    @include media-breakpoint-up(lg) {
      padding-left: 0;
      padding-right: 10px;
      margin-top: 20px;
      margin-bottom: 20px;
    }

    @include media-breakpoint-down(sm) {
      margin-top: 10px;
      margin-bottom: 15px;
      min-height: 47px;
    }
  }

  &__reviews-link-wrap {
    margin-right: $btn-padding-x;
  }

  &__gallery {

    @include media-breakpoint-up(md) {
      grid-column-start: 1;
      grid-row-start: 2;
    }

    @include media-breakpoint-up(lg) {
      padding-right: 20px;
      padding-bottom: 20px;
    }
  }

  &__description {
    padding-bottom: 0;

    @include media-breakpoint-only(md) {
      grid-column-start: 1;
      grid-row-start: 3;
      padding-right: 15px;
    }

    @include media-breakpoint-up(lg) {
      grid-column-start: 2;
      grid-row-start: 2;
      padding-left: 10px;
      padding-right: 10px;
    }

    @include media-breakpoint-down(sm) {
      padding-bottom: 0;
    }
  }

  &__aside {
    padding-bottom: 0;

    @include media-breakpoint-only(md) {
      grid-column-start: 2;
      grid-row: 2 / span 2;
      padding-left: 15px;
    }

    @include media-breakpoint-up(lg) {
      grid-column-start: 3;
      grid-row: 1 / span 3;
      padding-left: 20px;
    }
  }

  &__fulfilment {
    margin-top: 30px;
  }

  &__similar {
    @include media-breakpoint-down(md) {
      display: none;
    }
  }

  &__info {
    margin-bottom: 10px;
    padding: 20px;
    background-color: $gray-light;

    @include media-breakpoint-up(lg) {
      grid-column: 1 / span 3;
      grid-row: 5 / span 1;
    }

    @include media-breakpoint-down(md) {
      padding: 30px 40px;
      grid-column: 1 / span 3;
      grid-row: 5 / span 1;
      margin-bottom: 40px;
    }

    @include media-breakpoint-down(sm) {
      padding: 20px 15px;
      margin-bottom: 30px;
    }
  }

  &__quantity {
    width: 30px;
    height: 25px;
    text-align: left;
    padding: 5px;
    margin-left: 10px;
  }

  &__main {
    padding-top: 40px;

    @include media-breakpoint-only(md) {
      padding-top: 35px;
    }

    @include media-breakpoint-down(sm) {
      padding-top: 10px;
    }
  }

  &__recently-viewed {
    padding-top: 0;

    & .recently-viewed {
      padding-top: 0;
    }
  }

  &__buyers-gallery {
    overflow: hidden;
  }
}

.recently-viewed {

  @include media-breakpoint-down(md) {
    display: none;
  }

}

.review-star {
  display: inline-block;
  vertical-align: text-top;

  &.product-card__reviews {
    margin-top: 0;
    background: none;
  }

  & .product-rating {
    font-size: 1rem;
  }

  &-average {
    padding-right: $btn-padding-x;
  }
}

.s7flyoutzoomview.s7flyoutzoomview.s7flyoutzoomview.s7flyoutzoomview {
  border-bottom: 1px solid $gray-light;
}

.s7container.s7container.s7container.s7container {
  border: 1px solid $gray-light;
}

.product-main-info__description.product-main-info__description {
  margin-bottom: 20px;
  position: relative;

  @include media-breakpoint-down(md) {
    margin-bottom: 15px;
  }
}

.gallery_bordered {
  border: 1px solid $gray-light;
}

.gallery__main {
  border-bottom: 1px solid $gray-light;
}

.product-code-v2 {
  margin-right: 15px;

  @include media-breakpoint-down(sm) {
    margin-right: 5px;
  }
}

.review-star-average-v2 {
  font-size: .875rem;
  vertical-align: 15%;
}

.p-w-r .pr-snippet-stars-reco-inline .pr-snippet-read-and-write {
  // sass-lint:disable no-important
  display: block !important;

  span {
    padding-left: 0 !important;
  }
}

.product-rating-v2.product-rating-v2 {
  display: inline-block;
}

.empty-block {
  height: 200px;
}

.product-main {
  &-info {
    &__read {
      &-less {
        display: none;
        color: $blue;
        text-decoration: underline;
        text-align: right;
        font-size: 1rem;
        cursor: pointer;
      }

      &-more {
        display: none;
        color: $blue;
        background: $white;
        text-decoration: underline;
        font-size: 1rem;
        cursor: pointer;
        position: absolute;
        top: calc(240px - 25px);
        right: 0;
      }
    }
  }
}

.modal-dialog {
  overscroll-behavior: contain;
}

.pdp-reviews-wrap {
  display: flex;
  flex-direction: column;
  margin-top: auto;
}

@include media-breakpoint-up(md) {
  .pdp {
    &__fulfilment {
      margin-top: 10px;
      margin-bottom: 5px;
      grid-column: 1 / span 4;
      grid-row: 4 / span 1;
    }
  }
}

@include media-breakpoint-up(lg) {
  .pdp {
    &__fulfilment {
      margin-top: 30px;
    }
  }
}
