:root {
  --bg: #0b0d12;
  --bg-alt: #10131a;
  --surface: #161a23;
  --surface-2: #1d2230;
  --border: #262c3b;
  --text: #e8ebf2;
  --muted: #8d95a8;
  --accent: #c6ff3d;
  --accent-ink: #0b0d12;
  --accent-2: #ff6b2c;
  --danger: #ff4d5e;
  --success: #3ddc97;
  --chart-line: #c6ff3d;
  --chart-grid: #232838;
  --chart-axis: #7d8598;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --display: "Rajdhani", var(--font);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--text);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.1; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.accent { color: var(--accent); }
.text-link { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.section-tight { padding: 40px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { margin-bottom: 32px; max-width: 720px; }
.section-head p { color: var(--muted); margin: 0; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 10px; font-weight: 600; font-size: .95rem; white-space: nowrap;
  transition: transform .15s, background .2s, border-color .2s; border: 1px solid transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #d6ff6e; }
.btn-ghost { border-color: var(--border); background: var(--surface-2); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-whatsapp { background: #25d366; color: #062b14; }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.btn-block { width: 100%; }
.link-btn { color: var(--muted); font-size: .82rem; text-decoration: underline; text-underline-offset: 2px; }
.link-btn:hover { color: var(--text); }
.link-btn.danger:hover { color: var(--danger); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(11, 13, 18, .88);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 1.3rem; font-weight: 700; }
.logo-mark {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink); font-size: 1rem; letter-spacing: .04em;
}
.logo-text b { color: var(--accent); }
.main-nav { display: flex; gap: 24px; margin-left: auto; }
.main-nav a { color: var(--muted); font-weight: 500; font-size: .93rem; transition: color .2s; }
.main-nav a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.menu-toggle { display: none; width: 44px; height: 44px; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.menu-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 56px; overflow: hidden; background: radial-gradient(1000px 500px at 80% 20%, rgba(198, 255, 61, .08), transparent 60%); }
.hero-inner { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; }
.hero-copy > p { color: var(--muted); font-size: 1.08rem; max-width: 560px; }
.hero-search {
  display: grid; grid-template-columns: 1.6fr 1fr auto; gap: 8px; margin: 28px 0 32px; padding: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; max-width: 620px;
}
.hero-search input { margin: 0; background: var(--bg-alt); }
.hero-stats { list-style: none; padding: 0; margin: 0; display: flex; gap: 36px; flex-wrap: wrap; }
.hero-stats b { display: block; font-family: var(--display); font-size: 1.6rem; }
.hero-stats span { color: var(--muted); font-size: .85rem; }
.hero-visual { position: relative; height: 400px; }
.hero-glow {
  position: absolute; inset: 15%; border-radius: 50%;
  background: radial-gradient(circle, rgba(198, 255, 61, .22), transparent 70%); filter: blur(30px);
}
.hero-card {
  position: absolute; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 26px 30px; border-radius: 20px; background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); box-shadow: var(--shadow); font-family: var(--display); font-weight: 700; font-size: 1.1rem;
  animation: float 6s ease-in-out infinite;
}
.hc-icon { width: 68px; height: 68px; color: var(--accent); }
.hc-1 { top: 4%; left: 8%; }
.hc-2 { top: 30%; right: 4%; animation-delay: -2s; }
.hc-2 .hc-icon { color: var(--accent-2); }
.hc-3 { bottom: 4%; left: 22%; animation-delay: -4s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- Categories ---------- */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 14px; }
.category-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 20px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: border-color .2s, transform .2s;
}
.category-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.cat-icon { width: 40px; height: 40px; color: var(--accent); margin-bottom: 10px; }
.cat-name { font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.cat-blurb { color: var(--muted); font-size: .83rem; }
.cat-count { margin-top: 8px; font-size: .74rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }

/* ---------- Browse ---------- */
.shop-layout { display: grid; grid-template-columns: 270px 1fr; gap: 28px; align-items: start; }
.filters {
  position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow-y: auto; padding: 22px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
}
.filter-group { margin-bottom: 22px; }
.filter-group > label, .filter-label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 8px; }
.filter-group .sub-label { margin: 12px 0 0; }
.geo-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; text-decoration: none; color: var(--accent); }
.geo-btn:hover { color: #d6ff6e; }
.location-status { margin: 6px 0 0; color: var(--muted); }
.location-status:empty { display: none; }
.location-status.ok { color: var(--success); }
select:disabled { opacity: .5; cursor: not-allowed; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 6px 12px; border-radius: 20px; font-size: .8rem; border: 1px solid var(--border); background: var(--bg-alt); transition: all .2s;
}
.chip:hover { border-color: var(--muted); }
.chip.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.check { display: flex; align-items: center; gap: 8px; font-size: .9rem; margin-bottom: 6px; cursor: pointer; font-weight: 400; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }

.shop-toolbar { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-bottom: 18px; }
.filter-toggle { display: none; margin-right: auto; }
.sort { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--muted); }
.sort select { width: auto; margin: 0; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.product-card {
  display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); transition: border-color .2s, transform .2s;
}
.product-card:hover { border-color: #3a4256; transform: translateY(-3px); }
.card-link { display: block; width: 100%; }
.pc-media, .pm-media {
  position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, var(--surface-2), var(--bg-alt));
}
.pc-media img, .pm-media img { width: 100%; height: 100%; object-fit: cover; }
.pc-icon { width: 36%; color: var(--accent); opacity: .85; transition: transform .3s; }
.product-card:hover .pc-icon { transform: scale(1.08); }
.badge {
  position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 6px;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
}
.cond-like-new { background: var(--accent); color: var(--accent-ink); }
.cond-good { background: #3d8bff; color: #fff; }
.cond-fair { background: #4a5268; color: var(--text); }
.cond-for-parts { background: var(--accent-2); color: #fff; }
.pc-body { display: flex; flex-direction: column; flex: 1; padding: 14px 16px 16px; }
.pc-meta { display: flex; justify-content: space-between; gap: 8px; }
.pc-cat { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.pc-date { font-size: .75rem; color: var(--muted); }
.pc-title { font-size: 1.12rem; margin: 4px 0 8px; }
.pc-title button { text-align: left; line-height: 1.2; }
.pc-title button:hover { color: var(--accent); }
.pc-loc { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: .85rem; margin-bottom: 14px; }
.pc-loc svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--accent); }
.pc-loc b { color: var(--text); font-weight: 600; }
.pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.price { font-family: var(--display); font-size: 1.5rem; font-weight: 700; }
.price-lg { font-size: 2.1rem; line-height: 1.1; margin-bottom: 4px; }
.price-note { color: var(--muted); margin: 0 0 10px; }
.empty-state { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- Sub-type chips & deal tags ---------- */
.sub-chips { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.chip-sm { padding: 4px 10px; font-size: .76rem; }
.deal { display: inline-block; font-size: .72rem; font-weight: 600; color: var(--muted); }
.deal-good { color: var(--success); }
.deal-high { color: var(--accent-2); }

/* ---------- Market price panel ---------- */
.pm-model { color: var(--muted); font-size: .88rem; margin: -4px 0 8px; }
.pm-model b { color: var(--text); font-weight: 600; }
.market-toggle {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin: 0 0 16px;
  padding: 12px 14px; border-radius: 12px; background: var(--bg-alt); border: 1px solid var(--border); transition: border-color .2s;
}
.market-toggle:hover, .market-toggle.open { border-color: var(--accent); }
.market-toggle b { display: block; font-size: .92rem; }
.market-toggle small { display: block; color: var(--muted); font-size: .8rem; }
.mt-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: rgba(198, 255, 61, .12); color: var(--accent); flex-shrink: 0; }
.mt-chev { margin-left: auto; font-size: 1.4rem; color: var(--muted); transition: transform .2s; }
.market-toggle.open .mt-chev { transform: rotate(90deg); }
.market-panel { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.market-panel h4 { font-size: 1.3rem; margin-bottom: 4px; }
.market-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.market-head p { margin: 0; }
.demo-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 5px; font-size: .7rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.trend-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.trend-stat { padding: 12px 14px; border-radius: 12px; background: var(--bg-alt); border: 1px solid var(--border); }
.trend-stat span { display: block; font-size: .78rem; color: var(--muted); }
.trend-stat b { font-family: var(--display); font-size: 1.5rem; }
.trend-stat em { display: block; font-style: normal; font-size: .78rem; color: var(--muted); }
.chart-title { font-family: var(--font); font-size: .9rem; font-weight: 600; margin: 0 0 8px; }
.chart-wrap { position: relative; width: 100%; }
#mcChart { width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
#mcChart .grid { stroke: var(--chart-grid); stroke-width: 1; }
#mcChart .axis { fill: var(--chart-axis); font-size: 12px; font-family: var(--font); }
#mcChart .dot { fill: var(--chart-line); stroke: var(--surface); stroke-width: 2; }
#mcChart .dot-hover { fill: none; stroke: var(--text); stroke-width: 2; pointer-events: none; }
#mcChart .ref { stroke-width: 2; stroke-dasharray: 5 4; }
#mcChart .ref-median { stroke: var(--chart-axis); }
#mcChart .ref-listing { stroke: var(--accent-2); }
#mcChart .ref-label { fill: var(--text); font-size: 12px; font-weight: 600; font-family: var(--font); }
#mcChart .hit { cursor: crosshair; }
.legend { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; font-size: .8rem; color: var(--muted); }
.legend i { display: inline-block; margin-left: 6px; }
.legend i:first-child { margin-left: 0; }
.lg-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--chart-line); }
.lg-line { width: 16px; height: 0; border-top: 2px dashed; }
.lg-median { border-color: var(--chart-axis); }
.lg-listing { border-color: var(--accent-2); }
.chart-tooltip {
  position: absolute; transform: translate(-50%, -100%); pointer-events: none; z-index: 3;
  padding: 8px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border);
  box-shadow: var(--shadow); white-space: nowrap; text-align: center;
}
.chart-tooltip b { display: block; font-family: var(--display); font-size: 1.2rem; line-height: 1.2; }
.chart-tooltip .tt-month, .chart-tooltip .tt-sub { display: block; font-size: .75rem; color: var(--muted); }
.chart-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
.chart-foot p { margin: 0; }
.table-wrap { overflow-x: auto; margin-top: 16px; }
.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.data-table th, .data-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.data-table th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.data-table td:nth-child(n+2), .data-table th:nth-child(n+2) { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Forms ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
form label, .msg-label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 14px; }
input[type="text"], input[type="email"], input[type="number"], input[type="search"], input[type="tel"], select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 11px 13px; border-radius: 9px;
  background: var(--bg-alt); border: 1px solid var(--border); color: var(--text); font: inherit; font-weight: 400; transition: border-color .2s;
}
input[type="file"] { display: block; margin-top: 6px; font-size: .85rem; color: var(--muted); }
.filters input, .filters select { margin-top: 0; }
.filters .sub-label + select { margin-top: 6px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; }
.invalid { border-color: var(--danger) !important; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
fieldset { border: 1px solid var(--border); border-radius: 12px; padding: 16px 16px 4px; margin: 8px 0 18px; }
legend { padding: 0 6px; font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.photo-preview { max-height: 180px; border-radius: 10px; margin: -4px 0 16px; border: 1px solid var(--border); }
.form-msg { margin: 14px 0 0; font-size: .9rem; }
.form-msg:empty { display: none; }
.form-msg.success { color: var(--success); }
.form-msg.error { color: var(--danger); }

/* ---------- Sell ---------- */
.sell-layout { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: start; }
.sell-copy { position: sticky; top: 96px; }
.sell-copy > p { color: var(--muted); font-size: 1.05rem; }
.steps-mini { padding: 0; margin: 28px 0 0; list-style: none; counter-reset: s; }
.steps-mini li { counter-increment: s; position: relative; padding: 0 0 18px 52px; color: var(--muted); }
.steps-mini li::before {
  content: counter(s); position: absolute; left: 0; top: -4px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--accent);
  color: var(--accent); font-weight: 700; font-family: var(--display);
}
.steps-mini b { color: var(--text); }
.price-hint {
  display: flex; flex-direction: column; gap: 2px; margin-top: 18px; padding: 18px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(198, 255, 61, .1), rgba(198, 255, 61, .02)); border: 1px dashed rgba(198, 255, 61, .4);
}
.price-hint b { font-family: var(--display); font-size: 2rem; color: var(--accent); line-height: 1.2; }
.price-hint .text-link { margin-top: 6px; }

/* ---------- My listings ---------- */
.my-list { display: flex; flex-direction: column; gap: 10px; }
.my-item {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center; padding: 12px 16px;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--border);
}
.my-item.is-sold { opacity: .6; }
.my-thumb { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--bg-alt); color: var(--accent); padding: 12px; }
.my-thumb:has(img) { padding: 0; }
.my-thumb img { width: 100%; height: 100%; object-fit: cover; }
.my-info b { display: block; line-height: 1.3; }
.my-actions { display: flex; align-items: center; gap: 14px; }
.sold-tag { color: var(--accent-2); font-weight: 600; }
.empty-card { text-align: center; color: var(--muted); }

/* ---------- How ---------- */
.how-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.how-card { padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.how-num { font-family: var(--display); font-size: 2.2rem; font-weight: 700; color: var(--accent); opacity: .8; }
.how-card p { color: var(--muted); font-size: .92rem; margin: 0; }

/* ---------- Safety & FAQ ---------- */
.safety-layout { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: start; }
.safety-card { border-color: rgba(198, 255, 61, .35); }
.safety-list { list-style: none; padding: 0; margin: 0; }
.safety-list li { position: relative; padding: 0 0 14px 30px; color: var(--muted); font-size: .94rem; }
.safety-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 700; }
.safety-list b { color: var(--text); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; color: var(--accent); transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 18px; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.footer-inner .muted { margin: 8px 0 0; }
.footer-links { display: flex; gap: 22px; color: var(--muted); }
.footer-links a:hover { color: var(--accent); }

/* ---------- Modal ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(5, 6, 10, .7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; transition: opacity .2s;
}
.overlay.open { opacity: 1; }
.overlay[hidden] { display: none; }
.modal {
  position: relative; width: 100%; max-width: 940px; max-height: 92vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 32px;
  box-shadow: var(--shadow); transform: translateY(16px); transition: transform .2s;
}
.overlay.open .modal { transform: translateY(0); }
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%;
  font-size: 1.5rem; line-height: 1; display: grid; place-items: center; background: var(--surface-2); z-index: 2;
}
.modal-close:hover { background: var(--border); }
.pm-body { display: grid; grid-template-columns: 1fr 1.15fr; gap: 28px; align-items: start; }
.pm-media { border-radius: 12px; aspect-ratio: 1; }
.pm-info h3 { font-size: 1.7rem; margin: 6px 0 10px; padding-right: 30px; }
.pm-desc { color: var(--muted); white-space: pre-line; }
.pm-perks { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.pm-perks li { font-size: .78rem; padding: 5px 10px; border-radius: 6px; background: var(--bg-alt); border: 1px solid var(--border); }
.seller-box { padding: 18px; border-radius: 12px; background: var(--bg-alt); border: 1px solid var(--border); }
.seller-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.seller-head b { display: block; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: var(--surface-2); border: 1px solid var(--accent); color: var(--accent); font-weight: 700; font-family: var(--display); font-size: 1.2rem;
}
.msg-label textarea { background: var(--surface); }
.contact-actions .btn { width: 100%; }
.contact-details { display: flex; flex-direction: column; gap: 8px; }
.contact-row {
  display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; border-radius: 9px;
  background: var(--surface); border: 1px solid var(--border); font-size: .9rem; word-break: break-all;
}
.contact-row:hover { border-color: var(--accent); }
.contact-row span { color: var(--muted); }
.seller-box > p { margin: 12px 0 0; }

/* ---------- Header icon button ---------- */
.icon-btn {
  position: relative; width: 44px; height: 44px; display: grid; place-items: center; flex-shrink: 0;
  border-radius: 10px; background: var(--surface); border: 1px solid var(--border); transition: border-color .2s;
}
.icon-btn:hover { border-color: var(--accent); }
.icon-badge {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--accent-2); color: #fff; font-size: .72rem; font-weight: 700; display: grid; place-items: center;
  transform: scale(0); transition: transform .2s;
}
.icon-badge.visible { transform: scale(1); }

/* ---------- Inbox drawer ---------- */
.overlay-drawer { justify-content: flex-end; padding: 0; }
.drawer {
  position: relative; height: 100%; width: 100%; max-width: 440px; display: flex; flex-direction: column;
  background: var(--surface); border-left: 1px solid var(--border); transform: translateX(100%); transition: transform .25s ease;
}
.overlay.open .drawer { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.drawer-head h3 { margin: 0; flex: 1; font-size: 1.3rem; }
.drawer-head .modal-close { position: static; }
.back-btn { width: 36px; height: 36px; }
.drawer-body { flex: 1; overflow-y: auto; }
.inbox-empty { padding: 48px 24px; text-align: center; }
.conv-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px 18px;
  border-bottom: 1px solid var(--border); transition: background .15s;
}
.conv-row:hover { background: var(--surface-2); }
.conv-thumb {
  width: 48px; height: 48px; flex-shrink: 0; border-radius: 10px; overflow: hidden; padding: 9px;
  background: var(--bg-alt); color: var(--accent); display: grid; place-items: center;
}
.conv-thumb:has(img) { padding: 0; }
.conv-thumb img { width: 100%; height: 100%; object-fit: cover; }
.conv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.conv-top { display: flex; justify-content: space-between; gap: 8px; }
.conv-time { font-size: .75rem; color: var(--muted); }
.conv-title { font-size: .78rem; color: var(--muted); }
.conv-title, .conv-preview { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-preview { font-size: .86rem; color: var(--muted); }
.conv-row.unread .conv-preview { color: var(--text); font-weight: 600; }
.conv-unread {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent);
  color: var(--accent-ink); font-size: .75rem; font-weight: 700; display: grid; place-items: center;
}

/* ---------- Chat ---------- */
.chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat[hidden] { display: none; }
.chat-listing {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 18px;
  background: var(--bg-alt); border-bottom: 1px solid var(--border);
}
.chat-listing:hover { background: var(--surface-2); }
.chat-listing b { display: block; font-size: .88rem; line-height: 1.3; }
.chat-listing .mt-chev { margin-left: auto; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.msg-system {
  align-self: center; max-width: 92%; text-align: center; font-size: .76rem; color: var(--muted);
  padding: 8px 12px; border-radius: 10px; background: var(--bg-alt); border: 1px solid var(--border);
}
.msg { display: flex; flex-direction: column; max-width: 82%; }
.msg-me { align-self: flex-end; align-items: flex-end; }
.msg-them { align-self: flex-start; align-items: flex-start; }
.bubble { padding: 9px 13px; border-radius: 16px; font-size: .92rem; line-height: 1.45; word-wrap: break-word; }
.msg-me .bubble { background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 5px; }
.msg-them .bubble { background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.msg-time { font-size: .7rem; color: var(--muted); margin-top: 3px; padding: 0 4px; }
.bubble-contact { display: flex; flex-direction: column; gap: 4px; }
.bubble-contact .contact-title { font-size: .76rem; font-weight: 600; opacity: .8; }
.bubble-contact a { text-decoration: underline; text-underline-offset: 2px; font-weight: 600; word-break: break-all; }
.typing { display: flex; gap: 4px; padding: 13px 14px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.chat-compose { display: flex; align-items: flex-end; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border); }
.chat-compose textarea { margin: 0; resize: none; min-height: 44px; max-height: 140px; border-radius: 12px; }
.send-btn { width: 44px; height: 44px; padding: 0; flex-shrink: 0; }
.share-panel { padding: 14px 16px 4px; border-top: 1px solid var(--border); background: var(--bg-alt); }
.share-panel[hidden] { display: none; }
.share-panel p { margin: 0 0 10px; }
.share-panel label { display: block; font-size: .8rem; font-weight: 600; margin-bottom: 10px; }
.share-actions { display: flex; justify-content: flex-end; align-items: center; gap: 14px; padding-bottom: 12px; }
.chat-profile { padding: 18px; border-top: 1px solid var(--border); }
.chat-profile input { margin: 0 0 12px; }

/* ---------- Account ---------- */
.account { position: relative; }
.avatar-btn { border-radius: 50%; border-color: var(--accent); color: var(--accent); font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.account-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 220px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.account-menu[hidden] { display: none; }
.am-head { padding: 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 4px; display: flex; flex-direction: column; }
.am-head .muted { word-break: break-all; }
.account-menu a, .account-menu button { text-align: left; padding: 9px 12px; border-radius: 8px; font-size: .9rem; }
.account-menu a:hover, .account-menu button:hover { background: var(--surface-2); }
.account-menu .danger { color: var(--danger); }

/* ---------- Auth modal ---------- */
.modal.modal-sm { max-width: 440px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 40px 22px 0; border-radius: 10px; background: var(--bg-alt); border: 1px solid var(--border); }
.auth-tabs[hidden] { display: none; }
.auth-tabs button { padding: 8px; border-radius: 7px; font-size: .88rem; font-weight: 600; color: var(--muted); }
.auth-tabs button.active { background: var(--surface-2); color: var(--text); }
#authIntro[hidden] { display: none; }
#authForm label[hidden] { display: none; }
.auth-links { display: flex; justify-content: center; margin-top: 12px; }
input[type="password"] {
  display: block; width: 100%; margin-top: 6px; padding: 11px 13px; border-radius: 9px;
  background: var(--bg-alt); border: 1px solid var(--border); color: var(--text); font: inherit;
}
input[type="password"]:focus { outline: none; border-color: var(--accent); }
button:disabled { opacity: .6; cursor: progress; }

/* ---------- Sell form extras ---------- */
.photo-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin: -4px 0 16px; }
.photo-previews:empty { display: none; }
.pp-item { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.pp-item img { width: 100%; height: 100%; object-fit: cover; }
.pp-cover { position: absolute; left: 4px; bottom: 4px; padding: 1px 6px; border-radius: 4px; font-size: .65rem; font-weight: 700; background: var(--accent); color: var(--accent-ink); }
.pp-remove {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0, 0, 0, .7); color: #fff; font-size: 1rem; line-height: 1; display: grid; place-items: center;
}
.posting-as {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding: 12px 14px; margin-bottom: 8px; border-radius: 10px; background: var(--bg-alt); border: 1px solid var(--border); font-size: .9rem;
}
.pa-actions { display: flex; gap: 8px; }

/* ---------- Gallery ---------- */
.gallery { display: flex; flex-direction: column; gap: 8px; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb { width: 64px; height: 64px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; opacity: .7; }
.thumb.active, .thumb:hover { border-color: var(--accent); opacity: 1; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-count {
  position: absolute; right: 10px; bottom: 10px; padding: 3px 8px; border-radius: 6px;
  background: rgba(0, 0, 0, .65); color: #fff; font-size: .72rem; font-weight: 600;
}

/* ---------- Local-file banner ---------- */
.file-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 150; max-width: 760px; margin: 0 auto;
  padding: 12px 16px; border-radius: 10px; background: #3a2a10; border: 1px solid var(--accent-2); color: #ffd9b8; font-size: .88rem;
}
.file-banner[hidden] { display: none; }
.file-banner code { background: rgba(0, 0, 0, .3); padding: 1px 5px; border-radius: 4px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 200; transform: translate(-50%, 140px);
  padding: 13px 20px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--accent);
  box-shadow: var(--shadow); font-size: .9rem; transition: transform .3s ease; max-width: calc(100% - 32px);
}
.toast.show { transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .main-nav { gap: 18px; }
  .how-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner, .sell-layout, .safety-layout { grid-template-columns: 1fr; }
  .sell-copy { position: static; }
  .hero-visual { display: none; }
}

@media (max-width: 900px) {
  .main-nav {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: 8px 20px 16px; display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .header-actions { margin-left: auto; }
  .menu-toggle { display: flex; }
  .shop-layout { grid-template-columns: 1fr; }
  .filters { position: static; max-height: none; display: none; }
  .filters.open { display: block; }
  .filter-toggle { display: inline-flex; }
  .pm-body { grid-template-columns: 1fr; }
  .pm-media { aspect-ratio: 16 / 10; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .section { padding: 56px 0; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .how-grid { grid-template-columns: 1fr; }
  .logo-text { display: none; }
  .header-inner { gap: 10px; }
  .header-actions { gap: 8px; }
  .place-btn { padding: 8px 10px; }
  .hero { padding-top: 44px; }
  .hero-search { grid-template-columns: 1fr; }
  .trend-summary { grid-template-columns: 1fr; gap: 8px; }
  .trend-card, .card { padding: 18px; }
  .modal { padding: 22px 16px; }
  .product-grid { grid-template-columns: 1fr; }
  .my-item { grid-template-columns: 52px 1fr; }
  .my-thumb { width: 52px; height: 52px; }
  .my-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .shop-toolbar { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
