.gallery-page-section{
  margin-bottom: var(--space);
}

.gallery-page-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(var(--space) / 2);
}

.gallery-page-item{
  padding: 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.gallery-page-item img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* планшеты */
@media (max-width: 1024px){
  .gallery-page-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* телефоны */
@media (max-width: 680px){
  .gallery-page-grid{
    grid-template-columns: 1fr;
  }
}


/* Контейнер кнопок */

.gallery-filter-container{
  margin-top: var(--space);
  margin-bottom: var(--space);
}

.gallery-filter{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.gallery-filter-btn{
  appearance: none;
  border: var(--card-border-width) solid var(--card-border-color);
  background: var(--card-bg);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: var(--body-size);
  line-height: 1.2;
  font-weight: 600;
  cursor: pointer;
  transition: var(--t);
}

.gallery-filter-btn:hover{
  transform: scale(1.03);
  border-color: var(--accent);
}

.gallery-filter-btn.is-active{
  background: var(--accent);
  color: var(--btn-text-color, #fff);
  border-color: var(--accent);
}

.gallery-category{
  display: block;
}

.gallery-category[hidden]{
  display: none !important;
}

/* уже твоя сетка галереи */
.gallery-page-section{
  margin-bottom: var(--space);
}

.gallery-page-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(var(--space) / 2);
}

.gallery-page-item{
  padding: 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.gallery-page-item img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* планшеты */
@media (max-width: 1024px){
  .gallery-page-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* телефоны */
@media (max-width: 680px){
  .gallery-filter{
    justify-content: flex-start;
  }

  .gallery-filter-btn{
    padding: 10px 14px;
    font-size: 15px;
  }

  .gallery-page-grid{
    grid-template-columns: 1fr;
  }
}

footer.is-fixed-footer{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 20px;
  z-index: 10;
}

body.has-fixed-footer{
  padding-bottom: 80px;
}