

/* ── Reset scoped to gallery ─────────────────────────────── */
.pgal-wrap *, .pgal-wrap *::before, .pgal-wrap *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Outer wrapper ───────────────────────────────────────── */
.pgal-wrap {
  width: 80%;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  user-select: none;
  -webkit-user-select: none;
  padding: 0 10%;
}

/* ── Stage (main image area) ─────────────────────────────── */
.pgal-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;   /* portrait-optimised for phone photos */
  overflow: hidden;
  background: #0a0a0a;
  cursor: grab;
}
.pgal-stage:active {
  cursor: grabbing;
}

/* ── Slides ──────────────────────────────────────────────── */
.pgal-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.55s ease;
  pointer-events: none;
}
.pgal-slide.pgal-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}
.pgal-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Caption ─────────────────────────────────────────────── */
.pgal-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem 1.5rem 1.1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.68));
  color: #fff;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.4s ease 0.25s, transform 0.4s ease 0.25s;
  z-index: 2;
  pointer-events: none;
}
.pgal-slide.pgal-active .pgal-caption {
  opacity: 1;
  transform: translateY(0);
}

/* ── Arrows ──────────────────────────────────────────────── */
.pgal-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s, opacity 0.2s, transform 0.15s;
  opacity: 0.65;
}
.pgal-arrow:hover {
  background: rgba(255, 255, 255, 0.22);
  opacity: 1;
  transform: translateY(-50%) scale(1.07);
}
.pgal-arrow:active {
  transform: translateY(-50%) scale(0.95);
}
.pgal-arrow svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pgal-prev { left: 1rem; }
.pgal-next { right: 1rem; }

/* ── Slide counter ───────────────────────────────────────── */
.pgal-counter {
  position: absolute;
  top: 0.9rem;
  right: 1.1rem;
  z-index: 10;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
}

/* ── Progress bar ────────────────────────────────────────── */
.pgal-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.75);
  width: 0%;
  z-index: 20;
}

/* ── Thumbnail strip ─────────────────────────────────────── */
.pgal-thumbs {
  display: flex;
  gap: 5px;
  padding: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #2a2a2a transparent;
}
.pgal-thumbs::-webkit-scrollbar { height: 3px; }
.pgal-thumbs::-webkit-scrollbar-thumb {
  background: #2a2a2a;
  border-radius: 2px;
}

.pgal-thumb {
  flex: 0 0 auto;
  width: 72px;     /* narrower to suit portrait images */
  height: 90px;    /* taller to match portrait ratio */
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.45;
  transition: border-color 0.2s, opacity 0.2s, transform 0.18s;
}
.pgal-thumb:hover {
  opacity: 0.8;
  transform: scale(1.04);
}
.pgal-thumb.pgal-active {
  border-color: #fff;
  opacity: 1;
}
.pgal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .pgal-stage {
    aspect-ratio: 4 / 3;  /* even taller on mobile for portrait shots */
  }

  .pgal-arrow {
    width: 36px;
    height: 36px;
  }
  .pgal-arrow svg {
    width: 14px;
    height: 14px;
  }

  .pgal-thumb {
    width: 52px;
    height: 66px;
  }
}

/* ── Reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .pgal-slide,
  .pgal-caption,
  .pgal-arrow,
  .pgal-thumb {
    transition: none !important;
  }
  .pgal-progress {
    transition: none !important;
  }
}