/* =========================================================
   Rawaj — public site styles
   Layout: one centered 1240px column; teal brand band at the top,
   white cards on a pale sage ground; saffron is the action color.
   ========================================================= */
:root {
  --bg: #f3f5f1;
  --surface: #ffffff;
  --surface-2: #f8faf7;
  --ink: #132220;
  --ink-2: #33433f;
  --muted: #677773;
  --line: #e0e6e2;
  --line-2: #cbd5d0;

  --brand: #0b5d5e;
  --brand-ink: #074446;
  --brand-2: #127675;
  --brand-soft: #e1efeb;
  --sun: #f5b22d;
  --sun-ink: #382600;
  --sun-soft: #fdf1d4;

  --danger: #c4413a;
  --danger-soft: #fbe6e4;
  --ok: #1d8650;
  --ok-soft: #e0f2e7;
  --warn: #a96d10;
  --warn-soft: #fbefd8;

  --font-display: "Readex Pro", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --shadow: 0 1px 2px rgb(19 34 32 / .05), 0 4px 16px rgb(19 34 32 / .06);
  --shadow-lg: 0 10px 40px rgb(19 34 32 / .16);
  --wrap: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.25; margin: 0; font-weight: 600; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: max(16px, env(safe-area-inset-left, 0px)); }
.narrow { max-width: 820px; }

/* ---------- icons ---------- */
.i { width: 20px; height: 20px; flex: none; vertical-align: -4px; }
.i--sm { width: 16px; height: 16px; vertical-align: -3px; }
.i--xs { width: 13px; height: 13px; vertical-align: -2px; }
.i--title { width: 22px; height: 22px; color: var(--sun); fill: var(--sun); vertical-align: -3px; }
.verified { color: var(--brand); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: var(--r-sm);
  border: 1px solid transparent; background: var(--surface); cursor: pointer;
  font-weight: 600; font-size: 14.5px; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn--brand { background: var(--brand); color: #fff; }
.btn--brand:hover { background: var(--brand-ink); }
.btn--sun { background: var(--sun); color: var(--sun-ink); }
.btn--sun:hover { background: #eaa317; }
.btn--ghost { border-color: var(--line-2); background: var(--surface); }
.btn--ghost:hover { border-color: var(--ink-2); }
.btn--ok { background: var(--ok); color: #fff; }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger-ghost { border-color: color-mix(in srgb, var(--danger) 35%, transparent); color: var(--danger); background: var(--surface); }
.btn--danger-ghost:hover { background: var(--danger-soft); }
.btn--lg { height: 50px; padding: 0 26px; font-size: 16px; border-radius: 10px; }
.btn--sm { height: 34px; padding: 0 12px; font-size: 13.5px; }
.btn--block { width: 100%; }

.icon-btn {
  position: relative; display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; color: var(--ink-2);
}
.icon-btn:hover { background: var(--brand-soft); color: var(--brand); }
.icon-btn--sm { width: 30px; height: 30px; border-radius: 8px; }
.icon-btn--danger:hover { background: var(--danger-soft); color: var(--danger); }
.icon-btn--ok:hover { background: var(--ok-soft); color: var(--ok); }
.link-strong { font-weight: 600; color: var(--brand); padding: 8px 6px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 600; font-size: 14.5px; }
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }

/* ---------- badges & status ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: var(--brand-soft); color: var(--brand-ink); white-space: nowrap;
}
.badge--sun { background: var(--sun); color: var(--sun-ink); }
.badge--sun .i { fill: currentColor; }
.badge--dark { background: var(--ink); color: #fff; }
.badge--danger { background: var(--danger-soft); color: var(--danger); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status--active { background: var(--ok-soft); color: var(--ok); }
.status--pending { background: var(--warn-soft); color: var(--warn); }
.status--rejected { background: var(--danger-soft); color: var(--danger); }
.status--sold { background: #e6ecf4; color: #34507a; }
.status--expired { background: #eceeed; color: var(--muted); }
.dot-count, .pill-count {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 1;
}
.dot-count { position: absolute; top: 2px; inset-inline-end: 2px; border: 2px solid var(--surface); }

/* ---------- header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; }
.topbar { background: var(--brand-ink); color: #cfe4df; font-size: 13px; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; }
.topbar__start, .topbar__end, .topbar__links { display: flex; align-items: center; gap: 18px; }
.topbar a:hover { color: #fff; }
.country-pill { display: inline-flex; align-items: center; gap: 7px; color: #fff; font-weight: 500; }
.country-pill img { width: 20px; height: 14px; border-radius: 2px; object-fit: cover; }
.lang-switch { display: inline-flex; align-items: center; gap: 6px; }

.mainbar__inner { display: flex; align-items: center; gap: 22px; min-height: 72px; }
.mainbar__menu { display: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--brand); flex: none; }
.brand__mark svg { width: 38px; height: 38px; display: block; }
.brand__word { font-family: var(--font-display); font-weight: 700; font-size: 24px; letter-spacing: -.01em; color: var(--brand-ink); }
.brand__word--light { color: #fff; }

.searchbar { position: relative; flex: 1; display: flex; align-items: center; max-width: 620px; }
.searchbar__icon { position: absolute; inset-inline-start: 14px; color: var(--muted); pointer-events: none; }
.searchbar input {
  flex: 1; height: 46px; padding-inline: 44px 12px; border: 1.5px solid var(--line-2); border-inline-end: 0;
  border-start-start-radius: 10px; border-end-start-radius: 10px; background: var(--surface-2); min-width: 0;
}
.searchbar input:focus { outline: none; border-color: var(--brand); background: var(--surface); }
.searchbar .btn { height: 46px; border-radius: 0; border-start-end-radius: 10px; border-end-end-radius: 10px; }

.mainbar__actions { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.btn--post { margin-inline-start: 8px; }

.avatar { border-radius: 50%; object-fit: cover; flex: none; }
.avatar--initials { display: inline-grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; font-family: var(--font-display); }
.avatar-btn { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px 3px 3px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.dropdown { position: relative; }
.dropdown__menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 240px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg);
  display: none; z-index: 60;
}
.dropdown.is-open .dropdown__menu { display: block; }
.dropdown__head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: grid; }
.dropdown__head small { color: var(--muted); }
.dropdown__menu a, .dropdown__menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 8px;
  border: 0; background: none; cursor: pointer; text-align: start; font-size: 14.5px;
}
.dropdown__menu a:hover, .dropdown__menu button:hover { background: var(--surface-2); }
.dropdown__menu .i { color: var(--muted); }
.dropdown__admin { color: var(--brand); font-weight: 600; }

.drawer { position: fixed; inset: 0; z-index: 80; }
.drawer__backdrop { position: absolute; inset: 0; background: rgb(10 20 18 / .45); }
.drawer__panel {
  position: absolute; top: 0; bottom: 0; inset-inline-start: 0; width: min(320px, 86vw); background: var(--surface);
  overflow-y: auto; padding: calc(14px + env(safe-area-inset-top, 0px)) 14px 24px; display: flex; flex-direction: column; gap: 2px;
}
.drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.drawer__panel > a { display: flex; align-items: center; gap: 12px; padding: 11px 10px; border-radius: 10px; }
.drawer__panel > a:hover { background: var(--surface-2); }
.drawer__panel > a .i { color: var(--brand); }
.drawer__country { background: var(--brand-soft); font-weight: 600; }
.drawer__country img { width: 24px; border-radius: 2px; }
.drawer__country small { margin-inline-start: auto; color: var(--brand); }
.drawer__label { margin: 14px 10px 4px; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }

/* ---------- toast ---------- */
.toast {
  position: fixed; z-index: 90; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); inset-inline-start: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; border-radius: 12px; max-width: calc(100vw - 32px);
  background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); animation: toast-in .25s ease-out;
}
[dir="rtl"] .toast { transform: translateX(50%); }
.toast .i { color: #7ee2a8; }
.toast--error { background: var(--danger); }
.toast--error .i { color: #fff; }
.toast__close { border: 0; background: none; color: #fff; opacity: .7; cursor: pointer; padding: 4px; display: grid; }
@keyframes toast-in { from { opacity: 0; translate: 0 10px; } }

/* ---------- common sections ---------- */
main { min-height: 60vh; }
.section { margin-block: 40px; }
.section--tight { margin-block: 24px; }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section__head h2 { font-size: 22px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .03em; color: var(--brand); margin-bottom: 8px; }
.eyebrow--light { color: var(--sun); }
.lead { font-size: 17px; color: var(--ink-2); max-width: 56ch; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 18px 6px; font-size: 13.5px; color: var(--muted); }
.crumbs a:hover { color: var(--brand); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.stack { display: grid; gap: 10px; }

/* ---------- country gate ---------- */
.gate {
  background: var(--brand);
  background-image: var(--pattern);
  color: #fff; padding-block: 56px 72px;
}
.gate__intro { max-width: 640px; margin-bottom: 36px; }
.gate h1 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 700; margin-bottom: 12px; }
.gate .lead { color: #cfe4df; }
.gate__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.gate-country {
  display: grid; grid-template-columns: 56px 1fr auto; grid-template-rows: auto auto; column-gap: 14px; align-items: center;
  padding: 14px 16px; border-radius: 14px; background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .14);
  transition: background .15s, transform .15s;
}
.gate-country:hover { background: #fff; color: var(--ink); transform: translateY(-2px); }
.gate-country img { grid-row: span 2; width: 56px; height: 38px; object-fit: cover; border-radius: 6px; box-shadow: 0 0 0 1px rgb(0 0 0 / .08); }
.gate-country__name { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.gate-country__count { font-size: 12.5px; opacity: .75; }
.gate-country__go { grid-row: 1 / span 2; grid-column: 3; opacity: .6; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-block: 48px 64px; }
.pillar { padding: 24px; background: var(--surface); border-radius: var(--r-lg); border: 1px solid var(--line); }
.pillar__icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--sun-soft); color: var(--warn); margin-bottom: 14px; }
.pillar h2 { font-size: 18px; margin-bottom: 6px; }
.pillar p { color: var(--muted); }

/* subtle eight-point star lattice used on brand bands */
:root {
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.07' stroke-width='1.2'%3E%3Cpath d='M36 14l6.4 15.6L58 36l-15.6 6.4L36 58l-6.4-15.6L14 36l15.6-6.4z'/%3E%3Crect x='20.5' y='20.5' width='31' height='31' transform='rotate(45 36 36)'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- home hero ---------- */
.hero { background: var(--brand); background-image: var(--pattern); color: #fff; padding-block: 44px 40px; }
.hero h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 700; margin-bottom: 22px; }
.hero-search {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr auto; gap: 6px; padding: 6px;
  background: #fff; border-radius: 14px; box-shadow: 0 12px 40px rgb(0 0 0 / .18); color: var(--ink);
}
.hero-search__field { position: relative; display: flex; align-items: center; min-width: 0; }
.hero-search__field .i { position: absolute; inset-inline-start: 14px; color: var(--muted); pointer-events: none; }
.hero-search__field input, .hero-search__field select {
  width: 100%; height: 50px; border: 0; background: var(--surface-2); border-radius: 10px; padding-inline: 44px 12px; min-width: 0;
}
.hero-search__field select { appearance: none; cursor: pointer; }
.hero-search__field input:focus, .hero-search__field select:focus { outline: 2px solid var(--brand); background: #fff; }
.hero__quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; font-size: 13.5px; color: #cfe4df; }
.hero__quick a { padding: 4px 12px; border-radius: 999px; background: rgb(255 255 255 / .1); color: #fff; }
.hero__quick a:hover { background: rgb(255 255 255 / .22); }

/* ---------- category grid ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 12px; }
.cat-tile {
  display: grid; justify-items: center; gap: 8px; padding: 18px 10px 14px; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); transition: border-color .15s, transform .15s;
}
.cat-tile:hover { border-color: var(--cat); transform: translateY(-2px); }
.cat-tile__icon {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px;
  background: color-mix(in srgb, var(--cat) 12%, white); color: var(--cat);
}
.cat-tile__icon .i { width: 26px; height: 26px; }
.cat-tile__name { font-weight: 600; font-size: 14px; line-height: 1.35; }
.cat-tile__count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- banners ---------- */
.banners { position: relative; }
.banner {
  display: none; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 24px; min-height: 200px;
  padding: 34px 40px; border-radius: 20px; color: #fff; overflow: hidden; position: relative;
  background-color: var(--banner, var(--brand)); background-image: var(--pattern);
}
.banner.is-active { display: grid; animation: fade .4s ease; }
.banner__text h2 { font-size: clamp(22px, 3vw, 32px); font-weight: 700; margin-bottom: 8px; }
.banner__text p { opacity: .85; margin-bottom: 18px; max-width: 48ch; }
.banner__img { max-height: 200px; justify-self: end; border-radius: 12px; object-fit: cover; }
.banner__art { position: relative; height: 150px; }
.banner__art span { position: absolute; border-radius: 22px; transform: rotate(45deg); border: 2px solid rgb(255 255 255 / .25); }
.banner__art span:nth-child(1) { width: 120px; height: 120px; inset-inline-end: 40px; top: 10px; background: rgb(255 255 255 / .08); }
.banner__art span:nth-child(2) { width: 70px; height: 70px; inset-inline-end: 170px; top: 50px; background: var(--sun); border: 0; }
.banner__art span:nth-child(3) { width: 40px; height: 40px; inset-inline-end: 10px; top: 110px; }
.banners__dots { position: absolute; bottom: 14px; inset-inline-start: 40px; display: flex; gap: 6px; }
.banners__dots button { width: 8px; height: 8px; border-radius: 4px; border: 0; background: rgb(255 255 255 / .45); cursor: pointer; padding: 0; transition: width .2s; }
.banners__dots button.is-active { width: 22px; background: #fff; }
@keyframes fade { from { opacity: .3; } }

/* ---------- listing cards ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.grid-cards--3 { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; }
.rail > * { scroll-snap-align: start; }
@media (min-width: 1100px) { .rail { grid-auto-columns: calc((100% - 48px) / 4); } }

.card {
  position: relative; display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card--featured { border-color: color-mix(in srgb, var(--sun) 70%, white); }
.card__media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card__media img { transform: scale(1.04); }
.card__placeholder {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: color-mix(in srgb, var(--cat) 10%, white); color: color-mix(in srgb, var(--cat) 70%, white);
  background-image: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--cat) 16%, transparent) 0 30%, transparent 31%),
                    radial-gradient(circle at 80% 90%, color-mix(in srgb, var(--cat) 12%, transparent) 0 25%, transparent 26%);
}
.card__placeholder .i { width: 48px; height: 48px; stroke-width: 1.4; }
.card__badge { position: absolute; top: 10px; inset-inline-start: 10px; }
.card__count { position: absolute; bottom: 8px; inset-inline-start: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; background: rgb(0 0 0 / .55); color: #fff; font-size: 12px; }
.card__fav-form { position: absolute; top: 8px; inset-inline-end: 8px; z-index: 2; }
.card__fav {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgb(255 255 255 / .92); color: var(--ink-2); box-shadow: 0 1px 4px rgb(0 0 0 / .15);
}
.card__fav .i { width: 18px; height: 18px; }
.card__fav:hover, .card__fav.is-on { color: var(--danger); }
.card__fav.is-on .i, .tool-btn.is-on .i { fill: var(--danger); stroke: var(--danger); }
.card__body { display: grid; gap: 4px; padding: 12px 14px 14px; }
.card__price { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--brand-ink); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.card__price small { font-family: var(--font-body); font-weight: 500; font-size: 11.5px; color: var(--muted); }
.card__title { font-family: var(--font-body); font-weight: 500; font-size: 14.5px; 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: var(--brand); }
.card__meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.card__meta span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sell-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 32px 36px; border-radius: 20px; background: var(--sun-soft); border: 1px solid color-mix(in srgb, var(--sun) 40%, white);
}
.sell-cta h2 { font-size: 24px; margin-bottom: 4px; }
.sell-cta p { color: var(--ink-2); }

.empty { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 56px 20px; background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r-lg); }
.empty > .i { width: 40px; height: 40px; color: var(--line-2); }
.empty h3 { font-size: 18px; }
.empty p { color: var(--muted); max-width: 42ch; }
.empty--small { padding: 32px 16px; border: 0; }
.empty--page { margin-block: 60px; border-style: solid; }
.empty__code { font-family: var(--font-display); font-size: 64px; font-weight: 700; color: var(--brand); line-height: 1; }

/* ---------- search results ---------- */
.results-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 8px 14px; }
.results-head h1 { font-size: 26px; }
.sort-form { display: flex; align-items: center; gap: 8px; }
.sort-form select { height: 40px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); padding-inline: 10px; }
.filters-toggle { display: none; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 14px; scrollbar-width: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; white-space: nowrap; }
.chip:hover { border-color: var(--brand); }
.chip.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }
.results { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px; align-items: start; padding-bottom: 48px; }
.filters { position: sticky; top: 130px; }
.filters__form { display: grid; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.filters__head { display: flex; align-items: center; justify-content: space-between; }
.filters__head h2 { font-size: 17px; }
.filters__close { display: none; }
.filters__actions { display: grid; gap: 8px; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.field input:not([type="radio"]):not([type="checkbox"]):not([type="color"]):not([type="file"]),
.field select, .field textarea, .city-add input, .city-row input, .adm-filters input, .adm-filters select, .bulkbar select, .quick-msg textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1.5px solid var(--line-2); border-radius: 10px; background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
.field textarea, .quick-msg textarea { resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus, .quick-msg textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field input[type="color"] { width: 64px; height: 44px; border: 1.5px solid var(--line-2); border-radius: 10px; padding: 3px; background: var(--surface); }
.field__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.error { color: var(--danger); font-size: 13px; font-weight: 500; }
.check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14.5px; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brand); flex: none; }
.check span small { display: block; color: var(--muted); font-size: 13px; }
.check--box { padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; align-self: end; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { flex: 1; position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 9px 10px; border: 1.5px solid var(--line-2); border-radius: 9px; cursor: pointer; font-size: 14px; white-space: nowrap; }
.seg input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.seg input:focus-visible + span { outline: 3px solid var(--brand-soft); }
.seg--wide label { min-width: 120px; }
.input-affix { display: flex; align-items: stretch; }
.input-affix input { flex: 1; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1.5px solid var(--line-2); border-radius: 10px; background: var(--surface); border-start-end-radius: 0 !important; border-end-end-radius: 0 !important; }
.input-affix input:focus { outline: none; border-color: var(--brand); }
.input-affix b { display: grid; place-items: center; padding-inline: 14px; border: 1.5px solid var(--line-2); border-inline-start: 0; border-start-end-radius: 10px; border-end-end-radius: 10px; background: var(--surface-2); font-weight: 600; font-size: 14px; white-space: nowrap; }
.stack-form { display: grid; gap: 16px; }
.stack-form h2 { font-size: 18px; }

/* ---------- listing page ---------- */
.ad { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; padding-block: 10px 20px; }
.gallery__stage {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-lg); overflow: hidden; background: #0e1615;
}
.gallery__stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .3s; }
.gallery__stage img.is-active { opacity: 1; }
.gallery__stage[style] { background: color-mix(in srgb, var(--cat) 10%, white); }
.gallery__placeholder { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; color: color-mix(in srgb, var(--cat) 60%, white); }
.gallery__placeholder .i { width: 72px; height: 72px; stroke-width: 1.2; }
.gallery__nav { position: absolute; top: 50%; translate: 0 -50%; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .9); cursor: pointer; display: grid; place-items: center; }
.gallery__nav--prev { inset-inline-start: 12px; }
.gallery__nav--next { inset-inline-end: 12px; }
.gallery__counter { position: absolute; bottom: 12px; inset-inline-end: 12px; padding: 3px 10px; border-radius: 8px; background: rgb(0 0 0 / .6); color: #fff; font-size: 13px; }
.gallery__thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.gallery__thumbs button { flex: none; width: 84px; height: 64px; padding: 0; border-radius: 10px; overflow: hidden; border: 2px solid transparent; cursor: pointer; opacity: .65; background: none; }
.gallery__thumbs button.is-active { border-color: var(--brand); opacity: 1; }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.ad__headline { margin-block: 22px 16px; }
.ad__headline h1 { font-size: clamp(22px, 2.6vw, 30px); margin-bottom: 10px; }
.ad__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 14px; }
.specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1px; margin: 0 0 24px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.specs > div { background: var(--surface); padding: 12px 16px; }
.specs dt { font-size: 12.5px; color: var(--muted); }
.specs dd { margin: 0; font-weight: 600; }
.ad__desc h2 { font-size: 19px; margin-bottom: 10px; }
.prose { color: var(--ink-2); font-size: 15.5px; line-height: 1.85; max-width: 72ch; }
.safety { display: flex; gap: 14px; margin-top: 28px; padding: 16px 18px; border-radius: var(--r); background: var(--brand-soft); color: var(--brand-ink); }
.safety > .i { width: 26px; height: 26px; flex: none; }
.safety p { font-size: 14px; }
.ad__side { position: sticky; top: 130px; display: grid; gap: 14px; }
.price-panel__price { font-family: var(--font-display); font-weight: 700; font-size: 30px; color: var(--brand-ink); font-variant-numeric: tabular-nums; line-height: 1.2; }
.price-panel .badge { margin-top: 6px; }
.price-panel .stack { margin-top: 18px; }
.quick-msg { display: grid; gap: 8px; }
.price-panel__tools { display: flex; gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.price-panel__tools form { flex: 1; display: flex; }
.tool-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 6px; border: 0; border-radius: 8px; background: none; cursor: pointer; color: var(--ink-2); font-size: 13.5px; font-weight: 500; }
.tool-btn:hover { background: var(--surface-2); }
.seller { display: flex; align-items: center; gap: 14px; transition: border-color .15s; }
.seller:hover { border-color: var(--brand); }
.seller__info { display: grid; flex: 1; min-width: 0; }
.seller__info small { color: var(--muted); font-size: 13px; }
.notice { display: flex; gap: 12px; padding: 14px 18px; border-radius: var(--r); margin-block: 6px 12px; }
.notice > .i { flex: none; margin-top: 2px; }
.notice p { font-size: 14px; }
.notice--pending { background: var(--warn-soft); color: var(--warn); }
.notice--rejected { background: var(--danger-soft); color: var(--danger); }
.notice--sold, .notice--expired { background: #e6ecf4; color: #34507a; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; padding: 16px; }
.modal__backdrop { position: absolute; inset: 0; background: rgb(10 20 18 / .5); }
.modal__box { position: relative; width: min(460px, 100%); max-height: 90vh; overflow-y: auto; display: grid; gap: 16px; padding: 22px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-lg); }
.modal__head { display: flex; justify-content: space-between; align-items: center; }
.modal__head h2 { font-size: 19px; }
.radio-list { display: grid; gap: 4px; }
.radio-list label { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; cursor: pointer; }
.radio-list label:hover { background: var(--surface-2); }
.radio-list input { accent-color: var(--brand); width: 17px; height: 17px; }

/* ---------- post form ---------- */
.form-head { padding-block: 28px 18px; }
.form-head h1 { font-size: 30px; margin-bottom: 6px; }
.post-form { display: grid; gap: 16px; padding-bottom: 56px; }
.step { display: grid; gap: 16px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.step__title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 18px; }
.step__title > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 14px; }
.step__title small { font-family: var(--font-body); font-weight: 400; font-size: 13px; }
.cat-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.cat-picker__root {
  display: grid; justify-items: center; gap: 6px; padding: 14px 6px; border-radius: 12px; cursor: pointer; text-align: center;
  border: 1.5px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 600; line-height: 1.35;
}
.cat-picker__root .i { width: 26px; height: 26px; color: var(--cat); }
.cat-picker__root:hover { border-color: var(--cat); }
.cat-picker__root.is-on { border-color: var(--cat); background: color-mix(in srgb, var(--cat) 9%, white); box-shadow: inset 0 0 0 1px var(--cat); }
.sub-picker { padding-top: 4px; }
.sub-picker__group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-radio { position: relative; }
.chip-radio input { position: absolute; opacity: 0; }
.chip-radio span { display: block; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line-2); cursor: pointer; font-size: 14px; }
.chip-radio input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip-radio input:focus-visible + span { outline: 3px solid var(--brand-soft); }
.dropzone {
  display: grid; justify-items: center; gap: 6px; padding: 28px 16px; text-align: center; border: 2px dashed var(--line-2); border-radius: var(--r);
  cursor: pointer; background: var(--surface-2); transition: border-color .15s, background .15s; position: relative;
}
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .i { width: 30px; height: 30px; color: var(--brand); }
.dropzone.is-over { border-color: var(--brand); background: var(--brand-soft); }
.thumbs-preview, .thumbs-existing { display: flex; flex-wrap: wrap; gap: 10px; }
.thumbs-preview:empty { display: none; }
.thumb { position: relative; width: 104px; height: 80px; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:first-child::after { content: attr(data-cover); }
.thumb__del { position: absolute; top: 4px; inset-inline-end: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgb(0 0 0 / .65); color: #fff; display: grid; place-items: center; cursor: pointer; }
.thumb__del .i { width: 14px; height: 14px; }
.post-form__submit { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- account ---------- */
.acct { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; padding-block: 28px 56px; }
.acct-nav { position: sticky; top: 130px; display: grid; gap: 2px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.acct-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-weight: 500; }
.acct-nav a .i { color: var(--muted); }
.acct-nav a:hover { background: var(--surface-2); }
.acct-nav a.is-on { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.acct-nav a.is-on .i { color: var(--brand); }
.acct-nav .pill-count { margin-inline-start: auto; }
.acct__main { display: grid; gap: 18px; min-width: 0; }
.acct__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.acct__head h1 { font-size: 26px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 2.5px solid transparent; white-space: nowrap; color: var(--muted); font-weight: 500; margin-bottom: -1px; }
.tabs a b { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; }
.tabs a.is-on { color: var(--brand-ink); border-bottom-color: var(--brand); }
.tabs a.is-on b { background: var(--brand); color: #fff; border-color: var(--brand); }
.mine { display: grid; gap: 10px; }
.mine__row { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.mine__thumb { width: 112px; height: 84px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: color-mix(in srgb, var(--cat, #0b5d5e) 10%, white); color: var(--cat, #0b5d5e); }
.mine__thumb img { width: 100%; height: 100%; object-fit: cover; }
.mine__info { display: grid; gap: 4px; min-width: 0; }
.mine__title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mine__info > p { font-size: 13.5px; }
.mine__stats { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.mine__reason { font-size: 13px; color: var(--danger); }
.mine__actions { display: flex; gap: 2px; }
.avatar-field { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.profile-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 28px; margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.profile-head h1 { font-size: 26px; display: flex; align-items: center; gap: 8px; }
.profile-head__bio { margin-top: 8px; color: var(--ink-2); max-width: 60ch; }
.profile-head__stats { display: flex; gap: 28px; margin: 0; }
.profile-head__stats dt { font-size: 13px; color: var(--muted); }
.profile-head__stats dd { margin: 0; font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--brand-ink); }

/* ---------- messages ---------- */
.inbox { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: min(78vh, 760px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.inbox__list { border-inline-end: 1px solid var(--line); overflow-y: auto; }
.inbox__title { font-size: 19px; padding: 18px 18px 10px; }
.thread { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.thread:hover { background: var(--surface-2); }
.thread.is-on { background: var(--brand-soft); }
.thread__thumb { flex: none; width: 52px; height: 52px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.thread__thumb img { width: 100%; height: 100%; object-fit: cover; }
.thread__body { display: grid; min-width: 0; flex: 1; }
.thread__top { display: flex; justify-content: space-between; gap: 8px; }
.thread__top small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.thread__ad, .thread__last { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread__ad { color: var(--brand); }
.thread__last { color: var(--muted); }
.thread.is-unread .thread__last { color: var(--ink); font-weight: 600; }
.inbox__chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat__head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chat__back { display: none; }
.chat__who { display: grid; min-width: 0; }
.chat__ad { font-size: 13px; color: var(--brand); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat__stream { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 6px; background: var(--surface-2); }
.chat__day { align-self: center; font-size: 12px; color: var(--muted); padding: 2px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); margin-block: 10px 4px; }
.bubble { max-width: min(75%, 520px); align-self: flex-start; padding: 9px 14px 6px; border-radius: 16px; border-start-start-radius: 4px; background: var(--surface); border: 1px solid var(--line); }
.bubble p { overflow-wrap: anywhere; }
.bubble small { display: flex; align-items: center; justify-content: flex-end; gap: 4px; font-size: 11px; color: var(--muted); margin-top: 2px; }
.bubble--mine { align-self: flex-end; background: var(--brand); border-color: var(--brand); color: #fff; border-radius: 16px; border-start-end-radius: 4px; }
.bubble--mine small { color: #bde0d9; }
.chat__composer { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat__composer textarea { flex: 1; resize: none; max-height: 140px; padding: 10px 14px; border: 1.5px solid var(--line-2); border-radius: 12px; }
.chat__composer textarea:focus { outline: none; border-color: var(--brand); }
.chat__composer .btn { height: auto; align-self: stretch; }
.chat__empty { flex: 1; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--muted); }
.chat__empty .i { width: 44px; height: 44px; color: var(--line-2); }

/* ---------- auth ---------- */
.auth { display: grid; place-items: center; padding: 48px 16px 72px; min-height: 70vh; background-image: var(--pattern); background-color: var(--brand); }
.auth__card { width: min(460px, 100%); padding: 32px; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); display: grid; gap: 18px; }
.auth__card h1 { font-size: 26px; }
.auth__switch { text-align: center; color: var(--muted); }
.auth__switch a { color: var(--brand); font-weight: 600; }
.auth .stack-form a { color: var(--brand); text-decoration: underline; }

/* ---------- static pages ---------- */
.page { padding-block: 36px 64px; }
.page h1 { font-size: 32px; margin-bottom: 20px; }
.contact-list { display: grid; gap: 12px; margin-top: 24px; }
.contact-list > div { display: flex; gap: 16px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.contact-list dt { width: 110px; color: var(--muted); }
.contact-list dd { margin: 0; font-weight: 600; }

/* ---------- pagination ---------- */
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 28px; }
.pager__btn { display: grid; place-items: center; min-width: 40px; height: 40px; padding-inline: 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-variant-numeric: tabular-nums; }
.pager__btn:hover { border-color: var(--brand); color: var(--brand); }
.pager__btn.is-current { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager__btn.is-disabled { opacity: .4; pointer-events: none; }
.pager__gap { display: grid; place-items: center; min-width: 24px; color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { margin-top: 64px; background: #0c2725; color: #a8c1bc; font-size: 14px; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; padding-block: 48px 32px; }
.footer__grid h3 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.footer__grid > div { display: grid; align-content: start; gap: 8px; }
.footer__grid a:hover { color: #fff; }
.footer__about p { max-width: 36ch; }
.footer__contact { display: grid; gap: 2px; margin-top: 8px; }
.footer__safety { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; font-size: 13px; color: var(--sun); }
.footer__bottom { padding-block: 18px calc(18px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid rgb(255 255 255 / .08); font-size: 13px; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .ad { grid-template-columns: minmax(0, 1fr) 320px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .topbar__links { display: none; }
  .mainbar__menu { display: inline-grid; }
  .mainbar__inner { flex-wrap: wrap; gap: 10px; padding-block: 10px; min-height: 0; }
  .searchbar { order: 5; flex-basis: 100%; max-width: none; }
  .mainbar__actions .link-strong { display: none; }
  .hero-search { grid-template-columns: 1fr 1fr; }
  .hero-search__field--q { grid-column: 1 / -1; }
  .hero-search .btn { grid-column: 1 / -1; }
  .results { grid-template-columns: 1fr; }
  .filters-toggle { display: inline-flex; }
  .filters { position: fixed; inset: 0; z-index: 85; background: rgb(10 20 18 / .5); padding: 16px; overflow-y: auto; display: none; top: 0; }
  .filters.is-open { display: block; }
  .filters__form { max-width: 440px; margin-inline: auto; }
  .filters__close { display: inline-grid; }
  .ad { grid-template-columns: 1fr; }
  .ad__side { position: static; }
  .acct { grid-template-columns: 1fr; padding-top: 16px; }
  .acct-nav { position: static; display: flex; overflow-x: auto; scrollbar-width: none; }
  .acct-nav a { white-space: nowrap; }
  .pillars { grid-template-columns: 1fr; }
  .inbox { grid-template-columns: 1fr; height: calc(100vh - 210px); min-height: 460px; }
  .inbox__chat { display: none; }
  .inbox--open .inbox__list { display: none; }
  .inbox--open .inbox__chat { display: flex; }
  .chat__back { display: inline-grid; }
  .profile-head { grid-template-columns: auto 1fr; }
  .profile-head__stats { grid-column: 1 / -1; }
  .banner { grid-template-columns: 1fr; padding: 28px 24px 40px; }
  .banner__art, .banner__img { display: none; }
  .banners__dots { inset-inline-start: 24px; }
}
@media (max-width: 600px) {
  body { font-size: 14.5px; }
  .btn--post span { display: none; }
  .btn--post { width: 42px; padding: 0; }
  .brand__word { font-size: 21px; }
  .topbar__end a:first-child { display: none; }
  .gate { padding-block: 36px 48px; }
  .gate__grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .gate-country { grid-template-columns: 1fr; justify-items: start; row-gap: 6px; padding: 12px; }
  .gate-country img { grid-row: auto; width: 44px; height: 30px; }
  .gate-country__go { display: none; }
  .hero { padding-block: 28px; }
  .hero-search { grid-template-columns: 1fr; }
  .grid-cards, .grid-cards--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card__body { padding: 10px; }
  .card__price { font-size: 15.5px; }
  .card__title { font-size: 13.5px; }
  .card__meta span:last-child { display: none; }
  .rail { grid-auto-columns: 62%; gap: 10px; }
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .cat-tile { padding: 14px 6px 10px; }
  .cat-tile__icon { width: 46px; height: 46px; }
  .field-grid { grid-template-columns: 1fr; }
  .step { padding: 18px; }
  .mine__row { grid-template-columns: 76px minmax(0, 1fr); }
  .mine__thumb { width: 76px; height: 64px; }
  .mine__actions { grid-column: 1 / -1; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 6px; }
  .sell-cta { padding: 24px; }
  .footer__grid { grid-template-columns: 1fr; }
  .auth__card { padding: 24px 20px; }
  .profile-head { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.page-auth .site-footer { margin-top: 0; }

/* =========================================================
   v2 components: specs, stars, promotions, alerts, stores, reviews
   ========================================================= */
.small { font-size: 13px; }
.req { color: var(--danger); }
.hide-sm { display: inline; }
.card__specs { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }

.spec-fields { display: grid; gap: 12px; }
.spec-fields:has(> .field-grid > .field:not([hidden])) { padding-top: 16px; border-top: 1px dashed var(--line-2); }
.spec-fields__title { font-weight: 600; font-size: 15px; }
.spec-fields .field-grid:not(:has(.field:not([hidden]))) { display: none; }

.stars { display: inline-flex; gap: 1px; vertical-align: -1px; }
.star { color: var(--line-2); fill: currentColor; stroke: none; }
.star.is-full { color: var(--sun); }
.star.is-half { color: var(--sun); opacity: .55; }
.stars-line { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.stars-line b { font-variant-numeric: tabular-nums; }
.stars-line--light { color: #fff; }
.seller__store { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--brand); }

/* save search, toggles */
.toggle { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.toggle.is-on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.search-row__main { display: grid; gap: 2px; min-width: 0; }
.search-row__main strong:hover { color: var(--brand); }
.search-row__main .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* notifications */
.alerts { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.alert-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.alert-row:last-child { border-bottom: 0; }
.alert-row:hover { background: var(--surface-2); }
.alert-row.is-unread { background: color-mix(in srgb, var(--brand-soft) 55%, var(--surface)); }
.alert-row.is-unread .alert-row__text { font-weight: 600; }
.alert-row__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }
.alert-row__icon--rejected, .alert-row__icon--payment_rejected { background: var(--danger-soft); color: var(--danger); }
.alert-row__icon--approved { background: var(--ok-soft); color: var(--ok); }
.alert-row__icon--payment_paid, .alert-row__icon--review { background: var(--sun-soft); color: var(--warn); }
.alert-row small { white-space: nowrap; }

/* promote */
.promo-listing { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; padding: 14px; }
.promo-listing__thumb { width: 84px; height: 64px; border-radius: 10px; overflow: hidden; flex: none; display: grid; place-items: center; background: color-mix(in srgb, var(--cat) 10%, white); color: var(--cat); }
.promo-listing__thumb img { width: 100%; height: 100%; object-fit: cover; }
.promo-listing__info { display: grid; gap: 2px; min-width: 0; }
.promo-listing__until { color: var(--warn); font-weight: 600; }
.packages { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 12px; }
.package { position: relative; }
.package input { position: absolute; opacity: 0; }
.package__box { display: grid; gap: 8px; height: 100%; padding: 20px 18px 18px; border: 2px solid var(--line); border-radius: 16px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.package:hover .package__box { border-color: var(--line-2); }
.package input:checked + .package__box { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.package input:focus-visible + .package__box { outline: 3px solid var(--brand-soft); }
.package__tag { position: absolute; top: -10px; inset-inline-start: 16px; }
.package__name { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.package__price { font-family: var(--font-display); font-weight: 700; font-size: 24px; color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.package__perks { display: grid; gap: 4px; font-size: 13.5px; color: var(--ink-2); }
.package__perks .i { color: var(--warn); }
.package--popular .package__box { background: color-mix(in srgb, var(--sun-soft) 45%, var(--surface)); }
.bank { display: grid; gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.bank > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; background: var(--surface); align-items: center; }
.bank dt { color: var(--muted); font-size: 13.5px; }
.bank dd { margin: 0; font-weight: 600; }
.bank__iban { display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
[data-copy].is-done { color: var(--ok); }

/* payments */
.pay-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.pay-row__main { display: grid; gap: 3px; min-width: 0; }
.pay-row__top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pay-row__amount { font-family: var(--font-display); font-size: 18px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay-row__attach { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--line); }
.pay-row__attach input[type="text"] { flex: 1 1 180px; min-height: 34px; padding: 4px 10px; border: 1.5px solid var(--line-2); border-radius: 8px; }
.pay-row__attach input[type="file"] { flex: 1 1 200px; font-size: 13px; }

/* reviews */
.reviews { display: grid; gap: 16px; }
.reviews__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.reviews__head h2 { font-size: 18px; }
.reviews__score { display: inline-flex; align-items: center; gap: 8px; }
.reviews__score b { font-family: var(--font-display); font-size: 22px; }
.review-form { display: grid; gap: 10px; padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.review-form textarea { width: 100%; padding: 10px 12px; border: 1.5px solid var(--line-2); border-radius: 10px; resize: vertical; background: var(--surface); }
.review-form .btn { justify-self: start; }
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
[dir="rtl"] .star-input { flex-direction: row-reverse; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { cursor: pointer; color: var(--line-2); padding: 2px; }
.star-input label .i { width: 28px; height: 28px; fill: currentColor; stroke: none; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--sun); }
.star-input input:focus-visible + label { outline: 2px solid var(--brand); border-radius: 4px; }
.review { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.review__top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.review p { font-size: 14.5px; }

/* profile + store layout */
.profile-head { position: relative; }
.profile-head__block { position: absolute; top: 16px; inset-inline-end: 16px; }
.profile-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; margin-block: 28px 48px; }
.profile-body__side { display: grid; gap: 16px; position: sticky; top: 130px; }
.section-title { font-size: 20px; margin-bottom: 14px; }
.store-hero { background-color: var(--brand); background-image: var(--pattern); background-size: cover; background-position: center; color: #fff; padding-block: 48px 36px; }
.store-hero__inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 22px; align-items: center; }
.store-hero h1 { font-size: clamp(24px, 3.4vw, 36px); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.store-hero__stats { display: flex; gap: 28px; margin: 0; }
.store-hero__stats dt { font-size: 13px; opacity: .8; }
.store-hero__stats dd { margin: 0; font-family: var(--font-display); font-size: 26px; font-weight: 700; }
.store-logo { display: grid; place-items: center; width: 104px; height: 104px; border-radius: 24px; overflow: hidden; background: #fff; color: var(--brand); font-family: var(--font-display); font-size: 40px; font-weight: 700; box-shadow: 0 6px 24px rgb(0 0 0 / .2); flex: none; }
.store-logo img { width: 100%; height: 100%; object-fit: cover; }
.store-logo--sm { width: 64px; height: 64px; border-radius: 16px; font-size: 26px; margin-top: -32px; border: 3px solid var(--surface); box-shadow: var(--shadow); }
.store-logo--xs { width: 34px; height: 34px; border-radius: 9px; font-size: 15px; box-shadow: none; border: 1px solid var(--line); }
.store-info { display: grid; gap: 12px; }
.store-info h2 { font-size: 18px; }
.store-info dl { display: grid; gap: 8px; margin: 0; }
.store-info dl > div { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.store-info dt { color: var(--brand); padding-top: 2px; }
.store-info dd { margin: 0; overflow-wrap: anywhere; }
.store-info a { color: var(--brand); }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.store-card { display: grid; justify-items: center; gap: 6px; padding-bottom: 18px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.store-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.store-card__cover { width: 100%; height: 96px; background-color: var(--brand); background-image: var(--pattern); background-size: cover; background-position: center; }
.store-card strong { padding-inline: 12px; }
.store-images { position: relative; margin-bottom: 30px; }
.store-images__cover { display: grid; place-items: center; height: 160px; border-radius: 14px; border: 2px dashed var(--line-2); background-color: var(--surface-2); background-size: cover; background-position: center; cursor: pointer; color: var(--muted); }
.store-images__cover span { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 8px; background: rgb(255 255 255 / .85); }
.store-images__logo { position: absolute; bottom: -28px; inset-inline-start: 20px; display: grid; place-items: center; width: 88px; height: 88px; border-radius: 20px; background: var(--surface); border: 3px solid var(--surface); box-shadow: var(--shadow); cursor: pointer; overflow: hidden; color: var(--brand); }
.store-images__logo img { width: 100%; height: 100%; object-fit: cover; }
.store-images__logo small { position: absolute; bottom: 0; inset-inline: 0; text-align: center; font-size: 11px; background: rgb(0 0 0 / .55); color: #fff; }
.input-sm { min-height: 40px; padding: 6px 12px; border: 1.5px solid var(--line-2); border-radius: 8px; background: var(--surface); }

/* chat additions */
.chat__menu { margin-inline-start: auto; }
.chat__blocked { display: flex; align-items: center; gap: 8px; justify-content: center; padding: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; background: var(--surface); }
.people--panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; list-style: none; margin: 0; display: grid; gap: 12px; }
.people--panel li { display: flex; align-items: center; gap: 12px; }
.people--panel li > span { flex: 1; }
.auth__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.auth__forgot { color: var(--brand); font-size: 14px; font-weight: 500; text-decoration: none !important; }
.chip--static { display: inline-flex; padding: 2px 10px; margin-inline: 2px; font-size: 12.5px; }

@media (max-width: 900px) {
  .profile-body { grid-template-columns: 1fr; }
  .profile-body__side { position: static; }
  .store-hero__inner { grid-template-columns: auto minmax(0, 1fr); }
  .store-hero__stats { grid-column: 1 / -1; }
  .profile-head__block { position: static; grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .hide-sm { display: none; }
  .store-logo { width: 72px; height: 72px; border-radius: 18px; font-size: 28px; }
  .search-row { grid-template-columns: minmax(0, 1fr) auto; }
  .search-row > form:first-of-type { grid-row: 2; }
  .alert-row { grid-template-columns: 36px minmax(0, 1fr); }
  .alert-row small { grid-column: 2; }
  .mainbar__actions .icon-btn { width: 36px; }
}

/* Arabic script must never be letter-spaced: it breaks the joining of letters */
[dir="rtl"] .eyebrow, [dir="rtl"] .drawer__label, [dir="rtl"] .badge, [dir="rtl"] .status { letter-spacing: normal; text-transform: none; }
