
.gallery-folders{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  justify-content:center;
  margin: 20px 0;
}


.folder-card{
  width: 160px;
  border-radius: 14px;
  overflow:hidden;
  text-decoration:none;
  color: inherit;
  background: #111;
  cursor:pointer;
  border: 1px solid rgba(255,255,255,0.12);
  transition: transform 0.2s ease;
}

.folder-card img{
  width:100%;
  height:110px;
  object-fit:cover;
  display:block;
  margin-top: 10px;
  border-radius: 6px;
}

.folder-card .title{
  padding:10px 12px;
  font-size: 13px;
  text-align:center;
}

.folder-card.active{
  outline: 2px solid rgba(255,255,255,0.35);
}

.folder-card:hover{
  background: rgba(255,255,255,.06);
  transform: scale(1.05);
}

.gallery-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.gallery-grid a{
  display:block;
  border-radius: 12px;
  overflow:hidden;
}

.gallery-grid img{
  width:100%;
  height: 160px;
  object-fit:cover;
  display:block;
  transition: transform .18s ease;
}

.gallery-grid a:hover img{
  transform: scale(1.03);
}

.lightbox{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display:none;
  align-items:center;
  justify-content:center;
  padding: 24px;
  z-index: 9999;
}

.lightbox.open{ 
  display:flex; 
}

.lightbox img{
  max-width: min(1100px, 100%);
  max-height: 85vh;
  border-radius: 14px;
}

.lightbox-close{
  position:absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,0.15);
  color: white;
  font-size: 26px;
  cursor:pointer;
}

.gallery-pagination{
  display:flex;
  gap:10px;
  justify-content:center;
  align-items:center;
  margin: 16px 0 6px;
}

.gallery-pagination button{
  padding: 8px 12px;
  border-radius: 10px;
  border: none;
  background: rgba(0,0,0,0.5);
  color: white;
  cursor:pointer;
  font-size: 14px;
}

.gallery-pagination button:disabled{
  opacity: .5;
  cursor: default;
}

.gallery-pagination .info{
  font-size: 13px;
  opacity: .8;
}