/* ===== Основна галерея ===== */
.product-gallery {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.main-image {
  flex: 1;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: zoom-in;
}

.main-image img {
  width: 100%;
  transition: transform 0.2s ease;
  border-radius: 12px;
}

.gallery-thumbs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 90px;
}

.gallery-thumbs img {
  width: 100%;
  border-radius: 6px;
  border: 1px solid #ddd;
  cursor: pointer;
  transition: all 0.3s ease;
}

.gallery-thumbs img:hover {
  border-color: #8DAC99;
  transform: scale(1.05);
}

/* ===== Lightbox ===== */
.image-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.image-lightbox.open {
  display: flex;
}

.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1;
}

#lightboxImage {
  max-width: 90%;
  max-height: 90%;
  z-index: 2;
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  z-index: 3;
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: none;
  font-size: 40px;
  cursor: pointer;
  padding: 5px 15px;
  border-radius: 8px;
  transition: background 0.3s;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255,255,255,0.4);
}

.lightbox-close { top: 20px; right: 25px; }
.lightbox-prev { left: 30px; }
.lightbox-next { right: 30px; }





/* ===============================
   🖼️ Галерея товару — мініатюри зліва
   =============================== */

.product-gallery {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.gallery-thumbs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 90px;
  flex: 0 0 90px; /* фіксуємо ширину колонки зліва */
}

.gallery-thumbs img {
  width: 100%;
  border-radius: 6px;
  border: 1px solid #ddd;
  cursor: pointer;
  transition: all 0.25s ease;
}

.gallery-thumbs img:hover {
  transform: scale(1.05);
  border-color: #8DAC99;
}

.main-image {
  flex: 1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.main-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* 📱 Адаптив — на мобільних робимо зверху */
@media (max-width: 768px) {
  .product-gallery {
    flex-direction: column;
  }

  .gallery-thumbs {
    flex-direction: row;
    max-width: 100%;
    order: 2;
    justify-content: center;
  }
}
