.custom-main-product {
  .custom-media-block {
    display: flex;
    flex-direction: column;
    gap: 2.6rem;
    position: sticky;
    top: var(--sticky-offset, 2rem);

    @media screen and (max-width: 768px) {
      gap: 1.6rem;
    }

    .custom-media-block__main-image {
      border-radius: 40px;
      aspect-ratio: 1/1;
      overflow: hidden;

    }

    .thumbnails-wrapper {
      overflow-x: auto;
      scroll-snap-type: x mandatory;
      scroll-snap-align: start;
      scroll-behavior: smooth;
      -webkit-overflow-scrolling: touch;
      -ms-overflow-style: none;
      scrollbar-width: none;

      .custom-media-block__thumbnails {
        display: flex;
        gap: 1.7rem;
        width: fit-content;

        @media screen and (max-width: 768px) {
          gap: 1rem;
        }

        .thumb-item {
          width: 135px;
          height: 130px;
          border-radius: 1.4rem;
          overflow: hidden;
          border: 1px solid transparent;

          @media screen and (max-width: 768px) {
            width: 75px;
            height: 72px;
          }
        }

        .thumb-item.active {
          border-color: #6a6a6a;
        }
      }
    }
  }

  .custom-main-product__top-badge {
    margin-top: 0;
    display: flex;
    font-weight: 700;
    line-height: 120%;
    color: #1f1f1f;
    background-color: #FFFCD2;
    border-radius: 10rem;
    padding: 1.4rem 2rem;
    width: fit-content;
    margin-bottom: 14px;

    @media screen and (max-width: 768px) {
      width: 100%;
      justify-content: center;
      text-align: center;
      text-align: center;
    }
  }

  .product__title.h1 {
    line-height: 120%;
    margin: 0;
  }

  .product__subtitle {
    line-height: 120%;
    color: #414141;
    margin-top: 0.8rem;

    @media screen and (max-width: 768px) {
      margin-top: 0.6rem;
    }
  }

  .custom-price-block {
    margin-top: 2.5rem;
    margin-bottom: 3.4rem;

    @media screen and (max-width: 768px) {
      margin-top: 2.4rem;
      margin-bottom: 2.4rem;
    }

    .custom-price-block__wrapper {
      display: flex;
      align-items: center;
      gap: 3.4rem;

      @media screen and (max-width: 768px) {
        gap: 0.5rem;
        flex-wrap: wrap;
      }

      @media screen and (max-width: 500px) {
        justify-content: space-between;
      }

      .custom-price-block__badge {
        margin: 0;
        display: flex;
        width: fit-content;
        padding: 1.2rem 2rem;
        font-weight: 600;
        line-height: 120%;
        border: 1px solid #ddd;
        border-radius: 100px;
        background-color: #FFFCD2;
        gap:3px;
      }

      .f-price__sale {
        gap: 2rem;
        flex-wrap: nowrap;
      }

      .f-price--on-sale .f-price-item--sale {
        color: #000;
      }

      .f-price--on-sale .f-price-item--regular {
        font-weight: 500;
        font-size: 2.2rem;
        line-height: 120%;
        color: #df1717;
      }
    }

    .product__tax {
      margin-top: -3px;
      color: #414141;

      @media screen and (max-width: 390px) {
        margin-top: 4px;
      }
    }
  }

  .product__block--description {
    color: #393939;
    margin-bottom: 3.4rem;

    @media screen and (max-width: 768px) {
      margin-bottom: 2.4rem;
    }

    ul {
      padding: 0;
      display: flex;
      gap: 1.6rem;
      flex-direction: column;
    }

    li {
      list-style: none;
      position: relative;
      padding-left: 4.8rem;

      @media screen and (max-width: 768px) {
        padding-left: 3.4rem;
      }
      
      &::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0.2rem;
        width: 2.8rem;
        height: 2.8rem;
        background-image: url('icon-checkmark.svg');
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;

        @media screen and (max-width: 768px) {
          width: 2.2rem;
          height: 2.2rem;
        }
      }
    }
  }

  .product-form__submit {
    display: flex;
    gap: 1.6rem;

    @media screen and (max-width: 768px) {
      gap: 0.8rem;
      padding: 0 1rem;
    }
  }

  .product-form__buttons {
    gap: 2rem;

    @media screen and (max-width: 768px) {
      gap: 0.6rem;
    }
  }

  .quantity {
    border-radius: 100px;

    @media screen and (max-width: 768px) {
      width: 100px;
    }
  }

  .quantity__input {
    border: 1px solid #bbb;
  }

  .custom-image-block {
    margin-top: 2.2rem;
    margin-bottom: 1rem;

    img {
      @media screen and (max-width: 1023px) {
        display: block;
        margin: auto;
      }
    }
  }

  .product__block--shipping {
    margin-top: 0;
    font-weight: 500;
    line-height: 120%;
    color: #414141;
    padding-bottom: 3.2rem;
    border-bottom: 1px solid #d6d6d6;
    margin-bottom: 2.7rem;

    @media screen and (max-width: 768px) {
      padding-bottom: 2.4rem;
      margin-bottom: 1.6rem;
    }
  }

  .product__block--advantage-blocks {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 0;
    margin-bottom: 3rem;

    @media screen and (max-width: 768px) {
      grid-template-columns: repeat(1, 1fr);
      gap: 0.8rem;
      margin-bottom: 1.3rem;
    }

    div {
      display: flex;
      gap: 1.2rem;
      padding: 1.9rem 0 1.9rem 2.5rem;
      align-items: center;
      border-radius: 12px;
      background-color: #FFFCD2;

      @media screen and (max-width: 768px) {
        padding: 1.4rem;
        justify-content: flex-start;
      }

      img {
        width: 37px;
      }

      span {
        font-weight: 600;
        line-height: 120%;
        color: #414141;
      }
    }
  }

  .product__block--collapsible_tab {
    svg {
      transition: transform 0.3s ease-in-out;
    }

    .accordion-details__summary h2 {
      line-height: 120%;
      color: #414141;
    }

    .accordion-details__summary {
      padding-block: 2.6rem;
    }
  }

  .product__block--collapsible_tab [open] {
    svg {
      transform: rotate(180deg);
    }
  }

  .product {
    gap: 7.4rem;
    --media-width: 54.8%;

    @media screen and (max-width: 1023px) {
      gap: 2.4rem;
      flex-direction: column;
    }
  }

  .product:not(.product--media-has-0) .product__info-wrapper {
    padding-inline-start: 0;
    flex: 1;

    @media screen and (max-width: 1023px) {
      width: 100%;
      max-width: unset;
    }
  }

  .product:not(.product--media-has-0) .product__media-wrapper {
    @media screen and (max-width: 1023px) {
      width: 100%;
      max-width: unset;

      img {
        width: 100%;
      }
    }
  }
}

/* Review block */

.product__block--review {
  .review-block {
    background-color: rgb(var(--color-field));
    border-radius: var(--blocks-radius);
    overflow: hidden;

    .review-block__header {
      padding: 1.2rem 2rem;
      background-color: #FFFCD2;

      .star-block {
        display: flex;
        align-items: center;
        justify-content: space-between;

        @media screen and (max-width: 768px) {
          flex-direction: column;
        }

        .star-block__stars {
          display: flex;
          align-items: center;

          svg {
            width: 18px;
            height: 16px;
          }

          span {
            padding-left: 0.8rem;
            font-weight: 600;
          }
        }
      }

      a {
        text-decoration: underline;
        text-decoration-thickness: 1px;
      }
    }

    .review-block__content {
      padding: 2rem;
      display: flex;
      gap: 2rem;

      @media screen and (max-width: 768px) {
        padding: 1.5rem;
        gap: 1.2rem;
      }

      .review-block__image {
        width: 60px;
        min-width: 60px;
        height: 60px;
        border-radius: 100px;
        overflow: hidden;

        @media screen and (max-width: 768px) {
          width: 45px;
          min-width: 45px;
          height: 45px;
        }

        img {
          width: 100%;
          height: 100%;
          object-fit: cover;
        }
      }

      .content-block__text {
        margin: 0 0 1.2rem;
      }

      .review-block__author {
        display: flex;
        align-items: center;
        gap: 2rem;

        @media screen and (max-width: 768px) {
          flex-wrap: wrap;
          gap: 1.2rem;
        }

        .review-block__author-name {
          font-weight: 600;
        }

        .review-block__verified {
          display: flex;
          align-items: center;
          gap: 0.8rem;

          span {
            color: #10CA3C;
            padding-bottom: 2px;
          }
        }
      }
    }
  }
}