/* ======================================================================
   Photo carousel + fullscreen lightbox — shared by all three rakhi themes.

   Structure only. Loaded BEFORE each theme stylesheet so a theme can
   override any of it at equal specificity (constellation already ships a
   fuller lightbox treatment and keeps it).
   ====================================================================== */

.photo-carousel {
  position: relative;
  width: 100%;
}

/* Scroll-snap does the motion so momentum and rubber-banding stay native.
   touch-action stays default here: a horizontal swipe pans the track, a
   vertical one still scrolls the page. */
.photo-carousel-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.photo-carousel-track::-webkit-scrollbar { display: none; }

.photo-carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  margin: 0;
  cursor: zoom-in;
}

.photo-carousel-slide img {
  display: block;
  width: 100%;
  height: auto;
}

.photo-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 12px;
}

.photo-carousel-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.28;
  cursor: pointer;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.photo-carousel-dot.is-active {
  opacity: 1;
  transform: scale(1.35);
}

/* Give the dots a real hit area without growing the visual dot. */
.photo-carousel-dot::before {
  content: "";
  position: absolute;
  width: 30px;
  height: 30px;
  margin: -11px 0 0 -11px;
}

.photo-carousel-dots { position: relative; }

/* ---------- Lightbox baseline ---------- */
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 5vh, 60px) clamp(20px, 5vw, 60px);
  background: rgba(12, 8, 5, 0.94);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: zoom-out;
}

.photo-lightbox[hidden] { display: none; }

.photo-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.photo-lightbox-img {
  max-width: 92vw;
  max-height: 86svh;
  width: auto;
  height: auto;
  border-radius: 10px;
  transform: scale(0.9);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.photo-lightbox.is-open .photo-lightbox-img { transform: scale(1); }

.photo-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.photo-lightbox-close:hover { background: rgba(255, 255, 255, 0.2); }

@media (prefers-reduced-motion: reduce) {
  .photo-carousel-track { scroll-behavior: auto; }
  .photo-lightbox,
  .photo-lightbox-img,
  .photo-carousel-dot { transition: none; }
}
