/* categorylightbox.css */

.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  flex-direction: column;
}

.lightbox-content {
  position: relative;
  text-align: center;
  display: inline-block;
}

#lightbox-img {
  max-width: 90vw;
  max-height: 75vh;
  border-radius: 8px;
}

.lightbox-icons {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 25px;
  justify-content: center;
  align-items: center;
}

.lightbox-icons a {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.lightbox-icons img {
  width: 28px;
  height: 28px;
}

.lightbox-icons a:hover {
  transform: scale(1.1);
}

.lightbox img {
  max-width: 90vw;
  max-height: 70vh;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  object-fit: contain;
  margin-bottom: 0;
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #ffffff;
  color: #000;
  border: none;
  padding: 10px 14px;
  border-radius: 50%;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 10000;
}

.nav-btn.prev {
  left: 35px;
}

.nav-btn.next {
  right: 35px;
}

.close-lightbox {
  position: absolute;
  top: 10px;
  right: 30px;
  background: #f44336;
  color: white;
  border: none;
  padding: 8px 12px;
  font-size: 16px;
  border-radius: 25px;
  cursor: pointer;
}

.lightbox-caption {
  display: none;
}

.category-header {
  text-align: center;
  margin: 30px 0 20px;
}

.category-header h2 {
  color: #007bff;
  margin-bottom: 10px;
}
.category-header h1 {
  color: #007bff;
  margin-bottom: 10px;
}

.category-header .sort-form {
  display: inline-block;
  font-size: 1rem;
}

.category-header .sort-form label {
  margin-right: 8px;
  font-weight: 500;
}

.category-header .sort-form select {
  padding: 6px 12px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

@media (max-width: 600px) {
  #lightbox-img {
     max-height: 60vh;
    position: relative;
    z-index: 1;
  }

  .lightbox-icons {
    gap: 14px;
    bottom: 12px;
  }

  .lightbox-icons a {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .lightbox-icons img {
    width: 22px;
    height: 22px;
  }
  
    .nav-btn {
    z-index: 10;
  }

  .nav-btn.prev { left: 10px; }
  .nav-btn.next {  right: 10px; }

  .close-lightbox {
    top: 8px;
    right: 15px;
    z-index: 11;
  }
  
  .lightbox-actions {
    flex-direction: row;
    bottom: 20px;
    position: absolute;
    z-index: 10;
  }
}

.thumb-image {
  max-width: 60%;
  height: auto;
  width: 300px; /* or any reasonable thumbnail width */
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.thumb-image:hover {
  transform: scale(1.02);
}

.image-center {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}
