.gallery-hero {
  height: 280px;

  border-radius: 25px;

  overflow: hidden;

  background: url("assets/images/gallery-banner.jpg") center center/cover;

  margin: 40px auto;

  max-width: 1400px;
}

.gallery-hero-overlay {
  width: 100%;
  height: 100%;

  background: rgba(0, 0, 0, 0.45);

  display: flex;
  align-items: center;
}

.gallery-card img,
.small-card img{
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    transition: transform .35s ease;
}

.gallery-card,
.small-card{
    transform:translateZ(0);
    backface-visibility:hidden;
    contain:layout paint;
}

.gallery-hero h1 {
  color: #fff;
  font-size: 55px;
  font-weight: 700;
}

.gallery-hero p {
  color: #fff;
  width: 500px;
  margin-top: 15px;
  line-height: 1.8;
}

/* FILTERS */

.gallery-filter-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  padding: 23px;

  margin-bottom: 0px;
}

.filter-btn {
  border: none;
  background: #fff;
  padding: 12px 25px;
  border-radius: 40px;
  cursor: pointer;
  color: #000;

  font-size: 20px;
    font-weight: bold;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: 0.3s;
  font-family: "Cormorant Garamond", serif;
}

.filter-btn.active {
  background: #5b7242;
  color: #fff;
}

/* SECTION */

.gallery-category {
  margin-bottom: 40px;
}

.gallery-category .container {
  background: #fff;

  border-radius: 25px;

  padding: 0px;

  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  margin-bottom: 25px;
}

.category-header h2 {
  font-size: 28px;

  color: #2c3b20;

  margin-bottom: 5px;
}

.category-header p {
  color: #000;
}

.category-header a {
  color: #5b7242;
  font-weight: 600;
}

/* BIG GRID */

.gallery-grid {
  display: grid;

  grid-template-columns: repeat(4, 1fr);

  gap: 20px;
}

/* SMALL GRID */

.small-grid {
  display: grid;

  grid-template-columns: repeat(4, 1fr);

  gap: 15px;
}

/* CARD */

.gallery-card,
.small-card {
  position: relative;

  overflow: hidden;

  border-radius: 18px;

  cursor: pointer;
}

.gallery-card img {
  width: 100%;
  height: 200px;

  object-fit: cover;

  transition: 0.5s;
}

.small-card img {
  width: 100%;
  height: 200px;

  object-fit: cover;

  transition: 0.5s;
}

.gallery-card:hover img,
.small-card:hover img {
  transform: scale(1.08);
}

.gallery-card span,
.small-card span {
  position: absolute;

  left: 15px;
  bottom: 15px;

  background: rgba(0, 0, 0, 0.55);

  color: #fff;

  padding: 8px 16px;

  border-radius: 25px;

  font-size: 14px;
}

.image-popup {
  display: none;

  position: fixed;

  top: 0;
  left: 0;

  width: 100%;
  height: 100%;

  background: rgba(0, 0, 0, 0.85);

  z-index: 99999;

  justify-content: center;
  align-items: center;
}

.image-popup img {
  max-width: 85%;
  max-height: 85%;

  border-radius: 20px;

  background: #fff;

  padding: 10px;
}

.close-popup {
  position: absolute;

  top: 30px;
  right: 40px;

  font-size: 50px;

  color: #fff;

  cursor: pointer;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 35px;
  cursor: pointer;
}

.plant-item {
  text-align: center;
}

.plant-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 15px;
}

.plant-item p {
  margin-top: 10px;
  font-weight: 600;
}

body.popup-open {
  overflow: hidden;
}

/* RESPONSIVE */

@media (max-width: 991px) {
  .gallery-grid,
  .small-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-hero h1 {
    font-size: 40px;
  }

  .category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
}

@media (max-width: 600px) {
  .gallery-grid,
  .small-grid {
    grid-template-columns: 1fr;
  }

  .gallery-hero {
    height: 220px;
  }

  .gallery-hero p {
    width: 100%;
  }
}

/* PLANT POPUP (shared for all categories) */
/* PLANT POPUP */
.plant-popup {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 999999;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.popup-content {
  background: #fff;
  width: min(1000px, 90vw);
  padding: 30px;
  border-radius: 20px;
  position: relative;

  max-height: 85vh;
  overflow: hidden;
  padding-top: 61px;
  -ms-overflow-style: none;
}

.popup-content::-webkit-scrollbar {
  width: 0;
  display: none;
}

html.popup-open,
body.popup-open,
#smooth-wrapper.popup-open,
#smooth-content.popup-open {
  overflow: hidden !important;
  height: 100vh !important;
}

body {
  overflow-x: hidden;
}

.close-btn {
  position: absolute;
  top: 60px;
  right: 36px;
  font-size: 35px;
  cursor: pointer;
}

.popup-content h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #2c3b20;
}

.popup-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.plant-item {
  text-align: center;
}

.plant-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 15px;
}

.plant-item p {
  margin-top: 10px;
  font-weight: 600;
}

@media (max-width: 768px) {
  .popup-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .popup-grid {
    grid-template-columns: 1fr;
  }
}


.image-popup{
    display:flex;
    opacity:0;
    visibility:hidden;
    transition:.35s ease;
}

.image-popup.active{
    opacity:1;
    visibility:visible;
}

.image-popup img{
    transform:scale(.9);
    transition:.35s ease;
}

.image-popup.active img{
    transform:scale(1);
}