.pickandmix-sidebar {
  position: fixed;
  display: flex;
  flex-direction: column;
  width: clamp(330px, 18vw, 400px);
  overflow: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background-color: rgb(252, 238, 245);
  padding: 14px 12px;
  z-index: 999;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
  border-radius: 6px;
}

.pickandmix-sidebar::-webkit-scrollbar {
  display: none;
}

#current-set-mobile-dropdown-icon {
  display: none;
}

#current-set-mobile-dropdown-label {
  display: none;
}

#current-set-products-container {
  min-height: 0;
  overflow-y: auto;
}

.pickandmix-sidebar-set-display {
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-bottom: 20px;
  background-color: white;
  padding: 20px clamp(8px, 2vw, 20px);
  min-height: 0;
}

.current-set-message {
  font-weight: bold;
  font-size: clamp(0.75rem, calc(0.5vw + 0.5rem), 3.5rem);
  display: block;
  white-space: nowrap;
  color: rgb(25, 25, 25);
  text-align: center;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.pickandmix-current-set {
  width: 100%;
  min-height: 0;
}

.pickandmix-current-set h3 {
  margin-bottom: 16px;
  text-align: center;
}

#current-set-weight {
  color: black;
  font-weight: bold;
  margin: 0;
}

.current-set-info {
  font-weight: bold;
  margin-bottom: 8px;
}

.current-set-product {
  height: auto;
  display: flex;
  gap: 5px;
  padding: 8px;
  border-radius: 4px;
  background-color: rgb(252, 252, 252);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  margin-bottom: 8px;
}

.current-set-product p {
  margin: 0;
}

.current-set-product-image {
  margin: auto;
  aspect-ratio: 1 / 1;
  height: clamp(50px, 2vw, 100px);
  object-fit: contain;
  flex-shrink: 0;
}

.current-set-product-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
  min-width: 0;
}

.current-set-product-name {
  font-size: clamp(0.8rem, calc(0.35vw + 0.4rem), 3.5rem);
}

.current-set-product-brand {
  margin-top: clamp(-0.6rem, -0.5rem, -0.2rem);
  font-size: clamp(0.7rem, calc(0.3vw + 0.35rem), 3rem);
  color: rgb(75, 75, 75);
  font-weight: bold;
}

.current-set-product-price {
  font-size: clamp(0.6rem, calc(0.3vw + 0.35rem), 2.2rem);
  color: rgb(60, 60, 60);
  font-weight: bold;
}

.remove-from-set-button {
  margin-left: 0px;
  background-color: var(--ast-global-color-1);
  border: none;
  cursor: pointer;
  height: 36px;
  width: 36px;
  padding: 0;
  text-align: center;
  color: white;
  border-radius: 4px;
  margin: auto;
  flex-shrink: 0;
}

.current-set-totals {
  flex-shrink: 0;
}

.pick-and-mix-products-total {
  margin-bottom: 4px;
}

.set-actions-container {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 10px;
  width: 100%;
  flex-shrink: 0;
}

.set-actions-container #cancel-set-button,
.set-actions-container #finish-set-button {
  width: 100%;
  padding: 17px;
  border: none;
  border-radius: 4px;
}

.add-package-button {
  align-self: center;
  font-size: clamp(0.8rem, calc(0.5vw + 0.2rem), 5rem);
  width: 100%;
  padding: clamp(1rem, calc(0.8vh + 0.3rem), 3rem);
}

@keyframes shake {
  0% {
    transform: translateX(0);
  }

  15% {
    transform: translateX(-4px) rotate(-2deg);
  }

  30% {
    transform: translateX(4px) rotate(2deg);
  }

  45% {
    transform: translateX(-3px) rotate(-1deg);
  }

  60% {
    transform: translateX(3px) rotate(1deg);
  }

  75% {
    transform: translateX(-2px);
  }

  100% {
    transform: translateX(0);
  }
}

.add-package-button.is-shaking {
  animation: shake 0.5s ease-in-out;
}

#pickandmix-pick-products-message {
  margin-top: 20px;
  font-size: 1.2rem;
  font-weight: bold;
}

/* DESKTOP */
@media (min-width: 1201px) {
  .pickandmix-sidebar {
    top: 100px;
    right: 0;
    bottom: 0;
    z-index: 99;
    overflow: visible;

    display: flex;
    flex-direction: column;
  }

  .pickandmix-sidebar-set-display {
    min-height: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
  }

  .pickandmix-current-set {
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  #current-set-products-container {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 6px 8px 6px;
    margin: -2px -6px 8px -6px;
  }

  #current-set-weight,
  .current-set-mobile-dropdown,
  .current-set-totals,
  .set-actions-container {
    flex-shrink: 0;
  }
}

/* DESKTOP — MNIEJSZE SZEROKOŚCI */
@media (min-width: 1201px) and (max-width: 1600px) {
  .pickandmix-sidebar {
    width: clamp(326px, 25vw, 380px);
    padding: clamp(10px, 4vw, 16px);
  }
}

/* MOBILE + TABLET */
@media (max-width: 1200px) {
  .mobile-sidebar {
    position: fixed;
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    max-height: 80vh !important;
    padding: 0;
    border-radius: 0;
    transform: translateY(0);
    transition: transform 0.25s ease;
    overflow: visible !important;
    z-index: 999;
    box-shadow: 0 0 7px rgba(0, 0, 0, 0.3);

    display: flex;
    flex-direction: column;
  }

  .mobile-sidebar.hidden {
    transform: translateY(100%);
  }

  .current-set-message {
    display: none;
  }

  .mobile-sidebar .pickandmix-sidebar-set-display {
    position: relative;

    flex: 1;
    min-height: 0;
    margin-bottom: 0;
    padding: 10px;
    overflow: visible;

    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .mobile-sidebar .pickandmix-current-set {
    flex: 1;
    min-height: 0;
    overflow: hidden;

    display: flex;
    flex-direction: column;
  }

  .mobile-sidebar #current-set-products-container {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    padding-right: 4px;
  }

  .mobile-sidebar #current-set-weight,
  .mobile-sidebar .current-set-mobile-dropdown,
  .mobile-sidebar .current-set-totals,
  .mobile-sidebar .set-actions-container {
    flex-shrink: 0;
  }

  .pickandmix-current-set {
    padding: 0 0.5rem;
  }

  #current-set-weight {
    font-size: clamp(1rem, calc(0.7vw + 0.7rem), 2rem);
    margin-bottom: 1rem;
  }

  #current-set-mobile-dropdown-icon {
    display: block;
    position: absolute;
    top: 0;
    left: 50%;
    width: clamp(26px, 7vw, 40px);
    height: clamp(26px, 7vw, 40px);

    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid var(--ast-global-color-1);
    background-color: white;
    padding: 5px;
    color: white;
    z-index: 9999;
    box-shadow: 0 0 7px rgba(0, 0, 0, 0.3);
    transition: transform 0.35s ease;
    pointer-events: auto;
  }

  #current-set-mobile-dropdown-icon.mobile-active {
    transform: translate(-50%, -50%) rotate(180deg);
  }

  .pickandmix-sidebar.mobile-sidebar.hidden #current-set-mobile-dropdown-icon {
    display: none;
  }

  .current-set-info,
  .current-set-product {
    max-height: 0;
    display: none;
  }

  .current-set-info.mobile-active,
  .current-set-product.mobile-active {
    display: block;
    max-height: 500px;
    margin-top: 10px;
    transition: max-height 0.3s ease;
  }

  .current-set-product.mobile-active {
    display: flex;
  }

  .current-set-product-image {
    width: clamp(40px, 10vw, 80px);
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .current-set-product-name {
    font-size: clamp(1rem, calc(0.6vw + 0.7rem), 2.7rem);
  }

  .current-set-product-brand {
    margin-top: clamp(-0.4rem, -0.3rem, -0.1rem);
    font-size: clamp(0.9rem, calc(0.5vw + 0.6rem), 2.5rem);
  }

  .current-set-product-price {
    font-size: clamp(0.9rem, calc(0.5vw + 0.6rem), 2.5rem);
  }

  #pickandmix-selected-package.mobile-active,
  #pickandmix-selected-decoration.mobile-active {
    display: block;
    max-height: 50px;
    transition: max-height 0.3s ease;
    font-size: clamp(1rem, calc(0.6vw + 0.7rem), 2.7rem);
  }

  .set-actions-container {
    flex-direction: row;
  }

  .add-package-button,
  #cancel-set-button,
  #finish-set-button {
    width: 50% !important;
    align-self: center !important;
  }

  .ast-builder-grid-row.ast-builder-grid-row-has-sides.ast-builder-grid-row-no-center {
    position: absolute;
    top: 0;
    width: 100%;
    padding: 0 10px;
  }

  html.pickmix-scroll-locked,
  body.pickmix-scroll-locked {
    overflow: hidden;
    overscroll-behavior: none;
  }
}

/* MOBILE */
@media (max-width: 768px) {
  #current-set-mobile-dropdown-label {
    display: none;
  }
}

/* TABLET */
@media (min-width: 769px) and (max-width: 1200px) {
  #current-set-mobile-dropdown-label {
    display: block;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);

    background-color: var(--ast-global-color-1);
    padding: 5px;
    color: white;
    z-index: 9999;
  }

  .current-set-product-image {
    scale: 1.25;
  }
}