/* /selling — personal listings */

:root {
  --ink: #1f1e1c;
  --ink-soft: #5a5852;
  --ink-faint: #97928b;
  --paper: #fbfaf7;
  --paper-warm: #f2efe8;
  --accent: #c44536;
  --rule: #e8e5dd;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Topbar */
.topbar {
  border-bottom: 1px solid var(--rule);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--ink-faint);
}
.topbar__home {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}
.topbar__home:hover { color: var(--accent); }
.topbar__crumb { color: var(--ink-faint); }

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}
@media (min-width: 720px) {
  .container { padding: 5rem 2rem 6rem; }
}

/* Intro */
.intro h1 {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.8rem;
}
.intro .lede {
  color: var(--ink-soft);
  margin: 0;
  font-size: 1rem;
}
.intro .lede a { color: var(--ink); text-decoration: underline; }
.intro .lede a:hover { color: var(--accent); }

/* Empty state */
.empty {
  margin-top: 5rem;
  text-align: center;
  color: var(--ink-faint);
}
.empty p {
  margin: 0.4rem 0;
  font-size: 1.1rem;
}
.empty__hint {
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* Listings */
.listings {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}
.item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  border-top: 1px solid var(--rule);
  padding-top: 2rem;
}
.item:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 640px) {
  .item {
    grid-template-columns: 220px 1fr;
    gap: 2rem;
  }
}

.item--sold,
.item--pending,
.item--hold {
  opacity: 0.6;
}

.item__photos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem;
  align-self: start;
}
.item__photos:has(.item__photo:only-child) {
  grid-template-columns: 1fr;
}
.item__photo {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--paper-warm);
  border-radius: 4px;
}
.item__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.item__title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: var(--ink);
}
.item__price {
  font-weight: 500;
  color: var(--accent);
  font-size: 1.1rem;
  white-space: nowrap;
}
.item__condition {
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin-bottom: 0.8rem;
}
.item__status {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.15rem 0.5rem;
  margin-bottom: 0.8rem;
  border-radius: 3px;
}
.item--sold .item__status,
.item--sold .item__price { color: var(--ink-faint); border-color: var(--ink-faint); }
.item__desc {
  color: var(--ink-soft);
  font-size: 1rem;
}
.item__desc p { margin: 0 0 0.8rem; }
.item__desc p:last-child { margin-bottom: 0; }
.item__cta {
  display: inline-block;
  margin-top: 1rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.1rem;
}
.item__cta:hover { color: var(--accent); border-color: var(--accent); }
.item__posted {
  margin-top: 0.8rem;
  font-size: 0.75rem;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
}

/* Footer */
.footer {
  border-top: 1px solid var(--rule);
  padding: 1.5rem;
  text-align: center;
}
.footer a {
  color: var(--ink-faint);
  text-decoration: none;
  font-size: 0.85rem;
}
.footer a:hover { color: var(--accent); }

/* Lightbox (shared with /tenz pattern) */
.lightbox {
  border: 0;
  padding: 0;
  background: rgba(31, 30, 28, 0.92);
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox::backdrop { background: rgba(31, 30, 28, 0.92); }
.lightbox__img {
  max-width: calc(100% - 4rem);
  max-height: calc(100vh - 4rem);
  object-fit: contain;
  user-select: none;
  touch-action: pan-y;
}
.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: none;
  border: 0;
  color: var(--paper);
  font-size: 2.5rem;
  cursor: pointer;
  padding: 1rem;
  line-height: 1;
}
.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__prev { left: 0.5rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 0.5rem; top: 50%; transform: translateY(-50%); }
