#shopee-floating-voucher {
  position: fixed;
  z-index: 9999;
  top: 50%;
  right: 14px;
  width: clamp(132px, 11vw, 184px);
  transform: translateY(-50%);
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.42));
  animation: shopeeVoucherFloat 3.4s ease-in-out infinite;
}

#shopee-floating-voucher a {
  display: block;
  color: #fff;
  text-decoration: none;
}

#shopee-floating-voucher img {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 20px;
  background: #ee4d2d;
}

#shopee-floating-voucher .voucher-sponsored {
  display: block;
  margin: 5px auto 0;
  width: max-content;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(5, 8, 25, 0.9);
  color: #d7d9e5;
  font: 600 10px/1.2 Arial, sans-serif;
  letter-spacing: 0.02em;
  text-align: center;
}

#shopee-floating-voucher .voucher-close {
  position: absolute;
  z-index: 2;
  top: -12px;
  right: -10px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #15182d;
  color: #fff;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.35);
  font: 700 20px/1 Arial, sans-serif;
  cursor: pointer;
}

#shopee-floating-voucher a:focus-visible,
#shopee-floating-voucher .voucher-close:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

@keyframes shopeeVoucherFloat {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  50% { transform: translateY(calc(-50% - 8px)) translateX(-4px); }
}

@media (max-width: 700px) {
  #shopee-floating-voucher {
    top: auto;
    right: 7px;
    bottom: 74px;
    width: 112px;
    transform: none;
    animation-name: shopeeVoucherFloatMobile;
  }

  #shopee-floating-voucher .voucher-sponsored {
    display: none;
  }

  @keyframes shopeeVoucherFloatMobile {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
  }
}

@media (prefers-reduced-motion: reduce) {
  #shopee-floating-voucher { animation: none; }
}
