/* =========================================================
   Heavy-equipment marketplace — design system
   Industrial premium: graphite + safety amber
   ========================================================= */
:root {
  --ink: #0f1218;
  --ink-2: #1a1f29;
  --ink-3: #262d3a;
  --text: #1c2230;
  --muted: #6b7385;
  --line: #e7e9ee;
  --line-2: #d9dce4;
  --bg: #f5f6f8;
  --card: #ffffff;
  --amber: #f5b301;
  --amber-2: #ffc933;
  --amber-ink: #3a2a00;
  --amber-soft: #fff6dc;
  --blue: #2563eb;
  --blue-soft: #e8f0ff;
  --green: #16a34a;
  --green-soft: #e7f8ee;
  --red: #dc2626;
  --red-soft: #fdecec;
  --wa: #1fae5b;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 18, 24, .06);
  --shadow: 0 4px 18px -6px rgba(15, 18, 24, .14), 0 1px 3px rgba(15, 18, 24, .05);
  --shadow-lg: 0 24px 60px -20px rgba(15, 18, 24, .35);
  --font: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --container: 1240px;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.65;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.3; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 1.4rem; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
.ic { width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: -0.2em; }
.muted { color: var(--muted); }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.nowrap { white-space: nowrap; }
.mt-2 { margin-top: .5rem; } .mt-4 { margin-top: 1.5rem; }
.container { max-width: var(--container); margin-inline: auto; padding-inline: 16px; }
.page { padding-block: 20px 60px; }
.narrow { max-width: 860px; }
.page-title { font-size: 1.6rem; display: flex; align-items: center; gap: .5rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  height: 44px; padding: 0 18px; border-radius: 12px; font-weight: 700; font-size: .95rem;
  border: 1px solid transparent; transition: transform .12s, background .15s, box-shadow .15s, border-color .15s;
  white-space: nowrap; user-select: none;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--amber); color: var(--amber-ink); box-shadow: 0 6px 16px -6px rgba(245, 179, 1, .7); }
.btn-primary:hover { background: var(--amber-2); }
.btn-ghost { background: var(--card); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-ghost.on { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.btn-ghost.on .ic { fill: currentColor; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { filter: brightness(1.07); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-gold { background: var(--amber-soft); color: #8a6100; }
.btn-lg { height: 52px; font-size: 1.02rem; padding: 0 24px; border-radius: 14px; }
.btn-sm { height: 36px; padding: 0 12px; font-size: .88rem; border-radius: 10px; }
.btn-xs { height: 28px; padding: 0 10px; font-size: .8rem; border-radius: 8px; }
.btn-block { width: 100%; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; display: inline-grid; place-items: center; border: 1px solid var(--line-2); background: var(--card); transition: .15s; }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn.danger:hover { border-color: var(--red); color: var(--red); }

/* ---------- Header ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(15, 18, 24, .96); backdrop-filter: saturate(180%) blur(12px); color: #fff; border-bottom: 1px solid rgba(255,255,255,.06); }
.topbar-inner { height: var(--header-h); display: flex; align-items: center; gap: 18px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.3rem; letter-spacing: -.02em; color: #fff; }
.logo img { border-radius: 10px; }
.top-search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 8px; height: 44px; padding-inline: 14px; border-radius: 12px; background: var(--ink-3); border: 1px solid rgba(255,255,255,.06); transition: .15s; }
.top-search:focus-within { background: #fff; color: var(--text); border-color: var(--amber); }
.top-search .ic { color: #9aa3b5; }
.top-search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font: inherit; }
.topbar .top-search input { color: #fff; }
.topbar .top-search:focus-within input { color: var(--text); }
.top-search input::placeholder { color: #8890a2; }
.top-nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 10px; color: #d6dae3; font-weight: 600; font-size: .93rem; transition: .15s; }
.nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: #d6dae3; }
.nav-icon:hover { background: rgba(255,255,255,.07); }
.btn-post { margin-inline-start: 8px; height: 42px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; background: linear-gradient(135deg, var(--amber), #ff8a00); color: var(--amber-ink); font-weight: 800; flex-shrink: 0; }
.avatar-lg { width: 52px; height: 52px; font-size: 1.3rem; }
.avatar-xl { width: 84px; height: 84px; font-size: 2rem; border-radius: 22px; }
.avatar-btn { padding: 2px; border-radius: 50%; }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); min-width: 220px; background: #fff; color: var(--text); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .16s; z-index: 60; }
.dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: none; }
.dropdown-menu a, .dropdown-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: .93rem; text-align: start; }
.dropdown-menu a:hover, .dropdown-menu button:hover, .dropdown-menu a.active { background: var(--bg); }
.dropdown-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: flex; flex-direction: column; }
.dropdown-head small { color: var(--muted); }

/* ---------- Toasts / alerts ---------- */
.toasts { position: fixed; top: calc(var(--header-h) + 12px); inset-inline: 0; z-index: 70; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding-inline: 16px; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 600; animation: toastIn .3s ease, toastOut .4s ease 4.5s forwards; max-width: 520px; }
.toast-success .ic { color: #4ade80; } .toast-error .ic { color: #f87171; } .toast-info .ic { color: var(--amber); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); visibility: hidden; } }
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-weight: 600; border: 1px solid; }
.alert-success { background: var(--green-soft); border-color: #bce8cc; color: #106b33; }
.alert-error { background: var(--red-soft); border-color: #f6caca; color: #a11c1c; }
.alert-info { background: var(--blue-soft); border-color: #c9dafe; color: #1d4ed8; }
.alert-warn { background: var(--amber-soft); border-color: #f6e0a0; color: #7a5600; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--ink); color: #fff; padding: 64px 0 56px; }
.hero-bg { position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(900px 400px at 85% -10%, rgba(245, 179, 1, .22), transparent 60%),
    radial-gradient(700px 400px at 0% 110%, rgba(37, 99, 235, .18), transparent 60%),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 44px 44px;
  mask-image: linear-gradient(#000 60%, transparent);
}
.hero-bg::after { content: ''; position: absolute; inset-inline-end: -60px; bottom: -40px; width: 520px; height: 360px; opacity: .07;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 19h11M3 19a2 2 0 0 1 0-4h9a2 2 0 0 1 0 4'/%3E%3Cpath d='M4 15v-3h6l1 3'/%3E%3Cpath d='M10 12 15 5l6 4-2 4'/%3E%3Cpath d='m19 13-2 3h3'/%3E%3C/svg%3E") no-repeat center / contain; }
[dir=rtl] .hero-bg::after { transform: scaleX(-1); }
.hero-inner { position: relative; text-align: center; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; background: rgba(245, 179, 1, .12); color: var(--amber-2); border: 1px solid rgba(245, 179, 1, .25); font-weight: 700; font-size: .85rem; margin-bottom: 18px; }
.hero-title { font-size: clamp(1.9rem, 4.6vw, 3.3rem); font-weight: 900; line-height: 1.2; margin-bottom: 14px; letter-spacing: -.02em; }
.hero-sub { color: #b8bfcc; font-size: clamp(1rem, 1.6vw, 1.15rem); max-width: 640px; margin: 0 auto 28px; }
.hero-search { max-width: 920px; margin-inline: auto; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 22px; padding: 12px; backdrop-filter: blur(8px); }
.hero-search .seg { margin-bottom: 10px; background: rgba(0,0,0,.25); }
.hero-search .seg span { color: #cfd4de; }
.hero-search .seg input:checked + span { background: var(--amber); color: var(--amber-ink); }
.hero-fields { display: grid; grid-template-columns: 1.6fr 1fr 1fr auto; gap: 8px; background: #fff; border-radius: 16px; padding: 6px; }
.hf { display: flex; align-items: center; gap: 8px; padding-inline: 12px; height: 52px; border-radius: 12px; color: var(--text); transition: background .15s; }
.hf:hover { background: var(--bg); }
.hf + .hf { border-inline-start: 1px solid var(--line); border-radius: 0; }
.hf .ic { color: var(--muted); }
.hf input, .hf select { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; color: inherit; height: 100%; appearance: none; cursor: pointer; }
.hf input { cursor: text; }
.hero-stats { display: flex; justify-content: center; gap: clamp(24px, 6vw, 72px); margin-top: 34px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.8rem; font-weight: 900; color: #fff; line-height: 1.1; }
.hero-stats span { color: #949cad; font-size: .88rem; }

/* ---------- Segmented control ---------- */
.seg { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--bg); gap: 2px; border: 1px solid var(--line); }
.seg label { position: relative; flex: 1; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 16px; border-radius: 9px; font-weight: 700; font-size: .9rem; color: var(--muted); cursor: pointer; transition: .15s; white-space: nowrap; }
.seg input:checked + span { background: var(--card); color: var(--text); box-shadow: var(--shadow-sm); }
.seg input:focus-visible + span { outline: 2px solid var(--amber); }
.seg-sm { display: flex; } .seg-sm span { padding: 6px 8px; font-size: .84rem; }

/* ---------- Sections ---------- */
.section { padding: 44px 0; }
.section-alt { background: linear-gradient(#fff, var(--bg)); border-block: 1px solid var(--line); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.section-head h2 { margin: 0; display: flex; align-items: center; gap: 10px; }
.link-more { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: #a77a00; font-size: .93rem; }
.link-more:hover { color: var(--ink); }
.dot-gold { width: 10px; height: 10px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 5px rgba(245,179,1,.2); }

/* ---------- Category tiles ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cat-tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 20px 10px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); transition: .18s; }
.cat-tile:hover { border-color: var(--amber); transform: translateY(-3px); box-shadow: var(--shadow); }
.cat-ic { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 18px; background: var(--amber-soft); color: #8a6100; transition: .18s; }
.cat-ic .ic { width: 32px; height: 32px; }
.cat-tile:hover .cat-ic { background: var(--amber); color: var(--amber-ink); }
.cat-name { font-weight: 800; font-size: .93rem; line-height: 1.35; }
.cat-count { font-size: .78rem; color: var(--muted); }

/* ---------- Listing cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 280px); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; scrollbar-width: thin; }
.scroller > * { scroll-snap-align: start; }
.card { position: relative; background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); transition: transform .2s, box-shadow .2s, border-color .2s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card-media { position: relative; aspect-ratio: 4 / 3; background: #e9ebf0; overflow: hidden; display: block; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-media img { transform: scale(1.05); }
.card-ph { width: 100%; height: 100%; display: grid; place-items: center; color: #b6bcc9; background: linear-gradient(135deg, #eef0f4, #e1e4ea); }
.card-ph .ic { width: 38%; height: 38%; stroke-width: 1.1; }
.card-ph.big { aspect-ratio: 16/10; }
.card-badges { position: absolute; top: 10px; inset-inline-start: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 7px; font-size: .74rem; font-weight: 800; line-height: 1.5; }
.badge .ic { width: 12px; height: 12px; }
.badge-gold { background: var(--amber); color: var(--amber-ink); } .badge-gold .ic { fill: currentColor; }
.badge-dark { background: rgba(15, 18, 24, .82); color: #fff; }
.badge-blue { background: var(--blue); color: #fff; }
.badge-green { background: var(--green); color: #fff; }
.badge-red { background: var(--red); color: #fff; }
.badge-light { background: var(--bg); color: var(--text); border: 1px solid var(--line); }
.card-count { position: absolute; bottom: 10px; inset-inline-end: 10px; display: inline-flex; align-items: center; gap: 4px; background: rgba(15,18,24,.7); color: #fff; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 7px; }
.fav-btn { position: absolute; top: 10px; inset-inline-end: 10px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.95); display: grid; place-items: center; color: var(--ink); box-shadow: var(--shadow-sm); transition: .15s; z-index: 2; }
.fav-btn:hover { transform: scale(1.1); }
.fav-btn.on { color: var(--red); } .fav-btn.on .ic { fill: currentColor; }
.fav-btn.pop { animation: pop .35s; }
@keyframes pop { 50% { transform: scale(1.3); } }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-price { font-size: 1.15rem; font-weight: 900; color: var(--ink); letter-spacing: -.01em; }
.card-price small { font-size: .78rem; color: var(--muted); font-weight: 600; }
.card-title { font-size: .95rem; font-weight: 700; margin: 0; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.card-title a:hover { color: #a77a00; }
.card-specs { display: flex; flex-wrap: wrap; gap: 6px; }
.card-specs span { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 600; color: #4a5263; background: var(--bg); padding: 3px 8px; border-radius: 7px; }
.card-specs .ic { width: 13px; height: 13px; }
.card-foot { margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line); display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); }
.card-foot span { display: inline-flex; align-items: center; gap: 4px; }
.card-foot .ic { width: 14px; height: 14px; }
.card.is-sold .card-media img { filter: grayscale(.85); opacity: .75; }
.sold-ribbon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-12deg); background: var(--red); color: #fff; font-weight: 900; padding: 4px 18px; border-radius: 6px; letter-spacing: .08em; box-shadow: var(--shadow); }
.sold-ribbon.big { font-size: 1.6rem; padding: 8px 28px; }

/* ---------- Brands, why, CTA ---------- */
.brand-row { display: flex; flex-wrap: wrap; gap: 10px; }
.brand-chip { padding: 10px 18px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-weight: 800; font-size: .92rem; transition: .15s; direction: ltr; }
.brand-chip:hover { border-color: var(--ink); background: var(--ink); color: #fff; }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 24px; }
.why { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.why-ic { width: 54px; height: 54px; border-radius: 16px; background: var(--ink); color: var(--amber); display: grid; place-items: center; margin-bottom: 14px; }
.why-ic .ic { width: 28px; height: 28px; }
.why h3 { font-size: 1.08rem; } .why p { color: var(--muted); margin: 0; }
.cta { margin: 20px 0 60px; padding: 38px; border-radius: 22px; background: linear-gradient(120deg, var(--ink) 0%, var(--ink-3) 100%); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 24px; position: relative; overflow: hidden; }
.cta::before { content: ''; position: absolute; inset-inline-end: -80px; top: -80px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(rgba(245,179,1,.35), transparent 70%); }
.cta h2 { font-size: 1.6rem; } .cta p { color: #b8bfcc; margin: 0; }
.cta .btn { position: relative; }

/* ---------- Breadcrumbs & pills ---------- */
.crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .86rem; color: var(--muted); margin-bottom: 16px; }
.crumbs a:hover { color: var(--text); } .crumbs b { color: var(--text); font-weight: 700; }
.cat-pills { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 8px; scrollbar-width: none; }
.cat-pills::-webkit-scrollbar { display: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-weight: 700; font-size: .86rem; white-space: nowrap; transition: .15s; }
.pill small { color: var(--muted); font-weight: 600; }
.pill:hover { border-color: var(--ink); }
.pill.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill.active small { color: var(--amber); }

/* ---------- Browse layout ---------- */
.browse { display: grid; grid-template-columns: 290px 1fr; gap: 24px; align-items: start; }
.filters { position: sticky; top: calc(var(--header-h) + 16px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; }
.filters-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.filters-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 1.05rem; }
.filter-actions { display: grid; gap: 8px; margin-top: 16px; position: sticky; bottom: -18px; background: var(--card); padding-block: 12px; }
.results-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.results-title { font-size: 1.5rem; margin: 0; }
.results-tools { display: flex; gap: 8px; }
.sort-form select { height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); padding-inline: 12px; font: inherit; font-weight: 600; }
.count-dot { background: var(--amber); color: var(--amber-ink); border-radius: 99px; min-width: 20px; height: 20px; font-size: .75rem; display: inline-grid; place-items: center; padding: 0 5px; }
.show-mobile { display: none; }
.backdrop { position: fixed; inset: 0; background: rgba(15,18,24,.5); z-index: 80; opacity: 0; visibility: hidden; transition: .2s; }
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 32px; }
.pg-btn { min-width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-weight: 700; }
.pg-btn:hover { border-color: var(--ink); }
.pg-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.empty { text-align: center; padding: 60px 20px; background: var(--card); border-radius: var(--radius); border: 1px dashed var(--line-2); }
.empty > .ic { width: 56px; height: 56px; color: #c3c8d3; margin-bottom: 12px; }
.empty.big { border: 0; background: none; padding-top: 80px; }
.big-404 { font-size: 7rem; font-weight: 900; line-height: 1; background: linear-gradient(var(--amber), #ff8a00); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; margin: 0; }
.field > span { font-weight: 700; font-size: .88rem; color: #3b4354; }
.filters .field { margin-top: 12px; }
input[type=text], input[type=tel], input[type=number], input[type=password], input[type=email], input[type=url], input[type=search], input[type=date], input[type=datetime-local], input[type=time], input:not([type]), select, textarea {
  width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; font: inherit; color: var(--text); outline: 0; transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.7; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7385' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-inline-end: 36px; cursor: pointer; }
[dir=rtl] select { background-position: left 14px center; }
input:focus, select:focus, textarea:focus { border-color: var(--amber); box-shadow: 0 0 0 4px rgba(245,179,1,.18); }
.top-search input, .hf input, .hf select { border: 0; height: 100%; padding: 0; background-color: transparent; box-shadow: none !important; border-radius: 0; }
.hf select { padding-inline-end: 24px; background-position: left 0 center; }
[dir=ltr] .hf select { background-position: right 0 center; }
input:disabled { background: var(--bg); color: var(--muted); }
input::placeholder, textarea::placeholder { color: #a3aab8; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; margin-top: 12px; }
.check input { width: 20px; height: 20px; accent-color: var(--amber); flex-shrink: 0; }
.check.box { margin: 0; height: 46px; padding-inline: 14px; border: 1px solid var(--line-2); border-radius: 12px; }
.check span { display: inline-flex; align-items: center; gap: 6px; }
.input-ic { position: relative; }
.input-ic .ic { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-start: 14px; color: var(--muted); pointer-events: none; }
.input-ic input { padding-inline-start: 42px; }
[dir=rtl] input[dir=ltr] { text-align: right; }

/* ---------- Post form ---------- */
.post-head { text-align: center; margin-bottom: 24px; }
.post-head h1 { font-size: 1.9rem; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.step { margin-bottom: 18px; display: grid; gap: 16px; }
.step-title { display: flex; align-items: center; gap: 12px; font-size: 1.15rem; margin: 0; }
.step-n { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--ink); color: var(--amber); font-weight: 900; font-size: .95rem; }
.deal-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.deal-toggle input, .cat-pick input { position: absolute; opacity: 0; pointer-events: none; }
.deal-toggle label, .cat-pick label { position: relative; }
.deal-toggle span { display: flex; align-items: center; justify-content: center; gap: 8px; height: 54px; border: 2px solid var(--line); border-radius: 14px; font-weight: 800; cursor: pointer; transition: .15s; }
.deal-toggle input:checked + span { border-color: var(--amber); background: var(--amber-soft); color: #6d4c00; }
.cat-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.cat-pick span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px 6px; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; text-align: center; transition: .15s; height: 100%; }
.cat-pick span .ic { width: 30px; height: 30px; color: #8a6100; }
.cat-pick em { font-style: normal; font-weight: 700; font-size: .82rem; line-height: 1.35; }
.cat-pick span:hover { border-color: var(--line-2); background: var(--bg); }
.cat-pick input:checked + span { border-color: var(--amber); background: var(--amber-soft); }
.cat-pick input:focus-visible + span, .deal-toggle input:focus-visible + span { outline: 2px solid var(--ink); }
.price-row { display: flex; gap: 10px; align-items: end; }
.price-row input { font-size: 1.15rem; font-weight: 800; direction: ltr; }
.price-row .seg { height: 46px; align-items: stretch; }
.price-row .seg span { height: 100%; }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px; border: 2px dashed var(--line-2); border-radius: 16px; cursor: pointer; text-align: center; transition: .15s; background: var(--bg); }
.dropzone:hover, .dropzone.drag { border-color: var(--amber); background: var(--amber-soft); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dz-ic { width: 56px; height: 56px; border-radius: 50%; background: var(--card); display: grid; place-items: center; box-shadow: var(--shadow-sm); color: #8a6100; }
.dz-ic .ic { width: 26px; height: 26px; }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.img-grid:empty { display: none; }
.img-item { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--bg); }
.img-item img { width: 100%; height: 100%; object-fit: cover; }
.img-item .tag-cover { position: absolute; bottom: 6px; inset-inline-start: 6px; }
.img-item .rm { position: absolute; top: 6px; inset-inline-end: 6px; width: 28px; height: 28px; border-radius: 50%; background: rgba(15,18,24,.75); color: #fff; display: grid; place-items: center; }
.img-cover, .img-remove { position: absolute; top: 6px; cursor: pointer; }
.img-cover { inset-inline-start: 6px; } .img-remove { inset-inline-end: 6px; }
.img-cover input, .img-remove input { position: absolute; opacity: 0; }
.img-cover span, .img-remove span { width: 30px; height: 30px; border-radius: 50%; background: rgba(15,18,24,.6); color: #fff; display: grid; place-items: center; transition: .15s; }
.img-cover input:checked + span { background: var(--amber); color: var(--amber-ink); }
.img-cover input:checked + span .ic { fill: currentColor; }
.img-remove input:checked + span { background: var(--red); }
.img-item:has(.img-remove input:checked) img { opacity: .3; filter: grayscale(1); }
.post-submit { position: sticky; bottom: 12px; z-index: 5; }
.post-submit .btn { box-shadow: 0 14px 30px -10px rgba(245,179,1,.8); }

/* ---------- Listing detail ---------- */
.detail { display: grid; grid-template-columns: 1fr 370px; gap: 24px; align-items: start; }
.detail-main { display: grid; gap: 18px; min-width: 0; }
.gallery { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gallery-main { position: relative; aspect-ratio: 16 / 10; background: #0f1218; }
.gallery-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .3s; }
.gallery-main img.active { opacity: 1; }
.g-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; box-shadow: var(--shadow); z-index: 2; }
.g-prev { left: 12px; } .g-next { right: 12px; }
.g-counter { position: absolute; bottom: 12px; inset-inline-end: 12px; background: rgba(15,18,24,.7); color: #fff; padding: 3px 10px; border-radius: 8px; font-size: .82rem; font-weight: 700; direction: ltr; }
.gallery-thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; }
.gallery-thumbs button { width: 84px; height: 62px; border-radius: 10px; overflow: hidden; flex-shrink: 0; border: 2px solid transparent; opacity: .65; transition: .15s; }
.gallery-thumbs button.active { border-color: var(--amber); opacity: 1; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detail-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.detail-title { font-size: clamp(1.35rem, 2.6vw, 1.8rem); margin-bottom: 10px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .86rem; color: var(--muted); }
.detail-meta span { display: inline-flex; align-items: center; gap: 5px; }
.h-sub { font-size: 1.1rem; margin: 26px 0 14px; }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.spec { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--bg); border-radius: 12px; }
.spec-ic { width: 40px; height: 40px; border-radius: 10px; background: var(--card); display: grid; place-items: center; color: #8a6100; flex-shrink: 0; }
.spec small { display: block; color: var(--muted); font-size: .78rem; }
.spec b { font-weight: 800; font-size: .95rem; }
.desc { white-space: normal; line-height: 1.9; color: #343c4d; }
.detail-side { display: grid; gap: 16px; }
.sticky { position: sticky; top: calc(var(--header-h) + 16px); }
.price-box { padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.price-big { font-size: 1.9rem; font-weight: 900; color: var(--ink); letter-spacing: -.02em; line-height: 1.2; }
.price-big small { font-size: .95rem; color: var(--muted); font-weight: 600; }
.price-sub { display: flex; align-items: center; gap: 10px; margin-top: 4px; font-size: .88rem; }
.contact-btns { display: grid; gap: 10px; }
.contact-btns [data-reveal] span { direction: ltr; unicode-bidi: plaintext; }
.action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.seller-card { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 14px; border-radius: 14px; background: var(--bg); transition: .15s; }
.seller-card:hover { background: var(--line); }
.seller-card > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.seller-card small { font-size: .8rem; }
.verified { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--blue); color: #fff; vertical-align: middle; }
.verified .ic { width: 11px; height: 11px; stroke-width: 3.5; }
.owner-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.safety h4 { display: flex; align-items: center; gap: 8px; font-size: 1rem; color: #106b33; }
.safety p { font-size: .88rem; color: var(--muted); }
.report summary { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .86rem; font-weight: 600; }
.report summary:hover { color: var(--red); }
.report .form { margin-top: 10px; gap: 4px; }
.report .check { margin-top: 4px; }
.mobile-contact { display: none; }

/* ---------- Seller / account ---------- */
.seller-hero { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.seller-hero h1 { font-size: 1.6rem; margin-bottom: 6px; }
.seller-actions { display: flex; gap: 10px; }
.account-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.account-head .page-title { margin: 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 12px 16px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--ink); border-color: var(--amber); }
.tabs-sm a { padding: 8px 12px; font-size: .88rem; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.stat { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--amber-soft); color: #8a6100; display: grid; place-items: center; }
.stat b { display: block; font-size: 1.4rem; font-weight: 900; line-height: 1.1; }
.stat small { color: var(--muted); }
.my-list { display: grid; gap: 12px; }
.my-item { display: flex; align-items: center; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.my-thumb { width: 120px; height: 90px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: var(--bg); }
.my-thumb img { width: 100%; height: 100%; object-fit: cover; }
.my-info { flex: 1; min-width: 0; }
.my-title { font-weight: 800; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-price { font-weight: 800; color: #8a6100; margin-bottom: 4px; }
.my-actions { display: flex; gap: 6px; }
.status { display: inline-flex; padding: 2px 10px; border-radius: 99px; font-size: .76rem; font-weight: 800; }
.status-active { background: var(--green-soft); color: #106b33; }
.status-pending { background: var(--amber-soft); color: #7a5600; }
.status-sold { background: var(--blue-soft); color: #1d4ed8; }
.status-rejected, .status-expired { background: var(--red-soft); color: #a11c1c; }
.narrow-form { max-width: 640px; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 30px 16px 80px;
  background: radial-gradient(600px 300px at 50% 0%, rgba(245,179,1,.12), transparent 70%); }
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 30px 16px; background: var(--bg); }
.auth-card { width: 100%; max-width: 440px; background: var(--card); border-radius: 22px; padding: 32px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.auth-card h3 { margin-top: 10px; font-size: 1rem; color: var(--muted); }
.auth-logo { display: flex; justify-content: center; margin-bottom: 12px; }
.auth-logo img { border-radius: 14px; }
.auth-title { text-align: center; font-size: 1.5rem; margin-bottom: 22px; }
.auth-alt { text-align: center; margin: 18px 0 0; color: var(--muted); }
.auth-alt a { color: #a77a00; font-weight: 800; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #c4cad6; padding: 50px 0 0; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 30px; }
.footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer .muted { color: #8c94a5; margin: 14px 0; max-width: 320px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .9rem; }
.footer-links a:hover { color: var(--amber); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.07); margin-top: 36px; padding-block: 18px; font-size: .85rem; color: #7d8597; }
.bottom-nav { display: none; }

/* ---------- Admin ---------- */
body.admin { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side { background: var(--ink); color: #c4cad6; padding: 20px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 24px; }
.admin-side nav { display: grid; gap: 4px; }
.admin-side nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-weight: 600; }
.admin-side nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-side nav a.active { background: var(--amber); color: var(--amber-ink); }
.admin-logout button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; font-weight: 600; cursor: pointer; text-align: start; }
.admin-logout button:hover { background: rgba(239,68,68,.15); color: #fff; }
.admin-side nav em { margin-inline-start: auto; font-style: normal; background: var(--red); color: #fff; font-size: .72rem; font-weight: 800; padding: 1px 8px; border-radius: 99px; }
.admin-lang { margin-top: auto; display: flex; gap: 6px; font-size: .8rem; }
.admin-lang a { padding: 4px 8px; border-radius: 6px; } .admin-lang a.active { background: rgba(255,255,255,.1); color: #fff; }
.admin-main { padding: 28px; min-width: 0; }
.admin-top, .admin-backdrop { display: none; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 2px; }
.kpi small { color: var(--muted); font-weight: 700; }
.kpi b { font-size: 1.9rem; font-weight: 900; line-height: 1.2; }
.kpi a { color: #a77a00; font-weight: 700; font-size: .85rem; }
.kpi-warn { border-color: var(--amber); background: var(--amber-soft); }
.admin-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 200px; padding-top: 20px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.bar span { width: 100%; background: linear-gradient(var(--amber), #ffa000); border-radius: 6px 6px 2px 2px; min-height: 3px; }
.bar small { font-size: .7rem; color: var(--muted); margin-top: 4px; }
.bar em { position: absolute; top: 0; font-style: normal; font-size: .72rem; font-weight: 700; }
.hbar { display: grid; grid-template-columns: 130px 1fr 36px; align-items: center; gap: 10px; margin-bottom: 10px; font-size: .88rem; }
.hbar div { height: 10px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.hbar i { display: block; height: 100%; background: var(--ink); border-radius: 99px; }
.hbar b { text-align: end; }
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.admin-toolbar .tabs { margin: 0; border: 0; }
.admin-search { display: flex; gap: 6px; }
.admin-search input { height: 36px; width: 240px; }
.table-wrap { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: start; font-size: .78rem; color: var(--muted); font-weight: 700; padding: 12px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border: 0; }
.table tr:hover td { background: #fcfcfd; }
.table a:hover { color: #a77a00; }
.row-muted td { opacity: .55; }
.tthumb { width: 64px; height: 48px; border-radius: 8px; overflow: hidden; background: var(--bg); display: grid; place-items: center; color: #b6bcc9; }
.tthumb img { width: 100%; height: 100%; object-fit: cover; }
form.inline { display: inline; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .detail { grid-template-columns: 1fr 330px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  :root { --header-h: 60px; }
  body { padding-bottom: 72px; }
  .top-nav .nav-link:not([data-dropdown]) { display: none; }
  .hide-sm { display: none !important; }
  .top-search { max-width: none; height: 40px; }
  .logo span { display: none; }
  .hero { padding: 36px 0 34px; }
  .hero-fields { grid-template-columns: 1fr 1fr; }
  .hf-q { grid-column: 1 / -1; }
  .hf + .hf { border-inline-start: 0; }
  .hf { background: var(--bg); border-radius: 12px !important; }
  .hero-fields .btn { grid-column: 1 / -1; }
  .browse { grid-template-columns: 1fr; }
  .filters { position: fixed; top: 0; bottom: 0; inset-inline-start: 0; width: min(360px, 90vw); z-index: 90; border-radius: 0; max-height: none; transform: translateX(-105%); transition: transform .25s; }
  [dir=rtl] .filters { transform: translateX(105%); }
  body.filters-open .filters { transform: none; }
  body.filters-open .backdrop { opacity: 1; visibility: visible; }
  body.filters-open { overflow: hidden; }
  .show-mobile { display: inline-flex; }
  .detail { grid-template-columns: 1fr; }
  .detail-side .sticky { position: static; }
  .contact-btns > a { display: none; }   /* call & WhatsApp live in the bottom bar; the message box stays */
  .mobile-contact { display: flex; gap: 8px; align-items: center; position: fixed; bottom: 72px; inset-inline: 10px; z-index: 40; background: rgba(255,255,255,.97); backdrop-filter: blur(10px); padding: 10px; border-radius: 16px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
  .mc-price { flex: 1; font-weight: 900; font-size: 1.05rem; }
  .why-grid { grid-template-columns: 1fr; }
  .cta { flex-direction: column; text-align: center; padding: 28px 20px; }
  .bottom-nav { display: flex; position: fixed; bottom: 0; inset-inline: 0; z-index: 45; background: #fff; border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px -10px rgba(0,0,0,.15); }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .7rem; font-weight: 700; color: var(--muted); padding: 4px 0; }
  .bottom-nav a .ic { width: 22px; height: 22px; }
  .bottom-nav a.active { color: var(--ink); }
  .bottom-nav a.active .ic { color: #c48f00; }
  .bn-plus { width: 46px; height: 46px; margin-top: -22px; border-radius: 16px; background: var(--amber); color: var(--amber-ink); display: grid; place-items: center; box-shadow: 0 8px 18px -6px rgba(245,179,1,.9); border: 4px solid #fff; }
  .bn-post { color: var(--text) !important; }
  .stat-row { grid-template-columns: 1fr; }
  .post-submit { bottom: 80px; }
}
@media (max-width: 560px) {
  body { font-size: 14.5px; }
  .grid, .grid-3 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card-body { padding: 10px; }
  .card-price { font-size: 1rem; }
  .card-title { font-size: .86rem; }
  .card-specs span:nth-child(n+3) { display: none; }
  .card-foot { font-size: .72rem; }
  .scroller { grid-auto-columns: 72%; gap: 12px; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .cat-tile { padding: 14px 6px 10px; }
  .cat-ic { width: 48px; height: 48px; border-radius: 14px; }
  .cat-ic .ic { width: 26px; height: 26px; }
  .cat-name { font-size: .8rem; }
  .row3 { grid-template-columns: 1fr 1fr; }
  .panel { padding: 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .my-thumb { width: 84px; height: 70px; }
  .my-item { flex-wrap: wrap; }
  .my-actions { width: 100%; justify-content: flex-end; }
  .hero-stats strong { font-size: 1.4rem; }
  .section { padding: 30px 0; }
  .auth-card { padding: 24px 18px; }
  .seller-actions { width: 100%; } .seller-actions .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Admin: mobile ---------- */
@media (max-width: 900px) {
  body.admin { display: block; padding-top: 58px; }
  .admin-top { display: flex; align-items: center; gap: 12px; position: fixed; top: 0; inset-inline: 0; z-index: 60; height: 58px; padding: 0 12px; background: var(--ink); color: #fff; box-shadow: 0 4px 16px -8px rgba(0,0,0,.5); }
  .admin-top-title { flex: 1; font-size: 1.02rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .admin-top-logo img { display: block; border-radius: 8px; }
  .admin-burger { width: 42px; height: 42px; border: 0; border-radius: 12px; background: rgba(255,255,255,.08); display: grid; place-content: center; gap: 4px; cursor: pointer; }
  .admin-burger span { display: block; width: 20px; height: 2px; border-radius: 2px; background: #fff; transition: transform .2s, opacity .2s; }
  .admin-menu-open .admin-burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .admin-menu-open .admin-burger span:nth-child(2) { opacity: 0; }
  .admin-menu-open .admin-burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .admin-side { position: fixed; top: 58px; bottom: 0; inset-inline-start: 0; z-index: 59; width: min(290px, 84vw); height: auto; overflow-y: auto; padding: 16px 12px calc(16px + env(safe-area-inset-bottom)); transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility .25s; gap: 18px; }
  [dir="ltr"] .admin-side { transform: translateX(-100%); }
  .admin-menu-open .admin-side { transform: none; visibility: visible; }
  html:has(body.admin), body.admin { overflow-x: hidden; max-width: 100vw; }
  .admin-side > .logo { display: none; }
  .admin-side nav a { padding: 12px 14px; font-size: .98rem; }
  .admin-side nav a span { display: inline; }
  .admin-lang { margin-top: 8px; }
  .admin-lang a { padding: 8px 12px; }
  .admin-backdrop { position: fixed; inset: 58px 0 0; z-index: 58; background: rgba(10,14,22,.5); opacity: 0; pointer-events: none; transition: opacity .25s; display: block; }
  .admin-menu-open .admin-backdrop { opacity: 1; pointer-events: auto; }
  .admin-menu-open { overflow: hidden; }

  .admin-main { padding: 14px 12px 40px; }
  .admin-main > .page-title { display: none; }
  .admin-main .alert { margin-bottom: 12px; }
  .admin-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; }
  .kpi b { font-size: 1.5rem; }
  .hbar { grid-template-columns: 96px 1fr 32px; font-size: .8rem; }
  .bars { gap: 3px; } .bar em { font-size: .62rem; } .bar small { font-size: .6rem; }

  .admin-toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .admin-toolbar .tabs, .admin-main .tabs { margin-inline: -12px; padding-inline: 12px; scrollbar-width: none; }
  .admin-main .tabs::-webkit-scrollbar { display: none; }
  .admin-search { width: 100%; }
  .admin-search input { flex: 1; width: auto; height: 42px; }

  .admin-main .panel { padding: 14px; border-radius: 14px; }
  .admin-main .row2, .admin-main .row3 { grid-template-columns: 1fr; }
  .admin-main input:not([type=checkbox]):not([type=radio]), .admin-main select, .admin-main textarea { width: 100%; max-width: 100%; font-size: 16px; }
  .admin-main .flex-between { flex-wrap: wrap; gap: 10px; }
  .banner-admin { grid-template-columns: 1fr; }
  .settings-form .btn-lg, .admin-main form > .btn-primary { width: 100%; }

  /* tables become cards */
  .admin-main .table-wrap { background: none; border: 0; box-shadow: none; padding: 0; overflow: visible; }
  .admin-main .table, .admin-main .table tbody, .admin-main .table tr, .admin-main .table td { display: block; width: 100%; }
  .admin-main .table thead { display: none; }
  .admin-main .table tr { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 10px; box-shadow: 0 2px 8px -6px rgba(0,0,0,.2); }
  .admin-main .table tr:hover td { background: none; }
  .admin-main .table td { border: 0; padding: 5px 0; display: flex; gap: 10px; align-items: baseline; justify-content: space-between; text-align: end; white-space: normal; }
  .admin-main .table td[data-label]::before { content: attr(data-label); flex: none; color: var(--muted); font-size: .78rem; font-weight: 700; text-align: start; }
  .admin-main .table td.td-block { display: block; text-align: start; font-size: .95rem; }
  .admin-main .table td.td-block::before { display: block; margin-bottom: 2px; }
  .admin-main .table td.td-nolabel { display: block; }
  .admin-main .table td:has(.tthumb) .tthumb { width: 100%; height: 140px; border-radius: 10px; }
  .admin-main .table td:has(.tthumb):not(:has(img)) { display: none; }
  .admin-main .table td:last-child { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 6px; padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--line); }
  .admin-main .table td:last-child::before { width: 100%; }
  .admin-main .table td:last-child form.inline { display: contents; }
  .admin-main .table .btn-xs { min-height: 38px; padding: 8px 14px; font-size: .85rem; border-radius: 10px; }
  .admin-main .table td.nowrap { white-space: normal; }
  .admin-main .table td:empty { display: none; }
  .pay-row { align-items: flex-start; }
  .code-box { white-space: pre-wrap; word-break: break-all; }
}
