/* ============================================
   BLSP - 3D Carousel (chuẩn tâm + hỗ trợ drag)
   ============================================ */

.blsp-banner {
  position: relative;
  height: 500px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  text-align: center;
  color: #fff;
  perspective: 1100px;
  border-radius: 0;
}

.blsp-banner .blsp-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  z-index: 1;
}

/* ✅ Đặt carousel chính giữa tuyệt đối */
.blsp-carousel {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -52%); /* kéo nhẹ lên trên (chính giữa hoàn hảo) */
  width: min(640px, 90vw);
  height: 280px;
  transform-style: preserve-3d;
  animation: blsp-rotate 25s linear infinite;
  cursor: grab; /* hiển thị bn tay khi c thể kéo */
  z-index: 2;
}

.blsp-carousel.dragging {
  cursor: grabbing;
  animation-play-state: paused; /* dng xoay khi kéo */
}

/* Ảnh sản phm vuông */
.blsp-item {
  position: absolute;
  width: 200px;
  height: 200px;
  left: 50%;
  top: 50%;
  transform-style: preserve-3d;
  transform-origin: center center;
  transition: transform 0.6s;
}

.blsp-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  background: #222;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
}

.blsp-item::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 36px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.16), transparent);
  transform: rotateX(90deg);
  transform-origin: top;
  opacity: 0.4;
}

/* Animation xoay */
@keyframes blsp-rotate {
  from { transform: translate(-50%, -52%) rotateY(0deg); }
  to { transform: translate(-50%, -52%) rotateY(360deg); }
}

/* Responsive */
@media (max-width: 1024px) {
  .blsp-banner { height: 420px; }
  .blsp-carousel { width: 88vw; height: 240px; }
  .blsp-item { width: 170px; height: 170px; }
}

@media (max-width: 768px) {
  .blsp-banner { height: 360px; }
  .blsp-carousel { height: 200px; }
  .blsp-item { width: 140px; height: 140px; }
}
