/* ===== Carousel ===== */
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #111;
  touch-action: pan-y;
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 560px;
  margin-bottom: 10px;
}
.carousel-track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.28s ease;
}
.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
.carousel-nav { display: none !important; }
.carousel-counter {
  position: absolute; top: 12px; right: 12px; z-index: 4;
  background: rgba(0,0,0,.55); color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 5px 10px; border-radius: 999px; pointer-events: none;
}
.carousel-dots {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
  display: flex; gap: 5px; z-index: 4;
  padding: 6px 10px; background: rgba(0,0,0,.28);
  border-radius: 999px; pointer-events: none;
}
.carousel-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.45);
}
.carousel-dots span.active {
  width: 18px; border-radius: 4px; background: #fff;
}

/* ===== Lightbox top: X left | count center | ⋯ right ===== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: #000;
  flex-direction: column;
}
.lightbox.show { display: flex !important; }

.lb-top {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  left: 12px;
  right: 12px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.lb-top .lb-icon-btn,
.lb-top .lb-counter {
  pointer-events: auto;
}
.lb-icon-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(40,40,44,.85);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-tap-highlight-color: transparent;
}
.lb-counter {
  height: 40px;
  min-width: 52px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(40,40,44,.85);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.lb-menu {
  display: none;
  position: absolute;
  top: calc(58px + env(safe-area-inset-top, 0px));
  right: 12px;
  background: #2c2c30;
  border-radius: 14px;
  padding: 6px 0;
  min-width: 250px;
  z-index: 50;
  box-shadow: 0 16px 40px rgba(0,0,0,.55);
}
.lb-menu.show { display: block !important; }
.lb-menu button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 15px;
  padding: 13px 16px;
  text-align: left;
  cursor: pointer;
}

.lightbox-stage {
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 70px 0 90px;
  touch-action: pan-y;
}
.lb-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.28s ease;
  will-change: transform;
}
.lb-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  background: #000;
}
.lightbox-nav, .lightbox-img { display: none !important; }

.lb-bottom {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(40,40,44,.92);
  color: #fff;
}
.lb-act {
  border: none;
  background: none;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 8px;
}
.lb-act i { font-size: 22px; }
.lb-act.liked i { color: #ff2d55; }
