/* ============================================================
   SELLVO — Design system
   ============================================================ */

:root {
  --brand:        #0f6fff;
  --brand-dark:   #0b52c0;
  --brand-soft:   #e8f1ff;
  --ink:          #0d1220;
  --ink-2:        #3d4658;
  --ink-3:        #6b7488;
  --line:         #e4e8f0;
  --line-soft:    #f0f3f8;
  --surface:      #ffffff;
  --canvas:       #f6f8fc;
  --ok:           #0f9d58;
  --ok-soft:      #e6f7ee;
  --warn:         #f59e0b;
  --warn-soft:    #fff5e1;
  --bad:          #e5484d;
  --bad-soft:     #fdecec;
  --violet:       #7c5cff;

  --r-sm: 8px;
  --r:    12px;
  --r-lg: 18px;
  --r-xl: 26px;

  --sh-1: 0 1px 2px rgba(16, 24, 40, .05);
  --sh-2: 0 4px 14px rgba(16, 24, 40, .07);
  --sh-3: 0 14px 40px rgba(16, 24, 40, .12);

  --header-h: 68px;
  --max: 1280px;
}

[data-theme='dark'] {
  --ink: #eef2f9;
  --ink-2: #b3bccd;
  --ink-3: #808b9f;
  --line: #232b3b;
  --line-soft: #1a2130;
  --surface: #141a26;
  --canvas: #0c1119;
  --brand-soft: #16233c;
  --ok-soft: #102a1d;
  --warn-soft: #2c2313;
  --bad-soft: #2e1618;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .4);
  --sh-2: 0 4px 14px rgba(0, 0, 0, .45);
  --sh-3: 0 14px 40px rgba(0, 0, 0, .55);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.hide { display: none !important; }
.muted { color: var(--ink-3); }
.small { font-size: .82rem; }
.tiny { font-size: .74rem; }
.bold { font-weight: 700; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: .6rem; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.col { display: flex; flex-direction: column; }
.grow { flex: 1; }
.wrapflex { flex-wrap: wrap; }
.mt1 { margin-top: .5rem; } .mt2 { margin-top: 1rem; } .mt3 { margin-top: 1.5rem; } .mt4 { margin-top: 2.5rem; }
.mb1 { margin-bottom: .5rem; } .mb2 { margin-bottom: 1rem; } .mb3 { margin-bottom: 1.5rem; } .mb4 { margin-bottom: 2.5rem; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .62rem 1.05rem; border-radius: var(--r); border: 1px solid transparent;
  background: var(--brand); color: #fff; font-weight: 650; font-size: .9rem;
  cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--brand-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--line-soft); }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-soft:hover { background: var(--brand-soft); filter: brightness(.96); }
.btn-ok { background: var(--ok); } .btn-ok:hover { filter: brightness(.93); background: var(--ok); }
.btn-bad { background: var(--bad); } .btn-bad:hover { filter: brightness(.93); background: var(--bad); }
.btn-warn { background: var(--warn); color: #3a2a00; }
.btn-sm { padding: .38rem .7rem; font-size: .8rem; border-radius: var(--r-sm); }
.btn-lg { padding: .85rem 1.5rem; font-size: 1rem; border-radius: var(--r-lg); }
.btn-block { width: 100%; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: transparent; border: 1px solid transparent; cursor: pointer; position: relative;
}
.icon-btn:hover { background: var(--line-soft); }

/* ---------- Form controls ---------- */
.field { display: flex; flex-direction: column; gap: .3rem; }
.field > label { font-size: .8rem; font-weight: 650; color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%; padding: .62rem .8rem; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.textarea { min-height: 110px; resize: vertical; font-family: inherit; }
.check { display: flex; align-items: center; gap: .5rem; cursor: pointer; font-size: .88rem; }
.check input { width: 17px; height: 17px; accent-color: var(--brand); }
.hint { font-size: .75rem; color: var(--ink-3); }
.err-text { font-size: .8rem; color: var(--bad); }

/* ---------- Cards / surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.pad { padding: 1.15rem; }
.pad-lg { padding: 1.75rem; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .55rem;
  border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .01em;
  background: var(--line-soft); color: var(--ink-2);
}
.badge-brand { background: var(--brand-soft); color: var(--brand); }
.badge-ok    { background: var(--ok-soft);   color: var(--ok); }
.badge-warn  { background: var(--warn-soft); color: #92600b; }
.badge-bad   { background: var(--bad-soft);  color: var(--bad); }
.badge-violet{ background: #f0ecff; color: var(--violet); }

/* ============================================================
   Header
   ============================================================ */
.hdr {
  position: -webkit-sticky; position: sticky; top: 0; z-index: 60; background: var(--surface);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  backdrop-filter: saturate(180%) blur(8px);
}
.hdr-in { height: var(--header-h); display: flex; align-items: center; gap: 1rem; }
.logo { display: flex; align-items: center; gap: .5rem; font-weight: 850; font-size: 1.25rem; letter-spacing: -.02em; }
/* The SVG carries its own gradient plate, so no background here. */
.logo-mark { width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; display: block; }
.searchbar {
  flex: 1; display: flex; align-items: center; gap: .4rem; max-width: 620px;
  background: var(--canvas); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .3rem .3rem .9rem;
}
.searchbar input { flex: 1; border: none; background: transparent; outline: none; font-size: .92rem; }
.searchbar select { border: none; background: transparent; outline: none; font-size: .82rem; color: var(--ink-3); max-width: 150px; }
.hdr-actions { display: flex; align-items: center; gap: .35rem; margin-left: auto; }
.dot {
  position: absolute; top: 6px; right: 6px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: var(--bad); color: #fff; font-size: .62rem; font-weight: 800;
  display: grid; place-items: center;
}
.lang-toggle { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-toggle button { padding: .28rem .6rem; background: transparent; border: none; cursor: pointer; font-size: .74rem; font-weight: 700; color: var(--ink-3); }
.lang-toggle button.on { background: var(--brand); color: #fff; }

/* Category strip — horizontal scroller. On desktop the left rail does this
   job, so the strip only appears once the rail is hidden. */
.catstrip { border-bottom: 1px solid var(--line); background: var(--surface); }
@media (min-width: 1025px) { .catstrip-mobile { display: none; } }
.catstrip-wrap {
  max-width: var(--max); margin: 0 auto; padding: 0 20px;
  position: relative; display: flex; align-items: center;
}
.catstrip-scroll {
  display: flex; gap: .25rem; padding: .5rem 0;
  overflow-x: auto; scroll-behavior: smooth;
  scrollbar-width: none; -ms-overflow-style: none; flex: 1; min-width: 0;
}
.catstrip-scroll::-webkit-scrollbar { display: none; }

/* fade hints, toggled by JS via .can-left / .can-right */
.catstrip-wrap::before, .catstrip-wrap::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 52px;
  pointer-events: none; opacity: 0; transition: opacity .18s ease; z-index: 1;
}
.catstrip-wrap::before { left: 20px;  background: linear-gradient(90deg, var(--surface), transparent); }
.catstrip-wrap::after  { right: 20px; background: linear-gradient(270deg, var(--surface), transparent); }
.catstrip-wrap.can-left::before  { opacity: 1; }
.catstrip-wrap.can-right::after  { opacity: 1; }

.catstrip-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%; z-index: 2;
  display: none; place-items: center; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--sh-2); color: var(--ink-2); font-size: 1rem; line-height: 1;
}
.catstrip-nav:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.catstrip-nav.left  { left: 6px; }
.catstrip-nav.right { right: 6px; }
.catstrip-wrap.can-left  .catstrip-nav.left  { display: grid; }
.catstrip-wrap.can-right .catstrip-nav.right { display: grid; }

.catchip {
  display: flex; align-items: center; gap: .35rem; padding: .4rem .75rem; border-radius: 999px;
  font-size: .84rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; cursor: pointer;
  border: 1px solid transparent; background: transparent;
}
.catchip:hover { background: var(--line-soft); }
.catchip.on { background: var(--brand); color: #fff; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  background: linear-gradient(140deg, #0b2a5c 0%, #0f6fff 55%, #7c5cff 100%);
  color: #fff; padding: 3.2rem 0 3.6rem; position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: radial-gradient(700px 320px at 78% 12%, rgba(255,255,255,.16), transparent 65%);
}
.hero-in { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); font-weight: 850; letter-spacing: -.03em; line-height: 1.12; max-width: 720px; }
.hero p { margin-top: .8rem; font-size: 1.02rem; opacity: .9; max-width: 580px; }
.hero-stats { display: flex; gap: 2.2rem; margin-top: 2rem; flex-wrap: wrap; }
.hero-stat b { display: block; font-size: 1.5rem; font-weight: 850; }
.hero-stat span { font-size: .8rem; opacity: .82; }
.hero-cta { display: flex; gap: .7rem; margin-top: 1.6rem; flex-wrap: wrap; }
.hero .btn-ghost { border-color: rgba(255,255,255,.4); color: #fff; }
.hero .btn-ghost:hover { background: rgba(255,255,255,.14); }

/* Trust strip */
.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: -1.7rem; position: relative; z-index: 2; }
.trust-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1rem 1.1rem; box-shadow: var(--sh-2); display: flex; gap: .8rem; align-items: flex-start; }
.trust-item .ic { font-size: 1.4rem; }
.trust-item b { display: block; font-size: .88rem; }
.trust-item span { font-size: .77rem; color: var(--ink-3); }

/* Category tiles */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; }
.cat-tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.1rem .9rem; text-align: center; cursor: pointer; transition: all .16s ease;
}
.cat-tile:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--brand); }
.cat-tile .ic { font-size: 1.8rem; }
.cat-tile b { display: block; font-size: .84rem; margin-top: .45rem; }
.cat-tile span { font-size: .72rem; color: var(--ink-3); }

/* ============================================================
   Dynamic module layouts
   ============================================================ */
.mod { margin-bottom: 2.4rem; }
.mod-hd { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; flex-wrap: wrap; }
.mod-hd h2 { font-size: 1.22rem; font-weight: 820; letter-spacing: -.02em; display: flex; align-items: center; gap: .45rem; }
.mod-hd .sub { font-size: .82rem; color: var(--ink-3); margin-top: .1rem; }
.mod-accent { width: 4px; align-self: stretch; border-radius: 4px; background: var(--brand); }

/* horizontal_scroll — swipeable on touch, arrow-driven on desktop.
   A hidden scrollbar is fine on a trackpad and useless with a mouse, so
   desktop gets explicit controls and edge fades. */
.mod-rail { position: relative; min-width: 0; }
.mod-rail-nav {
  position: absolute; top: 34%; transform: translateY(-50%); z-index: 3;
  width: 38px; height: 38px; border-radius: 50%; display: none; place-items: center;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-2);
  cursor: pointer; font-size: 1.15rem; color: var(--ink-2); line-height: 1;
}
.mod-rail-nav:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.mod-rail-nav.left { left: -14px; }
.mod-rail-nav.right { right: -14px; }
.mod-rail.can-left .mod-rail-nav.left { display: grid; }
.mod-rail.can-right .mod-rail-nav.right { display: grid; }

.mod-rail::before, .mod-rail::after {
  content: ''; position: absolute; top: 0; bottom: 10px; width: 44px;
  pointer-events: none; opacity: 0; transition: opacity .18s ease; z-index: 2;
}
.mod-rail::before { left: 0;  background: linear-gradient(90deg, var(--canvas), transparent); }
.mod-rail::after  { right: 0; background: linear-gradient(270deg, var(--canvas), transparent); }
.mod-rail.can-left::before  { opacity: 1; }
.mod-rail.can-right::after  { opacity: 1; }

.mod-scroll {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(160px, 200px);
  gap: 1rem; overflow-x: auto; padding-bottom: .5rem;
  scroll-snap-type: x proximity; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.mod-scroll::-webkit-scrollbar { display: none; }
.mod-scroll > * { scroll-snap-align: start; }

/* grid_2col / grid_3col describe DENSITY, not a fixed division of the
   container. A hard repeat(3, 1fr) on a 1300px column produces 430px-wide
   cards — enormous once they're 3:4 portrait. auto-fill with a minmax cap
   keeps cards a sane size and simply adds columns on wider screens.
   grid_2col = larger, more prominent cards; grid_3col = standard density. */
.mod-grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.mod-grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 1rem; }

/* hero_banner */
.mod-hero {
  position: relative; border-radius: var(--r-xl); overflow: hidden;
  background: linear-gradient(120deg, var(--brand), var(--violet));
  color: #fff; padding: 2rem 2.2rem; min-height: 190px;
  display: flex; flex-direction: column; justify-content: center;
}
.mod-hero.has-img::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(90deg, rgba(10,15,28,.82), rgba(10,15,28,.25));
}
.mod-hero > * { position: relative; z-index: 1; }
.mod-hero h2 { font-size: clamp(1.3rem, 3vw, 2rem); font-weight: 850; letter-spacing: -.02em; }
.mod-hero p { opacity: .9; margin-top: .4rem; max-width: 460px; }
.mod-hero-bg { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }

/* Card extras introduced by the module system */
.lst-seller { display: flex; align-items: center; gap: .35rem; font-size: .72rem; color: var(--ink-3); }
.lst-seller img, .lst-seller .avatar { width: 18px; height: 18px; font-size: .55rem; }
.lst-cond {
  position: absolute; bottom: .5rem; left: .5rem;
  background: rgba(255,255,255,.94); color: var(--ink-2);
  padding: .12rem .4rem; border-radius: 5px; font-size: .64rem; font-weight: 750;
}
.tag-chip {
  display: inline-block; padding: .1rem .38rem; border-radius: 4px;
  font-size: .62rem; font-weight: 750; background: var(--line-soft); color: var(--ink-3);
}
.match-why { font-size: .62rem; color: var(--ok); font-weight: 700; }

/* ============================================================
   Sidebar shell — persistent category rail
   ============================================================ */
/* minmax(0, 1fr) rather than 1fr: a plain fr track has min-width:auto and
   refuses to shrink below its content, so a wide scroll rail inside would
   push the column past the viewport instead of scrolling within it. */
.shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); gap: 1.6rem; align-items: start; }
.shell > * { min-width: 0; }
.railcol { position: -webkit-sticky; position: sticky; top: calc(var(--header-h) + 14px); }
.rail {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto;
}
.rail h4 {
  font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-3); padding: .9rem 1rem .45rem;
}
.rail-item {
  display: flex; align-items: center; gap: .55rem; width: 100%;
  padding: .5rem 1rem; background: transparent; border: none; cursor: pointer;
  font-size: .855rem; color: var(--ink-2); text-align: left; border-left: 3px solid transparent;
}
.rail-item:hover { background: var(--canvas); color: var(--ink); }
.rail-item.on { background: var(--brand-soft); color: var(--brand); font-weight: 700; border-left-color: var(--brand); }
.rail-item .ic { width: 20px; text-align: center; font-size: .98rem; flex-shrink: 0; }
.rail-item .n { margin-left: auto; font-size: .7rem; color: var(--ink-3); font-weight: 600; }
.rail-item.sub { padding-left: 2.6rem; font-size: .8rem; }
.rail-hero { font-weight: 750; color: var(--ink); padding-top: .8rem; padding-bottom: .8rem; }
.rail-hero:hover { background: linear-gradient(90deg, #fff2ec, transparent); }
.rail-live {
  margin-left: auto; font-size: .58rem; font-weight: 900; letter-spacing: .06em;
  background: linear-gradient(135deg, #ff6a3d, #ff2d78); color: #fff;
  padding: .1rem .35rem; border-radius: 4px;
}
.rail-sep { height: 1px; background: var(--line); margin: .5rem 0; }
.rail-cta { padding: .8rem 1rem 1rem; }

/* ============================================================
   Auctions
   ============================================================ */
.auc-badge {
  display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .5rem;
  border-radius: 999px; font-size: .68rem; font-weight: 800; letter-spacing: .02em;
  background: linear-gradient(135deg, #ff6a3d, #ff2d78); color: #fff;
}
.auc-panel { border: 2px solid var(--brand); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.auc-head {
  background: linear-gradient(135deg, var(--brand) 0%, var(--violet) 100%);
  color: #fff; padding: 1rem 1.15rem;
}
.auc-price { font-size: 2.1rem; font-weight: 900; letter-spacing: -.03em; line-height: 1.1; }
.auc-clock {
  display: flex; gap: .35rem; margin-top: .6rem;
}
.auc-unit {
  background: rgba(255,255,255,.18); border-radius: 8px; padding: .3rem .5rem;
  min-width: 46px; text-align: center;
}
.auc-unit b { display: block; font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.auc-unit span { font-size: .6rem; opacity: .85; text-transform: uppercase; letter-spacing: .05em; }
.auc-urgent .auc-unit { background: rgba(255,60,80,.4); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

.auc-reserve {
  display: flex; align-items: center; gap: .4rem; font-size: .78rem;
  padding: .5rem .8rem; border-radius: var(--r); font-weight: 650;
}
.auc-reserve.met     { background: var(--ok-soft); color: var(--ok); }
.auc-reserve.not-met { background: var(--warn-soft); color: #92600b; }

.auc-status { padding: .55rem .8rem; border-radius: var(--r); font-size: .82rem; font-weight: 700; text-align: center; }
.auc-status.lead   { background: var(--ok-soft); color: var(--ok); }
.auc-status.outbid { background: var(--bad-soft); color: var(--bad); }
.auc-status.won    { background: linear-gradient(135deg,#ffd66b,#ffb020); color: #5c3d00; }

.bidrow {
  display: flex; align-items: center; gap: .6rem; padding: .5rem 0;
  border-bottom: 1px solid var(--line-soft); font-size: .82rem;
}
.bidrow:last-child { border-bottom: none; }
.bidrow.mine { background: var(--brand-soft); margin: 0 -.5rem; padding: .5rem; border-radius: var(--r-sm); }

.auc-card-strip {
  position: absolute; bottom: 0; left: 0; right: 0; padding: .35rem .6rem;
  background: linear-gradient(transparent, rgba(0,0,0,.78)); color: #fff;
  display: flex; align-items: center; justify-content: space-between; font-size: .72rem; font-weight: 700;
}

/* Wallet */
.wallet-hero {
  background: linear-gradient(135deg, #0b2a5c, #0f6fff 60%, #7c5cff);
  color: #fff; border-radius: var(--r-xl); padding: 1.6rem 1.7rem;
}
.wallet-hero .amt { font-size: 2.4rem; font-weight: 900; letter-spacing: -.03em; }
.tx-row { display: flex; align-items: center; gap: .7rem; padding: .65rem 0; border-bottom: 1px solid var(--line-soft); }
.tx-row:last-child { border-bottom: none; }
.tx-amt { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; }
.tx-amt.pos { color: var(--ok); }
.tx-amt.neg { color: var(--bad); }

/* ============================================================
   Listing grid
   ============================================================ */
/* Portrait cards are taller, so they want a narrower column. */
.lst-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.lst-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; cursor: pointer; transition: all .16s ease; display: flex; flex-direction: column;
  min-width: 0; /* grid items default to min-width:auto, which lets wide images blow out the track */
}
.lst-card:hover { transform: translateY(-4px); box-shadow: var(--sh-3); border-color: transparent; }
/* 3:4 PORTRAIT — the product-card standard.
   Phones shoot portrait by default, so this is the shape sellers actually
   upload. 4/3 = 133.333% padding. Padding-ratio rather than aspect-ratio
   because Safari support for the latter is unreliable. */
.lst-img { position: relative; background: var(--line-soft); overflow: hidden; }
.lst-img::before { content: ''; display: block; padding-top: 133.333%; }
.lst-img img {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform .35s ease;
}
.lst-card:hover .lst-img img { transform: scale(1.05); }
.lst-tags { position: absolute; top: .6rem; left: .6rem; display: flex; gap: .3rem; flex-wrap: wrap; }
.lst-fav {
  position: absolute; top: .5rem; right: .5rem; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.94); border: none; cursor: pointer; display: grid; place-items: center;
  font-size: 1rem; box-shadow: var(--sh-1);
}
.lst-fav.on { color: var(--bad); }
.lst-body { padding: .7rem .75rem .85rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; min-width: 0; }

/* Price and its qualifier sit on one baseline. The qualifier is kept as an
   unbreakable unit so "Συζητήσιμη τιμή" wraps whole rather than splitting
   across two lines mid-phrase. */
.lst-price {
  font-size: 1.08rem; font-weight: 850; letter-spacing: -.02em;
  display: flex; align-items: baseline; gap: .25rem; flex-wrap: wrap; line-height: 1.25;
}
.lst-price .qual { white-space: nowrap; font-size: .68rem; font-weight: 500; color: var(--ink-3); }

.lst-title { font-size: .82rem; font-weight: 600; color: var(--ink-2); line-height: 1.32; }

.lst-meta {
  display: flex; align-items: center; gap: .3rem; font-size: .7rem;
  color: var(--ink-3); margin-top: auto; padding-top: .4rem; min-width: 0;
}
/* Location gets whatever space is left; the timestamp never truncates. */
.lst-meta .loc { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lst-meta .when { flex: 0 0 auto; white-space: nowrap; }

/* Filters sidebar */
.browse { display: grid; grid-template-columns: 258px 1fr; gap: 1.6rem; align-items: start; }
.filters { position: sticky; top: calc(var(--header-h) + 12px); }
.fgroup { border-bottom: 1px solid var(--line); padding: .95rem 0; }
.fgroup:last-child { border-bottom: none; }
.fgroup > h4 { font-size: .78rem; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); margin-bottom: .6rem; }
.fopts { display: flex; flex-direction: column; gap: .38rem; max-height: 260px; overflow-y: auto; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }

/* ============================================================
   Listing detail
   ============================================================ */
.detail { display: grid; grid-template-columns: 1fr 370px; gap: 1.8rem; align-items: start; }
.gallery { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.gallery-main { position: relative; background: var(--line-soft); }
.gallery-main::before { content: ''; display: block; padding-top: 75%; }
.gallery-main img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: .5rem; padding: .7rem; overflow-x: auto; }
.gallery-thumbs img { width: 68px; height: 54px; object-fit: cover; border-radius: var(--r-sm); cursor: pointer; border: 2px solid transparent; }
.gallery-thumbs img.on { border-color: var(--brand); }

/* Gallery variants the admin can pick between */
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px; }
.gal-grid img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.gal-stack { display: flex; flex-direction: column; gap: 2px; }
.gal-stack img { width: 100%; object-fit: cover; }
.gal-count {
  position: absolute; bottom: .6rem; right: .6rem; z-index: 2;
  background: rgba(0,0,0,.65); color: #fff; padding: .15rem .5rem;
  border-radius: 999px; font-size: .7rem; font-weight: 700;
}
.aside-sticky { position: -webkit-sticky; position: sticky; top: calc(var(--header-h) + 14px); }
@media (max-width: 1024px) { .aside-sticky { position: static; } }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .7rem; }
.spec { background: var(--canvas); border-radius: var(--r); padding: .6rem .75rem; }
.spec b { display: block; font-size: .85rem; }
.spec span { font-size: .72rem; color: var(--ink-3); }
.seller-box { display: flex; gap: .8rem; align-items: center; }
.avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: var(--brand-soft); display: grid; place-items: center; font-weight: 800; color: var(--brand); flex-shrink: 0; }
.avatar-sm { width: 32px; height: 32px; font-size: .78rem; }
.avatar-lg { width: 76px; height: 76px; font-size: 1.5rem; }

/* ============================================================
   Modals / drawers
   ============================================================ */
.overlay {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(10, 15, 28, .55);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  z-index: 200; display: flex; align-items: center; justify-content: center; padding: 1.2rem;
  animation: fade .16s ease;
}
@keyframes fade { from { opacity: 0; } }
@keyframes slideUp { from { transform: translateY(22px); opacity: 0; } }
@keyframes slideIn { from { transform: translateX(100%); } }
.modal {
  background: var(--surface); border-radius: var(--r-xl); width: 100%; max-width: 560px;
  max-height: 92vh; overflow-y: auto; box-shadow: var(--sh-3); animation: slideUp .2s ease;
}
.modal-lg { max-width: 900px; }
.modal-hd { padding: 1.2rem 1.4rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: var(--surface); z-index: 2; }
.modal-bd { padding: 1.4rem; display: flex; flex-direction: column; gap: 1rem; }
.modal-ft { padding: 1rem 1.4rem; border-top: 1px solid var(--line); display: flex; gap: .6rem; justify-content: flex-end; position: sticky; bottom: 0; background: var(--surface); }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%);
  background: var(--surface); border-left: 1px solid var(--line); z-index: 210;
  display: flex; flex-direction: column; box-shadow: var(--sh-3); animation: slideIn .2s ease;
}

/* Chat */
.chat-list { flex: 1; overflow-y: auto; }
.chat-item { padding: .8rem 1rem; border-bottom: 1px solid var(--line-soft); cursor: pointer; display: flex; gap: .7rem; }
.chat-item:hover { background: var(--canvas); }
.chat-item.on { background: var(--brand-soft); }
.bubbles { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .55rem; background: var(--canvas); }
.bubble { max-width: 78%; padding: .55rem .8rem; border-radius: 16px; font-size: .87rem; line-height: 1.45; }
.bubble.them { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 5px; align-self: flex-start; }
.bubble.me { background: var(--brand); color: #fff; border-bottom-right-radius: 5px; align-self: flex-end; }
.bubble.sys { background: var(--warn-soft); color: #7a5200; align-self: center; font-size: .78rem; text-align: center; border-radius: 999px; }
.chat-input { display: flex; gap: .5rem; padding: .8rem; border-top: 1px solid var(--line); }

/* Steps (post ad wizard) */
.steps { display: flex; gap: .4rem; margin-bottom: 1.2rem; }
.step { flex: 1; height: 4px; border-radius: 999px; background: var(--line); }
.step.on { background: var(--brand); }
.imgpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .6rem; }
.imgpick-cell { border-radius: var(--r); overflow: hidden; position: relative; border: 1px solid var(--line); }
.imgpick-cell::before { content: ''; display: block; padding-top: 100%; }
.imgpick-cell img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.imgpick-cell button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; border: none; cursor: pointer; font-size: .7rem; z-index: 2; }
.imgpick-add { min-height: 96px; border: 2px dashed var(--line); border-radius: var(--r); display: grid; place-items: center; cursor: pointer; color: var(--ink-3); font-size: 1.5rem; background: transparent; }
.imgpick-add:hover { border-color: var(--brand); color: var(--brand); }

/* Tabs */
.tabs { display: flex; gap: .2rem; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { padding: .65rem 1rem; background: transparent; border: none; border-bottom: 2px solid transparent; cursor: pointer; font-size: .88rem; font-weight: 620; color: var(--ink-3); white-space: nowrap; }
.tab.on { color: var(--brand); border-bottom-color: var(--brand); }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; font-size: .85rem; }
.tbl th { text-align: left; padding: .65rem .8rem; font-size: .71rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); background: var(--canvas); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: .7rem .8rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tr:hover td { background: var(--canvas); }
.tbl-scroll { overflow-x: auto; }

/* Stats */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.05rem 1.15rem; }
.stat .lbl { font-size: .74rem; color: var(--ink-3); font-weight: 620; text-transform: uppercase; letter-spacing: .03em; }
.stat .val { font-size: 1.65rem; font-weight: 850; letter-spacing: -.02em; margin-top: .2rem; }
.stat .sub { font-size: .74rem; color: var(--ink-3); }

/* Empty / loading */
.empty { text-align: center; padding: 3.5rem 1rem; color: var(--ink-3); }
.empty .ic { font-size: 2.6rem; margin-bottom: .6rem; }
.skeleton { background: linear-gradient(90deg, var(--line-soft) 25%, var(--line) 37%, var(--line-soft) 63%); background-size: 400% 100%; animation: shimmer 1.3s infinite; border-radius: var(--r); }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: .5rem; align-items: center; }
.toast { background: var(--ink); color: #fff; padding: .7rem 1.1rem; border-radius: var(--r); font-size: .86rem; box-shadow: var(--sh-3); animation: slideUp .2s ease; max-width: 90vw; }
.toast.ok  { background: var(--ok); }
.toast.bad { background: var(--bad); }

/* Footer */
.ftr { background: var(--surface); border-top: 1px solid var(--line); margin-top: 4rem; padding: 2.6rem 0 1.6rem; }
.ftr-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
@media (max-width: 860px) { .ftr-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .ftr-grid { grid-template-columns: 1fr; } }
.ftr h5 { font-size: .8rem; font-weight: 750; margin-bottom: .6rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.ftr ul { list-style: none; display: flex; flex-direction: column; gap: .35rem; font-size: .84rem; color: var(--ink-2); }
.ftr ul a:hover { color: var(--brand); }
.ftr-btm { border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1.2rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .78rem; color: var(--ink-3); }

/* Mobile bottom nav */
.mobnav { display: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .detail { grid-template-columns: 1fr; }
  .browse { grid-template-columns: 1fr; }
  .filters { position: static; }
  .shell { grid-template-columns: 1fr; }
  .railcol { position: static; display: none; }   /* category strip up top covers it */
  .railcol.show-mobile { display: block; }
  .rail { max-height: none; }
}
@media (max-width: 720px) {
  body { font-size: 14px; }
  .searchbar select { display: none; }
  .hdr-in { gap: .5rem; }
  /* touch devices scroll the strip naturally — arrows would just cover chips */
  .catstrip-wrap.can-left .catstrip-nav.left,
  .catstrip-wrap.can-right .catstrip-nav.right { display: none; }
  .catstrip-wrap::before, .catstrip-wrap::after { width: 24px; }
  .catstrip-wrap { padding: 0 12px; }
  .logo span { display: none; }
  .hero { padding: 2.2rem 0 2.6rem; }
  .lst-grid { grid-template-columns: repeat(2, 1fr); gap: .7rem; }
  .mod-grid-2, .mod-grid-3 { grid-template-columns: repeat(2, 1fr); gap: .7rem; }
  .mod-scroll { grid-auto-columns: minmax(142px, 46vw); gap: .7rem; }
  .mod-hero { padding: 1.4rem 1.3rem; min-height: 150px; border-radius: var(--r-lg); }
  .mod-hd h2 { font-size: 1.08rem; }
  .cat-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .modal { max-width: 100%; border-radius: var(--r-xl) var(--r-xl) 0 0; align-self: flex-end; max-height: 94vh; }
  .overlay { padding: 0; align-items: flex-end; }
  .mobnav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
    background: var(--surface); border-top: 1px solid var(--line); padding: .4rem 0 .6rem;
  }
  .mobnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .1rem; font-size: .64rem; color: var(--ink-3); }
  .mobnav a.on { color: var(--brand); }
  .mobnav .ic { font-size: 1.15rem; }
  main { padding-bottom: 68px; }
}
