.carousel-wrapper {
  position: relative;
  overflow: hidden;
}

.carousel {
  position: absolute;
  inset: 0;
}

.carousel-track-outer {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  user-select: none;
}

.carousel-slide {
  flex: 0 0 100%;
  height: 100%;
  cursor: pointer;
  outline-offset: -3px;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
}

.carousel-placeholder {
  position: absolute;
  inset: 1.5rem;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-placeholder span {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(44, 40, 32, 0.4);
  border: none;
  color: #FDFAF7;
  width: 2rem;
  height: 2rem;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 2;
}
.carousel-btn:hover { background: rgba(44, 40, 32, 0.65); }
.carousel-prev { left: 0.75rem; }
.carousel-next { right: 0.75rem; }
.carousel[data-count="1"] .carousel-btn { display: none; }

.carousel-dots {
  position: absolute;
  bottom: 0.9rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  z-index: 2;
}

.carousel-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(253, 250, 247, 0.45);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.carousel-dot[aria-selected="true"] {
  background: #FDFAF7;
  transform: scale(1.35);
}
.carousel[data-count="1"] .carousel-dots { display: none; }

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(44, 40, 32, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] { display: none; }

.lightbox-img {
  max-width: min(90vw, calc(90vh * 0.75));
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  user-select: none;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  color: rgba(253, 250, 247, 0.6);
  font-size: 1.5rem;
  font-family: var(--sans);
  line-height: 1;
  cursor: pointer;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}
.lightbox-close:hover { color: #FDFAF7; }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(253, 250, 247, 0.1);
  border: none;
  color: rgba(253, 250, 247, 0.7);
  font-size: 1rem;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.lightbox-nav:hover { background: rgba(253, 250, 247, 0.18); color: #FDFAF7; }
.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }
.lightbox[data-count="1"] .lightbox-nav { display: none; }

@media (max-width: 600px) {
  .carousel-btn { display: none; }
  .lightbox-nav { display: none; }
}
