/* ==============================================================
   Never Enough Paper — Rail CSS (uniform cards)
   Ensures Sneak Peek & Recently Uploaded show artwork full-frame
   File: /assets/css/rail-soft.css
   © Never Enough Paper
   ============================================================== */

/* ---------- Rail container ---------- */
.rail-wrap { position: relative; }
.rail {
  display: flex;
  gap: var(--nep-gap,14px);
  overflow: auto;
  scroll-behavior: smooth;
  padding: 6px 8px 12px;
  margin: 0;
  list-style: none;
  -webkit-overflow-scrolling: touch;
}
.rail::-webkit-scrollbar { height: 8px; }
.rail::-webkit-scrollbar-thumb { background: #dadada; border-radius: 999px; }

/* Pager buttons */
.rail-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 999px;
  border: 1px solid var(--nep-border,#e5e7eb);
  background: #fff; color: var(--nep-ink,#111827);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.rail-prev { left: -6px; }
.rail-next { right: -6px; }
.rail-btn[disabled] { opacity: .35; pointer-events: none; }

/* ---------- Cards (Sneak = .t, Recent = .r) ---------- */
.rail .t, .rail .r {
  background: var(--nep-surface,#fff);
  border: 1px solid var(--nep-border,#e5e7eb);
  border-radius: var(--nep-radius-sm,12px);
  overflow: hidden;
  /* width is set by JS via --card-w so we can do exact N-up */
  flex: 0 0 var(--card-w, 220px);
  box-shadow: 0 4px 12px rgba(0,0,0,.04);
}

/* Image frame (uniform, no crop) */
.rail .t .frame, .rail .r .frame {
  aspect-ratio: 4 / 3;        /* consistent frame */
  background: #f3f4f6;
  overflow: hidden;
}
.rail .t .frame img, .rail .r .frame img {
  width: 100%; height: 100%;
  object-fit: contain;        /* show full artwork */
  object-position: center;
  background: #fff;           /* pleasant matte for empty space */
}

/* Meta block (title + category) */
.rail .meta { padding: 10px 12px 12px; }
.rail .meta .title {
  margin: 0 0 2px 0;
  font-weight: 600;
  font-size: 14px;
  color: var(--nep-ink,#111827);
  line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rail .meta .small {
  margin: 0;
  font-size: 12px;
  color: var(--nep-muted,#6b7280);
  line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Hover polish */
.rail .t:hover, .rail .r:hover {
  box-shadow: 0 8px 22px rgba(0,0,0,.08);
  transform: translateY(-1px);
  transition: box-shadow .18s ease, transform .12s ease;
}

/* Section title (for pages that import rails alone) */
.section-title {
  font-size: 22px; font-weight: 700; margin: 22px 0 10px; color: var(--nep-ink,#111827);
}

/* Responsive */
@media (max-width: 560px) {
  .rail { gap: 12px; }
}

/* === NEP homepage rails — captions restored (2025-09-15) === */

/* Rail track */
.rail { display:flex; gap:14px; overflow:auto; padding:6px 8px 12px; -webkit-overflow-scrolling:touch; }
.rail > li {
  flex:0 0 var(--card-w, 220px);
  min-width:210px; max-width:260px;
  background:#fff; border:1px solid #e5e7eb; border-radius:12px; overflow:hidden;
}

/* Image frame: show full image (no crop) */
.rail .frame { aspect-ratio:4/3; background:#f3f4f6; }
.rail .frame img { width:100%; height:100%; object-fit:contain; object-position:center; background:#fff; }

/* Card meta (same on Sneak + Recent) */
.rail .meta{ padding:10px 12px 12px }
.rail .meta .title{
  margin:0 0 2px; font-weight:600; font-size:14px; line-height:1.25;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.rail .meta .desc{
  margin:4px 0 6px; font-size:13px; line-height:1.35; color:#111;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.rail .meta .small{
  margin:0; font-size:12px; color:#6b7280;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}

/* Per-rail width hints (JS will still snap to exact N-up) */
.rail--sneak > li{ min-width:210px; max-width:240px; }
.rail--recent> li{ min-width:220px; max-width:260px; }

/* Pager buttons */
.rail-wrap{ position:relative }
.rail-btn{
  position:absolute; top:50%; transform:translateY(-50%);
  width:34px; height:34px; border-radius:999px; border:1px solid #e5e7eb;
  background:#fff; color:#111; display:flex; align-items:center; justify-content:center;
  cursor:pointer; z-index:2; box-shadow:0 2px 6px rgba(0,0,0,.08);
}
.rail-prev{ left:-6px } .rail-next{ right:-6px }
.rail-btn[disabled]{ opacity:.35; pointer-events:none }

/* Lightbox tags line (category › subcategory) */
.lb-tags{ margin-top:4px; font-size:13px; color:#6b7280; }

/* Soft rails (carousel-style lists shared across pages) */
.rail-wrap{position:relative}
.rail{
  display:flex;gap:14px;overflow:auto;scroll-behavior:smooth;
  padding:6px 8px 12px;margin:0;list-style:none;-webkit-overflow-scrolling:touch;
}
.rail::-webkit-scrollbar{height:8px}
.rail::-webkit-scrollbar-thumb{background:#dadada;border-radius:999px}
.rail > li{
  flex:0 0 var(--card-w,220px);
  min-width:200px;max-width:280px;background:#fff;border:1px solid var(--nep-border);
  border-radius:12px;overflow:hidden;display:flex;flex-direction:column;
}
.rail .frame{aspect-ratio:4/3;background:#f3f4f6}
.rail .frame img{width:100%;height:100%;object-fit:contain;object-position:center;background:#fff}
.rail .meta{padding:10px 12px 12px}
.rail .meta .title{margin:0 0 2px;font-weight:600;font-size:14px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rail .meta .desc{margin:4px 0 6px;font-size:13px;line-height:1.35;color:var(--nep-ink);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.rail .meta .small{margin:0;font-size:12px;color:var(--nep-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rail--sneak>li{min-width:210px;max-width:240px}
.rail--recent>li{min-width:220px;max-width:260px}
.rail-btn{
  position:absolute;top:50%;transform:translateY(-50%);width:34px;height:34px;border-radius:999px;
  border:1px solid var(--nep-border);background:#fff;color:var(--nep-ink);display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:2;box-shadow:0 2px 6px rgba(0,0,0,.08)
}
.rail-prev{left:-6px}.rail-next{right:-6px}
.rail-btn[disabled]{opacity:.35;pointer-events:none}
