/* Touch rules */
* {
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Cards */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  height: 500px;
  cursor: pointer;
  transition: transform var(--transition);
}

.card:active {
  transform: scale(0.97);
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Back button */
.back-btn {
  position: fixed;
  top: 130px;
  left: 20px;
  z-index: 1000;
  font-size: 26px;
  padding: 5px 20px;
  border-radius: 25px;
  border: none;
  background: var(--accent);
  color: #000;
}

.back-btn.hidden {
  display: none;
}

/* Loader */
.loader {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.loader.hidden {
  display: none;
}

.spinner {
  width: 80px;
  height: 80px;
  border: 8px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
.card {
  position: relative;
}

.card-label {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  font-size: 22px;
}
/* ===== LIGHTBOX OVERLAY ===== */

.lightbox,
.lightbox * {
  touch-action: none;
}


.lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.95);
  z-index: 3000;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;
}

.lightbox.hidden {
  display: none;
}

/* Close button */
.lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 3100;
  font-size: 36px;
  padding: 0px 10px;
  border-radius: 25px;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

/* ===== SWIPER ===== */
.lightbox-swiper-container {
  width: 100%;
  height: 100%;
}

/* Center slides */
.swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}

.swiper-zoom-container {
  touch-action: none;
}

/* REQUIRED for zoom */
.swiper-zoom-container {
  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* IMAGE CONSTRAINT — THIS FIXES OVERFLOW */
.swiper-zoom-container img {
  max-width: 100vw;
  max-height: 100vh;

  width: auto;
  height: auto;

  object-fit: contain;
}

/* ===== NAVIGATION ARROWS ===== */
.swiper-button-prev,
.swiper-button-next {
  color: #fff;
  width: 50px;
  height: 50px;
  z-index: 3200;
}
