/* Unit card photo gallery (Stays + home) */
.unit-card-photo-wrap {
  position: relative;
  overflow: hidden;
  height: 220px;
}

.unit-card-photo-wrap .unit-card-img,
.unit-card-photo-wrap picture,
.unit-card-photo-wrap picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.unit-card-img {
  transition: transform 0.3s ease;
  cursor: pointer;
}

.unit-card:hover .unit-card-img,
.stay-card.category-card:hover .unit-card-img {
  transform: scale(1.03);
}

.photo-count-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(4px);
  letter-spacing: 0.03em;
  font-family: 'DM Sans', sans-serif;
  z-index: 2;
}

.photo-count-btn:hover {
  background: rgba(0, 0, 0, 0.75);
}

.photo-count-btn i {
  font-size: 13px;
}

.unit-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.unit-card-footer.unit-actions {
  margin-top: 0;
  padding: 14px 20px 18px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.btn-photos {
  font-size: 12px;
  color: #8B7355;
  background: none;
  border: 0.5px solid #8B7355;
  border-radius: 5px;
  padding: 7px 14px;
  cursor: pointer;
  letter-spacing: 0.03em;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
}

.btn-photos:hover {
  background: #8B7355;
  color: #fff;
}

.category-card .unit-card-photo-wrap {
  height: 260px;
}

.category-card .unit-actions {
  padding: 0 24px 16px;
  margin-top: 0;
}

/* GLightbox overrides */
.glightbox-clean .gslide-description {
  background: #1a1a1a;
}

.glightbox-clean .gdesc-inner .gslide-title {
  font-family: Georgia, 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 16px;
  color: #fff;
}

.glightbox-clean .gnext,
.glightbox-clean .gprev {
  background: rgba(255, 255, 255, 0.15);
}

.glightbox-clean .gnext:hover,
.glightbox-clean .gprev:hover {
  background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
  .category-card .unit-card-photo-wrap {
    height: 320px;
    min-height: 320px;
    max-height: 320px;
  }

  .category-card .unit-actions {
    padding: 0 18px 12px;
  }

  .glightbox-container .ginner-container {
    max-width: 100vw;
    max-height: 100dvh;
  }

  .glightbox-clean .gslide-media {
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - 120px);
  }

  .glightbox-clean .gnext,
  .glightbox-clean .gprev {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .glightbox-clean .gclose {
    width: 44px;
    height: 44px;
    top: calc(8px + env(safe-area-inset-top, 0px));
    right: 8px;
  }

  .photo-count-btn {
    min-height: 36px;
    padding: 8px 12px;
  }

  .btn-photos {
    min-height: 44px;
    padding: 10px 16px;
  }

  .unit-card-btn,
  .unit-card-btn--secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0 18px;
    height: 44px;
    min-height: 44px;
    box-sizing: border-box;
    vertical-align: middle;
  }
}

@media (max-width: 430px) {
  .category-card .unit-card-photo-wrap {
    height: clamp(300px, 78vw, 360px);
    min-height: 300px;
    max-height: 360px;
  }
}
