/* Registry Gallery + Car Page — proof-of-concept presentation layer over
   LimeSurvey's own response data (live-query, not pre-generated — see
   Docs/Design/Registry_Survey_Architecture_Design_Spec.md §22). Deliberately
   minimal: basic info + photo, expandable later per the North Star. Reuses
   citreg.css site-wide tokens/colors where possible rather than inventing a
   parallel palette. */

.gallery-wrap { max-width: 1130px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.gallery-heading { margin-bottom: .3rem; }
.gallery-subhead { color: var(--lit-muted, #6b7280); margin-bottom: 1.5rem; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.gallery-card {
  display: block;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: #fff;
  transition: box-shadow .15s ease, transform .15s ease;
}
.gallery-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); transform: translateY(-2px); }

.gallery-card-photo {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: #f1f2f4;
  display: block;
}
.gallery-card-photo-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: #f1f2f4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: .85rem;
}
.gallery-card-body { padding: .75rem .9rem; }
.gallery-card-title { font-weight: 600; font-size: .95rem; margin: 0 0 .15rem; }
.gallery-card-meta { font-size: .8rem; color: #6b7280; }

/* Hero treatment, 2026-09-17 - a reserved, always-first grid slot for
   "whichever car brought the visitor here" (carried via ?hero= on the
   link, not a computed/newest pick - see SP-33). Pure size/position on
   the SAME card component; click-through behavior is identical to any
   other card (still opens car.php). Placed first in the DOM so the grid's
   own default flow puts it top-left with no extra positioning rules. */
.gallery-card--hero {
  grid-column: span 2;
  grid-row: span 2;
}
.gallery-card--hero .gallery-card-title { font-size: 1.3rem; }
.gallery-card--hero .gallery-card-meta { font-size: .95rem; }
.gallery-card--hero .gallery-card-body { padding: 1.1rem 1.3rem; }
@media (max-width: 640px) {
  .gallery-card--hero { grid-column: span 1; grid-row: span 1; }
  .gallery-card--hero .gallery-card-title { font-size: .95rem; }
  .gallery-card--hero .gallery-card-meta { font-size: .8rem; }
  .gallery-card--hero .gallery-card-body { padding: .75rem .9rem; }
}

.gallery-empty { color: #6b7280; padding: 2rem 0; }

/* Car page + Forum rail (2026-09-16) — same sticky rail component as the
   homepage's .hp-top-rail, reused as-is for site-wide nav continuity; car
   page no longer carries its own centered 820px column alone. */
.gallery-rail-flex { display:flex; gap:24px; align-items:flex-start; max-width:954px; margin:28px auto 40px; padding:0; }
@media (max-width:780px){ .gallery-rail-flex{ flex-direction:column; } }

.gallery-rail { display:flex; flex-direction:column; gap:14px; width:110px; flex-shrink:0; position:sticky; top:20px; }
.gallery-rail__heading { font-size:.8rem; font-weight:700; letter-spacing:.03em; text-transform:uppercase; color:#152536;
  text-align:center; padding-bottom:8px; border-bottom:1px solid #d0d5db; margin-bottom:4px; }
.gallery-rail__cell { display:block; text-align:center; text-decoration:none; border-radius:8px; padding:4px; margin:0 -4px; }
.gallery-rail__cell:hover { background:#eceef1; }
.gallery-rail__cell img { width:100%; height:auto; display:block; }
.gallery-rail__cell span { display:block; margin-top:4px; font-size:.75rem; font-weight:600; color:#5a6772; }
.gallery-rail__cell:hover span { color:#0d6efd; }

.car-page-photo-caption { font-size:.82rem; color:#5a6772; font-style:italic; margin:-.9rem 0 1.25rem; }

/* Car page */
.car-page-wrap { max-width: 820px; margin: 0; padding: 0; flex: 1; min-width: 0; }
.car-page-photo {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 10px;
  background: #f1f2f4;
  margin-bottom: 1.25rem;
}
.car-page-photo-placeholder {
  width: 100%;
  height: 280px;
  border-radius: 10px;
  background: #f1f2f4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  margin-bottom: 1.25rem;
}
.car-page-title { margin-bottom: .3rem; }
.car-page-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .9rem 1.5rem;
  margin: 1.25rem 0;
  padding: 1rem 1.1rem;
  background: #f8f9fa;
  border-radius: 8px;
}
.car-page-fact-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; margin-bottom: .15rem; }
.car-page-fact-value { font-size: .95rem; font-weight: 600; }
.car-page-note { font-size: .82rem; color: #6b7280; margin-top: 1.5rem; }
.car-page-back { display: inline-block; margin-bottom: 1rem; font-size: .85rem; }
