.gallery {
    display: block;
    max-width: 1200px;
    margin-inline: auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    padding: 2rem 15px;
  }
  .gallery img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: 0.3s;
    border-radius: 7px;
    cursor: pointer;
  }

  .gallery img:hover {
    transform: scale(1.02);
  }

  .viewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 50px 1rem;
  }

  .viewer img {
    /* width: 80%; */
    /* max-width: 600px; */
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
    margin-bottom: 20px;
    cursor: pointer;
  }

  .controls {
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    gap: 20px;
  }
  .controls .prev-next {
    position: absolute;
    width: 100%;
    bottom: 10px;
    display: flex;
    justify-content: center;
    gap: 20px;
  }



  .viewer .prev-next button {
    padding: 3px 25px;
    font-size: 16px;
    color: white;
    background-color: var(--main-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
  }

   .viewer .prev-next button:disabled {
    background-color: #c0c0c0;
    cursor: not-allowed;
  }

  .viewer .prev-next button:hover:not(:disabled) {
    background-color: var(--main-color);
  }

  .viewer .close-view {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px;
    background-color: transparent;
    cursor: pointer;
  }

  .viewer .close-view img{
    width: 25px;
  }
  .controls button img{
    width: 15px;
  }
  @media screen and (max-width: 768px) {
    .gallery {
      grid-template-columns: 1fr 1fr;
      gap: 20px;
    }
  }
  @media screen and (max-width: 576px) {
    .gallery {
      grid-template-columns: 1fr ;
      gap: 20px;
    }
  }