/* /photos — wear-photo grid + lightbox.
   Depends on: base.css, nav.css, components.css */

.photos-main { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.25rem 5rem }

.photos-header { margin-bottom: 1.5rem }
.photos-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem; color: var(--accent); margin-bottom: .35rem;
}
.photos-header p { color: var(--muted); font-size: .92rem }

.photos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .35rem;
}
@media (min-width: 640px) {
  .photos-grid { grid-template-columns: repeat(4, 1fr); gap: .5rem }
}
@media (min-width: 1024px) {
  .photos-grid { grid-template-columns: repeat(5, 1fr); gap: .55rem }
}

.photo-tile {
  position: relative; padding: 0; border: none; cursor: pointer;
  background: var(--surface2); border-radius: 6px;
  width: 100%; height: 0; padding-bottom: 100%;  /* square via padding-trick */
  overflow: hidden; transition: transform .15s, box-shadow .15s;
}
.photo-tile:hover { transform: translateY(-1px); box-shadow: 0 4px 16px -8px rgba(200,169,110,.35) }
.photo-tile > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.photo-tile-crowns {
  position: absolute; bottom: .35rem; left: .35rem;
  background: rgba(10,10,9,.78); color: var(--accent);
  font-size: .68rem; font-weight: 700;
  padding: .15rem .45rem; border-radius: 999px;
  pointer-events: none;
}

.photos-loading,
.photos-empty {
  grid-column: 1 / -1;
  text-align: center; padding: 3rem 1rem;
  color: var(--muted); font-size: .9rem;
}

.photos-load-more-wrap { display: flex; justify-content: center; margin-top: 1.5rem }
.photos-load-more {
  background: none; border: 1px solid var(--border2); color: var(--muted);
  padding: .55rem 1.4rem; border-radius: 8px;
  font-size: .85rem; font-weight: 600; font-family: inherit; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.photos-load-more:hover    { border-color: var(--accent); color: var(--accent) }
.photos-load-more:disabled { opacity: .55; cursor: default }

/* ── Lightbox ────────────────────────────────────────────────────────────── */
.photo-modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(10,10,9,.92);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.photo-modal-overlay.hidden { display: none }

.photo-modal-close {
  position: fixed; top: 1rem; right: 1rem;
  background: rgba(255,255,255,.08); color: #fff;
  border: 1px solid rgba(255,255,255,.15);
  width: 36px; height: 36px; border-radius: 50%;
  font-size: 1rem; cursor: pointer; z-index: 2;
}
.photo-modal-close:hover { background: rgba(255,255,255,.18) }

.photo-modal-inner {
  display: grid; grid-template-columns: 1fr; gap: 1rem;
  max-width: 1080px; max-height: 92vh;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
@media (min-width: 720px) {
  .photo-modal-inner {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 0;
  }
}

.photo-modal-photo-wrap {
  background: #0a0a09;
  display: flex; align-items: center; justify-content: center;
  min-height: 0;
}
.photo-modal-photo {
  max-width: 100%; max-height: 70vh; object-fit: contain; display: block;
}
@media (min-width: 720px) {
  .photo-modal-photo { max-height: 92vh }
}

.photo-modal-meta {
  padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .55rem;
  background: var(--surface);
  overflow-y: auto;
}
.photo-modal-cap {
  font-size: 1.1rem; font-weight: 700;
  color: var(--text); text-decoration: none;
  font-family: 'Playfair Display', serif;
}
.photo-modal-cap:hover { color: var(--accent) }
.photo-modal-sub { font-size: .82rem; color: var(--muted) }
.photo-modal-collector { color: var(--text2); text-decoration: none }
.photo-modal-collector:hover { color: var(--accent); text-decoration: underline }

.photo-modal-actions {
  display: flex; flex-direction: column; gap: .45rem; margin-top: .35rem;
}

.pm-action {
  display: flex; align-items: center; gap: .55rem;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); padding: .55rem .8rem;
  border-radius: 8px; font-size: .88rem; font-weight: 600;
  font-family: inherit; cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.pm-action:hover    { background: rgba(200,169,110,.06); border-color: rgba(200,169,110,.3) }
.pm-action:disabled { opacity: .55; cursor: default }
.pm-icon            { font-size: 1.05rem; line-height: 1 }
.pm-label           { flex: 1; text-align: left }
.pm-count {
  background: rgba(200,169,110,.15); color: var(--accent);
  font-size: .76rem; font-weight: 700;
  padding: .12rem .5rem; border-radius: 999px;
  min-width: 28px; text-align: center;
}
.pm-action.crowned {
  background: rgba(200,169,110,.18); border-color: var(--accent);
  color: var(--accent);
}
.pm-action.crowned .pm-count { background: rgba(0,0,0,.2); color: var(--accent) }
.pm-action-cta {
  background: var(--accent); color: #111; border-color: var(--accent);
  justify-content: center;
}
.pm-action-cta:hover { opacity: .9 }
.pm-action-cta .pm-label { text-align: center; font-weight: 700 }
