/* 121 Thrift: the dressed-up zine. Every choice traces to design.md. */
:root {
  --paper: #F4ECDD;
  --ink: #2E0F07;
  --ink-soft: #5A3B2E;
  --red: #C8361F;           /* the one accent: marker marks only */
  --tape: rgba(222, 200, 150, .72);
  --snap: #FFFDF8;
  --line: #D9CBB2;
  --display: "Gasoek One", "Arial Black", sans-serif;
  --typed: "Courier Prime", "Courier New", monospace;
  --hand: "Reenie Beanie", "Bradley Hand", cursive;
  --ui: "Manrope", system-ui, sans-serif;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .18 0 0 0 0 .06 0 0 0 0 .03 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.11'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); background: var(--paper) var(--grain);
  font: 400 17px/1.5 var(--typed);
}
img { max-width: 100%; display: block; }
a { color: var(--ink); text-underline-offset: 3px; }
em { font-style: normal; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 600px; }
.center { text-align: center; }
.small { font-size: 14px; color: var(--ink-soft); }
.label { display: block; font: 700 13px/1.3 var(--typed); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 4px; }
.typed { font-family: var(--typed); color: var(--ink-soft); max-width: 58ch; }
.logo { height: auto; mix-blend-mode: multiply; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

/* ---------------- cover */
.cover { max-width: 1180px; margin: 0 auto; padding: 24px 24px 64px; display: grid; gap: 24px;
  grid-template-columns: 1fr; border-bottom: 2px solid var(--ink); }
.cover-top { display: flex; justify-content: space-between; align-items: flex-start; }
.cover-logo { width: clamp(120px, 26vw, 190px); }
.issue { margin: 8px 0 0; text-align: right; font: 700 13px/1.4 var(--typed); letter-spacing: .1em; text-transform: uppercase; }
.cover-head { margin: 16px 0 0; font: 400 clamp(40px, 7.4vw, 92px)/.98 var(--display); letter-spacing: -.01em; }
.underline { position: relative; white-space: nowrap; }
.underline::after { /* one hand-drawn red marker stroke */
  content: ""; position: absolute; left: -2%; right: -4%; bottom: -.08em; height: .2em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 20' preserveAspectRatio='none'%3E%3Cpath d='M3 14 C 60 4, 140 3, 297 9' fill='none' stroke='%23C8361F' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}
.cover-facts { display: grid; gap: 16px; border-top: 1.5px dashed var(--ink); padding-top: 24px; }
.cover-facts p { margin: 0; font-size: 18px; }
.cover-blurb { margin: 0; max-width: 46ch; color: var(--ink-soft); }
@media (min-width: 860px) {
  .cover { grid-template-columns: 1.6fr 1fr; column-gap: 64px; padding-bottom: 104px; }
  .cover-top { grid-column: 1 / -1; }
  .cover-head { grid-row: 2 / 4; align-self: end; }
  .cover-facts { grid-column: 2; align-self: end; }
  .cover-blurb { grid-column: 2; }
}

/* ---------------- section heads */
.sec-head { font: 400 clamp(36px, 6vw, 62px)/1 var(--display); letter-spacing: -.02em; margin: 0 0 24px; }
.sec-head em, .cover-head em { font-style: normal; }

/* ---------------- how to do the market */
.howto { padding-top: 64px; padding-bottom: 40px; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 24px; }
.steps li { counter-increment: s; position: relative; padding-left: 72px; max-width: 62ch; min-height: 48px; }
.steps li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: -4px; font: 400 44px/1 var(--display); }
.steps strong { display: block; }
@media (min-width: 860px) { .steps { grid-template-columns: 1fr 1fr; column-gap: 64px; } }

/* ---------------- the racks: collage */
.racks { padding-top: 40px; padding-bottom: 104px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 16px 0 40px; }
.chip { font: 700 15px/1 var(--typed); text-decoration: none; padding: 8px 0; border-bottom: 2px solid transparent; }
.chip.on { border-bottom-color: var(--ink); }
.collage { columns: 2 150px; column-gap: 20px; }
@media (min-width: 720px) { .collage { columns: 3 220px; column-gap: 40px; } }
@media (min-width: 1100px) { .collage { columns: 4 220px; } }
.empty-store { font: 400 30px/1.2 var(--display); margin: 40px 0; }

.snap { position: relative; display: block; break-inside: avoid; margin: 0 0 40px; padding: 10px 10px 0; text-decoration: none;
  background: var(--snap); box-shadow: 0 1px 0 #0002, 0 12px 20px -14px rgba(46,15,7,.55);
  transition: transform .18s ease-out, box-shadow .18s ease-out; }
.t0 { transform: rotate(-1.6deg); } .t1 { transform: rotate(1.1deg); } .t2 { transform: rotate(-.5deg); }
.t3 { transform: rotate(2deg); } .t4 { transform: rotate(-2.2deg); }
a.snap:hover, a.snap:focus-visible { transform: rotate(0) translateY(-4px); box-shadow: 0 1px 0 #0002, 0 20px 26px -16px rgba(46,15,7,.6); }
.taped::before { content: ""; position: absolute; top: -12px; left: 50%; width: 92px; height: 26px; margin-left: -46px;
  background: var(--tape); transform: rotate(-4deg); z-index: 2; }
.snap-photo { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper); }
.snap-photo img { width: 100%; height: 100%; object-fit: cover; }
.snap-cap { display: block; padding: 8px 2px 6px; font: 400 27px/1 var(--hand); color: var(--ink); }
.mark { position: relative; display: inline-block; padding: 0 .28em; white-space: nowrap; }
.mark::before { /* red marker circle around the price */
  content: ""; position: absolute; inset: -.18em -.1em -.12em; border: 2px solid var(--red); border-radius: 50% 46% 52% 44%;
  transform: rotate(-4deg);
}
.snap-meta { display: block; padding: 0 2px 12px; font: 400 13px/1.35 var(--typed); color: var(--ink-soft); }
.is-sold .snap-photo img { filter: grayscale(.85) contrast(.9); opacity: .75; }
.is-sold .mark { text-decoration: line-through var(--red) 2px; }
.gone { position: absolute; top: 34%; left: 50%; transform: translate(-50%, -50%) rotate(-12deg);
  font: 400 58px/1 var(--hand); color: var(--red); text-shadow: 0 0 6px var(--snap), 0 0 2px var(--snap); pointer-events: none; }

/* ---------------- piece page */
.bar { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; padding-bottom: 16px; }
.back { font: 700 15px/1 var(--typed); }
.bar-logo { width: 64px; }
.piece { display: grid; gap: 40px; padding-top: 24px; padding-bottom: 104px; }
.snap.big { margin: 16px 0 0; max-width: 560px; transform: rotate(-1deg); }
.snap.big .snap-cap { font-size: 44px; padding-bottom: 12px; }
.snap.big .gone { font-size: 110px; }
.piece-title { font: 400 clamp(38px, 6vw, 64px)/1 var(--display); letter-spacing: -.02em; margin: 8px 0 16px; }
.piece-facts { font-size: 18px; margin: 0 0 40px; }
.stub { position: relative; max-width: 420px; padding: 24px 24px 24px 40px; background: var(--snap);
  border: 1.5px dashed var(--ink); }
.stub::before { /* ticket perforation */
  content: ""; position: absolute; left: 16px; top: 12px; bottom: 12px; border-left: 2px dotted var(--ink-soft); }
.stub p { margin: 0 0 8px; }
.stub-when { font: 400 26px/1.15 var(--display); }
@media (min-width: 860px) { .piece { grid-template-columns: 1.1fr 1fr; align-items: start; gap: 64px; } }

/* ---------------- colophon */
.colophon { border-top: 2px solid var(--ink); padding-top: 40px; padding-bottom: 64px; display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: center; }
.colophon p { margin: 0; }
.foot-logo { width: 72px; }

/* ================= vendor + admin: product UI (Manrope), zine headings */
.top { display: flex; align-items: center; gap: 16px; padding: 16px 24px; max-width: 1180px; margin: 0 auto; border-bottom: 2px solid var(--ink); }
.top h1 { margin: 0; font: 400 34px/1 var(--display); }
.top .eyebrow { font: 700 12px/1.3 var(--typed); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 4px; }
.top .small-btn { margin-left: auto; }
.top .back { margin-right: auto; }
.logo.sm { width: 56px; } .logo.md { width: 170px; margin: 40px auto 16px; } .logo.xs { width: 40px; }
.top + main, main.narrow { padding-top: 24px; padding-bottom: 64px; }
.top ~ main h2, .card h2 { font: 400 30px/1.1 var(--display); margin: 40px 0 8px; }
.card h2 { margin-top: 0; }
.top ~ main h1 { font: 400 34px/1.05 var(--display); margin: 8px 0 8px; }
.top ~ main, .center { font-family: var(--ui); }
.hint { color: var(--ink-soft); margin: 0 0 16px; }
.count { font: 600 15px/1 var(--ui); color: var(--ink-soft); margin-left: 8px; font-style: normal; }
.foot { color: var(--ink-soft); font-size: 15px; padding: 24px 0 40px; }

.card { background: var(--snap); border: 1.5px solid var(--ink); padding: 24px; margin-bottom: 24px; overflow-x: auto; box-shadow: 0 12px 20px -16px rgba(46,15,7,.5); }
.form { display: grid; gap: 16px; font-family: var(--ui); }
.form label { display: grid; gap: 6px; font: 700 15px/1.3 var(--ui); }
.form small { font-weight: 500; color: var(--ink-soft); }
input, select, textarea { font: 500 17px/1.3 var(--ui); color: var(--ink); width: 100%; min-height: 50px; padding: 12px 14px;
  background: #fff; border: 1.5px solid var(--ink); border-radius: 4px; }
textarea { min-height: 96px; }
.row2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }
.dollar { position: relative; }
.dollar::before { content: "$"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font: 700 17px var(--ui); }
.dollar input { padding-left: 30px; }
.btn { font: 700 16px/1 var(--ui); min-height: 52px; padding: 0 24px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--paper); border: 1.5px solid var(--ink); border-radius: 4px; }
.btn:hover { background: #4a1d10; }
.btn:disabled { opacity: .6; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: rgba(46,15,7,.06); }
.small-btn { min-height: 40px; padding: 0 16px; font-size: 15px; }
.linkish { font: 700 15px var(--ui); background: none; border: 0; padding: 8px 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.flash { font-family: var(--ui); background: var(--snap); border: 1.5px solid var(--ink); border-left: 6px solid var(--red); padding: 12px 16px; font-weight: 600; }
.link-flash input { margin: 8px 0 12px; font-size: 14px; }

.photo-pick { cursor: pointer; }
.photo-pick input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-preview { display: grid; place-items: center; aspect-ratio: 4 / 5; max-height: 380px; width: 100%; margin: 0 auto;
  background: var(--paper); border: 1.5px dashed var(--ink); overflow: hidden; }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-empty { font: 400 34px/1.1 var(--hand); padding: 24px; text-align: center; }

.mine-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.mine a { display: grid; grid-template-columns: 72px 1fr auto; gap: 16px; align-items: center; text-decoration: none;
  background: var(--snap); border: 1.5px solid var(--ink); padding: 8px; }
.mine img, .thumb-empty { width: 72px; height: 90px; object-fit: cover; }
.thumb-empty { display: grid; place-items: center; background: var(--paper); font: 600 12px var(--ui); text-align: center; }
.mine-text { display: grid; gap: 4px; font-size: 15px; }
.mine-text strong { font-size: 16px; }
.sku { font: 700 13px var(--typed); color: var(--ink-soft); }
.badge { display: inline-block; width: fit-content; font: 700 12px/1.6 var(--typed); letter-spacing: .04em; text-transform: uppercase;
  padding: 0 8px; border: 1.5px solid var(--ink); }
.b-approved { background: var(--ink); color: var(--paper); }
.b-pending { background: var(--tape); }
.b-rejected { border-color: var(--red); color: var(--red); background: #fff; }
.b-none { background: transparent; }
.danger-zone { margin-top: 16px; }

.review { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.review li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; align-items: start; }
.review img { width: 110px; aspect-ratio: 4/5; object-fit: cover; border: 1.5px solid var(--ink); }
.review div { display: grid; gap: 4px; }
.inline { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.inline .btn { min-height: 44px; font-size: 15px; }
.tbl { width: 100%; border-collapse: collapse; font: 500 15px var(--ui); }
.tbl th, .tbl td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font: 700 12px var(--typed); text-transform: uppercase; letter-spacing: .08em; }
.inline-form { grid-template-columns: 90px 1fr auto; align-items: end; margin-top: 16px; }
.lockrow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; margin-top: 24px; padding-top: 16px; border-top: 1.5px dashed var(--ink); }
.lockrow p { margin: 0; }

@media (prefers-reduced-motion: reduce) { .snap, a.snap:hover { transition: none; } }
