/* =============================================
   BRAYTE — Complete Stylesheet v3
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Noto+Sans+Arabic:wght@300;400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700;800&display=swap');
/* ---- VARIABLES ---- */
:root {
  --primary:       #E8441C;
  --primary-dark:  #C93915;
  --primary-light: #FF6B47;
  --primary-bg:    #FFF4F1;
  --secondary:     #1A1A2E;
  --success:       #22C55E;
  --warning:       #F59E0B;
  --danger:        #EF4444;
  --info:          #3B82F6;

  --t1: #1A1A2E;
  --t2: #4B5563;
  --t3: #9CA3AF;
  --t4: #D1D5DB;

  --bg1: #FFFFFF;
  --bg2: #F7F8FA;
  --bg3: #F0F2F5;
  --border: #E5E7EB;

  --shadow-xs: 0 1px 2px rgba(0,0,0,.06);
  --shadow-sm: 0 2px 6px rgba(0,0,0,.07);
  --shadow:    0 4px 16px rgba(0,0,0,.09);
  --shadow-md: 0 8px 28px rgba(0,0,0,.11);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.15);

  --r-xs:  4px;
  --r-sm:  8px;
  --r:     12px;
  --r-md:  16px;
  --r-lg:  24px;
  --r-full: 9999px;

  --font:    'Outfit', sans-serif;
  --font-ar: 'Noto Sans Arabic', sans-serif;
  --ease:    .18s ease;
  --ease-md: .32s cubic-bezier(.4,0,.2,1);

  --header-h: 64px;
  --nav-h:    46px;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 15px;
  color: var(--t1);
  background: var(--bg2);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
img   { max-width: 100%; height: auto; display: block; }
a     { color: inherit; text-decoration: none; }
button{ cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }
ul, ol { list-style: none; }

/* ---- TYPOGRAPHY ---- */
h1 { font-size: clamp(1.5rem, 4vw, 2.4rem); font-weight: 800; line-height: 1.15; }
h2 { font-size: clamp(1.1rem, 2.5vw, 1.6rem); font-weight: 700; line-height: 1.2; }
h3 { font-size: 1.05rem; font-weight: 700; }
p  { line-height: 1.7; }

/* ---- LAYOUT ---- */
.container    { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 860px;  margin: 0 auto; padding: 0 24px; }

/* ==============================================
   HEADER
   ============================================== */
#header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--bg1);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  box-shadow: var(--shadow-xs);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--primary);
  flex-shrink: 0;
  letter-spacing: -.5px;
}
.logo svg { width: 34px; height: 34px; flex-shrink: 0; }
.logo-dot { color: #FFB800; }

/* Search bar */
.header-search {
  flex: 1;
  max-width: 540px;
  position: relative;
}
.header-search form {
  display: flex;
  align-items: stretch;
  height: 44px;
  border: 2px solid var(--border);
  border-radius: var(--r-full);
  background: var(--bg2);
  overflow: hidden;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.header-search form:focus-within {
  border-color: var(--primary);
  background: var(--bg1);
  box-shadow: 0 0 0 4px rgba(232,68,28,.08);
}
.header-search input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0 16px;
  font-size: 14px;
  outline: none;
  color: var(--t1);
  min-width: 0;
}
.header-search select {
  border: none;
  border-left: 1px solid var(--border);
  background: transparent;
  padding: 0 12px;
  font-size: 13px;
  color: var(--t2);
  outline: none;
  cursor: pointer;
  max-width: 140px;
  flex-shrink: 0;
}
.search-btn {
  background: var(--primary);
  color: #fff;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 13.5px;
  flex-shrink: 0;
  transition: background var(--ease);
  white-space: nowrap;
}
.search-btn:hover { background: var(--primary-dark); }

/* Header right-side actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  color: var(--t2);
  transition: background var(--ease), color var(--ease);
  position: relative;
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--bg3); color: var(--primary); }
.icon-btn svg   { width: 20px; height: 20px; pointer-events: none; }

.badge-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--primary);
  border-radius: 50%;
  border: 2px solid var(--bg1);
}

.badge-count {
  position: absolute;
  top: 4px; right: 4px;
  background: var(--primary);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  line-height: 1;
  border: 1.5px solid var(--bg1);
}

/* Language switcher */
.lang-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-full);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  background: var(--bg1);
  color: var(--t2);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color var(--ease), color var(--ease), background var(--ease);
}
.lang-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }
.lang-btn .flag { font-size: 15px; line-height: 1; }

/* Post button (desktop) */
.post-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--r-full);
  padding: 9px 20px;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--ease), box-shadow var(--ease), transform var(--ease);
}
.post-btn:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 14px rgba(232,68,28,.35);
  transform: translateY(-1px);
}
.post-btn svg { width: 15px; height: 15px; }

/* User avatar button */
.user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--r-full);
  background: transparent;
  border: 1.5px solid transparent;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--t1);
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease);
  flex-shrink: 0;
  white-space: nowrap;
  max-width: 160px;
}
.user-btn:hover { background: var(--bg3); border-color: var(--border); }
.user-btn .avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--primary-bg);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  color: var(--primary);
  font-size: 12px;
  overflow: hidden;
  flex-shrink: 0;
}
.user-btn .avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-btn .uname {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Dropdown menu */
.dropdown-wrap { position: relative; }
.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  min-width: 200px;
  z-index: 200;
  overflow: hidden;
}
.dropdown.open { display: block; }
.dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  font-size: 14px;
  color: var(--t1);
  transition: background var(--ease);
}
.dropdown a:hover { background: var(--bg3); }
.dropdown a svg { width: 16px; height: 16px; color: var(--t3); flex-shrink: 0; }
.dropdown-divider { border-top: 1px solid var(--border); }
.dropdown a.danger { color: var(--danger); }
.dropdown a.danger svg { color: var(--danger); }

/* Burger button */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--ease);
}
.burger:hover { background: var(--bg3); }
.burger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--t1);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
  transform-origin: center;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==============================================
   MOBILE NAV DRAWER
   ============================================== */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--header-h);
  background: rgba(0,0,0,.45);
  z-index: 850;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity var(--ease-md);
}
.mobile-nav-overlay.open {
  display: block;
  opacity: 1;
}

.mobile-nav {
  position: fixed;
  top: var(--header-h);
  left: 0;
  bottom: 0;
  width: min(320px, 90vw);
  background: var(--bg1);
  z-index: 860;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateX(-100%);
  transition: transform var(--ease-md);
  display: flex;
  flex-direction: column;
}
.mobile-nav.open { transform: translateX(0); }

/* Mobile search inside nav */
.mob-search {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.mob-search form {
  display: flex;
  gap: 8px;
  align-items: center;
}
.mob-search input {
  flex: 1;
  border: 2px solid var(--border);
  border-radius: var(--r-full);
  padding: 10px 16px;
  font-size: 14px;
  outline: none;
  background: var(--bg2);
  transition: border-color var(--ease);
  min-width: 0;
}
.mob-search input:focus { border-color: var(--primary); background: var(--bg1); }
.mob-search button {
  background: var(--primary);
  color: #fff;
  border-radius: var(--r-full);
  padding: 9px 16px;
  font-weight: 700;
  font-size: 13.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.mob-post-btn {
  margin: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--r-md);
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  transition: background var(--ease);
}
.mob-post-btn:hover { background: var(--primary-dark); }

/* User info bar in mobile nav */
.mob-user-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--primary-bg);
  border-bottom: 1px solid var(--border);
}
.mob-user-bar .avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff;
  font-size: 16px;
  overflow: hidden;
  flex-shrink: 0;
}
.mob-user-bar .avatar img { width: 100%; height: 100%; object-fit: cover; }
.mob-user-name { font-weight: 700; font-size: 14.5px; }
.mob-user-email { font-size: 12px; color: var(--t3); }

.mob-section-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--t3);
  padding: 12px 16px 4px;
}

.mob-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--t1);
  border-left: 3px solid transparent;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}
.mob-link svg { width: 20px; height: 20px; color: var(--t3); flex-shrink: 0; }
.mob-link:hover { background: var(--bg2); color: var(--primary); border-left-color: var(--primary); }
.mob-link:hover svg { color: var(--primary); }
.mob-link.active { color: var(--primary); font-weight: 700; background: var(--primary-bg); border-left-color: var(--primary); }
.mob-link.active svg { color: var(--primary); }
.mob-link.danger { color: var(--danger); }
.mob-link.danger svg { color: var(--danger); }

.mob-divider { border-top: 1px solid var(--border); margin: 4px 0; }

/* ==============================================
   CATEGORY NAVBAR
   ============================================== */
#navbar {
  background: var(--bg1);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--header-h);
  z-index: 800;
}
.navbar-inner {
  display: flex;
  align-items: stretch;
  height: var(--nav-h);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.navbar-inner::-webkit-scrollbar { display: none; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--t2);
  border-bottom: 2px solid transparent;
  transition: color var(--ease), border-color var(--ease), background var(--ease);
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-item svg { width: 16px; height: 16px; }
.nav-item:hover { color: var(--primary); background: var(--primary-bg); border-bottom-color: rgba(232,68,28,.3); }
.nav-item.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* ==============================================
   BUTTONS
   ============================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: var(--r);
  font-weight: 600;
  font-size: 14px;
  transition: all var(--ease);
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-primary  { background: var(--primary);  color: #fff; border-color: var(--primary);  }
.btn-primary:hover  { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(232,68,28,.3); }
.btn-secondary{ background: var(--bg3);  color: var(--t1); border-color: var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-outline  { background: transparent; color: var(--t1); border-color: var(--border); }
.btn-outline:hover  { border-color: var(--primary); color: var(--primary); }
.btn-danger   { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-success  { background: var(--success); color: #fff; border-color: var(--success); }
.btn-sm       { padding: 6px 14px; font-size: 13px; border-radius: var(--r-sm); }
.btn-lg       { padding: 13px 28px; font-size: 15.5px; }
.btn-block    { width: 100%; }

/* ==============================================
   HERO
   ============================================== */
.hero {
  background: linear-gradient(140deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
  padding: 56px 0 40px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(232,68,28,.18) 0%, transparent 55%),
    radial-gradient(circle at 80% 20%, rgba(255,184,0,.08) 0%, transparent 45%);
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
.hero-content h1 { color: #fff; margin-bottom: 14px; }
.hero-content > p { color: rgba(255,255,255,.7); font-size: 1.05rem; margin-bottom: 32px; }

.hero-search-wrap { max-width: 680px; margin: 0 auto 28px; }
.hero-search {
  display: flex;
  background: #fff;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,.25);
  height: 58px;
}
.hero-search input {
  flex: 1;
  border: none;
  padding: 0 20px;
  font-size: 15px;
  outline: none;
  min-width: 0;
  color: var(--t1);
}
.hero-search select {
  border: none;
  border-left: 1px solid var(--border);
  padding: 0 14px;
  font-size: 13.5px;
  color: var(--t2);
  outline: none;
  cursor: pointer;
  width: 155px;
  flex-shrink: 0;
}
.hero-search button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0 28px;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background var(--ease);
}
.hero-search button:hover { background: var(--primary-dark); }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-size: 1.5rem; font-weight: 800; color: #fff; margin-bottom: 3px; }
.hero-stat span   { font-size: 12px; color: rgba(255,255,255,.6); }

/* ==============================================
   SECTION
   ============================================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 10px;
}
.section-title { font-size: 1.1rem; font-weight: 800; }
.section-link  { font-size: 13px; color: var(--primary); font-weight: 600; }
.section-link:hover { text-decoration: underline; }
.sections-wrap { padding: 0 0 60px; }
.listings-section { padding: 32px 0 0; }

/* ==============================================
   CATEGORY GRID
   ============================================== */
.categories-section { padding: 36px 0 0; }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
}
.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 8px 14px;
  background: var(--bg1);
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  text-align: center;
  transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease);
  cursor: pointer;
  color: var(--t1);
}
.cat-card:hover {
  border-color: var(--primary);
  background: var(--primary-bg);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.cat-icon {
  width: 52px; height: 52px;
  border-radius: var(--r-sm);
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--ease), color var(--ease);
  flex-shrink: 0;
}
.cat-icon svg { width: 24px; height: 24px; }
.cat-card:hover .cat-icon { background: var(--primary); color: #fff; }
.cat-card span  { font-size: 12px; font-weight: 600; line-height: 1.35; }
.cat-card small { font-size: 11px; color: var(--t3); }

/* ==============================================
   LISTING CARDS
   ============================================== */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.listing-card {
  background: var(--bg1);
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  overflow: hidden;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
  display: flex;
  flex-direction: column;
  color: inherit;
}
.listing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.listing-img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg3);
  flex-shrink: 0;
}
.listing-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.listing-card:hover .listing-img-wrap img { transform: scale(1.06); }

.listing-badges {
  position: absolute;
  top: 8px; left: 8px;
  display: flex; gap: 4px; flex-wrap: wrap;
}
.badge {
  padding: 3px 8px;
  border-radius: var(--r-xs);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.badge-featured { background: #FFB800; color: var(--secondary); }
.badge-urgent   { background: var(--danger); color: #fff; }

.fav-btn {
  position: absolute;
  top: 8px; right: 8px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--ease), background var(--ease);
  z-index: 2;
}
.fav-btn:hover { transform: scale(1.12); background: var(--primary-bg); }
.fav-btn svg   { width: 15px; height: 15px; stroke: var(--t2); fill: none; transition: all var(--ease); }
.fav-btn.active svg { stroke: var(--primary); fill: var(--primary); }

.listing-body {
  padding: 12px 13px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.listing-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 5px;
}
.listing-price.free { color: var(--success); }
.listing-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--t1);
  line-height: 1.45;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.listing-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--t3);
  gap: 6px;
  margin-top: auto;
}
.listing-location {
  display: flex;
  align-items: center;
  gap: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.listing-location svg { width: 11px; height: 11px; flex-shrink: 0; }
.listing-time { white-space: nowrap; flex-shrink: 0; }

/* ==============================================
   SEARCH PAGE (FILTER + RESULTS)
   ============================================== */
.page-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  padding: 20px 0 50px;
  align-items: start;
}

.filter-sidebar {
  background: var(--bg1);
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  padding: 20px;
  position: sticky;
  top: calc(var(--header-h) + var(--nav-h) + 12px);
}
.filter-section { margin-bottom: 22px; }
.filter-section:last-child { margin-bottom: 0; }
.filter-title {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: .7px;
  margin-bottom: 10px;
}
.filter-options { display: flex; flex-direction: column; gap: 1px; }
.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  cursor: pointer;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  transition: background var(--ease);
}
.filter-option:hover { background: var(--bg3); }
.filter-option input[type="radio"],
.filter-option input[type="checkbox"] { accent-color: var(--primary); cursor: pointer; width: 14px; height: 14px; flex-shrink: 0; }
.filter-option label { cursor: pointer; flex: 1; line-height: 1.4; }
.filter-option .count { font-size: 11px; color: var(--t3); margin-left: auto; }

.price-range { display: flex; gap: 8px; align-items: center; }
.price-range input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  font-size: 13px;
  outline: none;
  transition: border-color var(--ease);
  min-width: 0;
}
.price-range input:focus { border-color: var(--primary); }

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.results-count { font-size: 14px; color: var(--t2); }
.results-count strong { color: var(--t1); font-weight: 700; }
.sort-select {
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 7px 12px;
  font-size: 13px;
  color: var(--t2);
  outline: none;
  cursor: pointer;
  background: var(--bg1);
  transition: border-color var(--ease);
}
.sort-select:focus { border-color: var(--primary); }

/* ==============================================
   LISTING DETAIL PAGE
   ============================================== */
.listing-gallery {
  background: var(--bg3);
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1.5px solid var(--border);
  margin-bottom: 24px;
}
.gallery-main {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #111;
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  overflow-x: auto;
  background: var(--bg2);
  scrollbar-width: none;
}
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumb {
  width: 76px; height: 56px;
  border-radius: var(--r-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--ease), opacity var(--ease);
  opacity: .65;
  flex-shrink: 0;
}
.gallery-thumb:hover { opacity: 1; }
.gallery-thumb.active { border-color: var(--primary); opacity: 1; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
  padding-bottom: 50px;
}
.detail-main {}
.detail-sidebar {}

.detail-card {
  background: var(--bg1);
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  padding: 24px;
  margin-bottom: 16px;
}
.detail-card:last-child { margin-bottom: 0; }

.price-tag {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  margin-bottom: 2px;
}
.price-type-label { font-size: 13px; color: var(--t3); margin-bottom: 16px; }
.listing-detail-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 14px; line-height: 1.35; }

.meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: var(--bg3);
  border-radius: var(--r-full);
  font-size: 12.5px;
  color: var(--t2);
  font-weight: 500;
}
.chip svg { width: 13px; height: 13px; color: var(--t3); flex-shrink: 0; }

.listing-description { font-size: 14.5px; line-height: 1.85; color: var(--t2); white-space: pre-wrap; }

.seller-block {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.seller-av {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--primary-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; font-weight: 800; color: var(--primary);
  flex-shrink: 0; overflow: hidden;
}
.seller-av img { width: 100%; height: 100%; object-fit: cover; }
.seller-name   { font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.seller-since  { font-size: 12px; color: var(--t3); }

.contact-btns { display: flex; flex-direction: column; gap: 10px; }
.btn-call {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--success); color: #fff;
  border-radius: var(--r); padding: 13px 20px;
  font-weight: 700; font-size: 15px;
  border: none; cursor: pointer; width: 100%;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
}
.btn-call:hover { background: #16a34a; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(34,197,94,.3); }
.btn-call svg { width: 18px; height: 18px; }

.btn-msg {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--bg2); color: var(--t1);
  border-radius: var(--r); padding: 12px 20px;
  font-weight: 600; font-size: 14px;
  border: 1.5px solid var(--border);
  cursor: pointer; width: 100%; text-decoration: none;
  transition: border-color var(--ease), color var(--ease), background var(--ease);
}
.btn-msg:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }
.btn-msg svg { width: 18px; height: 18px; }

/* ==============================================
   FORMS
   ============================================== */
.form-card {
  background: var(--bg1);
  border-radius: var(--r-lg);
  border: 1.5px solid var(--border);
  padding: 36px;
  max-width: 520px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}
.form-group    { margin-bottom: 20px; }
.form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--t2);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.form-control {
  width: 100%;
  border: 2px solid var(--border);
  border-radius: var(--r);
  padding: 11px 14px;
  font-size: 14.5px;
  color: var(--t1);
  background: var(--bg1);
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(232,68,28,.07); }
.form-control.error { border-color: var(--danger); }
textarea.form-control { resize: vertical; min-height: 120px; line-height: 1.65; }
select.form-control   { cursor: pointer; }
.form-hint  { font-size: 12px; color: var(--t3); margin-top: 5px; line-height: 1.5; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 5px; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ==============================================
   ALERTS
   ============================================== */
.alert {
  padding: 13px 16px;
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}
.alert-success { background: #F0FDF4; border: 1px solid #BBF7D0; color: #166534; }
.alert-danger  { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }
.alert-warning { background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; }
.alert-info    { background: #EFF6FF; border: 1px solid #BFDBFE; color: #1E40AF; }

/* ==============================================
   PAGINATION
   ============================================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.page-btn {
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
  border: 1.5px solid var(--border);
  background: var(--bg1); color: var(--t2);
  cursor: pointer;
  transition: all var(--ease);
  text-decoration: none;
}
.page-btn:hover  { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ==============================================
   EMPTY STATE
   ============================================== */
.empty-state {
  text-align: center;
  padding: 64px 20px;
  color: var(--t3);
}
.empty-state svg { width: 72px; height: 72px; margin: 0 auto 18px; opacity: .22; }
.empty-state h3  { font-size: 1.1rem; color: var(--t2); margin-bottom: 8px; }
.empty-state p   { font-size: 14px; max-width: 320px; margin: 0 auto; line-height: 1.7; }

/* ==============================================
   BREADCRUMB
   ============================================== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--t3);
  padding: 14px 0;
  flex-wrap: wrap;
}
.breadcrumb a       { color: var(--t2); transition: color var(--ease); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep    { color: var(--t4); }
.breadcrumb .current{ color: var(--t1); font-weight: 500; }

/* ==============================================
   DASHBOARD
   ============================================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  padding: 28px 0 64px;
  align-items: start;
}
.dashboard-sidebar {
  background: var(--bg1);
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  overflow: hidden;
  position: sticky;
  top: calc(var(--header-h) + var(--nav-h) + 14px);
}
.dash-user {
  padding: 22px 20px;
  background: linear-gradient(135deg, var(--secondary), #16213e);
  color: #fff;
  text-align: center;
}
.dash-avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 800;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.2);
}
.dash-avatar img  { width: 100%; height: 100%; object-fit: cover; }
.dash-username    { font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.dash-email       { font-size: 12px; opacity: .6; }
.dash-nav         { padding: 8px 0; }
.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  font-size: 14px;
  color: var(--t2);
  transition: background var(--ease), color var(--ease), border-color var(--ease);
  text-decoration: none;
  border-right: 3px solid transparent;
}
.dash-nav-item:hover  { background: var(--bg3); color: var(--primary); }
.dash-nav-item.active { background: var(--primary-bg); color: var(--primary); font-weight: 600; border-right-color: var(--primary); }
.dash-nav-item svg    { width: 17px; height: 17px; flex-shrink: 0; }

.stat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.stat-card {
  background: var(--bg1);
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  padding: 20px;
  text-align: center;
}
.stat-num   { font-size: 1.9rem; font-weight: 800; color: var(--primary); line-height: 1; margin-bottom: 6px; }
.stat-label { font-size: 12.5px; color: var(--t2); }

/* ==============================================
   MODAL
   ============================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ease-md);
  backdrop-filter: blur(2px);
}
.modal-overlay.show { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg1);
  border-radius: var(--r-lg);
  padding: 32px;
  width: 100%;
  max-width: 480px;
  position: relative;
  transform: translateY(16px) scale(.97);
  transition: transform var(--ease-md);
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-overlay.show .modal { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 18px; color: var(--t2);
  border: none; transition: background var(--ease);
}
.modal-close:hover { background: var(--border); }

/* ==============================================
   TOAST
   ============================================== */
.toast-container {
  position: fixed;
  bottom: 20px; right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--secondary);
  color: #fff;
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  min-width: 240px;
  max-width: 320px;
  font-size: 14px;
  transform: translateX(120%);
  transition: transform var(--ease-md);
  pointer-events: all;
}
.toast.show     { transform: translateX(0); }
.toast.success  { background: var(--success); }
.toast.error    { background: var(--danger); }

/* ==============================================
   FOOTER
   ============================================== */
#footer {
  background: var(--secondary);
  color: rgba(255,255,255,.75);
  padding: 52px 0 28px;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 44px;
}
.footer-brand p { font-size: 14px; opacity: .65; line-height: 1.75; max-width: 260px; margin-top: 12px; }
.footer-col h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .9px;
  color: rgba(255,255,255,.45);
  margin-bottom: 18px;
}
.footer-col ul   { display: flex; flex-direction: column; gap: 11px; }
.footer-col a    { font-size: 14px; opacity: .65; transition: opacity var(--ease), padding var(--ease); }
.footer-col a:hover { opacity: 1; color: var(--primary-light); padding-left: 4px; }
.social-links { display: flex; gap: 8px; margin-top: 20px; }
.social-link {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--ease), transform var(--ease);
}
.social-link:hover { background: var(--primary); transform: translateY(-2px); }
.social-link svg { width: 16px; height: 16px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  opacity: .42;
  flex-wrap: wrap;
  gap: 8px;
}

/* ==============================================
   UTILITIES
   ============================================== */
.hidden   { display: none !important; }
.sr-only  { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.w-full   { width: 100%; }
.text-center { text-align: center; }
.mt-8  { margin-top: 8px;  }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, var(--bg3) 25%, #e5e7eb 50%, var(--bg3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-sm);
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }


/* ==============================================
   RESPONSIVE BREAKPOINTS
   ============================================== */

/* ─── 1280px ─── */
@media (max-width: 1280px) {
  .cat-grid      { grid-template-columns: repeat(4, 1fr); }
  .listings-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ─── 1100px ─── */
@media (max-width: 1100px) {
  .listings-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid   { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand  { grid-column: 1 / -1; }
  .footer-brand p { max-width: 440px; }
  .detail-grid   { grid-template-columns: 1fr 300px; }
}

/* ─── 900px ─── */
@media (max-width: 900px) {
  .page-layout       { grid-template-columns: 1fr; }
  .filter-sidebar    { position: static; }
  .dashboard-grid    { grid-template-columns: 200px 1fr; gap: 18px; }
}

/* ─── 768px — Tablet / Mobile, BURGER appears ─── */
@media (max-width: 768px) {
  :root {
    --header-h: 58px;
    --nav-h: 44px;
  }

  /* Show burger, hide desktop items */
  .burger          { display: flex; }
  .header-search   { display: none; }
  .lang-btn        { display: none; }
  .post-btn        { display: none; }
  .user-btn .uname { display: none; }
  .user-btn        { padding: 2px; border: none; background: transparent; }
  /* Keep user avatar icon visible as small icon button on mobile */

  /* The login link stays visible on mobile as icon or short label */

  /* Category navbar */
  .nav-item { padding: 0 12px; font-size: 12.5px; }
  .nav-item svg { width: 15px; height: 15px; }

  /* Hero */
  .hero { padding: 36px 0 28px; }
  .hero-content h1 { font-size: clamp(1.3rem, 5vw, 1.85rem); }
  .hero-content > p { font-size: .95rem; margin-bottom: 22px; }
  .hero-search { height: 52px; border-radius: var(--r-md); }
  .hero-search select { display: none; }
  .hero-search button { padding: 0 18px; font-size: 14px; }
  .hero-stats { gap: 20px; }
  .hero-stat strong { font-size: 1.25rem; }

  /* Category grid */
  .cat-grid      { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .cat-icon      { width: 44px; height: 44px; }
  .cat-icon svg  { width: 22px; height: 22px; }
  .cat-card span { font-size: 11.5px; }

  /* Listings */
  .listings-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* Search page */
  .page-layout { grid-template-columns: 1fr; padding: 16px 0 36px; }
  .filter-sidebar {
    position: static;
    display: none;
  }
  .filter-sidebar.mob-open { display: block; }

  /* Detail */
  .detail-grid { grid-template-columns: 1fr; }
  .detail-sidebar { order: -1; }
  .gallery-main { aspect-ratio: 4/3; }
  .detail-card { padding: 18px 16px; }
  .price-tag { font-size: 1.6rem; }

  /* Dashboard — sidebar becomes horizontal tabs */
  .dashboard-grid { grid-template-columns: 1fr; padding: 14px 0 40px; }
  .dashboard-sidebar { position: static; border-radius: var(--r); overflow-x: auto; }
  .dash-user { padding: 14px 16px; display: flex; align-items: center; gap: 12px; text-align: left; }
  .dash-avatar { margin: 0; width: 46px; height: 46px; font-size: 1.2rem; flex-shrink: 0; }
  .dash-username { font-size: 14px; }
  .dash-nav {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    border-top: 1px solid var(--border);
    padding: 0;
  }
  .dash-nav::-webkit-scrollbar { display: none; }
  .dash-nav-item {
    flex-shrink: 0;
    border-right: none;
    border-bottom: 3px solid transparent;
    padding: 12px 16px;
    font-size: 13px;
    gap: 7px;
    white-space: nowrap;
  }
  .dash-nav-item svg { width: 16px; height: 16px; }
  .dash-nav-item.active { border-right: none; border-bottom-color: var(--primary); }

  /* Stat cards */
  .stat-cards { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .stat-num   { font-size: 1.5rem; }

  /* Forms */
  .form-card { padding: 24px 20px; }
  .form-row  { grid-template-columns: 1fr; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  #footer { padding: 36px 0 20px; margin-top: 40px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  /* Modal */
  .modal { border-radius: var(--r-md); padding: 24px 18px; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal {
    max-width: 100%;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    transform: translateY(100%);
  }
  .modal-overlay.show .modal { transform: translateY(0); }
}

/* ─── 480px — Small Mobile ─── */
@media (max-width: 480px) {
  .container { padding: 0 14px; }

  /* Hero */
  .hero { padding: 28px 0 22px; }
  .hero-content h1 { font-size: clamp(1.2rem, 6vw, 1.5rem); }
  .hero-search { height: 48px; }
  .hero-search input { padding: 0 14px; font-size: 14px; }
  .hero-search button { padding: 0 14px; font-size: 13.5px; }
  .hero-stats { gap: 14px; }
  .hero-stat strong { font-size: 1.1rem; }
  .hero-stat span   { font-size: 11px; }

  /* Category */
  .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .cat-card { padding: 12px 4px 10px; gap: 7px; }
  .cat-icon { width: 38px; height: 38px; }
  .cat-icon svg { width: 19px; height: 19px; }
  .cat-card span { font-size: 10.5px; }
  .cat-card small { display: none; }

  /* Listings */
  .listings-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .listing-img-wrap { aspect-ratio: 1; }
  .listing-body { padding: 10px 10px 12px; }
  .listing-price { font-size: .95rem; }
  .listing-title { font-size: 12.5px; }

  /* Stats */
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .stat-num   { font-size: 1.3rem; }
  .stat-card  { padding: 14px; }

  /* Form */
  .form-card { padding: 20px 14px; }

  /* Section */
  .section-title { font-size: 1rem; }

  /* Pagination */
  .page-btn { width: 34px; height: 34px; font-size: 13px; }

  /* Footer */
  .footer-col a { font-size: 13.5px; }
}

/* ─── 360px — Tiny Mobile ─── */
@media (max-width: 360px) {
  :root { --header-h: 54px; }
  .container { padding: 0 10px; }
  .logo { font-size: 1.2rem; }
  .logo svg { width: 28px; height: 28px; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .listings-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .hero-search button { font-size: 13px; gap: 5px; }
  .hero-search button svg { display: none; }
  .stat-cards { grid-template-columns: 1fr; }
}


/* ==============================================
   RTL — ARABIC
   ============================================== */
[dir="rtl"] {
  font-family: 'Noto Sans Arabic', sans-serif;
  text-align: right;
}

[dir="rtl"] body {
  font-family: 'Almarai', sans-serif !important;
}

/* Header */
[dir="rtl"] .header-inner   { flex-direction: row-reverse; }
[dir="rtl"] .header-actions { flex-direction: row-reverse; }
[dir="rtl"] .header-search form { flex-direction: row-reverse; }
[dir="rtl"] .header-search select { border-left: none; border-right: 1px solid var(--border); }
[dir="rtl"] .logo { flex-direction: row-reverse; }
[dir="rtl"] .search-btn { flex-direction: row-reverse; }
[dir="rtl"] .dropdown { right: auto; left: 0; }
[dir="rtl"] .dropdown a { flex-direction: row-reverse; }

/* Mobile nav */
[dir="rtl"] .mobile-nav { left: auto; right: 0; transform: translateX(100%); }
[dir="rtl"] .mobile-nav.open { transform: translateX(0); }
[dir="rtl"] .mob-link { flex-direction: row-reverse; border-left: none; border-right: 3px solid transparent; text-align: right; }
[dir="rtl"] .mob-link:hover, [dir="rtl"] .mob-link.active { border-right-color: var(--primary); border-left-color: transparent; }
[dir="rtl"] .mob-user-bar { flex-direction: row-reverse; }

/* Navbar */
[dir="rtl"] .navbar-inner { flex-direction: row-reverse; }
[dir="rtl"] .nav-item { flex-direction: row-reverse; }

/* Cards & content */
[dir="rtl"] .listing-badges  { left: auto; right: 8px; }
[dir="rtl"] .fav-btn          { right: auto; left: 8px; }
[dir="rtl"] .listing-meta    { flex-direction: row-reverse; }
[dir="rtl"] .listing-location { flex-direction: row-reverse; }
[dir="rtl"] .section-header  { flex-direction: row-reverse; }

/* Hero */
[dir="rtl"] .hero-search { flex-direction: row-reverse; }
[dir="rtl"] .hero-search select { border-left: none; border-right: 1px solid var(--border); }
[dir="rtl"] .hero-stats { flex-direction: row-reverse; }

/* Filter / search */
[dir="rtl"] .page-layout   { direction: rtl; }
[dir="rtl"] .filter-option { flex-direction: row-reverse; }
[dir="rtl"] .filter-option .count { margin-left: 0; margin-right: auto; }
[dir="rtl"] .price-range { flex-direction: row-reverse; }
[dir="rtl"] .results-bar { flex-direction: row-reverse; }

/* Detail */
[dir="rtl"] .detail-grid   { direction: rtl; }
[dir="rtl"] .meta-chips    { flex-direction: row-reverse; }
[dir="rtl"] .chip          { flex-direction: row-reverse; }
[dir="rtl"] .seller-block  { flex-direction: row-reverse; }
[dir="rtl"] .contact-btns button,
[dir="rtl"] .contact-btns a { flex-direction: row-reverse; }
[dir="rtl"] .gallery-thumbs { flex-direction: row-reverse; }

/* Dashboard */
[dir="rtl"] .dashboard-grid     { direction: rtl; }
[dir="rtl"] .dash-nav-item      { flex-direction: row-reverse; border-right: none; border-left: 3px solid transparent; }
[dir="rtl"] .dash-nav-item.active { border-left-color: var(--primary); }

/* Forms */
[dir="rtl"] .form-card    { direction: rtl; }
[dir="rtl"] .form-label   { flex-direction: row-reverse; }
[dir="rtl"] .form-control { text-align: right; direction: rtl; }
[dir="rtl"] .form-row     { direction: rtl; }
[dir="rtl"] input[dir="ltr"], [dir="rtl"] textarea[dir="ltr"] { text-align: left; }

/* Buttons */
[dir="rtl"] .btn { flex-direction: row-reverse; }

/* Breadcrumb */
[dir="rtl"] .breadcrumb { flex-direction: row-reverse; }

/* Footer */
[dir="rtl"] #footer         { direction: rtl; }
[dir="rtl"] .footer-grid    { direction: rtl; }
[dir="rtl"] .footer-bottom  { flex-direction: row-reverse; }
[dir="rtl"] .social-links   { flex-direction: row-reverse; }
[dir="rtl"] .footer-col a:hover { padding-left: 0; padding-right: 4px; }

/* Alerts / Pagination / Modal */
[dir="rtl"] .alert      { flex-direction: row-reverse; }
[dir="rtl"] .pagination { flex-direction: row-reverse; }
[dir="rtl"] .modal      { direction: rtl; text-align: right; }
[dir="rtl"] .modal-close { right: auto; left: 14px; }

/* Toast */
[dir="rtl"] .toast-container { right: auto; left: 20px; }
[dir="rtl"] .toast { flex-direction: row-reverse; transform: translateX(-120%); }
[dir="rtl"] .toast.show { transform: translateX(0); }

/* Input placeholders */
[dir="rtl"] input::placeholder,
[dir="rtl"] textarea::placeholder { text-align: right; direction: rtl; }

/* Mobile RTL dashboard tabs */
@media (max-width: 768px) {
  [dir="rtl"] .dash-nav-item { border-right: none; border-left: none; border-bottom: 3px solid transparent; flex-direction: row-reverse; }
  [dir="rtl"] .dash-nav-item.active { border-left: none; border-bottom-color: var(--primary); }
  [dir="rtl"] .dash-user { flex-direction: row-reverse; text-align: right; }
  [dir="rtl"] .mob-link { flex-direction: row-reverse; border-left: none; border-right: 3px solid transparent; }
  [dir="rtl"] .mob-link:hover,
  [dir="rtl"] .mob-link.active { border-right-color: var(--primary); }
}
