/* ============================================================
   Twisted360 Market & Auctions — theme v2
   ============================================================ */
:root {
  --brand: #1d5fae;           /* Twisted360 blue (Admin → Settings) */
  --navy: #0b2547; --navy-2: #12356b;
  --orange: #ff7a1a; --orange-2: #ffa042;
  --cyan: #18b4e8; --green: #22985a; --purple: #7a4fd6; --red: #e5484d; --amber: #e5a00d;
  --bg: #f2f5fa; --surface: #ffffff; --surface-2: #f7f9fc;
  --text: #142033; --muted: #5f6d82; --line: #dde3ec;
  --ok: #1e8a4c; --warn: #b26a00; --err: #d23b3b;
  --radius: 14px; --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(11,37,71,.06);
  --shadow: 0 2px 6px rgba(11,37,71,.06), 0 10px 28px rgba(11,37,71,.07);
  --shadow-lg: 0 18px 50px rgba(11,37,71,.18);
  --head: "Montserrat", "Arial Black", "Segoe UI", sans-serif;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0b1220; --surface: #121b2c; --surface-2: #172238; --text: #e8eef7; --muted: #9aa8bd; --line: #24324a; --shadow: 0 10px 28px rgba(0,0,0,.35); --shadow-sm: none; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4, .h2 { font-family: var(--head); letter-spacing: -.01em; line-height: 1.2; }
h1 { font-size: 1.85rem; font-weight: 800; margin: 22px 0 14px; }
h2, .h2 { font-size: 1.25rem; font-weight: 800; margin: 22px 0 12px; }
.panel h2:first-child, .panel h3:first-child { margin-top: 0; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.main { min-height: 50vh; padding-bottom: 20px; }
.narrow { max-width: 640px; margin: 0 auto; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; }
.ok { color: var(--ok); font-weight: 700; } .warn { color: var(--warn); font-weight: 700; }
.r { text-align: right; } .pre { white-space: pre-wrap; } .dim { opacity: .55; }
.hp { position: absolute; left: -9999px; }
code { background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; word-break: break-all; font-size: .85em; }
.ic { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.17em; }

/* ---------- Utility strip ---------- */
.utility { background: var(--navy); color: #c9d6ea; font-size: .8rem; }
.utility-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 7px; padding-bottom: 7px; }
.utility .ic { color: var(--cyan); margin-right: 4px; }
.utility-links { display: flex; gap: 18px; }
.utility a { color: #e6eefb; }

/* ---------- Main bar ---------- */
.mainbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; box-shadow: var(--shadow-sm); }
.mainbar-inner { display: flex; align-items: center; gap: 22px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); flex: none; }
.brand:hover { text-decoration: none; }
.brand img { width: 48px; height: 48px; filter: drop-shadow(0 3px 6px rgba(11,37,71,.25)); transition: transform .4s; }
.brand:hover img { transform: rotate(-12deg) scale(1.05); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--head); font-weight: 900; font-size: 1.45rem; letter-spacing: -.02em; color: var(--navy); }
.brand-name b { color: var(--orange); font-weight: 900; }
.brand-sub { font-size: .66rem; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--brand); margin-top: 5px; }
@media (prefers-color-scheme: dark) { .brand-name { color: #fff; } .brand-sub { color: var(--cyan); } }

.search { flex: 1; display: flex; align-items: stretch; border: 2px solid var(--brand); border-radius: 12px; overflow: hidden; background: var(--surface); height: 48px; box-shadow: 0 4px 14px rgba(29,95,174,.12); }
.search:focus-within { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255,122,26,.15); }
.search select { border: 0; border-right: 1px solid var(--line); background: var(--surface-2); color: var(--text); padding: 0 10px; max-width: 170px; font-size: .88rem; border-radius: 0; }
.search input { flex: 1; border: 0; padding: 0 14px; background: transparent; color: var(--text); min-width: 0; font-size: .97rem; border-radius: 0; }
.search input:focus, .search select:focus { outline: none; }
.search button { border: 0; background: linear-gradient(135deg, var(--orange-2), var(--orange)); color: #fff; padding: 0 22px; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 7px; font-size: .95rem; }
.search button:hover { filter: brightness(1.06); }

.actions { display: flex; align-items: center; gap: 4px; flex: none; }
.act { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--text); font-size: .72rem; font-weight: 600; padding: 6px 10px; border-radius: 10px; }
.act .ic { width: 22px; height: 22px; color: var(--brand); }
.act:hover { background: var(--surface-2); text-decoration: none; }
.act-sm .ic { color: var(--muted); }
.dot { position: absolute; top: 1px; right: 4px; font-style: normal; background: var(--brand); color: #fff; font-size: .66rem; font-weight: 800; border-radius: 999px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 5px; border: 2px solid var(--surface); }
.dot.hot { background: var(--red); }

/* ---------- Category bar ---------- */
.catbar { background: linear-gradient(90deg, var(--navy) 0%, var(--navy-2) 45%, var(--brand) 100%); }
.catbar-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 2px; padding-top: 6px; padding-bottom: 6px; }
.catbar-inner::-webkit-scrollbar { display: none; }
.catbar a { color: #dbe6f7; white-space: nowrap; padding: 6px 10px; border-radius: 8px; font-size: .86rem; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.catbar a:hover, .catbar a.on { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
.catbar .cb-hot { background: var(--orange); color: #fff; }
.catbar .cb-hot:hover { background: var(--orange-2); }
.catbar .cb-buy { color: #8ff0bd; }
.cb-sep { width: 1px; height: 22px; background: rgba(255,255,255,.2); margin: 4px 6px; flex: none; }

/* ---------- Buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--brand); color: #fff !important; border: 0; border-radius: 10px; padding: 11px 20px; font-weight: 700; font-size: .95rem; cursor: pointer; text-decoration: none !important; text-align: center; transition: transform .12s, filter .12s, box-shadow .12s; font-family: inherit; }
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(11,37,71,.18); }
.btn:active { transform: none; }
.btn-sm { padding: 7px 13px; font-size: .84rem; border-radius: 8px; }
.btn-lg { padding: 14px 26px; font-size: 1.02rem; border-radius: 12px; }
.btn-ghost { background: transparent; color: var(--brand) !important; box-shadow: inset 0 0 0 1.5px var(--brand); }
.btn-ghost:hover { background: color-mix(in srgb, var(--brand) 8%, transparent); }
.btn-danger { background: var(--red); }
.btn-bid { background: linear-gradient(135deg, var(--orange-2), var(--orange)); box-shadow: 0 6px 18px rgba(255,122,26,.35); }
.btn-buy { background: linear-gradient(135deg, #36b977, var(--green)); box-shadow: 0 6px 18px rgba(34,152,90,.3); }
.btn-white { background: #fff; color: var(--navy) !important; }
.btn-sell { background: linear-gradient(135deg, var(--orange-2), var(--orange)); margin-left: 6px; }
.btn-block { display: flex; width: 100%; margin: 10px 0; }
.btn-card { background: linear-gradient(135deg, #7a73ff, #635bff); }
.linkbtn { background: none; border: 0; color: var(--brand); cursor: pointer; padding: 4px 0; font: inherit; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 9px 12px; width: 100%; transition: border-color .12s, box-shadow .12s; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--brand); transform: scale(1.15); }
input[type=color] { height: 42px; padding: 3px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.form label, .filters label, .bidform label { display: block; margin-bottom: 14px; font-weight: 600; font-size: .88rem; }
.form label input, .form label select, .form label textarea, .filters label input, .filters label select { margin-top: 5px; font-weight: 400; }
label.check { display: flex; gap: 10px; align-items: center; font-weight: 500; }
fieldset { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 18px; background: var(--surface-2); }
legend { font-family: var(--head); font-weight: 800; padding: 0 8px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.inline { display: inline; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.inline-form input, .inline-form select { width: auto; flex: 1; min-width: 120px; }
.inline-form label { display: flex; gap: 6px; align-items: center; margin: 0; }
.inputgroup { display: flex; align-items: center; border: 2px solid var(--line); border-radius: 12px; margin-top: 6px; background: var(--surface); overflow: hidden; }
.inputgroup:focus-within { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255,122,26,.15); }
.inputgroup span { padding: 0 6px 0 14px; color: var(--muted); font-weight: 800; font-size: 1.2rem; }
.inputgroup input { border: 0; font-size: 1.35rem; font-weight: 800; padding: 10px; box-shadow: none !important; }
.seg { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.seg label { display: flex; gap: 8px; align-items: center; font-weight: 700; border: 1.5px solid var(--line); background: var(--surface); padding: 9px 14px; border-radius: 10px; cursor: pointer; }
.seg label:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, var(--surface)); color: var(--brand); }

/* ---------- Panels / flash ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.flash { border-radius: 11px; padding: 12px 16px; margin: 14px 0; border: 1px solid; border-left-width: 5px; font-weight: 500; }
.flash-ok { background: color-mix(in srgb, var(--ok) 9%, var(--surface)); border-color: var(--ok); }
.flash-warn { background: color-mix(in srgb, var(--amber) 12%, var(--surface)); border-color: var(--amber); }
.flash-err { background: color-mix(in srgb, var(--err) 9%, var(--surface)); border-color: var(--err); }
.empty { text-align: center; color: var(--muted); padding: 36px 10px; background: var(--surface); border: 1.5px dashed var(--line); border-radius: var(--radius); }
.empty .ic { width: 40px; height: 40px; color: var(--line); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; margin: 22px 0 8px; padding: 46px 44px; border-radius: 22px; color: #fff; display: grid; grid-template-columns: 1.25fr 1fr; gap: 36px; align-items: center;
  background:
    radial-gradient(600px 300px at 90% -10%, rgba(24,180,232,.45), transparent 60%),
    radial-gradient(500px 280px at 70% 120%, rgba(255,122,26,.40), transparent 60%),
    linear-gradient(125deg, var(--navy) 0%, var(--navy-2) 45%, var(--brand) 100%);
  box-shadow: var(--shadow-lg); }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .12; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, #fff 1px, transparent 0); background-size: 22px 22px; }
.hero::after { content: ""; position: absolute; width: 520px; height: 520px; right: -170px; top: -160px; border-radius: 50%; border: 18px solid rgba(255,255,255,.05); box-shadow: 0 0 0 46px rgba(255,255,255,.03); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); padding: 6px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.eyebrow .ic { color: var(--orange-2); }
.hero h1 { font-size: 3rem; font-weight: 900; margin: 16px 0 12px; letter-spacing: -.03em; line-height: 1.05; }
.hero h1 span { background: linear-gradient(90deg, var(--orange-2), #ffd28a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin: 0 0 24px; color: #d6e3f5; font-size: 1.06rem; max-width: 560px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 0; margin-top: 30px; background: rgba(0,0,0,.18); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; width: fit-content; }
.hero-stats div { padding: 12px 22px; display: flex; flex-direction: column; border-right: 1px solid rgba(255,255,255,.12); }
.hero-stats div:last-child { border-right: 0; }
.hero-stats b { font-family: var(--head); font-size: 1.6rem; font-weight: 900; color: #fff; }
.hero-stats span { font-size: .76rem; color: #b9cbe6; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.hero-art img { width: 100%; max-width: 340px; display: block; margin: 0 auto; filter: drop-shadow(0 20px 40px rgba(0,0,0,.35)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px) rotate(-3deg); } }
.spotlight { display: block; background: #fff; color: var(--text); border-radius: 18px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.35); transform: rotate(1.5deg); transition: transform .25s; max-width: 420px; justify-self: end; width: 100%; }
.spotlight:hover { transform: rotate(0) translateY(-4px); text-decoration: none; }
.spot-img { aspect-ratio: 16/10; background: #e8edf4; }
.spot-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spot-body { padding: 16px 18px 18px; }
.spot-tag { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--orange); }
.spot-title { display: block; font-family: var(--head); font-size: 1.1rem; margin: 6px 0 10px; color: #142033; }
.spot-row { display: flex; justify-content: space-between; align-items: center; }
.spot-price { font-family: var(--head); font-weight: 900; font-size: 1.6rem; color: var(--navy); }
.spot-buy { background: #e3f5ea; color: var(--green); font-weight: 800; font-size: .78rem; padding: 5px 10px; border-radius: 999px; }

/* ---------- Sections ---------- */
.section { margin: 30px 0; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.section-head h2 { margin: 0; display: flex; align-items: center; gap: 9px; font-size: 1.4rem; }
.section-head h2 .ic { color: var(--orange); }
.h-ico { width: 30px; height: 30px; }
.more { font-size: .88rem; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.band { padding: 24px; border-radius: 20px; margin-left: -4px; margin-right: -4px; }
.band-orange { background: linear-gradient(135deg, color-mix(in srgb, var(--orange) 12%, var(--surface)), color-mix(in srgb, var(--amber) 6%, var(--surface))); border: 1px solid color-mix(in srgb, var(--orange) 22%, transparent); }
.band-blue { background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 11%, var(--surface)), color-mix(in srgb, var(--cyan) 8%, var(--surface))); border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent); }

.cat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cat-tile { --c: var(--brand); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 14px 14px; color: var(--text); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; transition: transform .15s, box-shadow .15s, border-color .15s; position: relative; overflow: hidden; }
.cat-tile::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--c); transform: scaleX(0); transition: transform .2s; }
.cat-tile:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--c) 45%, var(--line)); }
.cat-tile:hover::after { transform: scaleX(1); }
.cat-ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: var(--c); }
.cat-ico .ic { width: 28px; height: 28px; }
.cat-tile b { font-size: .9rem; line-height: 1.25; }
.cat-tile small { color: var(--muted); font-size: .76rem; }

.sell-cta { margin: 36px 0 10px; padding: 34px 38px; border-radius: 20px; color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  background: radial-gradient(400px 200px at 100% 0, rgba(255,255,255,.18), transparent 60%), linear-gradient(120deg, #ff6a00, var(--orange-2)); box-shadow: 0 14px 40px rgba(255,122,26,.3); }
.sell-cta h2 { margin: 0 0 6px; font-size: 1.5rem; }
.sell-cta p { margin: 0; max-width: 620px; color: #fff3e6; }

/* ---------- Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); display: flex; flex-direction: column; box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s, border-color .18s; }
.card:hover { text-decoration: none; transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.card-img { position: relative; aspect-ratio: 4/3; background: linear-gradient(135deg, #e8edf4, #dfe6ef); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s; }
.card:hover .card-img img { transform: scale(1.06); }
.card-img .badges { position: absolute; top: 10px; left: 10px; }
.timer-pill { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 5px; background: rgba(8,24,48,.78); backdrop-filter: blur(6px); color: #fff; font-weight: 700; font-size: .78rem; padding: 5px 10px; border-radius: 999px; }
.spot-row .timer-pill { position: static; }
.timer-pill .ic { color: var(--cyan); }
.timer-pill.hot { background: rgba(214,52,52,.92); animation: pulse 1.6s ease-in-out infinite; }
.timer-pill.hot .ic { color: #fff; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(229,72,77,.25); } }
.img-flag { position: absolute; inset: auto 0 0 0; background: rgba(8,24,48,.78); color: #fff; text-align: center; font-weight: 800; padding: 6px; text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; }
.img-flag.sold { background: rgba(122,79,214,.9); }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.card-cat { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--c); }
.card-title { font-weight: 700; line-height: 1.3; min-height: 2.6em; max-height: 2.6em; overflow: hidden; margin: 3px 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-pricebox { display: flex; flex-direction: column; margin-top: auto; }
.card-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.card-price { font-family: var(--head); font-size: 1.4rem; font-weight: 900; color: var(--navy); line-height: 1.15; }
.is-auction .card-price { color: #d35400; }
.is-fixed .card-price { color: var(--green); }
@media (prefers-color-scheme: dark) { .card-price { color: #fff; } .is-auction .card-price { color: var(--orange-2); } .is-fixed .card-price { color: #5fd696; } }
.card-foot { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .8rem; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.card-foot span { display: inline-flex; align-items: center; gap: 4px; }
.card-seller { display: flex; align-items: center; gap: 5px; font-size: .76rem; color: var(--muted); margin-top: 6px; }
.card-seller.house { color: var(--brand); font-weight: 700; }
.badges { display: flex; gap: 5px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; border-radius: 6px; padding: 4px 8px; background: var(--surface-2); color: var(--muted); }
.badge .ic { width: 12px; height: 12px; }
.badge-auction { background: var(--orange); color: #fff; }
.badge-fixed { background: var(--green); color: #fff; }
.badge-feat { background: var(--amber); color: #fff; }
.badge-house { background: var(--brand); color: #fff; }

/* ---------- Browse ---------- */
.browse { display: grid; grid-template-columns: 260px 1fr; gap: 24px; margin-top: 20px; }
.filters { align-self: start; position: sticky; top: 92px; }
.filters h3 { margin: 0 0 12px; font-size: 1rem; }
.pager { display: flex; gap: 6px; margin: 24px 0; flex-wrap: wrap; }
.pager a { border: 1px solid var(--line); border-radius: 9px; padding: 6px 13px; background: var(--surface); font-weight: 700; }
.pager a.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.crumbs { margin: 18px 0 8px; font-size: .85rem; color: var(--muted); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Item page ---------- */
.item { display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px; margin-bottom: 18px; align-items: start; }
.gallery-main { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: var(--shadow); }
.gallery-main img { max-height: 100%; object-fit: contain; }
.thumbs { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.thumb { width: 78px; height: 78px; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; padding: 0; background: var(--surface); cursor: pointer; position: relative; transition: border-color .12s; }
.thumb:hover { border-color: var(--brand); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumbs.edit .thumb { width: 100px; height: 100px; cursor: default; }
.thumb .x { position: absolute; top: 3px; right: 3px; background: var(--red); color: #fff; border: 0; border-radius: 50%; width: 24px; height: 24px; cursor: pointer; line-height: 1; font-weight: 800; }
.buybox { position: sticky; top: 92px; border-top: 5px solid var(--brand); }
.buybox.is-auction { border-top-color: var(--orange); }
.buybox.is-fixed { border-top-color: var(--green); }
.buybox h1 { margin: 10px 0 4px; font-size: 1.55rem; }
.price-row { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.price-row .muted { font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.price { font-family: var(--head); font-size: 2.2rem; font-weight: 900; line-height: 1; }
.is-auction .price { color: #d35400; } .is-fixed .price { color: var(--green); }
.timer { margin: 12px 0; padding: 11px 14px; background: linear-gradient(90deg, color-mix(in srgb, var(--navy) 92%, transparent), var(--navy-2)); color: #fff; border-radius: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.timer .muted { color: #b9cbe6; }
.timer .ic { color: var(--cyan); }
.timer .countdown.warn { color: #ffb3b3; }
.shipinfo { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; display: grid; gap: 6px; }
.shipinfo div { display: flex; align-items: center; gap: 7px; }
.shipinfo .ic { color: var(--brand); }
.ownerbar { border-top: 1px dashed var(--line); margin-top: 14px; padding-top: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.delivery { display: flex; gap: 16px; margin: 8px 0; }
.desc { overflow-wrap: anywhere; font-size: 1rem; }
.qa { border-bottom: 1px solid var(--line); padding: 10px 0; }
.meta-line { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: .85rem; }
.meta-line span { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- Tables / tabs / stats ---------- */
.tablewrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.table { width: 100%; border-collapse: collapse; background: var(--surface); }
.panel .table, .tablewrap .table { border: 0; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.table th { font-size: .74rem; text-transform: uppercase; color: var(--muted); letter-spacing: .05em; background: var(--surface-2); font-weight: 800; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--brand) 4%, var(--surface)); }
.table th.r, .table td.r { text-align: right; }
.table .total td { font-family: var(--head); font-weight: 900; font-size: 1.2rem; border-bottom: 0; color: var(--navy); }
.actions form { margin: 2px 0; }
.tabs { display: flex; gap: 6px; margin-bottom: 18px; overflow-x: auto; background: var(--surface); padding: 6px; border-radius: 12px; border: 1px solid var(--line); width: fit-content; max-width: 100%; box-shadow: var(--shadow-sm); }
.tabs a { padding: 8px 16px; color: var(--muted); font-weight: 700; border-radius: 8px; white-space: nowrap; font-size: .9rem; }
.tabs a:hover { background: var(--surface-2); text-decoration: none; }
.tabs a.on { color: #fff; background: var(--brand); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { --c: var(--brand); background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: var(--radius); padding: 16px 18px; color: var(--text); display: flex; flex-direction: column; box-shadow: var(--shadow-sm); transition: transform .15s; }
.stat:nth-child(6n+2) { --c: var(--orange); } .stat:nth-child(6n+3) { --c: var(--green); } .stat:nth-child(6n+4) { --c: var(--purple); } .stat:nth-child(6n+5) { --c: var(--cyan); } .stat:nth-child(6n) { --c: var(--red); }
.stat b { font-family: var(--head); font-size: 1.8rem; font-weight: 900; color: var(--c); }
.stat span { color: var(--muted); font-size: .84rem; font-weight: 600; }
a.stat:hover { transform: translateY(-2px); text-decoration: none; box-shadow: var(--shadow); }
.status { font-size: .72rem; font-weight: 800; border-radius: 999px; padding: 3px 10px; background: var(--surface-2); color: var(--muted); text-transform: capitalize; white-space: nowrap; letter-spacing: .02em; }
.status-unpaid, .status-pending { background: #fff1d1; color: #8a5a00; }
.status-paid, .status-approved, .status-active { background: #ddf4e6; color: #17693a; }
.status-shipped { background: #dfeafc; color: #1d4f99; }
.status-completed, .status-sold { background: #ebe4fb; color: #5a3aa8; }
.status-cancelled, .status-removed, .status-rejected { background: #fde4e4; color: #a12020; }
.pill { background: var(--red); color: #fff; border-radius: 999px; font-size: .7rem; padding: 1px 7px; font-weight: 800; }
.notes { list-style: none; padding: 0; margin: 0; }
.notes li { padding: 10px 0 10px 14px; border-bottom: 1px solid var(--line); position: relative; }
.notes li.unread { font-weight: 700; }
.notes li.unread::before { content: ""; position: absolute; left: 0; top: 18px; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.order-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.order-head h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.invoice { border-top: 5px solid var(--brand); }
.inv-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.inv-top img { height: 44px; }
#paypal-buttons { margin: 6px 0 10px; min-height: 50px; }
details summary { cursor: pointer; font-weight: 700; color: var(--brand); padding: 6px 0; }

/* ---------- Auth pages ---------- */
.page-login .narrow, .page-register .narrow { margin-top: 26px; }
.auth-logo { display: block; margin: 0 auto 6px; width: 260px; }
.page-login h1, .page-register h1 { text-align: center; }

/* ---------- Trust bar & footer ---------- */
.trustbar { background: var(--surface); border-top: 1px solid var(--line); margin-top: 46px; }
.trust-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding-top: 26px; padding-bottom: 26px; }
.trust { display: flex; gap: 12px; align-items: center; }
.ti { --c: var(--brand); width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 13%, var(--surface)); color: var(--c); flex: none; }
.ti .ic { width: 24px; height: 24px; }
.trust b { display: block; font-size: .92rem; }
.trust small { color: var(--muted); font-size: .8rem; }
.footer { background: linear-gradient(180deg, var(--navy) 0%, #071830 100%); color: #b9c8de; padding: 44px 0 0; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.footer h4 { color: #fff; margin: 4px 0 12px; font-size: .95rem; }
.footer-grid > div { display: flex; flex-direction: column; gap: 8px; }
.footer a, .footer span { color: #b9c8de; display: inline-flex; align-items: center; gap: 7px; }
.footer a:hover { color: #fff; }
.footer .ic { color: var(--cyan); }
.footer-brand img { width: 280px; height: auto; }
.footer-brand p { margin: 4px 0 8px; max-width: 360px; }
.paylogos { display: flex; gap: 6px; flex-wrap: wrap; }
.pl { background: #fff; color: #1a1f71 !important; font-weight: 900; font-size: .7rem; padding: 4px 9px; border-radius: 5px; font-style: italic; letter-spacing: .02em; }
.pl-pp { color: #003087 !important; }
.footer-bottom { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.1); margin-top: 34px; padding-top: 16px; padding-bottom: 20px; font-size: .8rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .actions .act span { display: none; }
  .hero { grid-template-columns: 1fr; padding: 36px 28px; }
  .spotlight { justify-self: start; transform: none; }
  .hero h1 { font-size: 2.4rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .browse, .item, .cols2 { grid-template-columns: 1fr; }
  .filters, .buybox { position: static; }
  .row3 { grid-template-columns: 1fr 1fr; }
  .mainbar-inner { flex-wrap: wrap; gap: 12px; }
  .search { order: 3; flex-basis: 100%; }
  .actions { margin-left: auto; }
  .trust-inner { grid-template-columns: 1fr 1fr; }
  .utility-inner > span:first-child { display: none; }
  .utility-inner { justify-content: center; }
}
@media (max-width: 560px) {
  .mainbar-inner { flex-wrap: wrap; gap: 10px 6px; }
  .brand { gap: 7px; }
  .brand img { width: 36px !important; height: 36px !important; }
  .brand-name { font-size: 1.08rem !important; }
  .actions { gap: 0; }
  .act { padding: 6px 7px; }
  .act .ic { width: 21px; height: 21px; }
  .btn-sell { padding: 9px 11px; margin-left: 2px; }
  .btn-sell span { display: none; }
  .catbar-inner { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 30px; }
  .catbar-inner::-webkit-scrollbar { display: none; }
  .wrap { padding: 0 14px; }
  .row2, .row3 { grid-template-columns: 1fr; }
  .search select { display: none; }
  .search button span { display: none; }
  .brand-sub { display: none; }
  .brand-name { font-size: 1.2rem; }
  .brand img { width: 40px; height: 40px; }
  .hero { padding: 28px 20px; border-radius: 16px; }
  .hero h1 { font-size: 1.95rem; }
  .hero-stats div { padding: 10px 14px; }
  .hero-stats b { font-size: 1.25rem; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card-body { padding: 10px; }
  .card-price { font-size: 1.15rem; }
  .card-foot span:last-child { display: none; }
  .cat-tiles { grid-template-columns: repeat(2, 1fr); }
  .price { font-size: 1.7rem; }
  .trust-inner, .footer-grid { grid-template-columns: 1fr; }
  .band { padding: 16px 12px; }
  .sell-cta { padding: 24px 20px; }
  .utility-links { gap: 12px; }
}
@media print {
  .utility, .mainbar, .catbar, .footer, .trustbar, .noprint, .tabs { display: none !important; }
  body { background: #fff; color: #000; }
  .cols2 { grid-template-columns: 1fr; }
  .panel { box-shadow: none; border: 0; }
}
.timer-pill .countdown, .timer-pill .countdown.warn { color: #fff; font-weight: 800; }

/* ---------- Share bar ---------- */
.sharebar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 14px 0 4px; padding-top: 12px; border-top: 1px solid var(--line); position: relative; }
.share-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-right: 4px; }
.sh { display: inline-flex; align-items: center; gap: 6px; border: 0; cursor: pointer; font: inherit; font-size: .82rem; font-weight: 700; padding: 7px 11px; border-radius: 9px; color: #fff !important; text-decoration: none !important; transition: transform .12s, filter .12s; }
.sh:hover { transform: translateY(-1px); filter: brightness(1.08); }
.sh .ic { width: 16px; height: 16px; }
.sh-fb { background: #1877f2; }
.sh-x { background: #111; }
.sh-sms { background: var(--green); }
.sh-mail { background: var(--purple); }
.sh-native { background: var(--brand); }
.sh-copy { background: var(--surface-2); color: var(--text) !important; box-shadow: inset 0 0 0 1.5px var(--line); }
.sh-copy.ok { background: var(--ok); color: #fff !important; box-shadow: none; }
.sh-qr { background: var(--navy); }
.qr-pop { flex-basis: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px; margin-top: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; text-align: center; }
.qr-pop[hidden] { display: none; }
.qr-box { background: #fff; padding: 10px; border-radius: 10px; line-height: 0; }
.qr-box img, .qr-box canvas { width: 220px; height: 220px; }
.qr-pop small { color: var(--muted); max-width: 300px; }
@media (max-width: 560px) { .sh span { display: none; } .sh { padding: 9px; } .sh-native span { display: inline; } }

/* ---------- Pickup instructions ---------- */
.pickup-box { border: 1.5px solid color-mix(in srgb, var(--green) 40%, var(--line)); background: color-mix(in srgb, var(--green) 6%, var(--surface)); border-radius: 12px; padding: 14px 16px; margin: 12px 0; }
.pickup-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.pickup-head > .ic { color: var(--green); }
.pickup-appt { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; background: var(--orange); color: #fff; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 4px 9px; border-radius: 999px; }
.pickup-appt .ic { width: 13px; height: 13px; }
.pickup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pickup-label { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 3px; }
.pickup-addr { font-weight: 700; line-height: 1.4; margin-bottom: 4px; }
.pickup-phone { display: inline-flex; align-items: center; gap: 6px; font-family: var(--head); font-weight: 900; font-size: 1.15rem; }
.pickup-notes { margin: 12px 0 0; padding: 10px 0 0 18px; border-top: 1px dashed var(--line); font-size: .88rem; }
.pickup-notes li { margin: 2px 0; }
.pickup-details { margin-top: 10px; }
.pickup-details summary { display: flex; align-items: center; gap: 6px; }
.pickup-details .pickup-box { margin-top: 8px; }
@media (max-width: 560px) { .pickup-grid { grid-template-columns: 1fr; } .pickup-appt { margin-left: 0; } }
@media print { .pickup-box { border: 1px solid #999; background: #fff; } .pickup-appt { background: none; color: #000; border: 1px solid #000; } }
