/* Predefined utility classes */
.fw-light {
  font-weight: 300 !important;
}

.fw-normal {
  font-weight: 400 !important;
}

.fw-medium {
  font-weight: 500 !important;
}

.fw-semibold {
  font-weight: 600 !important;
}

.fw-bold {
  font-weight: 700 !important;
}

/* Custom Style */

/* Main Collection */
.custom_main_collection_grid {
  .layout {
    .layout__section {
      &:first-child {
        @media (min-width: 1280px) {
          width: 340px;
          align-self: flex-start;
          position: sticky;
          top: 230px;
        }
      }

      &:nth-child(2) {
        .collection {
          .collection__dynamic-part {
            .collection__toolbar {
              margin: 0;
              background: transparent;
              box-shadow: none;
              padding: 0px 0 30px;

              @media (max-width: 640px) {
                padding: 10px 21px;
                background: #fff;
                margin: 0 0 20px;
              }

              .collection__toolbar-item {
                height: auto;

                &.collection__toolbar-item--count {
                  .collection__showing-count {
                    margin: 0;
                  }

                  .value-picker-wrapper {
                    display: none;
                  }
                }

                &.collection__toolbar-item--layout {
                  display: none;
                }

                &.collection__toolbar-item--sort {
                  order: -1;
                  margin-right: auto;
                  margin-left: unset;
                }
              }
            }
          }

          .product-list {
            background: transparent;
            justify-content: space-between;

            @media (min-width: 1000px) {
              padding: 0;
            }

            .product-item {
              background: transparent;

              @media (min-width: 1000px) {
                padding: 0 0 30px;
                width: 32%;
              }

              &.product-item--vertical {
                background: transparent;
                margin-right: auto;
                margin-left: auto;

                .product-item__image-wrapper {
                  padding: 10px 8px;
                  border-radius: 8px;
                  background: #ffffff;

                  @media (min-width: 576px) {
                    padding: 20px 12px;
                  }

                  .aspect-ratio {
                    padding: 0 !important;
                    min-height: 120px;
                    max-height: 120px;

                    @media (min-width: 576px) {
                      min-height: 200px;
                      max-height: 200px;
                    }

                    @media (min-width: 1200px) {
                      min-height: 410px;
                      max-height: 410px;
                    }

                    img {
                      object-fit: contain;
                      object-position: center center;
                    }
                  }
                }

                .product-item__info {
                  .product-item__info-inner {
                    .product-item__vendor.link {
                      display: flex;
                      width: max-content;
                      border: 1px solid #e1e3e4;
                      padding: 2px 6px;
                      background: #e1e3e4;
                      color: #000;
                      font-weight: 500;
                      border-radius: 6px;
                      margin: 0 0 10px;
                    }
                  }
                }
              }

              &.product-item--list {
                background: transparent;

                .product-item__image-wrapper {
                  padding: 10px 8px;
                  border-radius: 8px;
                  background: #ffffff;
                  align-self: flex-start;

                  @media (min-width: 576px) {
                    padding: 20px 12px;
                  }

                  .aspect-ratio {
                    padding: 0 !important;
                    min-height: 120px;
                    max-height: 120px;

                    @media (min-width: 576px) {
                      min-height: 180px;
                      max-height: 180px;
                    }

                    img {
                      object-fit: contain;
                      object-position: center center;
                    }
                  }
                }

                .product-item__info {
                  .product-item__info-inner {
                    .product-item__vendor.link {
                      display: flex;
                      width: max-content;
                      border: 1px solid #e1e3e4;
                      padding: 2px 6px;
                      background: #e1e3e4;
                      color: #000;
                      font-weight: 500;
                      border-radius: 6px;
                      margin: 0 0 10px;
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }

  .card {
    background: transparent;
    border: 0;

    .card__section:not(.collection__mobile-filters-recap) {
      padding: 0;

      .filter_tag {
        display: flex;
        gap: 12px;
        font-size: 16px;
        margin-bottom: 30px;
        color: #000000;
      }

      .collection__filter-group-list {
        padding: 35px 25px;
        background: #ffffff;
        border-radius: 7px;
        border: 1px solid #E1E3E4;
        color: #000000;

        .collection__filter-group {
          padding: 0 0 14px;
          border-top: 1px solid rgba(0, 0, 0, 0.15);

          &:first-child {
            border-top: none;
          }

          .collection__filter-group-name {
            justify-content: space-between;
            padding: 15px 0 0px;
            color: #000000;

            svg,
            path {
              fill: #d19315;
              stroke: #d19315;
            }
          }

          .collection__filter-collapsible {
            color: #000000;

            .collection__filter-checkbox-list {
              padding-left: 0 !important;

              .collection__filter-checkbox {
                flex-direction: row-reverse;
                justify-content: space-between;
                padding: 2px 0;

                .checkbox-wrapper {
                  input {
                    border: 1px solid #d19315;
                    background: transparent;
                  }
                }

                label {
                  padding-right: 10px;
                  padding-left: 0;
                  color: #000000;
                }
              }
            }

            .price-range {
              .price-range__input-group {
                .price-range__input {
                  background: #ffffff;
                  color: #000000;
                  border-radius: 6px;
                }
              }
            }
          }
        }
      }
    }
  }

  #mobile-collection-filters {
    .collection-drawer__section-title {
      display: none;
    }

    .collection__filter-group {
      padding: 0 15px 14px;
      border-top: 1px solid #0000001c;

      &:first-child {
        border-top: none;
      }

      .collection__filter-group-name {
        justify-content: space-between;
        padding: 15px 0 0px;
      }

      .collection__filter-collapsible {
        .collection__filter-checkbox-list {
          padding-left: 0 !important;

          .collection__filter-checkbox {
            flex-direction: row-reverse;
            justify-content: space-between;
            padding: 2px 0;

            .checkbox-wrapper {
              input {
                border: 1px solid #677279;
              }
            }

            label {
              padding-right: 10px;
              padding-left: 0;
            }
          }
        }

        .price-range {
          .price-range__input-group {
            .price-range__input {
              background: #fff;
              border-radius: 6px;
            }
          }
        }
      }
    }
  }
}

/* Search Results Filter Panel */
.search-results-filter-card {
  background: #ffffff;
  border-color: #E1E3E4;

  .card__title--small {
    color: #000000;
  }

  .collection__filter-group-list {
    padding: 0;
    background: #ffffff;
    border-radius: 7px;
    color: #000000;

    .collection__filter-group {
      padding: 0 0 14px;
      border-top: 1px solid rgba(0, 0, 0, 0.15);

      &:first-child {
        border-top: none;
      }

      .collection__filter-group-name {
        justify-content: space-between;
        padding: 15px 0 0px;
        color: #000000;

        svg,
        path {
          fill: #d19315;
          stroke: #d19315;
        }
      }

      .collection__filter-collapsible {
        color: #000000;

        .collection__filter-checkbox-list {
          padding-left: 0 !important;

          .collection__filter-checkbox {
            flex-direction: row-reverse;
            justify-content: space-between;
            padding: 2px 0;

            .checkbox-wrapper {
              input {
                border: 1px solid #d19315;
                background: #ffffff;
              }
            }

            label {
              padding-right: 10px;
              padding-left: 0;
              color: #000000;
            }
          }
        }

        .price-range {
          .price-range__input-group {
            .price-range__input {
              background: #ffffff;
              color: #000000;
              border-radius: 6px;
            }
          }
        }
      }
    }
  }
}

/* Search Results Products Card */
.search-results-products-card {
  background: #ffffff;
  border-color: #E1E3E4;

  .card__header {
    background: #ffffff;
    border: 1px solid #E1E3E4;

    .collection__title {
      color: #000000;
    }

    .collection__products-count {
      color: #000000;
    }
  }

  .collection__toolbar {
    background: #ffffff;
    border: 1px solid #E1E3E4;
    border-top: none;
    color: #000000;
    box-shadow: none;

    .collection__toolbar-item {
      color: #000000;
    }
  }


}

/* Custom Recently Viewed */
.custom_product_recommendations,
.custom_recently_viewed {
  .section__header {
    .section__title {
      font-weight: 600;
      font-size: 32px;
    }
  }

  .product-list {
    background: transparent;
    justify-content: space-between;

    @media (min-width: 1000px) {
      padding: 0;
    }

    .product-item {
      background: transparent;

      @media (min-width: 1000px) {
        width: 25%;
      }

      &.product-item--vertical {
        background: transparent;

        .product-item__image-wrapper {
          padding: 20px 12px;
          border-radius: 8px;
          background: #ffffff;

          .aspect-ratio {
            padding: 0 !important;
            min-height: 200px;
            max-height: 200px;

            @media (min-width: 1200px) {
              min-height: 300px;
              max-height: 300px;
            }

            img {
              object-fit: contain;
              object-position: center center;
            }
          }
        }

        .product-item__info {
          .product-item__info-inner {
            .product-item__vendor.link {
              display: flex;
              width: max-content;
              border: 1px solid #e1e3e4;
              padding: 2px 6px;
              background: #e1e3e4;
              color: #000;
              font-weight: 500;
              border-radius: 6px;
              margin: 0 0 10px;
            }
          }
        }
      }
    }
  }
}

/* Product gallery image height cap */
.product-gallery__size-limiter {
  max-width: 100% !important;
}

.product-gallery__size-limiter .aspect-ratio {
  padding-bottom: 0 !important;
  height: 500px !important;
  overflow: hidden !important;
}

.product-gallery__size-limiter img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
}

/* Custom Main Product */
.custom_main_product {
  @media (max-width: 640px) {
    padding: 40px 25px 10px;
  }

  .product-block-list__wrapper {
    .product-block-list__item--gallery {
      .card {
        border: none;
        background: transparent;
        margin: 0;

        .card__section {
          padding: 0;

          .product-gallery {
            .product-gallery__carousel-wrapper {
              margin: 0;

              .product-gallery__carousel {
                .product-gallery__carousel-item {
                  .aspect-ratio {
                    border-radius: 10px;
                    overflow: hidden;
                  }
                }
              }

              .product-gallery__zoom-notice {
                margin: 15px 0 0 !important;
              }
            }
          }
        }
      }
    }

    .product-block-list__item--description {
      padding-top: 40px;

      .card {
        background: #fff;
        margin: 0;
        border-radius: 8px;

        .card__header {
          padding: 10px 15px 0;

          .card__title {
            font-weight: 700;
          }
        }

        .card__section {
          padding: 18px 15px 10px;

          h1 {
            margin: 0 0 10px;
            font-size: 22px;
          }

          p {
            font-weight: 400;
          }

          strong {
            font-weight: 500;
          }
        }
      }
    }

    .product-block-list__item--info {
      > .card {
        margin: 0 !important;
        border: none;
        background: transparent;

        @media (max-width: 999px) {
          padding-top: 30px;
          margin-top: 30px !important;
        }

        > .card__section {
          padding: 40px;

          @media (max-width: 999px) {
            padding: 0;
          }
        }

        .product-info__block-item--product-meta {
          .product-meta {
            margin: 0;

            .product-meta__vendor {
              display: flex;
              width: max-content;
              border: 1px solid #e1e3e4;
              padding: 2px 6px;
              background: #e1e3e4;
              color: #000;
              font-weight: 500;
              border-radius: 6px;
              margin: 0 0 10px;
              text-decoration: none;
            }

            .product-meta__share-buttons {
              margin: 20px 0 0;
            }
          }
        }

        .product-info__block-item--title {
          .product-meta__title {
            font-size: 35px;
            line-height: 41px;
            font-weight: 600;
            margin: 15px 0 20px !important;

            @media (max-width: 576px) {
              font-size: 22px;
              line-height: 27px;
            }
          }
        }

        .product-info__block-item--variant-selector {
          margin: 0 0 28px;

          variant-picker {
            .block-swatch-list {
              .block-swatch__item {
                transition: .3s all ease;
                border-radius: 8px;
              }

              .block-swatch__radio:checked + .block-swatch__item,
              .block-swatch__item.is-selected {
                box-shadow: none;
                border-color: #e3932d;
                background: rgb(227 147 45);
                color: #ffff;
              }
            }
          }

          .product-form__info-list {
            margin: 0;
            display: flex;
            flex-direction: column;
            gap: 20px;

            .product-form__info-item {
              display: flex;
              flex-direction: column;

              .product-form__info-content {
                display: flex;
              }
            }
          }
        }
      }
    }
  }
}