/* 3D Carousel Slider Styles */

/* 3D Carousel Variables */
:root {
  --glass: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --blur: blur(20px);
  --shift-x: 30vw;
}
.carousel-stage {
  cursor: grab;
}
.carousel-stage.dragging {
  cursor: grabbing;
}
.prod_slideshow .carousel-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  background: transparent;
  perspective: 2000px;
  overflow: hidden;
  width: 100%;
  padding: 40px 0;
}

.carousel-stage {
  position: relative;
  width: 100vw;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
}

.carousel-card {
  position: absolute;
  width: clamp(280px, 25vw, 400px);
  height: auto; /*clamp(300px, 50vh, 500px);*/
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: 32px;
  transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 3D Transform States */
.carousel-card.active {
  transform: translate3d(0, 0, 250px) rotateY(0deg);
  z-index: 10;
  opacity: 1;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.09);
}

.carousel-card.left {
  transform: translate3d(calc(var(--shift-x) * -1), 0, -150px) rotateY(35deg)
    scale(0.85);
  z-index: 5;
  opacity: 0.5;
}

.carousel-card.right {
  transform: translate3d(var(--shift-x), 0, -150px) rotateY(-35deg) scale(0.85);
  z-index: 5;
  opacity: 0.5;
}

.carousel-card.far-left {
  transform: translate3d(calc(var(--shift-x) * -1.8), 0, -500px) rotateY(45deg)
    scale(0.6);
  z-index: 1;
  opacity: 0.2;
}

.carousel-card.far-right {
  transform: translate3d(calc(var(--shift-x) * 1.8), 0, -500px) rotateY(-45deg)
    scale(0.6);
  z-index: 1;
  opacity: 0.2;
}

.carousel-card.hidden {
  transform: translate3d(0, 0, -1000px) scale(0.1);
  opacity: 0;
  pointer-events: none;
}

/* Card Image */
.carousel-card .card-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  padding: 20px;
}

.carousel-card .card-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Hover effect on non-active cards */
.carousel-card:not(.active):hover {
  opacity: 0.8;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

/* Controls */
.carousel-controls {
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  padding: 10px 20px;
  border-radius: 50px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.nav-btn {
  background: none;
  border: none;
  color: #1d1d1d;
  font-size: 2rem;
  cursor: pointer;
  padding: 0 10px;
  transition: all 0.3s ease;
  line-height: 1;
}

.nav-btn:hover {
  color: #00828c;
  transform: scale(1.2);
}

.nav-btn:active {
  transform: scale(1.1);
}

/* Pagination Dots */
.pagination-indicators {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 10px;
  border-left: 1px solid var(--glass-border);
  border-right: 1px solid var(--glass-border);
  margin: 0 10px;
}

.dot {
  width: 6px;
  height: 6px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dot.active {
  background: #00828c;
  width: 18px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 130, 140, 0.5);
}

.dot:hover:not(.active) {
  background: rgba(0, 130, 140, 0.6);
  transform: scale(1.2);
}

/* Responsive Design */
@media (min-width: 1200px) {
  :root {
    --shift-x: 32vw;
  }
}

@media (max-width: 1299px) {
  .prod_slideshow .carousel-container {
    min-height: 30vh;
  }
  .carousel-stage {
    height: 350px;
  }
}

@media (max-width: 1024px) {
  :root {
    --shift-x: 35vw;
  }

  .carousel-stage {
    height: 380px;
  }
}
@media (max-width: 991px) {
  .carousel-card.active,
  .carousel-card {
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .carousel-controls {
    margin-top: 0px;
    gap: 5px;
  }
}

@media (max-width: 767px) {
  :root {
    --shift-x: 38vw;
  }
  .carousel-card {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .carousel-card .card-image {
    background: transparent !important;
  }
  .carousel-card,
  .carousel-card.active {
    box-shadow: none !important;
  }

  .carousel-card {
    width: 70vw;
    height: 250px;
  }

  .carousel-card.left {
    transform: translate3d(-45%, 0, -250px) rotateY(45deg) scale(0.8);
  }

  .carousel-card.right {
    transform: translate3d(45%, 0, -250px) rotateY(-45deg) scale(0.8);
  }

  .prod_slideshow .carousel-container {
    min-height: 30vh;
    padding: 20px 0;
  }

  .carousel-stage {
    height: 300px;
  }

  .nav-btn {
    font-size: 1.5rem;
  }

  .pagination-indicators {
    gap: 5px;
    padding: 0 8px;
    margin: 0 8px;
  }

  .dot {
    width: 5px;
    height: 5px;
  }

  .dot.active {
    width: 14px;
  }
}

@media (max-width: 580px) {
  .carousel-card .card-image img {
    max-width: 80%;
  }
  #pagination-dots {
    display: none;
  }
  .carousel-controls {
    position: absolute;
    width: 100%;
    background: transparent;
    box-shadow: none;
    border: 0;
    backdrop-filter: none;
    z-index: 0;
  }
  .carousel-controls .nav-btn {
    font-size: 80px;
  }
  .carousel-controls #prev-btn {
    margin-left: 0;
    position: absolute;
    left: 0;
  }
  .carousel-controls #next-btn {
    margin-left: auto;
    position: absolute;
    right: 0;
  }
  .carousel-card {
    width: 70vw;
    height: 350px;
  }
  .carousel-stage {
    height: 420px;
  }
  .carousel-card {
    display: none;
  }
  .carousel-card.active {
    display: block;
  }
}

@media (max-width: 480px) {
  .carousel-card {
    width: 80vw;
    height: 400px;
  }

  .carousel-stage {
    height: 400px;
  }

  .carousel-card .card-image {
    padding: 15px;
  }
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(20px)) {
  .carousel-card {
    background: rgba(255, 255, 255, 0.95);
  }

  .carousel-controls {
    background: rgba(255, 255, 255, 0.95);
  }
}
