/* ==========================================================================
   General marketplace: browse, item detail, post a listing
   ========================================================================== */

.mk-tabs { display: flex; gap: .4rem; flex-wrap: wrap; }
.mk-tabs button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .5rem 1rem; font-family: var(--font-display); font-weight: 700; font-size: .92rem; cursor: pointer; color: var(--ink); }
.mk-tabs button[aria-pressed="true"] { background: var(--charcoal); border-color: var(--charcoal); color: var(--cream); }
.mk-tabs button span { opacity: .6; font-weight: 600; margin-left: .25rem; }
.mk-list { padding: 1.75rem 0 4rem; }
.mk-list .grid--4 .card__price { font-size: 1.1rem; }
.mk-trade { font-size: .86rem; color: var(--muted); margin: 0; }
.mk-trade b { color: var(--charcoal); }
.badge--mine { left: auto; right: .75rem; background: var(--green); color: #fff; }
.card__art img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }

/* Item detail */
.it-box { background: var(--paper); border: 2px solid var(--charcoal); border-radius: var(--radius); padding: 1.25rem; display: grid; gap: .9rem; }
.it-trade { display: grid; grid-template-columns: 1fr auto 1fr; gap: .75rem; align-items: center; }
.it-trade div { background: var(--cream); border-radius: var(--radius-sm); padding: .75rem .9rem; font-size: .9rem; }
.it-trade div small { display: block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: .15rem; }
.it-trade svg { color: var(--orange); }
@media (max-width: 520px) { .it-trade { grid-template-columns: 1fr; } .it-trade svg { justify-self: center; transform: rotate(90deg); } }
.safety { margin: 0; padding-left: 1.1rem; display: grid; gap: .35rem; font-size: .9rem; color: var(--muted); }
.composer { display: grid; gap: .6rem; }
.composer textarea { min-height: 110px; }

/* Post a listing */
.pl { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 2rem; align-items: start; padding: 1.5rem 0 4rem; }
@media (max-width: 980px) { .pl { grid-template-columns: 1fr; } }
.pl-form { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: grid; gap: 1.25rem; }
.pl-side { position: sticky; top: 92px; display: grid; gap: .75rem; }
@media (max-width: 980px) { .pl-side { position: static; } }
.photo-drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 1.25rem; text-align: center; background: var(--cream); cursor: pointer; display: grid; gap: .3rem; justify-items: center; color: var(--muted); font-size: .9rem; }
.photo-drop:hover, .photo-drop:focus-within { border-color: var(--orange); }
.photo-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-thumbs { display: flex; gap: .5rem; flex-wrap: wrap; }
.photo-thumbs figure { position: relative; margin: 0; width: 84px; height: 84px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); }
.photo-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumbs button { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(34,32,28,.75); color: #fff; cursor: pointer; line-height: 1; }
.pl-err { color: #a13a22; font-size: .9rem; margin: 0; }
