/* ══════════════════════════════════════
   POTTERY LIGHTBOX — Detail View + Steps
   ══════════════════════════════════════ */

/* ── Overlay ── */
#pottery-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(18, 18, 18, 0.97);
  z-index: 3000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#pottery-lightbox.open { display: flex; }

/* ── Close button ── */
.pl-close {
  position: absolute;
  top: 24px;
  right: 32px;
  color: var(--ink);
  font-size: 28px;
  cursor: pointer;
  background: none;
  border: none;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  outline: none;
}
.pl-close:focus-visible {
  outline: 1px solid rgba(255,255,255,0.3);
  outline-offset: 4px;
}

/* ── Nav buttons ── */
.pl-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 36px;
  cursor: pointer;
  padding: 20px;
  min-width: 44px;
  min-height: 44px;
  transition: color 0.2s;
  z-index: 10;
  outline: none;
}
.pl-nav:focus-visible {
  outline: 1px solid rgba(255,255,255,0.3);
  outline-offset: 4px;
}
.pl-nav:hover { color: var(--ink); }
.pl-prev { left: 16px; }
.pl-next { right: 16px; }

/* ── Counter ── */
.pl-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.5);
  font-size: 10px;
  letter-spacing: 0.15em;
  z-index: 10;
}

/* ── Body — two-column layout ── */
.pl-body {
  display: flex;
  width: 90vw;
  max-width: 1200px;
  height: 85vh;
  gap: 0;
  animation: pl-zoom-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes pl-zoom-in {
  from { transform: scale(0.9); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* ── Hero (left) ── */
.pl-hero-wrap {
  flex: 0 0 55%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  overflow: hidden;
}

.pl-hero-wrap img {
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.pl-title {
  display: none;
}

.pl-description {
  font-size: 13px;
  line-height: 1.7;
  color: var(--mid);
  letter-spacing: 0.03em;
  margin-top: 8px;
  text-align: center;
  max-width: 400px;
}

/* ── Detail panel (right) ── */
.pl-detail {
  flex: 0 0 45%;
  overflow-y: auto;
  padding: 48px 40px 48px 32px;
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-left: 1px solid rgba(255,255,255,0.06);
}

/* Custom scrollbar for detail panel */
.pl-detail::-webkit-scrollbar { width: 4px; }
.pl-detail::-webkit-scrollbar-track { background: transparent; }
.pl-detail::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.pl-steps-title {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--light);
  font-weight: 300;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.pl-steps-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.1);
}

/* ── Steps timeline ── */
.pl-steps-list {
  position: relative;
  padding-left: 24px;
}

/* Vertical timeline line */
.pl-steps-list::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: rgba(255,255,255,0.1);
}

/* ── Individual step ── */
.pl-step {
  position: relative;
  padding-bottom: 28px;
  padding-left: 12px;
}
.pl-step:last-child { padding-bottom: 0; }

/* Timeline dot */
.pl-step-dot {
  position: absolute;
  left: -21px;
  top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.25);
  background: transparent;
  transition: background 0.3s, border-color 0.3s;
}

.pl-step.has-data .pl-step-dot {
  background: rgba(255,255,255,0.7);
  border-color: rgba(255,255,255,0.7);
}

/* Step header */
.pl-step-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}

.pl-step-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.5);
  transition: color 0.3s;
}

.pl-step.has-data .pl-step-name {
  color: rgba(255,255,255,0.9);
}

.pl-step-date {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.3);
}

/* Step content (hidden when no data) */
.pl-step-content {
  display: none;
}
.pl-step.has-data .pl-step-content {
  display: block;
}

/* Step photo thumbnail */
.pl-step-photo {
  width: 100%;
  max-width: 200px;
  aspect-ratio: 4/3;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 8px;
  display: block;
}

/* Step metadata (clay, glaze, fire type) */
.pl-step-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.pl-step-tag {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.06);
  padding: 3px 10px;
  border: 1px solid rgba(255,255,255,0.08);
}

/* Step comments */
.pl-step-comments {
  font-size: 12px;
  line-height: 1.7;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.02em;
}

/* ── Empty state ── */
.pl-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--mid);
  font-size: 13px;
  letter-spacing: 0.05em;
}

/* ── Loading state ── */
.pl-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: rgba(255,255,255,0.4);
  font-size: 12px;
  letter-spacing: 0.1em;
}

/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */

@media (max-width: 1024px) {
  .pl-body {
    flex-direction: column;
    width: 95vw;
    height: 90vh;
    overflow-y: auto;
  }
  .pl-hero-wrap {
    flex: 0 0 auto;
    padding: 24px 20px 16px;
  }
  .pl-hero-wrap img {
    max-height: 40vh;
  }
  .pl-detail {
    flex: 1 1 auto;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 24px 20px;
  }
  .pl-prev { left: 4px; padding: 12px; font-size: 28px; }
  .pl-next { right: 4px; padding: 12px; font-size: 28px; }
  .pl-close { top: 12px; right: 16px; font-size: 24px; }
}

@media (max-width: 768px) {
  .pl-body {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
  }
  .pl-hero-wrap { padding: 16px 12px 8px; }
  .pl-hero-wrap img { max-height: 30vh; }
  .pl-title { font-size: 20px; margin-top: 12px; }
  .pl-description { font-size: 12px; }
  .pl-detail { padding: 16px 12px; }
  .pl-steps-title { margin-bottom: 20px; font-size: 9px; }
  .pl-step { padding-bottom: 20px; }
  .pl-step-name { font-size: 12px; }
  .pl-step-photo { max-width: 140px; }
  .pl-step-comments { font-size: 11px; }
  .pl-prev { left: 2px; padding: 8px; font-size: 24px; }
  .pl-next { right: 2px; padding: 8px; font-size: 24px; }
  .pl-close { top: 8px; right: 8px; font-size: 22px; }
  .pl-counter { bottom: 12px; font-size: 9px; }
}

/* Touch-friendly: swipe area hint */
@media (max-width: 480px) {
  .pl-hero-wrap { padding: 12px 8px 4px; }
  .pl-hero-wrap img { max-height: 25vh; }
  .pl-detail { padding: 12px 10px; }
  .pl-steps-list { padding-left: 18px; }
  .pl-step-dot { left: -16px; width: 7px; height: 7px; }
  .pl-steps-list::before { left: 4px; }
  .pl-nav { display: none; }
}
