/* Card Carousel Styles */
.card-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
}

.card-carousel-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.card-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.card-carousel-slide.active {
  opacity: 1;
}

.card-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-carousel-indicators {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.card-carousel-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background-color 0.3s ease;
  /* Make indicators more tappable on mobile */
  min-width: 10px;
  min-height: 10px;
  padding: 0;
  margin: 0 4px;
  border: none;
}

.card-carousel-indicator.active {
  background-color: white;
}

/* Responsive height adjustments for millwork carousels */
@media (min-width: 768px) {
  .millwork-card .h-64 {
    height: 20rem; /* 320px - increased from 16rem (256px) */
  }
}

@media (min-width: 1024px) {
  .millwork-card .h-64 {
    height: 24rem; /* 384px - even taller on larger screens */
  }
}

@media (min-width: 1280px) {
  .millwork-card .h-64 {
    height: 28rem; /* 448px - tallest on extra large screens */
  }
}

/* Controls */
.card-carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: opacity 0.3s ease;
  border: none;
  padding: 0;
  color: #333;
}

.card-carousel-prev {
  left: 10px;
}

.card-carousel-next {
  right: 10px;
}

/* Mobile-specific styles */
@media (max-width: 767px) {
  .card-carousel-control {
    /* Always show controls on mobile */
    opacity: 1;
    width: 40px;
    height: 40px;
    /* Make touch areas larger on mobile */
    touch-action: manipulation;
  }
  
  .card-carousel-indicator {
    width: 12px;
    height: 12px;
    margin: 0 5px;
  }
  
  /* Add a slide counter for mobile */
  .slide-counter {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    z-index: 10;
  }
}
