/**
 * Style dla galerii produktów z jednym zdjęciem w pierwszym i ostatnim rzędzie
 */

.product-gallery-grid {
  margin-bottom: 2rem;
}

.gallery-row {
  margin-bottom: 10px;
}

.gallery-row.first-row {
  margin-bottom: 15px;
}

.gallery-row.first-row .gallery-item {
  margin-bottom: 0;
}

.gallery-row.last-row {
  margin-top: 5px;
}

.gallery-row.last-row .gallery-item {
  margin-bottom: 0;
}

.gallery-item {
  padding: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 10px;
}

.gallery-item:hover {
  opacity: 0.8;
}

.gallery-item.empty {
  min-height: 100px;
  background-color: #f8f9fa;
}

.gallery-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background-color: #fff;
}

/* Modal do powiększania zdjęć */
.modal-image {
  max-width: 100%;
  max-height: 90vh;
  margin: 0 auto;
  display: block;
}

.modal-body {
  position: relative;
}

.modal-body .close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  color: #000;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  padding: 0;
}

/* Responsywność */
@media (max-width: 767px) {
  .gallery-item {
    padding: 3px;
    margin-bottom: 6px;
  }
  
  .gallery-row {
    margin-bottom: 6px;
  }
  
  .gallery-row.first-row {
    margin-bottom: 10px;
  }
  
  .gallery-row.last-row {
    margin-top: 3px;
  }
}

@media (max-width: 576px) {
  .gallery-item {
    padding: 2px;
    margin-bottom: 4px;
  }
  
  .gallery-row {
    margin-bottom: 4px;
  }
  
  .gallery-row.first-row {
    margin-bottom: 6px;
  }
  
  .gallery-row.last-row {
    margin-top: 2px;
  }
}
