/* ============================================
   3D Carousel Showroom Styles
   ============================================ */

/* Wrapper */
.carousel-3d-wrapper {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto 2rem;
  overflow: hidden;
}

/* Scene - perspective container */
.carousel-3d-scene {
  perspective: 1200px;
  perspective-origin: 50% 50%;
  width: 100%;
  height: 200px;
  position: relative;
  overflow: hidden;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .carousel-3d-scene {
    height: 370px;
  }
}

/* Container that holds all slides */
.carousel-3d-container {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

/* Individual slide */
.carousel-3d-slide {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 280px;
  height: 200px;
  margin-left: -140px;
  margin-top: -100px;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  will-change: transform, opacity;
  backface-visibility: hidden;
}

@media (min-width: 768px) {
  .carousel-3d-slide {
    width: 480px;
    height: 320px;
    margin-left: -240px;
    margin-top: -160px;
    border-radius: 20px;
  }
}

@media (min-width: 1024px) {
  .carousel-3d-slide {
    width: 560px;
    height: 370px;
    margin-left: -280px;
    margin-top: -185px;
  }
}

.carousel-3d-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.carousel-3d-slide.active {
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.25),
    0 0 0 2px rgba(255, 255, 255, 0.1);
}

.carousel-3d-slide.active img {
  transform: scale(1.02);
}

/* Reflection effect */
.slide-reflection {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.08), transparent);
  pointer-events: none;
}

/* Controls */
.carousel-3d-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.carousel-3d-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  background: white;
  color: #334155;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.carousel-3d-btn:hover {
  background: #0f172a;
  color: white;
  border-color: #0f172a;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.3);
  transform: scale(1.1);
}

.carousel-3d-btn:active {
  transform: scale(0.95);
}

/* Dots */
.carousel-3d-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.carousel-3d-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: #cbd5e1;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.carousel-3d-dot:hover {
  background: #94a3b8;
  transform: scale(1.2);
}

.carousel-3d-dot.active {
  background: #0f172a;
  width: 28px;
  border-radius: 5px;
}

/* Click hint on active slide */
.carousel-3d-slide.active {
  cursor: pointer;
}

.carousel-3d-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.3) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border-radius: inherit;
}

.carousel-3d-slide.active:hover::after {
  opacity: 1;
}

/* ============================================
   Lightbox
   ============================================ */
.showroom-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.showroom-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.showroom-lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.showroom-lightbox.active img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: rotate(90deg);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.lightbox-nav.prev {
  left: 20px;
}

.lightbox-nav.next {
  right: 20px;
}

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 500;
}

/* Smooth scroll for anchor links */
html {
  scroll-behavior: smooth;
}

/* Prevent body scroll when lightbox is open */
body.lightbox-open {
  overflow: hidden;
}
