/* Product Image Carousel Styles - Clean E-commerce Design - Based on Reference */
.product-image-carousel-wrapper {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Main Image Container */
.product-carousel-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 75%; /* 4:3 aspect ratio to match reference */
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.product-carousel-main {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  transition: transform 0.3s ease-out;
}

.product-carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 20px;
}

.product-carousel-slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: none; /* Remove hover effects for cleaner look */
  border-radius: 4px;
}

/* Navigation Arrows - Minimal Design */
.product-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #333;
  transition: all 0.2s ease;
  z-index: 10;
  opacity: 0;
  backdrop-filter: blur(4px);
}

.product-carousel-container:hover .product-carousel-nav {
  opacity: 1;
}

.product-carousel-nav:hover {
  background: rgba(255, 255, 255, 1);
  color: #000;
  border-color: rgba(0,0,0,0.2);
  transform: translateY(-50%) scale(1.05);
}

.product-carousel-prev {
  left: 15px;
}

.product-carousel-next {
  right: 15px;
}

/* Hide arrows when only one image */
.product-image-carousel-wrapper[data-count="1"] .product-carousel-nav {
  display: none;
}

/* Thumbnail Navigation - Horizontal Row Design */
.product-carousel-thumbnails {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 8px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin-top: 4px;
}

.product-carousel-thumbnails::-webkit-scrollbar {
  display: none;
}

.product-carousel-thumbnail {
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  border: 2px solid #f0f0f0;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.product-carousel-thumbnail:hover {
  border-color: #ccc;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.product-carousel-thumbnail.active {
  border-color: #007bff;
  box-shadow: 0 0 0 1px #007bff, 0 4px 12px rgba(0,123,255,0.2);
  transform: translateY(-2px);
}

.product-carousel-thumbnail img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 2px;
}

/* Remove indicators for this clean design */
.product-carousel-indicators {
  display: none;
}

/* Remove zoom button for cleaner look */
.product-carousel-zoom {
  display: none;
}

/* Remove counter for cleaner look */
.product-carousel-counter {
  display: none;
}

/* Single image styling */
.product-single-image {
  width: 100%;
  background: #ffffff;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 375px; /* Match the 4:3 ratio */
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.product-single-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .product-image-carousel-wrapper {
    max-width: 100%;
  }
  
  .product-carousel-container {
    padding-bottom: 75%;
    margin-bottom: 16px;
  }
  
  .product-carousel-nav {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }
  
  .product-carousel-prev {
    left: 10px;
  }
  
  .product-carousel-next {
    right: 10px;
  }
  
  .product-carousel-thumbnail {
    width: 60px;
    height: 60px;
  }
  
  .product-carousel-thumbnails {
    gap: 10px;
  }

  .product-single-image {
    min-height: 280px;
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .product-carousel-thumbnail {
    width: 50px;
    height: 50px;
  }
  
  .product-carousel-thumbnails {
    gap: 8px;
  }

  .product-carousel-container {
    margin-bottom: 12px;
  }

  .product-single-image {
    min-height: 240px;
    padding: 12px;
  }
}

/* Accessibility */
.product-carousel-nav:focus,
.product-carousel-thumbnail:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

/* Loading State */
.product-carousel-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border: 2px solid #f3f4f6;
  border-top: 2px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 5;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Clean animations */
* {
  box-sizing: border-box;
}

.product-carousel-slide img {
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}
