:root {
  --sticky-bundle-picker-bgcolor: #062D3E;
  --sticky-bundle-picker-options-bgcolor: #012130;
  --sticky-bundle-picker-options-hover-bgcolor: rgba(0, 24, 35, 0.86);
  --sticky-bundle-picker-options-selected-color: #FEB41A;
  --sticky-bundle-picker-options-btn-color: #fda702
}

@keyframes sticky-bundle-pickerOptionExpandUp {
  0% {
    transform: scaleY(0.5);
    opacity: 0;
    transform-origin: bottom;
  }
  100% {
    transform: scaleY(1);
    opacity: 1;
    transform-origin: bottom;
  }
}

@keyframes sticky-bundle-pickerOptionSlideDown {
  0% {
    transform: translateY(-50%);
    opacity: 0;
    transform-origin: top;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
    transform-origin: top;
  }
}

.sticky-bundle-picker-container {
  position: sticky;
  width: 100%;
  padding: 0;
  margin: 0;
  z-index: 100;

  &.bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    transition: 0.75s ease;
    @media (min-width: 1024px) {
      height: 80px;
    }
    &.theme-default, .theme-default {
      background-color: var(--sticky-bundle-picker-bgcolor);
      border-top-left-radius: 25px;
      border-top-right-radius: 25px;
      box-shadow: 0 -1px 8px 1px rgba(4, 15, 12, 0.79);
      @media (min-width: 1024px) {
        box-shadow: none;
        border-radius: 0;
      }
    }
    &.show, .show {
      bottom: 0;
      transition: 0.75s ease;
    }
  }

  &:not(:has(.show)) {
    bottom: -200px;
  }

  .sticky-bundle-picker-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    padding: 0 10px;
    margin: 0;
    @media (min-width: 1024px) {
      flex-direction: row;
      gap: 16px;
      width: 70%;
      padding: 0 5px;
      margin: 0 auto;
    }

    &>.sticky-bundle-picker-item {
      flex: 1 1 calc(33.333% - 10px);
      &.option-opened {
        .product-variant-options {
          animation: sticky-bundle-pickerOptionExpandUp 0.5s ease-out;
        }
      }
      &:not(.option-opened) {
        .product-variant-options {
          animation: sticky-bundle-pickerOptionSlideDown 0.5s ease-in-out;
        }
      }
    }
    @media (min-width: 1024px) {
      &>.sticky-bundle-picker-item:first-child {
        flex: 0 0 60%;
        align-items: center;
        align-self: center;
      }
      &>.sticky-bundle-picker-item:last-child {
        flex: 0 0 40%;
        flex-shrink: 1;
      }
    }

    &>.info {
      position: relative;
      margin-top: 10px;
      @media (min-width: 1024px) {
        margin-top: 0;
      }

      &.option-opened {
        .product-variant-selected>.product-action>button {
          .caret-up {
            display: block;
          }
          .caret-down {
            display: none;
          }
        }
        .product-variant-options {
          display: block;
          opacity: 1;
        }
      }

      .product-variant-selected,
      .product-variant-options {
        position: relative;
        display: block;
      }

      .product-variant-selected,
      .product-variant-options>ul>li {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
      }

      .product-variant-selected {
        height: 60px;
        margin: 8px 0;
        @media (min-width: 1024px) {
          height: 66px;
          gap: 10px;
        }
        .product-info {
          @media (min-width: 1024px) {
            flex-basis: 68%;
          }
        }
        .product-action {
          @media (min-width: 1024px) {
            flex-basis: 10%;
          }
          button {
            min-height: 34px !important;
            min-width: 108px !important;
            background-color: #DDDDDD !important;
            &::before, &::after {
              min-height: 34px !important;
            }
          }
        }
      }

      .product-image {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-basis: 80px;
        position: relative;
        width: 100%;
        height: 66px;
        padding: 0;
        margin: 0;
        border-radius: 13px;
        overflow: hidden;
        @media (min-width: 1024px) {
          flex-basis: 80px;
        }
        img {
          display: block;
          position: absolute;
          width: 100%;
          height: 100%;
          object-fit: cover;
          object-position: center;
          transition: transform 0.3s ease;
          &:hover {
            transform: scale(1.1);
          }
        }
      }

      .product-info {
        flex-basis: 58%;

        display: flex;
        flex-direction: column;
        color: white;

        .product-info-title h3 {
          font-size: 13px;
          font-weight: 500;
          line-height: 1.6rem;
          color: white;
          margin: 0;
          @media (min-width: 1024px) {
            font-size: 16px;
          }
        }

        .product-info-price {
          font-size: 12px;
          font-weight: 700;
          p {
            margin: 0;
            letter-spacing: 0.1rem;
            .sale-price {
              font-size: 13px;
              font-weight: 500;
              @media (min-width: 1024px) {
                font-size: 15px;
              }
            }
            .regular-price {
              color: #DDDDDD;
              font-weight: 400;
              text-decoration: line-through;
              margin-right: 8px;
              @media (min-width: 1024px) {
                font-size: 13px;
              }
            }
          }
        }
      }

      .product-action {
        flex-basis: 26%;
        width: 100%;

        button {
          padding: 4px 8px;
          border-radius: 8px;
          font-size: 13px;
          font-weight: 600 !important;
          text-transform: uppercase;
          cursor: pointer;
          transition: background-color 0.3s ease;

          &::before, &::after {
            --border-opacity: none;
          }

          .select-btn-icon {
            padding-left: 8px;
            margin-top: -2px;
          }
          .caret-up {
            display: none;
          }
          .caret-down {
            display: block;
          }
        }
      }

      .product-variant-options {
        padding: 10px 0;
        border-top: 2px inset rgba(221, 221, 221, 0.20);
        background-color: var(--sticky-bundle-picker-options-bgcolor);
        display: none;
        opacity: 0;
        @media (min-width: 1024px) {
          position: absolute;
          bottom: 66px;
          width: 100%;
          border-top-left-radius: 25px;
          border-top-right-radius: 25px;
          box-shadow: 1px -1px 9px 1px rgb(4 15 12 / 79%);
        }
        ul {
          display: block;
          list-style: none;
          padding: 0;
          margin: 0;
          li {
            position: relative;
            padding: 8px;
            margin:0 10px;
            gap: 10px;
            cursor: pointer;
            @media (min-width: 1024px) {
              padding: 10px;
            }
            &::after {
              content: "";
              position: absolute;
              display: block;
              width: 100%;
              bottom: 0;
              left: 0;
              border-bottom: 1px inset rgba(221, 221, 221, 0.20);
            }
            &:last-child {
              &::after {
                border-bottom: none;
              }
            }
            &.selected, &:hover {
              background-color: var(--sticky-bundle-picker-bgcolor);
              h3 {
                color: var(--sticky-bundle-picker-options-selected-color);
              }
            }
            transition: background-color 0.5s ease;
            @media (min-width: 1024px) {
              &:first-child {
                &.selected, &:hover {
                  border-top-left-radius: 25px;
                  border-top-right-radius: 25px;
                }
              }
            }
          }
        }
        .product-image {
          flex-basis: 56px;
          height: 50px;
        }
        .product-info {
          flex-basis: 80%;
        }
        .product-action {
          flex-basis: 10%;
          .select-option {
            display: none;
            & + label {
              display: inline-flex;
              align-items: center;
              justify-content: center;
              width: 24px;
              height: 24px;
              border-radius: 50%;
              border: 2px solid gray;
              background-color: var(--sticky-bundle-picker-options-bgcolor);
              transition: all 0.3s;
              cursor: pointer;
              position: relative;
              svg {
                width: 14px;
                height: 14px;
                path {
                  stroke: gray;
                }
              }
              @media (min-width: 1024px) {
                width: 28px;
                height: 28px;
                svg {
                  width: 18px;
                  height: 18px;
                }
              }
            }
            &:checked + label {
              border-color: white;
              background-color: var(--sticky-bundle-picker-options-btn-color);
              svg {
                path {
                  stroke: var(--sticky-bundle-picker-bgcolor);
                }
              }
            }
          }
        }
      }
    }
    &>.action {
      display: flex;
      align-items: center;
      margin-bottom: 20px;
      @media (min-width: 1024px) {
        margin-bottom: 0;
      }
      form {
        flex-grow: 1;
        position: relative;
        button {
          height: 41px !important;
          min-height: 41px !important;
          font-size: 18px;
          line-height: 1rem;
          transition: background-color 0.3s ease;
          &::before, &::after {
            height: 40px !important;
            min-height: 40px !important;
          }
          .btn-icon {
            height: 24px;
            width: 24px;
            padding-left: 4px;
            margin-bottom: -2px;
          }
          .loading__spinner svg {
            height: 31px;
            width: 34px;
          }
        }
      }
    }
  }
}
