/* Inherits global styles and page-title/page-description from shop-style.css/style.css */

/* Gallery Controls */
.gallery-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  margin-bottom: 40px;
  padding: 20px;
  border: 1px solid var(--color-hover);
}

#gallery-search,
#gallery-filter {
  padding: 10px;
  border: 1px solid var(--color-hover);
}

/* Amazing Grid Layout (Masonry-like effect on large screens) */
.image-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(200px, auto); /* Flexible row height */
  gap: 15px;
}

.gallery-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-card:nth-child(2n) {
  /* Example for varied grid: make every 2nd card span 2 rows */
  grid-row: span 2;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.gallery-card:hover img {
  transform: scale(1.05); /* Enlarge a bit on hover */
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(0, 74, 173, 0.8); /* Primary Blue transparent */
  color: var(--color-light);
  padding: 15px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-overlay {
  transform: translateY(0); /* Bring up details on hover */
}

.price-tag {
  font-weight: bold;
  color: var(--color-light);
  margin-top: 5px;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .image-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: minmax(150px, auto);
  }
}

@media (max-width: 600px) {
  .image-gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(250px, auto);
  }

  .gallery-card:nth-child(2n) {
    grid-row: span 1; /* Disable row span on mobile */
  }

  .gallery-controls {
    flex-direction: column;
    gap: 15px;
  }
}
