/* Gallery Modal CSS - proje detay sayfasi */

.cs-single_product_thumb {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  max-width: 100%;
  margin: 0 auto;
}

.cs-single_product_thumb_item {
  position: relative;
  display: inline-block;
}

.cs-single_product_thumb_item img {
  max-width: 100%;
  max-height: 300px;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.cs-single_product_thumb_item img:hover {
  transform: scale(1.05);
}

.cs-single_product_nav {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.75rem;
  padding: 1rem 0;
}

.cs-single_product_thumb_mini {
  flex: 0 0 auto;
  width: 150px;
}

.cs-single_product_thumb_mini img {
  width: 307px;
  height: 172.683px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.cs-single_product_thumb_mini img:hover {
  transform: scale(1.05);
}

/* Modal Styles */
.image-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.3s ease;
}

.image-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-image {
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease;
}

.modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: #fff;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.zoom-controls {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.zoom-btn {
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.zoom-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Modal Navigation Arrows */
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  font-size: 40px;
  width: 50px;
  height: 50px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10001;
}

.modal-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.prev-btn {
  left: -70px;
}

.next-btn {
  right: -70px;
}

/* Image Counter */
.image-counter {
  position: absolute;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  background: rgba(0, 0, 0, 0.6);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
}

/* Active thumbnail style */
.cs-single_product_thumb_mini.active {
  opacity: 0.7;
  transform: scale(0.95);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Responsive */
@media (min-width: 768px) {
  .cs-single_product_thumb_item img {
    max-height: 400px;
  }

  .cs-single_product_thumb_mini {
    width: 180px;
    height: min-content;
  }

  .modal-content {
    max-width: 80%;
    max-height: 80%;
  }
}

@media (min-width: 1200px) {
  .cs-single_product_thumb_item img {
    max-height: 500px;
  }

  .cs-single_product_thumb_mini {
    width: 200px;
  }

  .modal-content {
    max-width: 70%;
    max-height: 70%;
  }
}

@media (max-width: 767px) {
  .modal-content {
    max-width: 95%;
    max-height: 85%;
  }

  .modal-close {
    top: -35px;
    font-size: 28px;
    width: 35px;
    height: 35px;
  }

  .zoom-controls {
    bottom: -45px;
  }

  .zoom-btn {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }

  .modal-nav {
    font-size: 30px;
    width: 40px;
    height: 40px;
  }

  .prev-btn {
    left: -50px;
  }

  .next-btn {
    right: -50px;
  }

  .image-counter {
    bottom: -70px;
    font-size: 12px;
    padding: 6px 12px;
  }
}

/* Zoom Icon */
.zoom-icon {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #333;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
  z-index: 10;
}

.zoom-icon:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
