.gift-container{
  display: grid;
  flex-wrap: wrap;
  justify-content: space-around; /* hoặc space-around nếu muốn đều 2 bên */
  grid-template-columns: repeat(6, minmax(120px,1fr)); /* ✅ 6 cột */
  gap:16px;
  max-width: 1000px;
  margin: 20px auto;
  place-items:center;
}
.gift-title {
  text-align: center;
  font-size: 22px;
  font-weight: bold;
  color: #fff;
  padding: 12px 16px;
  background: linear-gradient(45deg, #ef5160, #ff416c);
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(255, 65, 108, 0.6);
  display: inline-block;
  margin: 0 auto -4px;
}
.gift-title-wrapper {
  text-align: center;
}
/* Hiệu ứng hộp quà lên xuống */
.gift-box.animate-up-down {
  animation: floatY 3s ease-in-out infinite;
}

@keyframes floatY {
  0%   { transform: translateY(0px); }
  50%  { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}
.gift-box{
  width:140px;
  height:140px;
  object-fit:contain;
  cursor:pointer;
  transition: transform .2s ease, filter .2s ease, opacity .2s ease;
  user-select:none;
}
.gift-box:hover{ transform: scale(1.05); }
.gift-box.opened{ filter: grayscale(20%); opacity: .95; }
.gift-disabled .gift-box{ pointer-events:none; opacity:.6; }

/* Overlay + popup */
.gift-overlay{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,0.6);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index: 999998;
}
.gift-prize-popup{
  background:#fff;
  color:#000;
  padding: 22px 28px;
  border-radius: 16px;
  font-size: 22px;
  text-align:center;
  max-width:80%;
  line-height:1.45;
  box-shadow:0 10px 30px rgba(0,0,0,.4);
  position:relative;
}
.gift-close{
  position:absolute;
  top:8px;
  right:-2px;
  width:30px; height:30px;
  border-radius:50%;
  border:none;
  background:#eee;
  cursor:pointer;
  font-size:10px;
  line-height:30px;
}
/* Toast */
.gift-toast{
  position: fixed;
  left:50%; bottom: 24px;
  transform: translateX(-50%);
  background:#111;
  color:#fff;
  padding:10px 14px;
  border-radius: 10px;
  font-size: 14px;
  z-index:999999;
  opacity:.95;
}
/* ✅ Sau khi mở thì phải RÕ NÉT HOÀN TOÀN */
.gift-box.opened{
  filter: none !important;
  opacity: 1 !important;
}

/* Mobile (màn nhỏ): 3 cột */
@media (max-width: 480px){
  .gift-container{
    grid-template-columns: repeat(3, minmax(60px,1fr));
  }
}

/* ✅ Trên điện thoại (màn hình nhỏ hơn 480px) sẽ chỉ hiển thị 9 hộp quà */
@media (max-width: 480px){
  .gift-container img:nth-child(n+10){
    display: none !important;
  }
}