#barberry_woocommerce_quickview {
  background: rgba(0, 0, 0, 0.1);
  transition: opacity 0.3s ease-in-out;
  transition-delay: 0.2s;
  position: fixed;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  opacity: 0;
  visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;

  .close-button-wrapper {
    overflow: hidden;
    z-index: 4;
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    display: inline-block;
    border-radius: 50%;
    border-width: 1px;
    border-style: solid;
    border-color: transparent;
    background-color: transparent;
    cursor: pointer;
    transition: border-color 1s ease-in-out, background-color 1s ease-in-out;
    transition-delay: 0.7s;

    @include breakpoint(767px down) {
      width: 35px;
      height: 35px;
      position: fixed;
    }
  }

  .close-button {
    z-index: 4;
    position: absolute;
    top: calc(50% - 10px);
    right: calc(50% - 10px);
    left: auto;
    overflow: visible;
    visibility: visible;
    display: block;

    @include breakpoint(small only) {
      width: 1.3rem;
      height: 1.3rem;
      .close-icon_top,
      .close-icon_bottom {
        height: 0.14rem;
      }
    }
  }

  &.open {
    opacity: 1;
    visibility: visible;

    .barberry_qv_content {
      opacity: 1;
      visibility: visible;
    }
  }

  &:focus {
    outline: none;
  }

  .barberry_qv_content {
    background-color: #fff;
    @include poly-fluid-sizing(
      'width',
      (
        375px: 300px,
        1023px: 900px,
        1280px: 900px,
        1920px: 1100px,
      )
    );
    height: auto;
    position: relative;
    max-height: 80vh;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out;
    box-shadow: 5px 5px 130px 5px rgba(0, 0, 0, 0.2);

    @include breakpoint(767px down) {
      &.maybe_scroll {
        overflow-y: auto;
        overflow-x: hidden;
        overflow-y: scroll;
        -webkit-overflow-scrolling: touch;
        height: 100%;
      }

      &::-webkit-scrollbar {
        width: 2px;
      }

      overflow: visible;
      max-height: 100%;
    }

    @include breakpoint(767px down) {
      width: 100%;
    }

    .before-product-summary-wrapper {
      position: relative;
      min-height: 450px;

      @include breakpoint(1023px down) {
        min-height: 100%;
      }

      .product-labels {
        top: 15px;
        left: 15px;

        @include breakpoint(small only) {
          top: 25px;
          left: 25px;
        }
      }

      .barberry-images {
        position: relative;

        .product_tool_buttons_placeholder {
          display: none;
        }

        .product-image-wrapper {
          position: relative;
          overflow: hidden;

          .product-title-section-wrapper {
            display: none;
          }

          #product-images,
          .flickity-slider {
            opacity: 0;
          }

          #product-images {
            .flickity-page-dots {
              bottom: 25px;
            }
            &.is-single-slide {
              .flickity-page-dots,
              .flickity-button {
                display: none;
              }
            }
          }

          .woocommerce-product-gallery__image {
            width: 100%;
            img {
              width: 100%;
              height: auto;
              box-shadow: none;
            }
          }
        }
      }
    }

    .gallery-cell {
      @include breakpoint(767px down) {
        width: 100%;
      }
    }

    .summary-cell {
      position: relative;

      @include breakpoint(767px down) {
        width: 100%;
      }
      .entry-summary {
        overflow: hidden;
        // padding: 40px;
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        height: auto;
        max-height: 80vh;
        width: 100%;

        @include breakpoint(767px down) {
          overflow: visible;
          position: relative;
          max-height: 100%;
          .nano {
            overflow: visible;
          }
        }

        &:after {
          z-index: 6;
          content: '';
          position: absolute;
          bottom: 0;
          left: 0;
          width: 100%;
          height: 200px;
          background: #fff;
          background: linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0) 0%,
            #fff 70%
          );
          filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00ffffff', endColorstr='#ffffff',GradientType=0 );
          z-index: 3;
          right: 0;
          display: block;
          visibility: visible;
          transition: all 0.5s;

          @include breakpoint(1023px down) {
            display: none;
          }
        }
      }

      &:hover {
        .entry-summary {
          &:after {
            opacity: 0;
            visibility: hidden;
          }
        }
      }
    }
  }

  .nano-content {
    padding: rem-calc(60);

    @include breakpoint(768px down) {
      padding: rem-calc(30);
    }

    @include breakpoint(767px down) {
      padding: rem-calc(40);
      position: relative;
    }

    .product-info-wrapper {
      .product_summary_top {
        .title-wrapper {
          position: relative;

          // Product Breadcrumbs
          .breadcrumbs-wrapper {
            .breadcrumbs {
              font-size: 0;
              span {
                &.delimiter {
                  &:last-child {
                    display: none;
                  }
                }
              }
            }
          }

          .page-title-wrapper {
            padding-top: 10px;
            position: relative;
            display: inline-block;
            overflow: hidden;
            margin-bottom: 10px;

            h1 {
              margin-bottom: 0;
            }
          }
        }
      }

      // Product Summary Middle

      .product_summary_middle {
        .woocommerce-product-details__short-description {
          margin: rem-calc(20 0 20);

          a {
            font-weight: 400;
            background-image: linear-gradient(to top, #000 0px, #000 0px),
              linear-gradient(
                to top,
                rgba(0, 0, 0, 0.1) 0px,
                rgba(0, 0, 0, 0.1) 0px
              );
            background-position: left bottom, left bottom;
            background-repeat: no-repeat, no-repeat;
            background-size: 0 1px, 100% 1px;
            transition: none 300ms ease-in-out;
            transition-property: background-size, color;
            word-wrap: break-word;

            &:hover {
              background-size: 100% 1px, 100% 1px;
            }
          }
        }

        .go_to_product_page_wrapper {
          border-top: 1px solid #eee;
          border-bottom: 1px solid #eee;
          padding: 20px 0;
          margin-bottom: 30px;
        }

        .go_to_product_page {
          position: relative;
          display: inline-block;
          font-size: rem-calc(18);
          font-weight: 400;
          margin-bottom: 0;
          padding-left: rem-calc(26);
          transition: transform 0.3s;

          &:before {
            font-size: rem-calc(16);
            position: absolute;
            left: 0;
            top: calc(50% - 9px);
            @include barberry-icon('\ea0f');
            transition: transform 0.3s;
          }

          &:hover {
            transform: translateX(10px);
            &:before {
              transform: translateX(3px);
            }
          }
        }

        .woocommerce-product-rating {
          .star-rating {
            vertical-align: top;
            font-size: rem-calc(16);
          }

          .woocommerce-review-link {
            display: none;
          }
        }

        .price {
          margin-top: rem-calc(0);

          .amount {
            font-size: 30px;
          }

          del {
            text-decoration: none;

            span.amount {
              position: relative;
              color: #666;
              font-size: 95%;
              font-weight: 300;
            }
            .woocommerce-Price-amount:before {
              width: 100%;
              position: absolute;
              content: '';
              right: 0;
              top: 50%;
              height: 0px;
              border-bottom: 1px solid #f9423a;
              opacity: 0.7;
              transform: rotate(-15deg);
            }
          }

          ins {
            margin-left: rem-calc(5);
            color: #f9423a;
            text-decoration: none;
            line-height: 1;
          }
        }
      }

      // Product Summary Bottom

      .product_summary_bottom {
        position: relative;

        .sizeguide-link,
        .compare-btn {
          display: none;
        }

        .quantity input.custom-qty {
          background-color: #fff;
        }

        .addtocart-button-group {
          display: inline-block;
          display: -webkit-box;
          display: -moz-box;
          display: -ms-flexbox;
          display: -moz-flex;
          display: -webkit-flex;
          display: flex;

          align-items: center;

          @include breakpoint(450px down) {
            display: block;
            text-align: center;
          }
        }

        .addtocart-button-group {
          .button-group-inner {
            width: 100%;
            font-size: 0;

            .addtocart-button-group-inner {
              display: flex;
              flex-wrap: wrap;

              &.has_buy_now > button {
                @media screen and (min-width: 451px) {
                  flex-grow: 1;
                  flex-basis: 0;
                }
              }
            }
          }
        }

        @include breakpoint(450px down) {
          .quantity {
            line-height: 1.3;
            margin-bottom: 20px;
            margin-right: 0;
            .plus-btn,
            .minus-btn {
              min-width: 32px;
              height: 32px;
              line-height: 38px;
            }
          }

          input.custom-qty {
            font-size: rem-calc(20);
            width: rem-calc(40);
          }
          .button {
            display: block;
            width: 100%;
            &.barberry-buy-now {
              margin-top: -4px;
            }
          }

          .woocommerce-variation-add-to-cart {
            width: 100%;
            &.woocommerce-variation-add-to-cart-disabled {
              .button {
                &.barberry-buy-now {
                  margin-top: -1px;
                }
              }
            }
          }
        }

        p {
          font-size: 16px;
          // font-weight: 400;
          margin: 0 0 15px 0;

          &.stock {
            &:before {
              content: '';
              width: 7px;
              height: 7px;
              margin-right: 0.5rem;
              margin-bottom: 0.1rem;
              display: inline-block;
              -webkit-border-radius: 50%;
              border-radius: 50%;
            }
          }

          &.in-stock {
            color: #85ab69;
            font-weight: 400;
            &:before {
              background-color: #85ab69;
            }
          }
          &.out-of-stock {
            color: #da4343;
            font-weight: 400;
            &:before {
              background-color: #da4343;
            }
          }
        }

        .barberry-single-product-stock {
          margin: 20px 0 40px 0;
          clear: both;

          .in-stock {
            display: none;
          }

          .stock-sold {
            color: #a0a0a0;
            text-transform: uppercase;
            font-size: rem-calc(12);
            font-weight: 400;
            letter-spacing: 2.5px;
            margin-bottom: 10px;
            display: inline-block;
            span {
              color: #000;
              font-weight: 600;
              font-size: rem-calc(16);
            }

            @include breakpoint(400px down) {
              font-size: rem-calc(11);
              letter-spacing: 1px;
              span {
                font-size: rem-calc(14);
              }
            }
          }

          .barberry-product-stock-progress {
            width: 100%;
            position: relative;
            background: #ededed;
            height: 3px;

            .barberry-product-stock-progress-bar {
              position: absolute;
              left: 0;
              top: 0;
              height: 100%;
              background: linear-gradient(325.12deg, #f9423a 0, #f1e04d 100%);
              background-color: #f9423a;
              z-index: 1;
              color: #fff;
              line-height: inherit;
              width: 2px;
              height: 100%;
              overflow: hidden;

              @include transition(width 500ms ease);
            }
          }
        }

        button.button {
          margin-bottom: 0;
        }

        form.cart .added_to_cart {
          display: none !important;
        }

        form.cart {
          @include breakpoint(530px down) {
            .quantity {
              line-height: 1.3;
              .plus-btn,
              .minus-btn {
                min-width: 26px;
                height: 26px;
                line-height: 38px;
              }
            }

            input.custom-qty {
              font-size: rem-calc(15);
              width: 30px;
            }

            .button {
              &.add_to_cart_button,
              &.barberry-buy-now {
                padding: 16px 18px 14px;
              }
            }
          }

          @include breakpoint(450px down) {
            .button {
              &.barberry-buy-now {
                margin-left: 0;
                margin-right: 0;
                margin-top: 10px;
                width: 100%;
                display: block;
              }
            }
          }

          @include breakpoint(375px down) {
            .quantity {
              line-height: 1.3;
              margin-bottom: 20px;
              .plus-btn,
              .minus-btn {
                min-width: 32px;
                height: 32px;
                line-height: 38px;
              }
            }

            input.custom-qty {
              font-size: rem-calc(20);
              width: rem-calc(40);
            }
            .button {
              display: block;
              width: 100%;
              &.barberry-buy-now {
                margin-top: -4px;
              }
            }
          }
        }

        .product_summary_bottom_inner {
          .product_meta {
            .product_meta_ins {
              opacity: 1;
              padding: 0;
              text-align: left;
              border-bottom: none;

              .cell {
                width: 100%;
                padding: 0;

                > span {
                  font-size: rem-calc(16);
                  font-weight: 400;
                  margin-right: rem-calc(30);

                  display: block;
                  text-align: left;
                  margin-right: 0;

                  .sku {
                    font-weight: 300;
                  }

                  a {
                    font-size: rem-calc(16);
                    background-image: linear-gradient(
                        to top,
                        #000 0px,
                        #000 0px
                      ),
                      linear-gradient(
                        to top,
                        rgba(0, 0, 0, 0.1) 0px,
                        rgba(0, 0, 0, 0.1) 0px
                      );
                    background-position: left bottom, left bottom;
                    background-repeat: no-repeat, no-repeat;
                    background-size: 0 1px, 100% 1px;
                    transition: none 300ms ease-in-out;
                    transition-property: background-size, color;
                    word-wrap: break-word;

                    &:hover {
                      background-size: 100% 1px, 100% 1px;
                    }
                  }

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

body.is-mobile {
  #barberry_woocommerce_quickview
    .barberry_qv_content
    .summary-cell
    .entry-summary:after {
    display: none;
  }
}
