/* =========================================================
   الربيعي B2B - التنسيق العام
   هوية بصرية برتقالية مستوحاة من طابع أسواق الجملة الكبرى
   ========================================================= */

:root {
  --primary: #FF6A00;
  --primary-dark: #E65C00;
  --primary-light: #FFF1E6;
  --primary-lighter: #FFF8F2;
  --bg: #F7F8FA;
  --white: #FFFFFF;
  --text: #222222;
  --text-light: #666666;
  --text-muted: #999999;
  --border: #E8E8E8;
  --border-dark: #D9D9D9;
  --success: #17A34A;
  --success-bg: #E9F9EF;
  --danger: #E23C3C;
  --danger-bg: #FDECEC;
  --warn: #F0A020;
  --warn-bg: #FEF3E0;
  --info: #1877C9;
  --info-bg: #E8F2FC;
  --radius: 8px;
  --radius-sm: 4px;
  --radius-lg: 14px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.10);
  --header-h: 70px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'Tajawal', 'Segoe UI', Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  font-size: 15px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0 0 8px; font-weight: 700; }
p { margin: 0 0 8px; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------------- أزرار ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-secondary { background: var(--white); color: var(--text); border-color: var(--border-dark); }
.btn-secondary:hover { background: #f2f2f2; }
.btn-dark { background: #2b2b2b; color: #fff; }
.btn-dark:hover { background: #111; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 13px 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-icon { padding: 8px; border-radius: 50%; background: #fff; border: 1px solid var(--border); }

/* ---------------- شارات ---------------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 100px; font-size: 12px; font-weight: 700; }
.badge-verified { background: var(--info-bg); color: var(--info); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warn { background: var(--warn-bg); color: #a06400; }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-gray { background: #eee; color: #555; }
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }

/* ---------------- الشريط العلوي الصغير ---------------- */
.topbar { background: #2b2b2b; color: #ccc; font-size: 12.5px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 34px; }
.topbar a { color: #ccc; }
.topbar a:hover { color: #fff; }
.topbar .topbar-links { display: flex; gap: 16px; align-items: center; }
.topbar .sep { color: #555; }

/* ---------------- الهيدر الرئيسي ---------------- */
.site-header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header-row { display: flex; align-items: center; gap: 24px; height: var(--header-h); }

.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark {
  width: 42px; height: 42px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 20px;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text .name { font-size: 21px; font-weight: 800; color: var(--text); }
.logo-text .tag { font-size: 11px; color: var(--primary); font-weight: 700; letter-spacing: .5px; }

/* ---------------- البحث ---------------- */
.search-wrap { flex: 1; max-width: 720px; position: relative; }
.search-box { display: flex; align-items: stretch; border: 2px solid var(--primary); border-radius: 100px; overflow: hidden; background: #fff; height: 46px; }
.search-cat {
  border: none; background: #f2f2f2; padding: 0 14px; font-size: 13px; color: var(--text-light);
  border-inline-end: 1px solid var(--border); min-width: 110px; max-width: 150px;
}
.search-input { flex: 1; border: none; outline: none; padding: 0 14px; font-size: 14.5px; background: #fff; }
.search-submit { background: var(--primary); color: #fff; border: none; padding: 0 22px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.search-submit:hover { background: var(--primary-dark); }

.search-suggest {
  position: absolute; top: calc(100% + 6px); inset-inline-start: 0; inset-inline-end: 0;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md);
  z-index: 200; max-height: 460px; overflow-y: auto; display: none;
}
.search-suggest.open { display: block; }
.suggest-group-title { padding: 8px 14px 4px; font-size: 12px; color: var(--text-muted); font-weight: 700; }
.suggest-item { display: flex; align-items: center; gap: 10px; padding: 8px 14px; cursor: pointer; }
.suggest-item:hover, .suggest-item.active { background: var(--primary-lighter); }
.suggest-item img { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; border: 1px solid var(--border); background: #fafafa; }
.suggest-item .s-title { font-size: 13.5px; flex: 1; }
.suggest-item .s-title mark { background: var(--primary-light); color: var(--primary-dark); border-radius: 3px; padding: 0 2px; }
.suggest-item .s-price { font-size: 12.5px; color: var(--primary-dark); font-weight: 700; }
.suggest-empty { padding: 18px; text-align: center; color: var(--text-muted); font-size: 13px; }
.suggest-didyoumean { padding: 10px 14px; font-size: 13px; background: var(--primary-lighter); border-top: 1px solid var(--border); }
.suggest-didyoumean b { color: var(--primary-dark); cursor: pointer; }

/* ---------------- إجراءات الهيدر ---------------- */
.header-actions { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.header-action { position: relative; display: flex; flex-direction: column; align-items: center; font-size: 11.5px; color: var(--text-light); gap: 2px; }
.header-action:hover { color: var(--primary); }
.header-action .icon-wrap { position: relative; font-size: 21px; }
.count-badge {
  position: absolute; top: -6px; inset-inline-start: -8px; background: var(--primary); color: #fff;
  font-size: 10px; min-width: 16px; height: 16px; border-radius: 100px; display: flex; align-items: center; justify-content: center; padding: 0 3px; font-weight: 700;
}
.header-account { position: relative; }
.account-dropdown {
  position: absolute; top: 100%; inset-inline-end: 0; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-md); min-width: 190px; padding: 6px; display: none; margin-top: 8px; z-index: 150;
}
.account-dropdown.open { display: block; }
.account-dropdown a, .account-dropdown button {
  display: block; width: 100%; text-align: right; padding: 9px 12px; border-radius: 6px; font-size: 13.5px; background: none; border: none; color: var(--text);
}
.account-dropdown a:hover, .account-dropdown button:hover { background: var(--primary-lighter); color: var(--primary-dark); }
.account-dropdown hr { border: none; border-top: 1px solid var(--border); margin: 6px 0; }

/* ---------------- شريط التصنيفات ---------------- */
.category-nav { background: var(--primary-dark); color: #fff; }
.category-nav .container { display: flex; align-items: center; gap: 4px; height: 46px; overflow-x: auto; }
.category-nav a { padding: 0 14px; height: 46px; display: flex; align-items: center; font-size: 13.5px; white-space: nowrap; font-weight: 600; }
.category-nav a:hover { background: rgba(255,255,255,.12); }
.category-nav .all-cats { background: rgba(0,0,0,.15); font-weight: 700; }
.cat-dropdown-wrap { position: relative; }
.cat-mega {
  position: absolute; top: 46px; inset-inline-start: 0; background: #fff; color: var(--text); min-width: 220px;
  border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow-md); display: none; padding: 8px; z-index: 120;
}
.cat-dropdown-wrap:hover .cat-mega { display: block; }
.cat-mega a { color: var(--text); height: auto; padding: 8px 12px; display: block; font-weight: 500; border-radius: 6px; }
.cat-mega a:hover { background: var(--primary-lighter); color: var(--primary-dark); }

/* ---------------- تنبيهات فلاش ---------------- */
.flash-wrap { max-width: 1280px; margin: 14px auto 0; padding: 0 16px; }
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 10px; font-size: 14px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid #b7e6c6; }
.alert-error { background: var(--danger-bg); color: var(--danger); border: 1px solid #f5c2c2; }
.alert-info { background: var(--info-bg); color: var(--info); border: 1px solid #bcdcf6; }
.alert-close { cursor: pointer; font-weight: 700; opacity: .6; }
.alert-close:hover { opacity: 1; }

/* ---------------- هيرو الرئيسية ---------------- */
.hero { background: linear-gradient(120deg, #FFF3E9 0%, #FFFFFF 55%); padding: 34px 0; }
.hero-inner { display: flex; gap: 24px; }
.hero-main { flex: 1; border-radius: var(--radius-lg); overflow: hidden; position: relative; min-height: 320px; background: linear-gradient(135deg, var(--primary) 0%, #FF9248 100%); color: #fff; padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.hero-main h1 { font-size: 30px; margin-bottom: 10px; }
.hero-main p { font-size: 15px; opacity: .95; max-width: 480px; }
.hero-main .btn { margin-top: 14px; width: fit-content; }
.hero-side { width: 300px; display: flex; flex-direction: column; gap: 12px; }
.hero-side .side-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.hero-side .side-card .num { font-size: 22px; font-weight: 800; color: var(--primary-dark); }
.hero-side .side-card .lbl { font-size: 12.5px; color: var(--text-light); }

/* ---------------- شبكة التصنيفات ---------------- */
.section { padding: 30px 0; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.section-head h2 { font-size: 19px; }
.section-head .more-link { font-size: 13px; color: var(--primary-dark); font-weight: 700; }

.cats-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.cat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 10px; text-align: center; transition: .15s; }
.cat-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); }
.cat-card .cat-ico { width: 46px; height: 46px; border-radius: 50%; background: var(--primary-light); color: var(--primary-dark); display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; font-size: 22px; }
.cat-card .cat-name { font-size: 13px; font-weight: 700; }
.cat-card .cat-count { font-size: 11.5px; color: var(--text-muted); }

/* ---------------- بطاقة منتج ---------------- */
.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.products-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
.product-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; position: relative; transition: .15s; display: flex; flex-direction: column; }
.product-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-dark); transform: translateY(-2px); }
.product-thumb { position: relative; aspect-ratio: 1/1; background: #fafafa; overflow: hidden; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-thumb-actions { position: absolute; top: 8px; inset-inline-start: 8px; display: flex; flex-direction: column; gap: 6px; }
.thumb-btn { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.92); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--text-light); }
.thumb-btn:hover { color: var(--primary); }
.thumb-btn.active { color: var(--primary); background: var(--primary-light); }
.product-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-title { font-size: 13.5px; font-weight: 600; height: 38px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product-price { font-size: 16px; font-weight: 800; color: var(--primary-dark); }
.product-price small { font-size: 11.5px; color: var(--text-muted); font-weight: 500; }
.product-moq { font-size: 11.5px; color: var(--text-light); }
.product-supplier { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--text-muted); margin-top: auto; padding-top: 6px; border-top: 1px solid #f2f2f2; }
.verified-tick { color: var(--info); font-size: 12px; }
.product-badges { position: absolute; top: 8px; inset-inline-end: 8px; display: flex; flex-direction: column; gap: 4px; }

/* ---------------- عرض القائمة/الشريط الجانبي ---------------- */
.layout-with-sidebar { display: flex; gap: 22px; align-items: flex-start; }
.sidebar { width: 240px; flex-shrink: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; position: sticky; top: 84px; }
.sidebar h4 { font-size: 14px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.filter-group { margin-bottom: 16px; }
.filter-group label.chk { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 5px 0; cursor: pointer; color: var(--text-light); }
.filter-group input[type=range] { width: 100%; }
.price-inputs { display: flex; gap: 8px; align-items: center; }
.price-inputs input { width: 100%; }
.content-area { flex: 1; min-width: 0; }

.toolbar { display: flex; justify-content: space-between; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.toolbar .result-count { font-size: 13.5px; color: var(--text-light); }
.sort-tabs { display: flex; gap: 4px; }
.sort-tabs a { padding: 6px 12px; font-size: 13px; border-radius: 100px; color: var(--text-light); }
.sort-tabs a.active { background: var(--primary); color: #fff; font-weight: 700; }

/* ---------------- عناصر النموذج ---------------- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 6px; }
.form-control, select.form-control, textarea.form-control {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border-dark); border-radius: var(--radius);
  font-size: 14px; font-family: inherit; background: #fff; color: var(--text);
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 12.5px; color: var(--danger); margin-top: 4px; }
.form-row { display: flex; gap: 14px; }
.form-row > * { flex: 1; }
.checkbox-line { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
fieldset.plain { border: none; padding: 0; margin: 0; }

.card-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.auth-card { max-width: 460px; margin: 40px auto; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 20px; background: #f2f2f2; border-radius: 100px; padding: 4px; }
.auth-tabs a { flex: 1; text-align: center; padding: 9px; border-radius: 100px; font-weight: 700; font-size: 13.5px; color: var(--text-light); }
.auth-tabs a.active { background: var(--primary); color: #fff; }

/* ---------------- الجداول ---------------- */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data-table th { background: #fafafa; text-align: right; padding: 10px 12px; font-weight: 700; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data-table td { padding: 10px 12px; border-bottom: 1px solid #f2f2f2; vertical-align: middle; }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover td { background: #fbfbfb; }
.table-empty { padding: 40px; text-align: center; color: var(--text-muted); }

/* ---------------- ترقيم الصفحات ---------------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 24px 0; }
.pagination a, .pagination span { min-width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 6px; border: 1px solid var(--border); font-size: 13px; background: #fff; }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 700; }

/* ---------------- لوحات التحكم ---------------- */
.dash-wrap { display: flex; min-height: calc(100vh - var(--header-h)); }
.dash-sidebar { width: 250px; background: #fff; border-inline-end: 1px solid var(--border); padding: 18px 0; flex-shrink: 0; }
.dash-sidebar .dash-user { padding: 0 18px 16px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.dash-sidebar .dash-user .name { font-weight: 800; font-size: 14.5px; }
.dash-sidebar .dash-user .role { font-size: 12px; color: var(--text-muted); }
.dash-nav a { display: flex; align-items: center; gap: 10px; padding: 11px 18px; font-size: 14px; color: var(--text-light); font-weight: 600; border-inline-start: 3px solid transparent; }
.dash-nav a:hover { background: var(--primary-lighter); color: var(--primary-dark); }
.dash-nav a.active { background: var(--primary-lighter); color: var(--primary-dark); border-inline-start-color: var(--primary); }
.dash-nav .nav-sec-title { padding: 14px 18px 6px; font-size: 11.5px; color: var(--text-muted); font-weight: 700; }
.dash-content { flex: 1; padding: 24px; min-width: 0; }
.dash-content h1 { font-size: 21px; margin-bottom: 4px; }
.dash-sub { color: var(--text-light); font-size: 13.5px; margin-bottom: 18px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.stat-card .stat-num { font-size: 24px; font-weight: 800; }
.stat-card .stat-lbl { font-size: 12.5px; color: var(--text-light); }
.stat-card.accent { border-color: var(--primary); background: var(--primary-lighter); }
.stat-card.accent .stat-num { color: var(--primary-dark); }

/* ---------------- المتجر/المورد storefront ---------------- */
.supplier-cover { height: 190px; background: linear-gradient(120deg, var(--primary), #FF9248); border-radius: var(--radius-lg); position: relative; overflow: hidden; }
.supplier-cover img { width: 100%; height: 100%; object-fit: cover; }
.supplier-head { display: flex; gap: 16px; margin-top: -46px; padding: 0 20px; align-items: flex-end; }
.supplier-logo { width: 92px; height: 92px; border-radius: 12px; background: #fff; border: 4px solid #fff; box-shadow: var(--shadow); overflow: hidden; flex-shrink: 0; }
.supplier-logo img { width: 100%; height: 100%; object-fit: cover; }
.supplier-info { flex: 1; padding-bottom: 6px; }
.supplier-info h1 { font-size: 20px; display: flex; align-items: center; gap: 8px; }
.supplier-meta { display: flex; gap: 14px; font-size: 13px; color: var(--text-light); margin-top: 4px; flex-wrap: wrap; }
.supplier-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 22px 0 18px; }
.supplier-tabs a { padding: 10px 16px; font-size: 14px; font-weight: 700; color: var(--text-light); border-bottom: 3px solid transparent; }
.supplier-tabs a.active { color: var(--primary-dark); border-color: var(--primary); }

/* ---------------- صفحة المنتج ---------------- */
.product-page { display: flex; gap: 28px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.product-gallery { width: 400px; flex-shrink: 0; }
.gallery-main { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; aspect-ratio: 1/1; background: #fafafa; margin-bottom: 10px; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.gallery-thumbs img { width: 68px; height: 68px; object-fit: cover; border-radius: 6px; border: 2px solid var(--border); cursor: pointer; }
.gallery-thumbs img.active { border-color: var(--primary); }
.product-main { flex: 1; min-width: 0; }
.product-main h1 { font-size: 22px; margin-bottom: 10px; }
.price-box { background: var(--primary-lighter); border: 1px solid var(--primary-light); border-radius: var(--radius); padding: 16px; margin: 14px 0; }
.price-box .current-price { font-size: 26px; font-weight: 800; color: var(--primary-dark); }
.tier-table { width: 100%; margin-top: 10px; font-size: 13px; }
.tier-table td { padding: 6px 10px; text-align: center; background: #fff; border: 1px solid var(--border); }
.tier-table th { padding: 6px 10px; text-align: center; font-size: 12px; color: var(--text-light); }
.spec-list { width: 100%; font-size: 13.5px; border-collapse: collapse; margin: 14px 0; }
.spec-list td { padding: 8px 10px; border-bottom: 1px solid #f2f2f2; }
.spec-list td:first-child { color: var(--text-light); width: 160px; }
.qty-input-wrap { display: flex; align-items: center; border: 1px solid var(--border-dark); border-radius: var(--radius); overflow: hidden; width: fit-content; }
.qty-input-wrap button { width: 34px; height: 38px; background: #f2f2f2; border: none; font-size: 16px; }
.qty-input-wrap input { width: 70px; text-align: center; border: none; height: 38px; font-size: 14px; }
.buy-actions { display: flex; gap: 10px; margin-top: 18px; }
.supplier-side-card { width: 280px; flex-shrink: 0; }
.mini-supplier-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.mini-supplier-card .sup-logo { width: 56px; height: 56px; border-radius: 8px; overflow: hidden; margin-bottom: 8px; border: 1px solid var(--border); }
.mini-supplier-card .sup-logo img { width: 100%; height: 100%; object-fit: cover; }
.mini-stats { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-light); margin: 10px 0; text-align: center; }
.mini-stats div b { display: block; font-size: 14px; color: var(--text); }

/* ---------------- السلة وإتمام الطلب ---------------- */
.cart-supplier-group { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.cart-supplier-head { background: #fafafa; padding: 10px 16px; font-weight: 700; font-size: 13.5px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; }
.cart-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid #f2f2f2; }
.cart-row:last-child { border-bottom: none; }
.cart-row img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.cart-row .info { flex: 1; min-width: 0; }
.cart-row .info .t { font-size: 13.5px; font-weight: 600; }
.cart-row .info .moq-warn { font-size: 12px; color: var(--danger); }
.cart-summary { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; position: sticky; top: 84px; }
.summary-line { display: flex; justify-content: space-between; font-size: 13.5px; padding: 6px 0; }
.summary-line.total { font-size: 17px; font-weight: 800; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 12px; }

.payment-option { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; cursor: pointer; }
.payment-option.selected { border-color: var(--primary); background: var(--primary-lighter); }
.payment-option label { display: flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; }
.payment-option .desc { font-size: 12.5px; color: var(--text-light); margin-top: 6px; padding-inline-start: 26px; }

/* ---------------- الطلبات / الحالة ---------------- */
.status-steps { display: flex; margin: 20px 0; }
.status-steps .step { flex: 1; text-align: center; position: relative; font-size: 12px; color: var(--text-muted); }
.status-steps .step .dot { width: 22px; height: 22px; border-radius: 50%; background: #eee; color: #999; display: flex; align-items: center; justify-content: center; margin: 0 auto 6px; font-size: 12px; font-weight: 700; }
.status-steps .step.done .dot { background: var(--success); color: #fff; }
.status-steps .step.current .dot { background: var(--primary); color: #fff; }
.status-steps .step:not(:last-child)::after { content: ''; position: absolute; top: 11px; inset-inline-start: -50%; width: 100%; height: 2px; background: #eee; z-index: -1; }
.status-steps .step.done:not(:last-child)::after { background: var(--success); }

/* ---------------- محادثات ---------------- */
.chat-wrap { display: flex; height: 600px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.chat-list { width: 300px; border-inline-end: 1px solid var(--border); overflow-y: auto; flex-shrink: 0; }
.chat-list-item { display: block; padding: 12px 14px; border-bottom: 1px solid #f2f2f2; }
.chat-list-item.active, .chat-list-item:hover { background: var(--primary-lighter); }
.chat-list-item .cname { font-weight: 700; font-size: 13.5px; display: flex; justify-content: space-between; }
.chat-list-item .cmsg { font-size: 12.5px; color: var(--text-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 3px; }
.chat-body { flex: 1; display: flex; flex-direction: column; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg-bubble { max-width: 60%; padding: 10px 14px; border-radius: 12px; font-size: 13.5px; background: #f2f2f2; }
.msg-bubble.mine { background: var(--primary); color: #fff; align-self: flex-start; }
.msg-bubble .t { font-size: 10.5px; opacity: .7; margin-top: 4px; }
.chat-input-row { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.chat-input-row input { flex: 1; }
.chat-empty { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--text-muted); flex-direction: column; gap: 8px; }

/* ---------------- شريط المقارنة العائم ---------------- */
.compare-bar { position: fixed; bottom: 0; inset-inline-start: 0; inset-inline-end: 0; background: #fff; border-top: 2px solid var(--primary); box-shadow: 0 -4px 20px rgba(0,0,0,.08); z-index: 300; display: none; padding: 10px 0; }
.compare-bar.show { display: block; }
.compare-bar .container { display: flex; align-items: center; gap: 14px; }
.compare-slots { display: flex; gap: 10px; flex: 1; }
.compare-slot { width: 50px; height: 50px; border: 1px dashed var(--border-dark); border-radius: 6px; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.compare-slot img { width: 100%; height: 100%; object-fit: cover; }
.compare-slot .rm { position: absolute; top: -6px; inset-inline-end: -6px; background: var(--danger); color: #fff; width: 16px; height: 16px; border-radius: 50%; font-size: 10px; display: flex; align-items: center; justify-content: center; }

/* ---------------- تذييل الموقع ---------------- */
.site-footer { background: #222; color: #ccc; margin-top: 40px; font-size: 13.5px; }
.footer-top { padding: 40px 0 20px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
.footer-col h4 { color: #fff; font-size: 14.5px; margin-bottom: 14px; }
.footer-col a { display: block; color: #aaa; padding: 5px 0; }
.footer-col a:hover { color: var(--primary); }
.footer-about p { color: #999; font-size: 13px; line-height: 1.8; }
.footer-bottom { border-top: 1px solid #3a3a3a; padding: 16px 0; text-align: center; color: #888; font-size: 12.5px; }
.gov-chip-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.gov-chip-list span { background: #333; color: #bbb; padding: 3px 10px; border-radius: 100px; font-size: 11.5px; }

/* ---------------- عناصر عامة ---------------- */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .ico { font-size: 46px; margin-bottom: 10px; }
.breadcrumb { font-size: 12.5px; color: var(--text-muted); margin-bottom: 14px; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span.sep { margin: 0 6px; }
.tag-chip { display: inline-flex; align-items: center; gap: 4px; background: #f2f2f2; padding: 4px 10px; border-radius: 100px; font-size: 12px; margin: 2px; }
.tag-chip .x { cursor: pointer; font-weight: 700; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary-dark); }
.mt-0{margin-top:0}.mb-0{margin-bottom:0}.mt-2{margin-top:8px}.mb-2{margin-bottom:8px}
.flex{display:flex}.flex-between{display:flex;justify-content:space-between;align-items:center}.gap-1{gap:6px}.gap-2{gap:12px}

/* ---------------- استجابة الموبايل ---------------- */
.mobile-menu-btn { display: none; font-size: 22px; background: none; border: none; }
@media (max-width: 992px) {
  .header-row { flex-wrap: wrap; height: auto; padding: 10px 0; gap: 10px; }
  .search-wrap { order: 3; width: 100%; max-width: none; }
  .cats-grid { grid-template-columns: repeat(3, 1fr); }
  .products-grid, .products-grid.cols-5 { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { flex-direction: column; }
  .hero-side { width: 100%; flex-direction: row; }
  .layout-with-sidebar { flex-direction: column; }
  .sidebar { width: 100%; position: static; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .product-page { flex-direction: column; }
  .product-gallery { width: 100%; }
  .dash-wrap { flex-direction: column; }
  .dash-sidebar { width: 100%; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar .topbar-links { gap: 8px; }
}
@media (max-width: 560px) {
  .cats-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid, .products-grid.cols-5 { grid-template-columns: repeat(2, 1fr); }
  .header-actions { gap: 10px; }
  .hero-main { padding: 24px; }
  .hero-main h1 { font-size: 22px; }
}
