.floating-box-fl {
  position: fixed;
  top: 20%;
  left: 5%;
  width: 200px;
  max-height: 500px;
  min-height: 60px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(2px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  padding: 5px;
  box-shadow: 0 0 5px rgba(255, 255, 255, .5);
  z-index: 1000;
  color: #333;
  cursor: grab;
  animation: fadeInRotateFl 1.2s ease-out forwards, floatFl 3s infinite ease-in-out;
  overflow: visible;
  display: flex;
  flex-direction: column;
  transition-property: max-height, opacity, box-shadow, padding;
  transition-duration: 1.2s, 1.2s, 0.4s, 0.4s;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  perspective: 1000px;
  will-change: transform;
  isolation: isolate;
}


.floating-box-fl.hidden-fl {
  display: none !important;
}

.floating-box-fl.minimized-fl {
  opacity: 0.9;
  padding: 10px;
  overflow: hidden;
  max-height: 80px !important;
}

.floating-box-fl.minimized-fl .middle-section-fl,
.floating-box-fl.minimized-fl .price-display-fl,
.floating-box-fl.minimized-fl .buttons-container-fl {
  display: none;
}

.floating-box-fl:hover:not(.dragging-fl) {
  transform: scale(1.13);
  box-shadow: 0 0 20px rgba(255, 255, 255, .5);
}

.floating-box-fl.dragging-fl {
  cursor: grabbing !important;
  animation: none !important;
  z-index: 1001;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

@keyframes fadeInRotateFl {
  0% {
    opacity: 0;
    transform: scale(0.7) translateY(-60px) rotate(-5deg);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0) rotate(0);
  }
}

@keyframes floatFl {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.control-bar-fl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
  pointer-events: none;
}

.control-bar-fl * {
  pointer-events: auto;
}

.box-title-fl {
  margin: 0;
  font-weight: bold;
  color: #ecf01e;
  flex-grow: 1;
  text-align: center;
  font-size: 16px;
}

.minimize-button-fl,
.close-button-fl {
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.3s ease;
  color: black;
  z-index: 1002;
  position: relative;
}

.minimize-button-fl:hover,
.close-button-fl:hover,
.scroll-button-fl:hover {
  background: rgba(255, 255, 255, 0.5);
}

.scroll-button-fl {
  background: linear-gradient(135deg, #4958e6, #068f28);
  width: 60px;
  height: 40px;
  border: none;
  border-radius: 20%;
  cursor: pointer;
  transition: background 0.3s ease;
  line-height: 12px;
  z-index: 1002;
  position: relative;
}

.scroll-button-fl:hover {
  background: linear-gradient(135deg, #6b6ac2, #250c94);
}

.price-display-fl {
  font-size: 14px !important;
  text-align: center;
  padding: 2px;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 10px;
  font-weight: normal;
  color: #011800;
  margin-top: 2px;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.price-loading-fl {
  color: #999;
  font-style: italic;
}

.price-updated-fl {
  animation: priceBlinkFl 0.5s ease;
}

@keyframes priceBlinkFl {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}

.middle-section-fl {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 10px;
  flex-grow: 1;
  margin: 5px 0;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.middle-section-fl * {
  pointer-events: auto;
}

.middle-section-fl h4 {
  margin: 2px auto;
  text-align: center;
  color: #f1f1ea;
  font-size: 16px;
}

.bottom-divider-fl {
  width: 60%;
  height: 1px;
  background: rgba(0, 0, 0, 0.15);
  margin: 3px auto;
}

.images-grid-fl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin-top: 5px;
}

.image-item-fl {
  text-align: center;
  opacity: 0;
  animation: slideInFl 0.5s ease-out forwards;
  animation-delay: calc(0.1s * var(--i));
  cursor: pointer;
}

.image-item-fl img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-item-fl img:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.image-item-fl span {
  display: block;
  font-size: 11px;
  margin-top: 6px;
  color: #555;
}

@keyframes slideInFl {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.buttons-container-fl {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.buttons-container-fl * {
  pointer-events: auto;
}

.buy-button-fl {
  flex: 1;
  height: 30px;
  width: 50%;
  color: white;
  border: none;
  border-radius: 25px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.3s ease, background 0.5s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: linear-gradient(135deg, #390452, #a834d6);
  opacity: 0.8;
  z-index: 1002;
}

.buy-button-fl:hover {
  transform: scale(1.2);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, #15041d, #6c0794);
}

.buy-button-fl::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease;
}

.buy-button-fl:hover::after {
  width: 250px;
  height: 250px;
}

@media (max-width: 600px) {
  .floating-box-fl {
    width: 200px;
    min-height: 80px;
    left: 10px;
    top: 10px;
    max-height: 100px;
    padding: 0;
    margin: 0;
  }

  .floating-box-fl:not(.minimized-fl) {
    max-height: 400px;
    padding: 3px;
  }

  .control-bar-fl {
    margin-bottom: 3px;
  }

  .box-title-fl {
    font-size: 14px;
  }

  .minimize-button-fl,
  .close-button-fl {
    width: 25px;
    height: 25px;
    font-size: 12px;
  }

  .image-item-fl img {
    width: 40px;
    height: 40px;
  }

  .image-item-fl span {
    font-size: 9px;
    margin-top: 4px;
  }

  .price-display-fl {
    font-size: 12px;
    padding: 5px;
    margin-top: 3px;
  }

  .middle-section-fl {
    width: 90%;
    margin: 0 auto;
    padding: 5px;
  }

  .middle-section-fl h4 {
    font-size: 14px;
    margin: 2px auto;
  }

  .buttons-container-fl {
    gap: 8px;
    margin-top: 8px;
  }

  .buy-button-fl {
    font-size: 16px;
    height: 30px;
    border-radius: 20px;
  }
}