@charset "UTF-8";

/**
 * @copyright     2022 beikeshop.com - All Rights Reserved.
 * @link          https://beikeshop.com
 * @Author        pu shuo <pushuo@guangda.work>
 * @Date          2022-08-24 17:24:33
 * @LastEditTime  2022-09-16 20:56:21
 */

body.page-product {
  @media (max-width: 768px) {
    .breadcrumb {
      display: none
    }
  }

  #product-description {
    img {
      max-width: 100%;
      height: auto;
    }
  }

  .product-image {
    position: relative;

    #swiper {
      height: 250px;
      @media (min-width: 480px) {
        height: 400px;
      }
      @media (min-width: 768px) {
        height: 500px;
      }

      &:hover {
        .swiper-pager > div {
          @media (max-width: 768px) {
            display: none;
          }
          background-color: rgba(255, 255, 255, 0.548);
          opacity: 1;
          &:hover {
            background-color: rgba(255, 255, 255);
          }
        }
      }
    }

    #swiper-mobile {
      .swiper-pagination {
        --swiper-theme-color: #ff6600;/* 设置Swiper风格 */
        --swiper-navigation-color: #ff6600;/* 单独设置按钮颜色 */
        --swiper-navigation-size: 30px;/* 设置按钮大小 */
      }
    }

    .left {
      margin-right: 1rem;

      .swiper > div > div{
        border: 1px solid #eee;
        margin-bottom: 10px;
        width: 80px;
        // height: 80px !important;
        padding: 2px;
        cursor: pointer;

        &.active, &:hover {
          border: 1px solid #3a3a3a;
        }
      }

      .swiper-pager {
        > div {
          opacity: 0;
          background-color: rgba(255, 255, 255, 0);
          transition: all .5s;
        }
        .swiper-button-next {
          border: 0;
          top: 485px;
          left: 50%;

          height: 55px;
          width: 30px;
          transform-origin: center;
          transform: rotate(90deg) translate(0,25%);

          &:hover,&.active {
            border: 0 !important;
          }

          &::after {
            font-size: 18px;
          }
        }

        .swiper-button-prev{
          border: 0;
          top: 8px;
          left: 50%;
          height: 55px;
          width: 30px;
          transform-origin: center;
          transform: rotate(90deg) translate(0,25%);

          &:hover,&.active {
            border: 0 !important;
          }

          &::after {
            font-size: 18px;
          }
        }
      }
    }

    .right {
      border: 1px solid #eee;
      position: relative;
    }

    #product-video {
      position: absolute;
      width: 100%;
      height: 100%;
      top: 0;
      left: 0;
      z-index: 99;
      display: none;
    }

    .open-video {
      position: absolute;
      bottom: 10px;
      z-index: 99;
      line-height: 1;
      cursor: pointer;

      @media (min-width: 768px) {
        transform: translateX(-50%);
        left: 50%;
      }

      @media (max-width: 768px) {
        right: 10px;
      }

      &:hover {
        i {
          color: #fff;
          background-color: rgba(0, 0, 0, 0.648);
        }
      }

      i {
        font-size: 3.5rem;
        line-height: 1;
        border-radius: 50%;
        font-weight: 400;
        display: inline-block;
        color: rgba(255, 255, 255, 0.948);
        background-color: rgba(0, 0, 0, 0.348);

        @media (max-width: 768px) {
          font-size: 2.5rem;
        }
      }
    }

    .close-video {
      position: absolute;
      top: 6px;
      right: 10px;
      z-index: 9999;
      color: #aaa;
      font-size: 30px;
      cursor: pointer;
      &:hover {
        color: #fff;
      }
    }
  }

  .stock-and-sku {
    > div {
      margin-bottom: 10px;
      font-size: 14px;

      .title {
        width: 80px;
      }
    }
  }

  .variables-wrap {
    .variable-info {
      > div {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-right: 0.5rem;
        margin-bottom: 0.5rem;
        border: 1px solid #ddd;
        margin-left: 0;
        min-width: 3rem;
        padding: 0.5rem;
        cursor: pointer;
        text-align: center;
        font-weight: bold;
        flex-direction: column;
        // border-radius: 2rem;
        transition: all .1s ease-in-out;
        &:hover, &.selected {
          border-color: #222;
        }

        > span.image {
          width: 50px;
          margin-top: -0.5rem;
          margin-left: -0.5rem;
          margin-right: -0.5rem;
          margin-bottom: 6px;
        }

        &:not(.selected) {
          &.disabled {
            border: 1px dashed #bfbfbf;
            color: #999;
            font-weight: initial;
          }
        }
      }
    }
  }

  .peoduct-info {
    .product-name {
      font-size: 1.7rem;
      line-height: 1.3;
      font-weight: 600;

      @media (max-width: 768px) {
        font-size: 1.2rem;
      }
    }

    .rating-wrap {
      margin-bottom: 2rem;

      .rating {
        margin-right: .5rem;
        i {
          color: $primary;
        }
      }
    }

    .price-wrap {
      margin-bottom: 2.4rem;
    }

    .quantity-btns {
      @media (min-width: 768px) {
        display: flex;
      }

      .quantity-input {
        max-width: 5rem;
        text-align: center;
      }

      .quantity-wrap {
        height: 43px;
        @media (max-width: 768px) {
          margin-bottom: 10px;
        }
      }
    }
  }

  .product-description {
    .nav-tabs {
      .nav-link {
        border: none;

        &.active {
          position: relative;
          background-color: transparent;
          color: $primary;

          &:before {
            border-top: 1px solid $primary;
            content: "";
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
          }
        }
      }
    }
  }

  .attribute-table {
    tr {
      td:first-of-type {
        @media (min-width: 768px) {
          width: 20%;
        }

        @media (max-width: 768px) {
          width: 40%;
        }
      }
    }
  }

  .relations-wrap {
    .swiper-pagination {
      .swiper-pagination-bullet {
        height: 3px;
        border-radius: 0;
      }
    }
  }
}