/* =============================================
   Image Carousel Component
   Reusable image carousel/gallery styles
   ============================================= */

.card-images {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--bg-secondary);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}

.card-images-track {
  display: flex;
  height: 100%;
  transition: transform 0.3s ease;
}

.card-images-track img {
  min-width: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  flex-shrink: 0;
}

/* Single image styling (no carousel) */
.card-images.single img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-images-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-images-placeholder svg {
  width: 48px;
  height: 48px;
  fill: var(--text-secondary);
  opacity: 0.3;
}

.card-images-nav {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.card-images-dot {
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
}

.card-images-dot.active {
  background: white;
  width: 20px;
  border-radius: 4px;
}

.card-images-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.card-images:hover .card-images-arrow {
  opacity: 1;
}

.card-images-arrow svg {
  width: 16px;
  height: 16px;
  fill: white;
}

.card-images-arrow.prev {
  left: 8px;
}

.card-images-arrow.next {
  right: 8px;
}

.card-images-arrow:hover {
  background: rgba(0, 0, 0, 0.8);
}

.card-images-count {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .card-images {
    margin-bottom: 8px;
    border-radius: 8px;
  }

  .card-images-placeholder svg {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 480px) {
  .card-images {
    margin-bottom: 6px;
    border-radius: 6px;
  }

  .card-images-placeholder svg {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 360px) {
  .card-images {
    border-radius: 6px;
  }

  .card-images-placeholder svg {
    width: 24px;
    height: 24px;
  }
}

/* Tablet landscape (1024x505) - compact images */
@media (width: 1024px) and (height: 505px) and (orientation: landscape),
       (min-width: 1022px) and (max-width: 1026px) and (min-height: 503px) and (max-height: 507px) and (orientation: landscape) {
  .card-images {
    margin-bottom: 6px !important;
    border-radius: 6px !important;
  }

  .card-images-placeholder svg {
    width: 24px !important;
    height: 24px !important;
  }

  .card-images-nav {
    bottom: 4px !important;
    gap: 4px !important;
  }

  .card-images-dot {
    width: 6px !important;
    height: 6px !important;
  }

  .card-images-dot.active {
    width: 16px !important;
  }

  .card-images-count {
    top: 4px !important;
    right: 4px !important;
    font-size: 9px !important;
    padding: 2px 6px !important;
  }
}
