.form-bundle-item-wrap {
  margin-bottom: 30px;

  .form-bundle-item {
    display: none;
  }

  &.active .form-bundle-item {
    display: grid;
  }
}

.form-bundle-item {
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.form-bundle-variant {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: 1px solid black;
  border-radius: 4px;
  padding: 10px;
  line-height: 1;
  cursor: pointer;

  &.selected {
    background-color: #96D5D2;
    border-color: #96D5D2;
  }
}

.form-bundle-variant-image {
  flex-shrink: 0;
}

.form-bundle-variant-img {
  width: 80px;
  height: auto;
  object-fit: cover;
  display: block;
}

.form-bundle-variant-name {
  text-align: center;
}

.form-bundle-item-heading {
  margin-bottom: 12px;
  border-radius: 4px;
  border: 1px solid black;
  padding: 2px 4px;
  position: relative;
  cursor: pointer;
}

.form-bundle-item-wrap:has(.form-bundle-variant.selected) .form-bundle-item-heading {
  background-color: #e5f7f7;
}

.form-bundle-item-heading-label {
  width: 100%;
  text-align: left;
  margin-bottom: 6px;
  position: absolute;
  top: -10px;
  padding-left: 10px;

  span {
    font-size: 14px;
    background-color: #96D5D2;
    padding: 2px 6px;
    border-radius: 4px;
    color: white;
    font-weight: 400;
    text-transform: uppercase;

  }
}

.form-bundle-item-heading-title {
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  position: relative;
  padding: 13px 36px 11px 7px;
  display: flex;
  align-items: center;
  gap: 8px;

  .form-bundle-item-heading-title-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 4px;
  }

  &::before,
  &::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background-color: currentColor;
  }

  &::before {
    width: 2px;
    height: 12px;
    right: 11px;
  }

  &::after {
    width: 12px;
    height: 2px;
    right: 6px;
  }

  &.is-open,
  .form-bundle-item-wrap.active & {
    &::before {
      display: none; /* minus when active/open */
    }
  }
}

.form-bundle-atc {
  margin-top: 20px;

  .product-form__buttons {
    width: 100%;
    margin: 0;
  }

  .addtocart {
    display: block;
    width: 100%;
    background-color: black;
    color: white;
    border: none;
    text-align: center;
    padding: 18px 0;
    font-size: 16px;
    height: 55px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;

    .pr s {
      padding-left: 8px;
      color: #a8a8a8;
      font-weight: 500;
    }

    .so {
      display: none !important; /* always show Add to cart, never Sold out */
    }

    &.deactive {
      background-color: #9d9d9d;
      cursor: inherit;
    }

    @media only screen and (max-width: 749px) {
      font-size: 14px;
    }
  }

  .pdp-afterpay-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    justify-content: center;

    @media only screen and (max-width: 900px) {
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 12px;
    }
  }

  .pdp-afterpay-wrapper .pdp-afterpay-text {
    font-size: 12px;
    font-weight: 400;
    color: #000;
    line-height: 1.4;

    @media only screen and (max-width: 900px) {
      font-size: 11px;
    }
  }

  .pdp-afterpay-wrapper .pdp-afterpay-image {
    display: inline-flex;
    align-items: center;
    height: auto;
  }

  .pdp-afterpay-wrapper .pdp-afterpay-image .pdp-afterpay-img {
    height: auto;
    max-height: 24px;
    width: auto;
    display: block;

    @media only screen and (max-width: 900px) {
      max-height: 22px;
    }
  }
}

@media only screen and (max-width: 769px) {
  .form-bundle-item {
    grid-template-columns: repeat(3, 1fr);
  }
}
