/* ══ خط Tajawal لكل العناصر ══ */
*, *::before, *::after { font-family: 'Tajawal', Tahoma, sans-serif !important; }
input, textarea, select, button { font-family: 'Tajawal', Tahoma, sans-serif !important; }

/* Font display swap لتحاشي FOUT */
:root { font-display: swap; }
:root {
  --primary:       #1C4670;
  --primary-light: #278AB0;
  --primary-dark:  #132F4C;
  --accent:        #1DC690;
  --accent-light:  #4DD6AA;
  --sale:          #1C4670;
  --exchange:      #278AB0;
  --charity:       #1DC690;
  --services:      #8B5CF6;
  --surface:       #EAEAE0;
  --card-bg:       #FFFFFF;
  --text:          #1A1D26;
  --text-medium:   #4A5068;
  --text-muted:    #8A91A4;
  --border:        #D5D5CC;
  --divider:       #E0E0D6;
  --gold:          #F59E0B;
  --error:         #DC3545;
  --warning:       #F59E0B;
  --success:       #1DC690;
  --shadow:        0 2px 12px rgba(28,70,112,.10);
  --shadow-hover:  0 8px 32px rgba(28,70,112,.18);
  --radius:        16px;
  --radius-sm:     10px;
  --secondary:       #1DC690;
  --secondary-light: #4DD6AA;
}
* { box-sizing: border-box; }
body {
  font-family: 'Tajawal', sans-serif;
  background: var(--surface);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 80px;
}
.navbar-souq {
  background: var(--primary);
  padding: 0 1rem;
  height: 62px;
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 2px 16px rgba(28,70,112,.3);
}
.navbar-brand-souq {
  color: #fff !important;
  font-weight: 900;
  font-size: 1.4rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.brand-dot { color: var(--accent); }
.nav-icon-btn {
  background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.18);
  color: #fff;
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background .2s;
  text-decoration: none;
  position: relative;
}
.nav-icon-btn:hover { background: rgba(255,255,255,.22); color: #fff; }
.badge-count {
  position: absolute;
  top: -4px; left: -4px;
  background: #ef4444;
  color: #fff;
  font-size: .65rem;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--primary);
  font-weight: 700;
}
.badge-count.orange { background: var(--gold); color: #fff; }
.btn-add-listing {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: var(--primary-dark) !important;
  font-weight: 800;
  border: none;
  padding: .55rem 1.4rem;
  border-radius: 24px;
  font-size: .88rem;
  text-decoration: none;
  display: flex; align-items: center; gap: .35rem;
  transition: all .25s;
  box-shadow: 0 3px 12px rgba(29,198,144,.35);
}
.btn-add-listing:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(29,198,144,.45);
  color: var(--primary-dark) !important;
}
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 28px);
  max-width: 400px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 999px;
  z-index: 1029;
  padding: 0 6px;
  height: 62px;
  box-shadow:
    0 -1px 0 rgba(255,255,255,.8) inset,
    0 12px 40px rgba(28,70,112,.16),
    0 2px 8px rgba(0,0,0,.06);
  align-items: center;
  justify-content: space-around;
  border: 1px solid rgba(255,255,255,.7);
}
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #b8c2d4;
  text-decoration: none;
  font-size: .6rem;
  font-weight: 700;
  padding: .25rem .1rem;
  transition: color .2s, transform .15s;
  position: relative;
  min-width: 0;
  height: 100%;
  letter-spacing: .01em;
}
.bottom-nav-item:active { transform: scale(.92); }
.bottom-nav-item.active { color: #1C4670; }
.bottom-nav-item i {
  font-size: 1.25rem;
  transition: transform .2s;
  display: block;
}
.bottom-nav-item.active i { transform: scale(1.1); }
.bottom-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 2.5px;
  background: #1C4670;
  border-radius: 3px;
  opacity: .85;
}
.bnav-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e2e8f0;
  display: block;
  transition: border-color .2s;
}
.bottom-nav-item.active .bnav-avatar {
  border-color: #1C4670;
}
.bottom-nav-add-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  position: relative;
  margin-top: -26px;
}
.bottom-nav-add {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(220,228,240,.8);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 6px 20px rgba(28,70,112,.16),
    0 1px 4px rgba(0,0,0,.06),
    0 -1px 0 rgba(255,255,255,.9) inset;
  color: #94a3b8;
  font-size: 1.7rem;
  cursor: pointer;
  text-decoration: none;
  transition: box-shadow .2s, transform .15s;
}
.bottom-nav-add:active {
  transform: scale(.9);
  box-shadow: 0 2px 8px rgba(28,70,112,.1);
}
@media (max-width: 767px) {
  .bottom-nav { display: flex; }
  .desktop-nav-links { display: none !important; }
  body { padding-bottom: 96px; background: #f5f5f0; }
}
@media (max-width: 767px) {
  .navbar-souq {
    padding: .6rem 1rem;
  }
  .page-container {
    padding: 0 .75rem;
  }
}
.listing-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all .25s;
  cursor: pointer;
  display: flex; flex-direction: column;
  height: 100%;
  border: 1.5px solid transparent;
}
.listing-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
  border-color: var(--accent);
}
.listing-card.featured {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold), var(--shadow-hover);
}
.corner-ribbon {
  position: absolute;
  top: 0; right: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 68px 68px 0;
  border-color: transparent var(--gold) transparent transparent;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(-2px 2px 3px rgba(245,158,11,.4));
}
.corner-ribbon::after {
  content: '★';
  position: absolute;
  top: 6px; right: -56px;
  color: #fff;
  font-size: .9rem;
  font-weight: 900;
  line-height: 1;
}
.card-img-wrap {
  position: relative;
  padding-top: 70%;
  overflow: hidden;
  background: #eef2f8;
}
.card-img-wrap img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.listing-card:hover .card-img-wrap img { transform: scale(1.06); }
.card-type-badge {
  position: absolute; bottom: 8px; right: 8px;
  z-index: 2;
}
.card-body-souq {
  padding: .85rem;
  flex: 1;
  display: flex; flex-direction: column; gap: .35rem;
}
.card-title-souq {
  font-weight: 700;
  font-size: .95rem;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}
.card-price {
  font-weight: 800;
  font-size: 1.05rem;
}
.card-meta {
  font-size: .78rem;
  color: var(--text-muted);
  display: flex; gap: .5rem; flex-wrap: wrap; align-items: center;
}
.search-bar-wrap {
  background: var(--primary);
  padding: 1rem 1rem .8rem;
}
.search-input-group {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  box-shadow: 0 4px 20px rgba(28,70,112,.2);
}
.search-input-group input {
  border: none;
  padding: .75rem 1rem;
  flex: 1;
  font-family: 'Tajawal', sans-serif;
  font-size: .95rem;
  outline: none;
}
.search-input-group button {
  background: var(--accent);
  border: none;
  padding: .75rem 1.2rem;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
.search-input-group button:hover { background: var(--accent-light); }
.filter-chips {
  display: flex; gap: .5rem; overflow-x: auto; padding: .75rem 1rem;
  background: #fff; border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.filter-chips::-webkit-scrollbar { display: none; }
.chip {
  white-space: nowrap;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 24px;
  padding: .35rem .9rem;
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  color: var(--text);
  text-decoration: none;
}
.chip:hover, .chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.hero-banner {
  background: linear-gradient(155deg, var(--primary-dark) 0%, var(--primary) 55%, #1a6d8f 100%);
  padding: 2.75rem 1.5rem 2rem;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(29,198,144,.12) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(39,138,176,.15) 0%, transparent 50%);
  pointer-events: none;
}
.hero-banner::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 40px;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,.08));
  pointer-events: none;
}
.hero-banner h1 {
  font-weight: 900; font-size: 2.2rem; margin-bottom: .35rem;
  position: relative; letter-spacing: -.5px;
  text-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.hero-banner p {
  font-size: .92rem; opacity: .82; margin: 0; position: relative;
  letter-spacing: .5px;
}
.hero-stats {
  display: flex; justify-content: center; gap: 0;
  margin-top: 1.75rem; position: relative;
  background: rgba(255,255,255,.1);
  border-radius: 20px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.18);
  max-width: 360px; margin-left: auto; margin-right: auto;
  overflow: hidden;
}
.hero-stat {
  flex: 1; text-align: center;
  padding: .85rem .5rem;
  border-left: 1px solid rgba(255,255,255,.15);
  transition: background .2s;
}
.hero-stat:last-child { border-left: none; }
.hero-stat:hover { background: rgba(255,255,255,.08); }
.hero-stat-num {
  font-size: 1.65rem; font-weight: 900;
  color: var(--accent);
  text-shadow: 0 0 20px rgba(29,198,144,.4);
  line-height: 1.1;
}
.hero-stat-label { font-size: .72rem; opacity: .78; margin-top: .15rem; }
.form-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  max-width: 480px;
  margin: 2rem auto;
}
.form-label { font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.form-control, .form-select {
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  padding: .65rem .9rem;
  font-family: 'Tajawal', sans-serif;
  font-size: .95rem;
  transition: border .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(28,70,112,.12);
  outline: none;
}
.btn-primary-souq {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: .8rem 1.75rem;
  font-family: 'Tajawal', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  width: 100%;
  cursor: pointer;
  transition: all .25s;
  box-shadow: 0 4px 16px rgba(28,70,112,.28);
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  text-decoration: none;
  letter-spacing: .01em;
}
.btn-primary-souq:hover {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(28,70,112,.36);
  color: #fff;
}
.btn-primary-souq:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(28,70,112,.2); }
.btn-secondary-souq {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  color: var(--primary-dark);
  border: none;
  border-radius: 14px;
  padding: .8rem 1.75rem;
  font-family: 'Tajawal', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  width: 100%;
  cursor: pointer;
  transition: all .25s;
  box-shadow: 0 4px 16px rgba(29,198,144,.28);
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  text-decoration: none;
  letter-spacing: .01em;
}
.btn-secondary-souq:hover {
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(29,198,144,.36);
  color: var(--primary-dark);
}
.btn-secondary-souq:active { transform: translateY(0); }
.detail-gallery {
  border-radius: var(--radius);
  overflow: hidden;
}
.detail-gallery .main-photo {
  width: 100%; aspect-ratio: 4/3;
  object-fit: cover;
}
.thumbs { display: flex; gap: .5rem; margin-top: .5rem; }
.thumbs img {
  width: 70px; height: 70px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border .2s;
}
.thumbs img.active { border-color: var(--primary); }
.seller-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 1rem;
}
.seller-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  background: var(--surface);
  flex-shrink: 0;
}
.verified-badge { color: var(--accent); font-size: .85rem; }
.stars { color: var(--gold); font-size: .9rem; }
.chat-wrap {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  height: calc(100vh - 160px);
  display: flex; flex-direction: column;
}
.chat-wrap {
  display: flex;
  height: calc(100vh - 130px);
  min-height: 500px;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(28,70,112,.12);
  border: 1px solid var(--border);
}
.chat-sidebar {
  width: 300px;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--divider);
  background: #fafbfd;
}
.chat-sidebar-head {
  padding: 1rem 1.1rem .85rem;
  border-bottom: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
}
.chat-sidebar-head h6 {
  font-weight: 900;
  font-size: .95rem;
  color: var(--primary);
  margin: 0;
}
.chat-conv-list { flex: 1; overflow-y: auto; }
.chat-conv-item {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--divider);
  text-decoration: none;
  color: var(--text);
  transition: background .15s;
  position: relative;
  cursor: pointer;
}
.chat-conv-item:hover  { background: #f0f4fb; }
.chat-conv-item.active { background: #e8f0fe; border-right: 3px solid var(--primary); }
.chat-conv-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}
.chat-conv-item.active .chat-conv-avatar { border-color: var(--primary); }
.chat-conv-name   { font-weight: 700; font-size: .87rem; color: var(--text); }
.chat-conv-last   { font-size: .74rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.chat-conv-time   { font-size: .65rem; color: var(--text-muted); white-space: nowrap; }
.chat-conv-badge  {
  background: #ef4444;
  color: #fff;
  border-radius: 50%;
  width: 20px; height: 20px;
  font-size: .65rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-header {
  background: #fff;
  border-bottom: 1px solid var(--divider);
  padding: .75rem 1.1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
}
.chat-header-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  flex-shrink: 0;
}
.chat-header-name  { font-weight: 800; font-size: .95rem; color: var(--primary); }
.chat-header-sub   { font-size: .72rem; color: var(--accent); }
.chat-header-actions { margin-right: auto; display: flex; gap: .4rem; }
.chat-action-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  font-size: .9rem;
  text-decoration: none;
  transition: all .2s;
}
.chat-action-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.chat-action-btn.green { border-color: #25D366; color: #25D366; }
.chat-action-btn.green:hover { background: #25D366; color: #fff; }
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  background: #f4f7fb;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.msg-row { display: flex; align-items: flex-end; gap: .4rem; margin-bottom: .15rem; }
.msg-row.out { flex-direction: row-reverse; }
.msg-avatar-sm {
  width: 28px; height: 28px;
  border-radius: 50%; object-fit: cover;
  flex-shrink: 0; margin-bottom: 2px;
}
.msg-bubble {
  max-width: 68%;
  padding: .6rem .9rem;
  font-size: .88rem;
  line-height: 1.6;
  word-break: break-word;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.msg-in  {
  background: #fff;
  color: var(--text);
  border-radius: 4px 18px 18px 18px;
}
.msg-out {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border-radius: 18px 4px 18px 18px;
}
.msg-time {
  font-size: .62rem;
  opacity: .6;
  margin-top: .2rem;
  display: flex;
  align-items: center;
  gap: .25rem;
}
.msg-out .msg-time { justify-content: flex-end; }
.chat-date-divider {
  text-align: center;
  margin: .75rem 0;
  font-size: .72rem;
  color: var(--text-muted);
  position: relative;
}
.chat-date-divider::before, .chat-date-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30%;
  height: 1px;
  background: var(--divider);
}
.chat-date-divider::before { right: 0; }
.chat-date-divider::after  { left: 0; }
.chat-input-bar {
  padding: .75rem 1rem;
  border-top: 1px solid var(--divider);
  background: #fff;
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-shrink: 0;
}
.chat-input-bar input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 24px;
  padding: .6rem 1.1rem;
  font-family: 'Tajawal', sans-serif;
  font-size: .9rem;
  outline: none;
  background: #f8fafd;
  transition: border .2s;
}
.chat-input-bar input:focus { border-color: var(--primary); background: #fff; }
.chat-send-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: none;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 3px 10px rgba(28,70,112,.3);
}
.chat-send-btn:hover { transform: scale(1.08); box-shadow: 0 5px 14px rgba(28,70,112,.4); }
.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: .75rem;
  background: #f8fafd;
}
@media (max-width: 767px) {
  .chat-wrap { border-radius: 12px; height: calc(100vh - 110px); }
  .chat-sidebar { width: 100%; min-width: unset; border-left: none; }
  .chat-sidebar.hide-mobile { display: none; }
  .chat-main.hide-mobile    { display: none; }
}
.profile-header {
  background: linear-gradient(135deg, var(--primary), #1a3f6a);
  color: #fff;
  padding: 2rem 1.5rem;
  text-align: center;
  border-radius: 0 0 32px 32px;
}
.profile-avatar {
  width: 90px; height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
  background: var(--surface);
}
.tab-pills .nav-link {
  border-radius: 24px;
  color: var(--text-muted);
  font-weight: 600;
  padding: .45rem 1rem;
  font-size: .85rem;
}
.tab-pills .nav-link.active { background: var(--primary); color: #fff; }
.section-title {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--primary);
  display: flex; align-items: center; gap: .5rem;
  margin-bottom: .85rem;
}
.empty-state { text-align: center; padding: 3rem 1.5rem; }
.empty-state i { font-size: 3.5rem; color: var(--border); }
.page-container { max-width: 1100px; margin: 0 auto; padding: 1rem; }
.bg-primary-souq { background: var(--primary); }
.text-primary-souq { color: var(--primary); }
.text-secondary-souq { color: var(--accent); }
.btn-outline-primary-souq {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
  border-radius: 10px;
  padding: .5rem 1.2rem;
  font-family: 'Tajawal', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.btn-outline-primary-souq:hover { background: var(--primary); color: #fff; }
.divider-text { display: flex; align-items: center; gap: .75rem; color: var(--text-muted); font-size: .85rem; }
.divider-text::before, .divider-text::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.loading-spinner { display: flex; justify-content: center; padding: 3rem; }
.spinner { width: 40px; height: 40px; border: 4px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.payment-card {
  background: linear-gradient(135deg, #fff9e6, #fffdf0);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.confirmation-card {
  background: linear-gradient(135deg, #f0fdf8, #e8faf3);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
}
@media (max-width: 575px) {
  .hero-banner h1 { font-size: 1.6rem; }
  .hero-stat-num { font-size: 1.3rem; }
  .hero-stats { max-width: 100%; }
  .form-card { padding: 1.25rem; margin: 1rem; }
}
.listings-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
}
@media (max-width: 1199px) { .listings-container { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 767px)  { .listings-container { grid-template-columns: 1fr; gap:.45rem; } }
.lcard {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid transparent;
  box-shadow: 0 1px 6px rgba(28,70,112,.08);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  position: relative;
  display: flex;
  flex-direction: column;   
}
.lcard:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(28,70,112,.14); }
.lcard-mine  { border-color: var(--primary-light) !important; }
.lcard-paid  { border-color: var(--gold) !important; }
.lcard-img {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #eef2f8;
  flex-shrink: 0;
}
.lcard-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}
.lcard:hover .lcard-img img { transform: scale(1.04); }
.lcard-type {
  position: absolute;
  bottom: 7px; left: 7px;
}
.lcard-label {
  position: absolute;
  top: 8px; right: 8px;
  color: #fff;
  font-size: .65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.lcard-msgs {
  position: absolute;
  top: 8px; left: 8px;
  background: #ef4444;
  color: #fff;
  font-size: .6rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.lcard-body {
  padding: .7rem .8rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  flex: 1;
}
.lcard-title {
  font-weight: 700;
  font-size: .9rem;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lcard-price { font-weight: 800; font-size: .95rem; }
.lcard-meta  {
  font-size: .75rem;
  color: var(--text-muted);
  display: flex; gap: .5rem; flex-wrap: wrap; align-items: center;
}
.lcard-meta i { color: var(--primary-light); font-size: .7rem; }
.lcard-seller {
  font-size: .74rem;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: space-between;
  margin-top: .1rem;
}
.lcard-seller a { color: var(--text-muted); text-decoration: none; }
.lcard-stars { color: var(--gold); font-weight: 700; font-size: .72rem; }
@media (max-width: 767px) {
  .lcard { flex-direction: row; border-radius: 12px; }
  .lcard-img {
    width: 100px; min-width: 100px;
    aspect-ratio: unset;
    height: auto; min-height: 95px;
  }
  .lcard-body { padding: .55rem .7rem; justify-content: center; }
  .lcard-title { font-size: .85rem; -webkit-line-clamp: 2; }
  .lcard-price { font-size: .88rem; }
  .lcard-meta  { font-size: .7rem; gap: .35rem; }
  .lcard-seller { font-size: .7rem; }
  .lcard-type { bottom:5px; left:5px; }
  .lcard-label { top:5px; right:5px; }
}
.stores-ticker {
  display: inline-flex;
  animation: ticker-scroll 30s linear infinite;
  white-space: nowrap;
}
.stores-ticker:hover { animation-play-state: paused; }
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
/* ══ تحسينات المظهر v8 ══ */
body { background: #f5f5f0 !important; }
.msg-in  { background: #fff !important; box-shadow: 0 1px 4px rgba(0,0,0,.06) !important; }
.msg-out { box-shadow: 0 1px 4px rgba(28,70,112,.15) !important; }
/* نص أكبر في الدردشة */
.msg-bubble { font-size: .88rem !important; line-height: 1.6 !important; }
/* خطوط التسويات أوضح */
.stl .card { box-shadow: 0 2px 8px rgba(28,70,112,.08) !important; }
