#products-list {
  margin: 0 auto;
}

.product-card-bundle-offer,
.badge-name {
  z-index: 5 !important;
  top: 0 !important;
  left: auto !important;
  right: 0px !important;

  [dir="ltr"] & {
    left: 0px !important;
    right: auto !important;
  }
}

.custom_badge {
  position: absolute;
  top: 0px;
  right: auto;
  left: 0px;
  gap: 10px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-direction: column;
  z-index: 5;

  .badge-sold,
  .remaining-text {
    background-color: var(--text-color-primary-bg);
    color: var(--primary-color);
    padding: 0px 10px;
    border-radius: 15px;
    font-size: 10px;
  }

  [dir="ltr"] & {
    right: 0;
    left: auto;
  }
}

/* base card */
.product-item {
  width: 100%;
  height: 100%;
  max-height: 435px;
  border: 3px solid;
  overflow: hidden;
  aspect-ratio: 1 / 2;
  padding: 10px;
  border-image: linear-gradient(
      to bottom,
      var(--text-color-primary-bg),
      transparent
    )
    1;

  @media (max-width: 600px) {
    aspect-ratio: 1 / 3;
  }

  .product-card-border-svg {
    display: none;
  }

  .product_link {
    flex-direction: column;
  }

  .content_img {
    position: relative;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    min-height: 190px;
    max-height: 200px;

    @media (min-width: 370px) {
      min-height: 140px;
      max-height: 150px;
    }

    &:hover img {
      transform: rotateY(180deg);
    }

    img {
      width: 100%;
      height: 100%;
      transition: all 0.3s ease-in-out;
    }
  }

  .product_details {
    > a {
      display: flex;
      justify-content: center;
      flex-flow: column;
      gap: 5px;
    }

    .product-title,
    .product-title span {
      min-height: unset;
      color: var(--text-color-primary-bg);
      font-size: 16px;
      font-weight: 400;
      word-break: normal;
      -webkit-line-clamp: 1;
      -webkit-box-orient: vertical;
      display: -webkit-box !important;
      margin-bottom: 0;
      overflow: hidden;
      height: unset;
      white-space: normal;
    }

    .discription-card {
      p,
      p span {
        color: var(--text-color-primary-bg);
        word-break: break-word;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        display: -webkit-box !important;
        margin-bottom: 0;
        overflow: hidden;
      }
    }
  }

  .options_card {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .product-card-rating-wrapper,
  .discription-card {
    height: 18px;
  }

  .section-product-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--primary-color);
  }

  .add_button_v {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    transition: all 0.3s ease-in-out;
  }

  .wishlist_container_v {
    position: relative;
    display: flex;
    top: 0px;
    inset-inline-end: 0px;
    align-items: end;
    justify-content: end;

    .add-to-wishlist_ver {
      margin: 0;
      padding: 0;
      background: transparent;
      border-radius: 0;
    }
  }

  .add_button_v .add_btn_card_ver {
    border-radius: 0;
    border-color: var(--text-color-primary-bg);
    color: var(--text-color-primary-bg);
    width: 90%;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    transition: all 0.3s ease-in-out;
    text-transform: capitalize;

    &:hover {
      background-color: var(--app-bg-color);
      color: var(--primary-color);
      border-color: var(--primary-color);
      filter: brightness(100%);
    }
  }

  .add_button_h {
    display: none;
  }
}

/* Horizontal card */
.herozintal_prod {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  width: 100%;
  gap: 3rem;

  @media (max-width: 991px) {
    grid-template-columns: repeat(1, 1fr);
    width: 100%;

    gap: 1.2rem;
  }

  @media (max-width: 600px) {
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
  }

  .product-item {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: 210px;
    max-width: 522px;
    overflow: hidden;
    aspect-ratio: 1 / 2;
    padding: 10px;
    display: flex;
    justify-content: space-around;
    gap: 20px;
    border: none;

    @media (max-width: 600px) {
      aspect-ratio: 1 / 0;
      max-height: unset;
    }

    .product-card-border-svg {
      z-index: -1;
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
      stroke: var(--text-color-primary-bg);
      display: inline-block;
    }

    .product_link {
      flex-direction: column;
      width: 50%;
    }

    .product_linkk {
      width: 100%;
      flex-direction: column;
    }

    > a {
      width: 45%;
    }

    .content_img {
      position: relative;
      width: 100% !important;
      height: 100% !important;
      max-width: 341px;
      max-height: 192px;
      min-height: 198px;
      overflow: hidden;
      transition: all 0.3s ease-in-out;
      clip-path: polygon(100% 0, 100% 74%, 61% 100%, 0 100%, 0 0);

      &:hover img {
        transform: rotateY(180deg);
      }

      img {
        width: 100%;
        height: 100%;
      }
    }

    .product_details {
      display: flex;
      justify-content: center;
      flex-flow: column;
      width: 50%;
      gap: 10px;

      a {
        flex-direction: column;
        align-items: flex-start;
      }

      .product-title,
      .product-title span {
        min-height: unset;
        color: var(--text-color-primary-bg);
        font-size: 16px;
        font-weight: 400;
        word-break: break-word;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        display: -webkit-box !important;
        margin-bottom: 0;
        overflow: hidden;
        height: unset;
      }

      .discription-card {
        p,
        p span {
          color: --text-color-primary-bg;
          word-break: break-word;
          -webkit-line-clamp: 1;
          -webkit-box-orient: vertical;
          display: -webkit-box !important;
          margin-bottom: 0;
          overflow: hidden;
        }
      }
    }

    .product-card-rating-wrapper,
    .discription-card {
      height: 18px;
    }

    .add_button_h {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: 47px;
      transition: all 0.3s ease-in-out;

      .wishlist_container_hero {
        padding: 0;
        margin: 0;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 10px;

        .add-to-wishlist_h {
          position: relative;
          margin: 0;
          padding: 0;
          border-radius: 0;
          height: 100%;
          display: flex;
          align-items: center;
          justify-content: center;
        }
      }

      .add_btn_card_hero {
        border-radius: 0;
        border-color: var(--text-color-primary-bg);
        color: var(--text-color-primary-bg);
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: transparent;
        flex-direction: row;
        transition: all 0.3s ease-in-out;
        text-transform: capitalize;


        &:hover {
          background-color: var(--app-bg-color);
          border-color: var(--primary-color);
          color: var(--primary-color);
          filter: brightness(100%);
        }
      }
    }

    .add_button_v {
      display: none;
    }

    .wishlist_container_v {
      display: none;
    }
  }
}

/* Vertical card */
.vertical_prod {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  gap: 1rem;

  @media (max-width: 991px) {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  @media (max-width: 600px) {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .product-item {
    width: 100%;
    height: 100%;
    max-height: 435px;
    border: 3px solid;
    overflow: hidden;
    aspect-ratio: 1 / 2;
    padding: 10px;
    border-image: linear-gradient(
        to bottom,
        var(--text-color-primary-bg),
        transparent
      )
      1;

    @media (max-width: 600px) {
      aspect-ratio: 1 / 3;
    }

    .product-card-border-svg {
      display: none;
    }

    .product_link {
      flex-direction: column;
    }

    .content_img {
      position: relative;
      width: 100% !important;
      height: 100% !important;
      overflow: hidden;
      transition: all 0.3s ease-in-out;
      min-height: 190px;
      max-height: 200px;
      display: flex;
      justify-content: center;
      align-items: center !important;;


      &:hover img {
        transform: rotateY(180deg);
      }

      img {
        width: 100%;
        height: 100%;
        transition: all 0.3s ease-in-out;
      }
    }

    .product_details {
      > a {
        display: flex;
        justify-content: center;
        flex-flow: column;
        gap: 5px;
      }

      .product-title,
      .product-title span {
        min-height: unset;
        color: var(--text-color-primary-bg);
        font-size: 16px;
        font-weight: 400;
        word-break: normal;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        display: -webkit-box !important;
        margin-bottom: 0;
        overflow: hidden;
        height: unset;
        white-space: normal;
      }

      .discription-card {
        p,
        p span {
          color: --text-color-primary-bg;
          word-break: break-word;
          -webkit-line-clamp: 1;
          -webkit-box-orient: vertical;
          display: -webkit-box !important;
          margin-bottom: 0;
          overflow: hidden;
        }
      }
    }

    .options_card {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .product-card-rating-wrapper,
    .discription-card {
      height: 18px;
    }

    .section-product-price {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .add_button_v {
      display: flex;
      align-items: center;
      justify-content: center;
      position: absolute;
      bottom: 5px;
      left: 0;
      width: 100%;
      transition: all 0.3s ease-in-out;
    }

    .wishlist_container_v {
      position: relative;
      display: flex;
      top: 0px;
      inset-inline-end: 0px;
      align-items: end;
      justify-content: end;

      .add-to-wishlist_ver {
        margin: 0;
        padding: 0;
        background: transparent;
        border-radius: 0;
      }
    }

    .add_button_v .add_btn_card_ver {
      border-radius: 0;
      border-color: var(--text-color-primary-bg);
      color: var(--text-color-primary-bg);
      width: 90%;
      height: 56px;
      display: flex;
      align-items: center;
      justify-content: center;
      background-color: transparent;
      transition: all 0.3s ease-in-out;
      text-transform: capitalize;


      &:hover {
        background-color: var(--app-bg-color);
        color: var(--primary-color);
        border-color: var(--primary-color);
        filter: brightness(100%);
      }
    }

    .add_button_h {
      display: none;
    }
  }
}
