/* zain.sale — site styles. Tokens first; everything else is built from them. */
:root{
  --ink:#0E1116; --ink-2:#3A404C; --muted:#5B6270; --line:#E4E7EC; --line-2:#D0D5DD;
  --soft:#F5F6F8; --bg:#FFFFFF; --accent:#0A4DDB; --accent-hover:#083DB0; --accent-soft:#EAF0FF; --accent-ink:#0A3AA8;
  --pill:rgba(14,17,22,.84);
  --font:'Plus Jakarta Sans',system-ui,-apple-system,'Segoe UI',sans-serif;
  --font-ar:'Almarai','Plus Jakarta Sans',system-ui,sans-serif;
  --wrap:1320px; color-scheme:light;
}
*{box-sizing:border-box}
html,body{margin:0}
[hidden]{display:none!important}
body{background:var(--bg);color:var(--ink);font-family:var(--font);-webkit-font-smoothing:antialiased}
html[lang=ar] body{font-family:var(--font-ar)}
html[lang=ar] *{letter-spacing:0!important}
a{color:inherit;text-decoration:none}
a:hover{color:var(--accent)}
img{max-width:100%;display:block}
button,input,select,textarea{font:inherit;color:inherit}
:focus-visible{outline:3px solid #9DB8FF;outline-offset:2px}
.wrap{max-width:var(--wrap);margin:0 auto;padding-inline:32px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.muted{color:var(--muted)}
bdi{unicode-bidi:isolate}

/* header */
.hdr{border-bottom:1px solid var(--line);background:var(--bg);position:sticky;top:env(safe-area-inset-top,0px);z-index:20}
.hdr-row{height:76px;display:flex;align-items:center;gap:28px}
.logo{font-size:26px;font-weight:800;letter-spacing:-.03em;font-family:var(--font)!important;direction:ltr;white-space:nowrap}
.logo span{color:var(--accent)}
.nav{display:flex;gap:22px;font-size:15px;font-weight:600}
.search{flex:1;display:flex;align-items:center;gap:10px;height:46px;padding:0 16px;background:var(--soft);border-radius:10px;min-width:0}
.search input{flex:1;border:0;background:transparent;font-size:15px;outline:none;min-width:0}
.lang{font-size:15px;font-weight:700;padding:10px 4px;white-space:nowrap}
.hdr-link{font-size:15px;font-weight:600;white-space:nowrap}
.chips{display:flex;gap:10px;overflow-x:auto;scrollbar-width:none;padding-bottom:14px}
.chips::-webkit-scrollbar{display:none}
.chip{display:inline-flex;align-items:center;height:40px;padding:0 16px;border:1px solid var(--line);border-radius:999px;font-size:14px;font-weight:600;background:var(--bg);white-space:nowrap;cursor:pointer}
.chip:hover{border-color:var(--ink);color:var(--ink)}
.chip.on{background:var(--ink);border-color:var(--ink);color:#fff}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:48px;padding:0 22px;border-radius:10px;background:var(--accent);color:#fff;font-weight:700;font-size:15px;border:0;cursor:pointer;white-space:nowrap}
.btn:hover{background:var(--accent-hover);color:#fff}
.btn[disabled]{opacity:.55;cursor:default}
.btn-ghost{white-space:nowrap;display:inline-flex;align-items:center;justify-content:center;gap:8px;height:48px;padding:0 20px;border-radius:10px;background:var(--bg);color:var(--ink);font-weight:700;font-size:15px;border:1px solid var(--line-2);cursor:pointer}
.btn-ghost:hover{border-color:var(--ink);color:var(--ink)}
.btn-block{width:100%}

/* sections */
main{padding-top:28px}
.sec{margin-top:64px}
.sec-h{margin:0 0 20px;font-size:26px;font-weight:800;letter-spacing:-.02em;text-wrap:balance}

/* hero */
.hero{display:grid;grid-template-columns:minmax(0,1.75fr) minmax(0,1fr);gap:28px}
.hero-img{position:relative;display:block;border-radius:14px;overflow:hidden;aspect-ratio:16/10;background:var(--soft)}
.hero-img img{width:100%;height:100%;object-fit:cover}
.hero-side{display:flex;flex-direction:column;gap:20px;padding:8px 0}
.eyebrow{font-size:13px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
.hero h1{margin:0;font-size:36px;line-height:1.12;font-weight:800;letter-spacing:-.03em;text-wrap:balance}
.facts-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;background:var(--line);border:1px solid var(--line);border-radius:12px;overflow:hidden}
.facts-2>div{background:var(--bg);padding:14px 16px}
.facts-2 small{display:block;font-size:12px;color:var(--muted);font-weight:600}
.facts-2 b{font-size:16px}
.badge{position:absolute;top:12px;inset-inline-start:12px;background:#fff;color:var(--ink);font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;padding:6px 10px;border-radius:6px}
.price-pill{position:absolute;bottom:12px;inset-inline-start:12px;background:var(--pill);color:#fff;font-size:14px;font-weight:700;padding:6px 11px;border-radius:7px}

/* categories */
.cats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px 20px}
.tile{display:flex;flex-direction:column;gap:10px}
.tile .ph{aspect-ratio:16/10;border-radius:12px;overflow:hidden;background:var(--soft)}
.tile img{width:100%;height:100%;object-fit:cover;transition:transform .35s ease}
.tile:hover img{transform:scale(1.05)}
.tile b{font-size:16px}
.tile small{font-size:13px;color:var(--muted)}

/* feed */
.feed-top{display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap;border-bottom:1px solid var(--line);margin-bottom:20px}
.feed-top .sec-h{margin:0;padding-bottom:12px}
.tabs{display:flex;gap:22px}
.tab{background:none;border:0;padding:8px 0;font-size:14px;font-weight:600;color:var(--muted);cursor:pointer;border-bottom:2px solid transparent}
.tab.on{color:var(--ink);border-bottom-color:var(--ink)}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:32px 24px}
.card{position:relative}
.card>a{display:flex;flex-direction:column;gap:12px}
.card .ph{position:relative;aspect-ratio:3/2;border-radius:10px;overflow:hidden;background:var(--soft)}
.card .ph img{width:100%;height:100%;object-fit:cover;transition:transform .35s ease}
.card:hover .ph img{transform:scale(1.04)}
.card:hover .t{color:var(--accent)}
.card .t{font-size:17px;font-weight:700;line-height:1.3;display:flex;align-items:center;gap:6px}
.card .s{font-size:14px;color:var(--ink-2);line-height:1.45}
.card .m{font-size:13px;color:var(--muted);display:flex;align-items:center;gap:6px}
.heart{position:absolute;top:12px;inset-inline-end:12px;width:40px;height:40px;border-radius:999px;border:0;background:rgba(255,255,255,.92);display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:2}
.heart.on svg{fill:var(--ink)}
.empty{padding:48px;text-align:center;background:var(--soft);border-radius:12px;color:var(--muted);font-size:15px}
.skel{background:linear-gradient(90deg,var(--soft),#eceef2,var(--soft));background-size:200% 100%;animation:sk 1.2s infinite}
@keyframes sk{to{background-position:-200% 0}}
@media (prefers-reduced-motion:reduce){.skel{animation:none}*{transition:none!important}}

/* trust + sell */
.trust{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px}
.trust>div{display:flex;flex-direction:column;gap:10px;padding:24px;background:var(--soft);border-radius:12px}
.trust h3{margin:0;font-size:17px}
.trust p{margin:0;font-size:14px;line-height:1.55;color:var(--ink-2)}
.sell{margin-top:88px;background:var(--ink);color:#fff;border-radius:18px;padding:56px}
.sell h2{margin:0;font-size:36px;font-weight:800;letter-spacing:-.03em;line-height:1.1}
.sell p{margin:0;color:#B8BEC9;font-size:17px;line-height:1.55}
.steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.steps>div{border:1px solid #2A2F38;border-radius:12px;padding:24px;display:flex;flex-direction:column;gap:8px}
.steps span{font-size:14px;font-weight:800;color:#7FA6FF}
.steps h3{margin:0;font-size:18px}
.steps p{font-size:14px}

/* footer */
.ftr{margin-top:88px;border-top:1px solid var(--line)}
.ftr-cols{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:32px;padding-block:48px 32px}
.ftr-cols div{display:flex;flex-direction:column;gap:10px;font-size:14px}
.ftr-cols strong{font-size:13px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.ftr-bot{border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:16px;padding-block:20px 32px;font-size:13px;color:var(--muted)}

/* listing page */
.crumbs{font-size:14px;color:var(--muted);display:flex;gap:8px;flex-wrap:wrap}
.ad-head{display:flex;justify-content:space-between;align-items:end;gap:24px;flex-wrap:wrap;margin:18px 0 20px}
.ad-head h1{margin:0;font-size:36px;line-height:1.1;font-weight:800;letter-spacing:-.03em}
.tags{display:flex;gap:8px;flex-wrap:wrap}
.tag{font-size:12px;font-weight:700;background:var(--soft);color:var(--ink-2);padding:6px 10px;border-radius:6px}
.tag.dark{background:var(--ink);color:#fff;text-transform:uppercase;letter-spacing:.06em;font-weight:800}
.tag.blue{background:var(--accent-soft);color:var(--accent-ink)}
.gallery{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr);grid-template-rows:250px 250px;gap:8px;border-radius:14px;overflow:hidden}
.gallery>*{overflow:hidden;background:var(--soft);position:relative}
.gallery>*:first-child{grid-row:span 2}
.gallery img{width:100%;height:100%;object-fit:cover}
.gallery.g1{grid-template-columns:minmax(0,1fr);grid-template-rows:520px}
.gallery.g2{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:460px}
.gallery.g2>*:first-child{grid-row:auto}
.gallery.g3{grid-template-columns:minmax(0,2fr) minmax(0,1fr)}
.gallery.g4{grid-template-columns:minmax(0,2fr) minmax(0,1fr);grid-template-rows:repeat(3,164px)}
.gallery.g4>*:first-child{grid-row:span 3}
.gallery .more{position:absolute;inset:0;background:rgba(14,17,22,.6);color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;font-weight:700}
.ad-body{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:48px;margin-top:36px;align-items:start}
.ad-main{display:flex;flex-direction:column;gap:44px}
.ad-main h2{margin:0 0 16px;font-size:22px;font-weight:800;letter-spacing:-.02em}
.facts{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr) minmax(0,.8fr) minmax(0,1.2fr);gap:1px;background:var(--line);border:1px solid var(--line);border-radius:12px;overflow:hidden;margin:0}
.facts dt{font-size:14px;color:var(--muted);font-weight:600;padding:14px 16px;background:var(--soft);margin:0}
.facts dd{font-size:15px;font-weight:600;padding:14px 16px;margin:0;background:var(--bg)}
.ad-main ul{margin:0;padding-inline-start:20px;display:flex;flex-direction:column;gap:10px;font-size:16px;line-height:1.55;color:#262B33}
.ad-main p.desc{margin:0;font-size:16px;line-height:1.7;color:#262B33;white-space:pre-line}
.tr-note{margin-top:12px;display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted)}
.linkbtn{background:none;border:0;padding:8px 0;font-size:13px;font-weight:700;color:var(--accent);cursor:pointer}
.orig{margin-top:12px;padding:16px 18px;background:var(--soft);border-radius:12px;font-size:16px;line-height:1.8}
.side{position:sticky;top:100px;display:flex;flex-direction:column;gap:16px}
.box{border:1px solid var(--line);border-radius:16px;padding:24px;display:flex;flex-direction:column;gap:16px}
.box.shadow{box-shadow:0 12px 32px rgba(14,17,22,.06)}
.price{font-size:36px;font-weight:800;letter-spacing:-.03em}
.seller{display:flex;gap:12px;align-items:center}
.avatar{width:48px;height:48px;border-radius:10px;background:var(--ink);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800;flex-shrink:0}
.note{background:var(--soft);border-radius:16px;padding:18px 20px;font-size:13px;color:var(--ink-2);line-height:1.55}

/* dialog (sign-in) */
dialog.sheet{border:0;border-radius:18px;padding:0;width:min(440px,calc(100vw - 32px));box-shadow:0 24px 64px rgba(14,17,22,.25)}
dialog.sheet::backdrop{background:rgba(14,17,22,.45)}
.sheet-in{padding:28px;display:flex;flex-direction:column;gap:16px}
.sheet-in h2{margin:0;font-size:24px;font-weight:800}
.sheet-in p{margin:0;color:var(--ink-2);font-size:15px;line-height:1.55}
.field{display:flex;flex-direction:column;gap:6px;font-size:14px;font-weight:600}
.inp{height:52px;border:1px solid var(--line-2);border-radius:10px;padding:0 14px;font-size:16px;background:var(--bg);width:100%}
.otp{letter-spacing:.6em;text-align:center;font-size:24px;font-weight:700;direction:ltr}
.err{color:#B42318;font-size:14px;min-height:1em}
.x{position:absolute;top:14px;inset-inline-end:14px;width:40px;height:40px;border:0;background:var(--soft);border-radius:10px;cursor:pointer}

/* rtl mirrors */
html[dir=rtl] .flip{transform:scaleX(-1)}

@media (max-width:1000px){
  .hero,.ad-body{grid-template-columns:minmax(0,1fr)}
  .cats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .trust{grid-template-columns:repeat(2,minmax(0,1fr))}
  .steps{grid-template-columns:minmax(0,1fr)}
  .nav,.hide-sm{display:none!important}
  .gallery{grid-template-columns:minmax(0,1fr);grid-template-rows:auto}
  .gallery>*:not(:first-child){display:none}
  .gallery>*:first-child{aspect-ratio:4/3}
  .facts{grid-template-columns:minmax(0,1fr) minmax(0,1.4fr)}
  .side{position:static;order:-1}
  .gallery.g1,.gallery.g2,.gallery.g3,.gallery.g4{grid-template-columns:minmax(0,1fr);grid-template-rows:auto}
  .gallery>*:first-child{grid-row:auto!important}
}
@media (max-width:700px){
  .wrap{padding-inline:16px}
  .hdr-row{flex-wrap:wrap;height:auto;padding-block:12px;gap:12px}
  .search{order:3;flex-basis:100%}
  .hdr-row .btn{margin-inline-start:auto;height:44px}
  .sell{padding:28px}
  .hero h1,.ad-head h1{font-size:30px}
  .trust{grid-template-columns:minmax(0,1fr)}
}

/* chat */
.ch{display:grid;grid-template-columns:320px minmax(0,1fr);gap:24px;height:calc(100vh - 190px);min-height:520px}
.ch-list{border:1px solid var(--line);border-radius:14px;overflow:auto;display:flex;flex-direction:column}
.ch-list h2{margin:0;padding:16px 18px;font-size:18px;font-weight:800;border-bottom:1px solid var(--line)}
.th{display:flex;gap:12px;padding:14px 18px;border-bottom:1px solid #EEF0F3;align-items:center}
.th.on{background:var(--soft)}
.th img,.th .ph0{width:56px;height:42px;border-radius:8px;object-fit:cover;flex-shrink:0;background:var(--soft)}
.th div{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.th strong{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.th span{font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.th .dot{min-width:20px;height:20px;border-radius:999px;background:var(--accent);color:#fff;font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center;padding:0 6px;flex:0}
.conv{border:1px solid var(--line);border-radius:14px;display:flex;flex-direction:column;min-height:0;overflow:hidden}
.adbar{display:flex;gap:14px;align-items:center;padding:14px 18px;border-bottom:1px solid var(--line)}
.adbar img{width:72px;height:54px;border-radius:8px;object-fit:cover}
.adbar .t{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}
.msgs{flex:1;overflow:auto;padding:20px 18px;display:flex;flex-direction:column;gap:10px;background:#FAFBFC}
.sys{align-self:center;font-size:12px;color:var(--muted);background:#EEF0F3;border-radius:999px;padding:6px 12px;text-align:center}
.m{max-width:70%;padding:10px 14px;border-radius:14px;font-size:15px;line-height:1.45;white-space:pre-line;overflow-wrap:anywhere}
.m small{display:block;font-size:11px;margin-top:4px;opacity:.7}
.m.in{align-self:flex-start;background:#fff;border:1px solid var(--line);border-end-start-radius:4px}
.m.out{align-self:flex-end;background:var(--accent);color:#fff;border-end-end-radius:4px}
.m.offer{border:2px solid var(--accent);background:#fff;color:var(--ink)}
.m.offer.out{align-self:flex-end}
.quick{display:flex;gap:8px;padding:12px 18px 0;overflow-x:auto;scrollbar-width:none}
.quick button{flex-shrink:0;height:36px;padding:0 14px;border-radius:999px;border:1px solid var(--line-2);background:#fff;font-size:13px;font-weight:600;cursor:pointer}
.send{display:flex;gap:10px;padding:12px 18px 16px;align-items:center}
.send .inp{flex:1;min-width:0}
.icon-btn{width:52px;height:52px;flex-shrink:0;border-radius:10px;border:0;background:var(--accent);display:flex;align-items:center;justify-content:center;cursor:pointer}
.offer-row{display:flex;gap:8px;padding:12px 18px 0;align-items:center}
@media (max-width:800px){
  .ch{grid-template-columns:minmax(0,1fr);height:calc(100vh - 170px)}
  .ch.has-thread .ch-list{display:none}
  .ch:not(.has-thread) .conv{display:none}
  .m{max-width:85%}
}

/* sell */
.form{display:flex;flex-direction:column;gap:28px}
.fs{border:1px solid var(--line);border-radius:14px;padding:24px;display:flex;flex-direction:column;gap:16px;margin:0}
.fs legend{font-size:18px;font-weight:800;padding:0 6px}
.row2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
select.inp{appearance:none;background:var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235B6270' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat;background-position:right 14px center;padding-inline-end:36px}
html[dir=rtl] select.inp{background-position:left 14px center}
textarea.inp{height:auto;min-height:110px;padding:12px 14px;line-height:1.55;resize:vertical}
.check{display:flex;gap:10px;align-items:flex-start;font-size:15px;font-weight:500}
.check input{width:20px;height:20px;margin-top:2px;flex-shrink:0}
.thumbs{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:10px}
.thumb{position:relative;aspect-ratio:1;border-radius:10px;overflow:hidden;background:var(--soft);border:2px solid transparent}
.thumb img{width:100%;height:100%;object-fit:cover}
.thumb.off{opacity:.35}
.thumb button{position:absolute;top:6px;inset-inline-end:6px;width:28px;height:28px;border-radius:999px;border:0;background:rgba(14,17,22,.75);color:#fff;cursor:pointer}
.drop{border:1.5px dashed #B7BECA;border-radius:12px;min-height:110px;display:flex;align-items:center;justify-content:center;text-align:center;font-weight:700;cursor:pointer;padding:16px}
.callout{background:var(--accent-soft);border-radius:14px;padding:20px;display:flex;flex-direction:column;gap:12px}
.status{font-size:12px;font-weight:700;padding:4px 8px;border-radius:6px;background:var(--soft)}
.status.live{background:#E7F6EC;color:#1B6B3A}.status.review{background:#FFF4E0;color:#8A5300}.status.sold{background:var(--ink);color:#fff}
@media (max-width:700px){.row2{grid-template-columns:minmax(0,1fr)}}

/* account menu + toast */
.acct{position:relative}
.acct summary{list-style:none;display:flex;align-items:center;gap:8px;height:44px;padding:0 12px;border:1px solid var(--line,#E4E7EC);border-radius:999px;font-size:15px;font-weight:600;cursor:pointer;white-space:nowrap}
.acct summary::-webkit-details-marker{display:none}
.acct-menu{position:absolute;inset-inline-end:0;top:calc(100% + 8px);min-width:190px;background:#fff;border:1px solid var(--line,#E4E7EC);border-radius:12px;box-shadow:0 12px 32px rgba(14,17,22,.12);padding:6px;display:flex;flex-direction:column;z-index:50}
.acct-menu a,.acct-menu button{display:block;text-align:start;padding:12px 14px;border-radius:8px;font:inherit;font-size:15px;font-weight:600;color:inherit;background:none;border:0;cursor:pointer}
.acct-menu a:hover,.acct-menu button:hover{background:#F5F6F8}
.toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,20px);background:#0E1116;color:#fff;padding:12px 18px;border-radius:10px;font-weight:600;opacity:0;pointer-events:none;transition:.2s;z-index:100}
.toast.on{opacity:1;transform:translate(-50%,0)}
@media (max-width:560px){.hide-xs{display:none}}
