.revGallery-anchor, .gal-overlay{
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  -ms-box-sizing: border-box;
  box-sizing: border-box;
}

/* Desktop: 3 items per row */
.revGallery-anchor{
  overflow: hidden;
  position: relative;
  width: calc(33.333% - 10px); /* 3 per row with margin */
  display: block;
  float: left;
  margin: 5px; /* spacing between items */
  background: #FFFFFF;
  border: 1px solid #ECECEC;
  box-shadow: 0px 3px 9px rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  padding: 10px 12px 15px;
}

/* Tablet: 3 items per row */
@media (max-width: 991.98px) {
  .revGallery-anchor{
    width: calc(33.333% - 10px);
  }
}

/* Mobile: 2 items per row */
@media (max-width: 575.98px) {
  .revGallery-anchor{
    width: calc(50% - 10px);
  }
}

.gal-overlay{
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  transition: background .4s ease;
}

.revGallery-anchor:hover .gal-overlay{
  background: rgba(27,27,27, 0);
}

/* Gallery wrapper */
.nak-gallery {
  display: block;
  width: 100%;
  position: relative;
  margin-top: 30px;
  box-sizing: border-box;
}

/* Natural height images */
.img-responsive.gallery-img{
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

/* Hover zoom */
.revGallery-anchor:hover .gallery-img{
  transform: scale(1.05);
  transition: all .4s ease;
}

/* Remove old helpers */
.nak-gallery-poster,
.revGallery-anchor-width1,
.revGallery-anchor-width2,
.revGallery-anchor-width3,
.nak-gallery-height1,
.nak-gallery-height2,
.nak-gallery-height3 {
  padding: 0;
  height: auto;
}

/* Buttons (unchanged) */
.button{
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: all .4s ease;
  width: 200px;
  height: 48px;
  border: 1px solid rgba(0,169,157,1);
  background-color: rgba(0,169,157,1);
  border-radius: 2px;
  color: #fff;
  letter-spacing: 2px;
}
.button:hover {
  background-color: #363636;
  color: #fff;
}
.button:active,
.button.is-checked {
  background-color: #28F;
}
.button.is-checked {
  color: white;
}
.button:active {
  box-shadow: inset 0 1px 10px hsla(0, 0%, 0%, 0.8);
}