/**
 * CVZ Product Gallery Styles
 * 
 * Custom styles for the product gallery component
 */

.cvz-product-gallery {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 100%;
}

.cvz-main-image-container {
  position: relative;
  width: 100%;
  margin: 0 auto;
}

.cvz-main-image-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #f8f9fa;
}

.cvz-main-image-link {
  display: block;
  position: relative;
}

.cvz-main-image {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.3s ease;
}

.cvz-main-image.loading {
  opacity: 0.7;
}

.cvz-main-image.cvz-fade-in {
  animation: cvzFadeIn 0.3s ease;
}

@keyframes cvzFadeIn {
  from {
    opacity: 0.7;
  }
  to {
    opacity: 1;
  }
}

.cvz-zoom-icon {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.cvz-zoom-icon::before {
  content: "";
  display: block;
  width: 36px;
  height: 36px;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M197.001 244C171.822 271.83 126.998 313 104.256 295.496C81.5174 277.992 126.998 246 156.656 220.314' stroke='%23ffffff' stroke-opacity='0.9' stroke-width='16' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M165.944 196.347C135.998 107 276.999 75.9996 300.776 165.974C319.017 235 211.46 292.164 175.314 213.85' stroke='%23ffffff' stroke-opacity='0.9' stroke-width='16' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.cvz-main-image-wrapper:hover .cvz-zoom-icon {
  opacity: 1;
}

.cvz-nav-btn {
  position: absolute;
  top: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 2;
}

.cvz-main-image-wrapper:hover .cvz-nav-btn {
  opacity: 1;
}

.cvz-nav-btn:hover {
  background: rgba(0, 0, 0, 0.9);
}

.cvz-next-btn:hover {
  transform: scale(1.1);
}

.cvz-prev-btn:hover {
  transform: rotate(180deg) scale(1.1);
}

/* Navigation arrow buttons with SVG backgrounds */
.cvz-nav-btn {
  display: block !important;
  width: 36px !important;
  height: 36px !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}

.cvz-prev-btn {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M136 90C150.384 112.919 266.871 185.871 263.166 204.626C261.326 213.931 242.049 227.382 237.725 230.837C217.044 247.361 153.451 296.996 136 310.245' stroke='%23ffffff' stroke-opacity='0.9' stroke-width='16' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  transform: rotate(180deg);
}

.cvz-next-btn {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M136 90C150.384 112.919 266.871 185.871 263.166 204.626C261.326 213.931 242.049 227.382 237.725 230.837C217.044 247.361 153.451 296.996 136 310.245' stroke='%23ffffff' stroke-opacity='0.9' stroke-width='16' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

.cvz-prev-btn {
  left: 15px;
}

.cvz-next-btn {
  right: 15px;
}

.cvz-thumbnails-container {
  width: 100%;
}

.cvz-thumbnails-wrapper {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 100%;
  overflow-x: auto;
  padding: 10px 0;
}

.cvz-thumbnail-item {
  flex: 0 0 auto;
  width: 80px;
  height: 55px;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.cvz-thumbnail-item:hover {
  border-color: #007cba;
  transform: scale(1.05);
}

.cvz-thumbnail-item.active {
  border-color: #007cba;
  box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.cvz-thumbnail-item a {
  display: block;
  width: 100%;
  height: 100%;
}

.cvz-thumbnail-image {
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.cvz-thumbnail-item:hover .cvz-thumbnail-image {
  transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  .cvz-product-gallery {
    gap: 15px;
  }

  .cvz-main-image-container {
    max-width: 100%;
  }

  .cvz-nav-btn {
    width: 40px;
    height: 40px;
    opacity: 1;
  }

  .cvz-prev-btn {
    left: 10px;
  }

  .cvz-next-btn {
    right: 10px;
  }

  .cvz-zoom-icon {
    width: 35px;
    height: 35px;
    top: 10px;
    right: 10px;
    opacity: 1;
  }

  .cvz-thumbnails-wrapper {
    gap: 8px;
    padding: 8px 0;
  }

  .cvz-thumbnail-item {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 480px) {
  .cvz-thumbnail-item {
    width: 50px;
    height: 50px;
  }

  .cvz-thumbnails-wrapper {
    gap: 6px;
  }
}
