/* =========================================================
   TRC Marketplace — Main Stylesheet
   Vintage Americana color palette:
     --bg:       #0E1520   (deep navy — page background)
     --surface:  #162030   (dark navy surface)
     --card:     #1C2D40   (medium navy card)
     --border:   #284055   (navy border)
     --gold:     #C4922A   (aged brass / amber)
     --gold-lt:  #D8AB45   (lighter aged gold)
     --text:     #E8DCC8   (parchment cream)
     --muted:    #7A8FA0   (faded blue-grey)
     --green:    #4A7C55   (olive / forest green)
     --red:      #B54040   (barn red)
     --blue:     #5A8AAA   (faded denim blue)
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:      #0E1520;
    --surface: #162030;
    --card:    #1C2D40;
    --border:  #284055;
    --gold:    #C4922A;
    --gold-lt: #D8AB45;
    --text:    #E8DCC8;
    --muted:   #7A8FA0;
    --green:   #4A7C55;
    --red:     #B54040;
    --blue:    #5A8AAA;
    --radius:  6px;
    --shadow:  0 2px 12px rgba(0,0,0,.45);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 15px;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--gold-lt); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5 {
    line-height: 1.25;
    font-weight: 700;
    color: var(--text);
}

/* ── Layout ── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 860px; }
.container--wide { max-width: 1440px; }

/* ── Header ── */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 64px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.site-logo__mark {
    width: 38px;
    height: 38px;
    background: var(--gold);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 18px;
    color: #0a1018;
    letter-spacing: -.5px;
}

.site-logo__text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.site-logo__name {
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: .03em;
    text-transform: uppercase;
}

.site-logo__sub {
    font-size: 10px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: .12em;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.site-nav a {
    padding: 6px 12px;
    border-radius: var(--radius);
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    transition: color .15s, background .15s;
}

.site-nav a:hover,
.site-nav a.current-menu-item { color: var(--text); background: rgba(255,255,255,.06); }

.site-nav__divider { width: 1px; height: 20px; background: var(--border); margin: 0 8px; }

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.site-header__search {
    display: flex;
    align-items: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 0 14px;
    gap: 8px;
    height: 36px;
    width: 220px;
}

.site-header__search input {
    background: none;
    border: none;
    color: var(--text);
    font-size: 13px;
    width: 100%;
    outline: none;
}

.site-header__search input::placeholder { color: var(--muted); }

.msg-badge {
    position: relative;
    display: inline-flex;
}

.msg-badge__count {
    position: absolute;
    top: -5px;
    right: -7px;
    background: var(--red);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 99px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

.user-menu {
    position: relative;
}

.user-menu__trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 5px 12px 5px 8px;
    cursor: pointer;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    transition: border-color .15s;
}

.user-menu__trigger:hover { border-color: var(--gold); }

.user-avatar {
    width: 28px;
    height: 28px;
    background: var(--gold);
    color: #0a1018;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
}

.user-menu__dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 200px;
    box-shadow: var(--shadow);
    z-index: 200;
    overflow: hidden;
}

.user-menu:hover .user-menu__dropdown,
.user-menu.is-open .user-menu__dropdown { display: block; }

.user-menu__dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text);
    font-size: 13px;
    transition: background .15s;
}

.user-menu__dropdown a:hover { background: rgba(255,255,255,.05); color: var(--gold-lt); }
.user-menu__dropdown hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background .15s, transform .1s, opacity .15s;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}

.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn--primary { background: var(--gold); color: #0a1018; }
.btn--primary:hover { background: var(--gold-lt); color: #0a1018; }

.btn--secondary { background: var(--card); color: var(--text); border: 1px solid var(--border); }
.btn--secondary:hover { background: rgba(255,255,255,.07); color: var(--text); }

.btn--danger { background: var(--red); color: #fff; }
.btn--danger:hover { background: #f06a6a; color: #fff; }

.btn--ghost { background: transparent; color: var(--gold); border: 1px solid var(--gold); }
.btn--ghost:hover { background: rgba(196,146,42,.1); color: var(--gold-lt); }

.btn--sm { padding: 6px 12px; font-size: 12px; }
.btn--lg { padding: 12px 28px; font-size: 16px; }
.btn--full { width: 100%; }

/* ── Hero ── */
.hero {
    background: linear-gradient(135deg, #0e1520 0%, #1a2a3a 50%, #0e1520 100%);
    border-bottom: 1px solid var(--border);
    padding: 64px 0 56px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c4922a' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: .4;
}

.hero__content { position: relative; z-index: 1; max-width: 680px; }

.hero__eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 14px;
}

.hero__title {
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 900;
    line-height: 1.1;
    color: var(--text);
    margin-bottom: 16px;
}

.hero__title span { color: var(--gold); }

.hero__desc {
    font-size: 16px;
    color: var(--muted);
    margin-bottom: 28px;
    max-width: 540px;
}

.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero__stats {
    display: flex;
    gap: 32px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.hero__stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--gold);
}

.hero__stat-label { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ── Search Bar ── */
.search-bar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    position: sticky;
    top: 64px;
    z-index: 90;
}

.search-bar__form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-bar__input {
    flex: 1;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 9px 14px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color .15s;
}

.search-bar__input:focus { border-color: var(--gold); }
.search-bar__input::placeholder { color: var(--muted); }

.search-bar__select {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 9px 12px;
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    outline: none;
    min-width: 140px;
}

.search-bar__select:focus { border-color: var(--gold); }

/* ── Section headings ── */
.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    position: relative;
    padding-left: 14px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: var(--gold);
    border-radius: 2px;
}

.section-link { font-size: 13px; color: var(--gold); font-weight: 600; }
.section-link:hover { color: var(--gold-lt); }

/* ── Listing Cards Grid ── */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.listings-grid--4 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.listings-grid--featured { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

.listing-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .15s, box-shadow .15s, border-color .15s;
    display: flex;
    flex-direction: column;
}

.listing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.5);
    border-color: rgba(196,146,42,.3);
}

.listing-card--featured { border-color: rgba(196,146,42,.4); }
.listing-card--featured:hover { border-color: var(--gold); }

.listing-card__image-wrap {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    display: block;
    background: #091018;
}

.listing-card__image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.listing-card:hover .listing-card__image-wrap img { transform: scale(1.03); }

.listing-card__no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 13px;
    background: #091018;
}

.listing-card__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    padding: 3px 8px;
    border-radius: 3px;
    line-height: 1;
}

.listing-card__badge--pending { background: #f0a500; color: #000; }
.listing-card__badge--sold    { background: var(--muted); color: #000; }
.listing-card__badge--featured { background: var(--gold); color: #000; }

.listing-card__body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.listing-card__meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.listing-card__cat,
.listing-card__condition {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 2px 7px;
    border-radius: 3px;
    font-weight: 600;
}

.listing-card__cat { background: rgba(90,138,170,.15); color: var(--blue); }
.listing-card__condition { background: rgba(196,146,42,.12); color: var(--gold); }

.listing-card__title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    flex: 1;
}

.listing-card__title a { color: var(--text); }
.listing-card__title a:hover { color: var(--gold-lt); }

.listing-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.listing-card__price {
    font-size: 17px;
    font-weight: 800;
    color: var(--gold);
}

.listing-card__seller {
    font-size: 11px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.listing-card__rep {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
}

.rep--good  { background: rgba(74,124,85,.2); color: var(--green); }
.rep--fair  { background: rgba(240,165,0,.15); color: #f0a500; }
.rep--poor  { background: rgba(181,64,64,.15); color: var(--red); }

/* ── Reputation badges ── */
.trc-rep {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
}

.trc-rep--new       { background: rgba(255,255,255,.07); color: var(--muted); }
.trc-rep--excellent { background: rgba(74,124,85,.2); color: var(--green); }
.trc-rep--good      { background: rgba(74,124,85,.15); color: #6ebe7a; }
.trc-rep--fair      { background: rgba(240,165,0,.15); color: #f0a500; }
.trc-rep--poor      { background: rgba(181,64,64,.15); color: var(--red); }
.trc-rep--neutral   { background: rgba(255,255,255,.07); color: var(--muted); }

.trc-verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gold);
    color: #000;
    font-size: 9px;
    font-weight: 900;
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.trc-rep-detail { display: flex; align-items: center; gap: 12px; }
.trc-rep-score { font-size: 28px; font-weight: 900; color: var(--green); }
.trc-rep-breakdown { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.trc-rep-positive { color: var(--green); font-weight: 600; }
.trc-rep-negative { color: var(--red); font-weight: 600; }
.trc-rep-total { color: var(--muted); font-size: 11px; }

/* ── Featured strip ── */
.featured-section {
    padding: 48px 0;
    background: linear-gradient(180deg, var(--bg) 0%, var(--surface) 50%, var(--bg) 100%);
    border-bottom: 1px solid var(--border);
}

/* ── Category Pills ── */
.category-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 20px 0;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 99px;
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
}

.category-pill:hover,
.category-pill.is-active {
    background: rgba(196,146,42,.12);
    border-color: var(--gold);
    color: var(--gold);
}

.category-pill__count {
    font-size: 11px;
    background: rgba(255,255,255,.08);
    padding: 1px 6px;
    border-radius: 99px;
    color: var(--muted);
}

/* ── Browse layout ── */
.browse-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    padding: 32px 0;
}

.browse-filters {
    position: sticky;
    top: 116px;
    height: fit-content;
}

.filter-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 14px;
}

.filter-card__title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--muted);
    margin-bottom: 14px;
}

.filter-group { display: flex; flex-direction: column; gap: 8px; }

.filter-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    padding: 2px 0;
}

.filter-check input[type="checkbox"],
.filter-check input[type="radio"] { accent-color: var(--gold); width: 14px; height: 14px; cursor: pointer; }

.filter-price-row { display: flex; gap: 8px; align-items: center; }

.filter-input {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 7px 10px;
    color: var(--text);
    font-size: 13px;
    width: 100%;
    outline: none;
}

.filter-input:focus { border-color: var(--gold); }

/* ── Single Listing ── */
.single-listing { padding: 32px 0 60px; }

.single-listing__grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: start;
}

.listing-gallery { position: sticky; top: 116px; }

.listing-gallery__main {
    background: #091018;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4/3;
    margin-bottom: 10px;
    border: 1px solid var(--border);
}

.listing-gallery__main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: zoom-in;
}

.listing-gallery__thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.listing-gallery__thumb {
    width: 72px;
    height: 54px;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color .15s;
}

.listing-gallery__thumb.is-active { border-color: var(--gold); }
.listing-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }

.listing-info__header { margin-bottom: 20px; }

.listing-info__cats {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.listing-info__cat {
    font-size: 11px;
    padding: 3px 9px;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.listing-info__cat--category { background: rgba(90,138,170,.15); color: var(--blue); }
.listing-info__cat--period   { background: rgba(196,146,42,.12);  color: var(--gold); }
.listing-info__cat--origin   { background: rgba(255,255,255,.07); color: var(--muted); }

.listing-info__title {
    font-size: 26px;
    font-weight: 900;
    line-height: 1.2;
    color: var(--text);
    margin-bottom: 10px;
}

.listing-info__price { font-size: 32px; font-weight: 900; color: var(--gold); margin-bottom: 4px; }

.listing-info__fee-note {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 20px;
}

.listing-purchase-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.listing-purchase-box__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.listing-seller-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.seller-box__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.seller-box__avatar {
    width: 44px;
    height: 44px;
    background: var(--gold);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    flex-shrink: 0;
}

.seller-box__name { font-weight: 700; font-size: 15px; color: var(--text); }
.seller-box__meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

.listing-specs {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 24px 0;
}

.listing-specs__title {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
}

.listing-specs__row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 10px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.listing-specs__row:last-child { border-bottom: none; }
.listing-specs__label { color: var(--muted); }
.listing-specs__value { color: var(--text); font-weight: 500; }

.listing-description {
    font-size: 14px;
    line-height: 1.75;
    color: #c8cebc;
}

.listing-description h3 { font-size: 16px; margin: 16px 0 8px; color: var(--text); }

/* ── Messaging ── */
.messaging-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0;
    height: calc(100vh - 200px);
    min-height: 500px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.message-threads {
    border-right: 1px solid var(--border);
    overflow-y: auto;
    background: var(--surface);
}

.message-thread-item {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background .15s;
}

.message-thread-item:hover { background: rgba(255,255,255,.04); }
.message-thread-item.is-active { background: rgba(196,146,42,.08); border-left: 3px solid var(--gold); }

.thread-item__name { font-weight: 600; font-size: 13px; color: var(--text); }
.thread-item__listing { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-item__preview { font-size: 12px; color: var(--muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-item__time { font-size: 11px; color: var(--muted); }

.thread-unread { font-weight: 700; }

.thread-badge {
    background: var(--gold);
    color: #000;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 99px;
}

.message-pane {
    display: flex;
    flex-direction: column;
}

.message-pane__header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--card);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.message-pane__title { font-weight: 700; font-size: 14px; }
.message-pane__subtitle { font-size: 12px; color: var(--muted); margin-top: 2px; }

.message-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.message-bubble {
    display: flex;
    gap: 10px;
    max-width: 75%;
}

.message-bubble--sent { align-self: flex-end; flex-direction: row-reverse; }
.message-bubble--received { align-self: flex-start; }

.message-bubble__avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    color: var(--text);
}

.message-bubble--sent .message-bubble__avatar { background: var(--gold); color: #000; }

.message-bubble__content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.55;
}

.message-bubble--sent .message-bubble__content {
    background: rgba(196,146,42,.12);
    border-color: rgba(196,146,42,.25);
}

.message-bubble__meta { font-size: 10px; color: var(--muted); margin-top: 4px; }

.message-compose {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.message-compose__form { display: flex; gap: 10px; }

.message-compose__input {
    flex: 1;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    color: var(--text);
    font-size: 13px;
    resize: none;
    outline: none;
    min-height: 42px;
    max-height: 120px;
    font-family: inherit;
    transition: border-color .15s;
}

.message-compose__input:focus { border-color: var(--gold); }
.message-compose__input::placeholder { color: var(--muted); }

/* ── Forms ── */
.form-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
}

.form-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--gold);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group--full { grid-column: span 2; }

.form-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
}

.form-label--required::after { content: ' *'; color: var(--red); }

.form-control {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color .15s;
    font-family: inherit;
    width: 100%;
}

.form-control:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(196,146,42,.1); }
.form-control::placeholder { color: var(--muted); }

textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; }

.form-hint { font-size: 11px; color: var(--muted); margin-top: 3px; }
.form-error { font-size: 12px; color: var(--red); }

/* ── Dashboard ── */
.dashboard-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    padding: 32px 0;
}

.dashboard-sidebar { position: sticky; top: 116px; height: fit-content; }

.dashboard-nav {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.dashboard-nav__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    border-bottom: 1px solid var(--border);
    transition: background .15s, color .15s;
    cursor: pointer;
    text-decoration: none;
}

.dashboard-nav__item:last-child { border-bottom: none; }
.dashboard-nav__item:hover { background: rgba(255,255,255,.04); color: var(--text); }
.dashboard-nav__item.is-active { background: rgba(196,146,42,.1); color: var(--gold); border-left: 3px solid var(--gold); }

.dashboard-nav__icon { width: 16px; text-align: center; }

.dashboard-main { min-height: 400px; }

.dash-panel { display: none; }
.dash-panel.is-active { display: block; }

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
}

.stat-card__value { font-size: 24px; font-weight: 800; color: var(--gold); }
.stat-card__label { font-size: 12px; color: var(--muted); margin-top: 4px; }

.listing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.listing-table th {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    font-weight: 600;
}

.listing-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.listing-table tr:last-child td { border-bottom: none; }
.listing-table tr:hover td { background: rgba(255,255,255,.02); }

.status-pill {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 2px 8px;
    border-radius: 3px;
}

.status-pill--active  { background: rgba(74,124,85,.2); color: var(--green); }
.status-pill--pending { background: rgba(240,165,0,.2); color: #f0a500; }
.status-pill--sold    { background: rgba(255,255,255,.07); color: var(--muted); }
.status-pill--draft   { background: rgba(255,255,255,.05); color: #555; }

/* ── Rating modal ── */
.rating-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}

.rating-modal-overlay.is-open { opacity: 1; pointer-events: all; }

.rating-modal {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    max-width: 480px;
    width: 90%;
    box-shadow: var(--shadow);
}

.rating-modal__title { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.rating-modal__sub   { font-size: 13px; color: var(--muted); margin-bottom: 20px; }

.rating-choice {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

.rating-btn {
    flex: 1;
    padding: 14px;
    border-radius: var(--radius);
    border: 2px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    text-align: center;
    transition: all .15s;
}

.rating-btn.is-positive:hover,
.rating-btn.is-positive.is-selected { border-color: var(--green); background: rgba(74,124,85,.1); }

.rating-btn.is-negative:hover,
.rating-btn.is-negative.is-selected { border-color: var(--red); background: rgba(181,64,64,.1); }

.rating-btn__icon { font-size: 28px; line-height: 1; margin-bottom: 6px; }
.rating-btn__label { font-size: 13px; font-weight: 700; color: var(--text); }

/* ── Profile page ── */
.profile-header {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gold);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    flex-shrink: 0;
}

.profile-header__info { flex: 1; }
.profile-header__name { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.profile-header__meta { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.profile-header__stats { display: flex; gap: 24px; }
.profile-header__stat-val { font-size: 20px; font-weight: 800; color: var(--gold); }
.profile-header__stat-lbl { font-size: 11px; color: var(--muted); }

/* ── Alerts & notices ── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert--success { background: rgba(74,124,85,.15); border: 1px solid rgba(74,124,85,.3); color: var(--green); }
.alert--error   { background: rgba(181,64,64,.15);  border: 1px solid rgba(181,64,64,.3);  color: var(--red); }
.alert--warning { background: rgba(240,165,0,.12);  border: 1px solid rgba(240,165,0,.25); color: #f0a500; }
.alert--info    { background: rgba(90,138,170,.12); border: 1px solid rgba(90,138,170,.3); color: var(--blue); }

/* ── Breadcrumbs ── */
.breadcrumbs {
    font-size: 12px;
    color: var(--muted);
    padding: 10px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--gold); }
.breadcrumbs span { color: var(--border); }
.breadcrumbs span:last-child { color: var(--muted); }

/* ── Footer ── */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 48px 0 24px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 36px;
}

.footer-brand__desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
    margin: 12px 0 16px;
    max-width: 280px;
}

.footer-col__title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 14px;
}

.footer-col__links { display: flex; flex-direction: column; gap: 8px; }
.footer-col__links a { font-size: 13px; color: var(--muted); transition: color .15s; }
.footer-col__links a:hover { color: var(--gold); }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--muted);
}

.footer-disclaimer {
    background: rgba(181,64,64,.08);
    border: 1px solid rgba(181,64,64,.15);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 12px;
    color: var(--muted);
    margin-top: 16px;
    line-height: 1.5;
}

/* ── Modals ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}

.modal-overlay.is-open { opacity: 1; pointer-events: all; }

.modal {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    max-width: 520px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
    transform: scale(.96);
    transition: transform .2s;
}

.modal-overlay.is-open .modal { transform: scale(1); }

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.modal__title { font-size: 18px; font-weight: 800; }
.modal__close { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 20px; line-height: 1; padding: 4px; }
.modal__close:hover { color: var(--text); }

/* ── Pagination ── */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 32px 0;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    transition: all .15s;
}

.pagination a:hover { border-color: var(--gold); color: var(--gold); }
.pagination .current { background: var(--gold); border-color: var(--gold); color: #000; }

/* ── Empty states ── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}

.empty-state__icon { font-size: 40px; margin-bottom: 14px; opacity: .4; }
.empty-state__title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.empty-state__text  { font-size: 13px; }

/* ── Loading ── */
.loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin .6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Misc ── */
.divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.text-muted { color: var(--muted); }
.text-gold { color: var(--gold); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* ── Section spacing ── */
.page-section { padding: 40px 0; }
.page-section + .page-section { border-top: 1px solid var(--border); }

/* ── Trust banner ── */
.trust-banner {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
}

.trust-items {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    font-size: 12px;
    color: var(--muted);
}

.trust-item { display: flex; align-items: center; gap: 6px; }
.trust-item strong { color: var(--gold); }

/* ── Compact Listing List ── */
.listing-list {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.listing-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 7px 16px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    transition: background .12s;
    min-height: 46px;
}

.listing-row:last-child { border-bottom: none; }
.listing-row:hover { background: rgba(255,255,255,.04); }

.listing-row__thumb {
    width: 32px;
    height: 32px;
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
    background: #091018;
    display: flex;
    align-items: center;
    justify-content: center;
}

.listing-row__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.listing-row__no-thumb { color: var(--border); font-size: 13px; line-height: 1; }

.listing-row__title {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.listing-row:hover .listing-row__title { color: var(--gold-lt); }

.listing-row__meta {
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
    width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

.listing-row__price {
    font-size: 13px;
    font-weight: 700;
    color: var(--gold);
    white-space: nowrap;
    width: 110px;
    text-align: right;
    flex-shrink: 0;
}

.listing-row__price-type {
    font-size: 10px;
    font-weight: 400;
    color: var(--muted);
    margin-left: 3px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.listing-row__seller {
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
    width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
    text-align: right;
}

.listing-row__date {
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
    width: 36px;
    text-align: right;
    flex-shrink: 0;
}

/* ── Seller Cards Grid ── */
.seller-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.seller-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-decoration: none;
    transition: border-color .15s, background .15s;
}

.seller-card:hover {
    border-color: var(--gold);
    background: rgba(196,146,42,.04);
}

.seller-card__avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.seller-card__avatar {
    width: 44px;
    height: 44px;
    font-size: 16px;
}

.seller-card__verified {
    position: absolute;
    bottom: -2px;
    right: -2px;
}

.seller-card__info { min-width: 0; flex: 1; }

.seller-card__name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;
}

.seller-card__badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.seller-card__count {
    font-size: 11px;
    color: var(--muted);
}

.seller-card__location {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .browse-layout { grid-template-columns: 1fr; }
    .browse-filters { position: static; }
    .single-listing__grid { grid-template-columns: 1fr; }
    .listing-gallery { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
    .stats-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .hero { padding: 40px 0 36px; }
    .hero__stats { gap: 20px; flex-wrap: wrap; }
    .site-header__search { display: none; }
    .dashboard-layout { grid-template-columns: 1fr; }
    .dashboard-sidebar { position: static; }
    .messaging-layout { grid-template-columns: 1fr; height: auto; }
    .message-threads { max-height: 200px; border-right: none; border-bottom: 1px solid var(--border); }
    .form-grid { grid-template-columns: 1fr; }
    .form-group--full { grid-column: span 1; }
    .footer-grid { grid-template-columns: 1fr; }
    .listings-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .trust-items { gap: 16px; flex-wrap: wrap; justify-content: flex-start; }
    .listing-row__meta,
    .listing-row__seller { display: none; }
    .listing-row__price { width: auto; }
    .listing-row__date { display: none; }
    .seller-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .seller-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .container { padding: 0 14px; }
    .hero__actions { flex-direction: column; }
    .search-bar__form { flex-wrap: wrap; }
    .site-nav a { padding: 6px 8px; font-size: 13px; }
}
