/* ======================================================
   حراج — Arabic Marketplace · Redesigned v3
   Colors: Sky Blue + White (like haraj.com.sa)
   ====================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=Tajawal:wght@300;400;500;700;800&display=swap');

/* ─── CSS Variables ─────────────────────────────────── */
:root {
    --primary:        #1a73c8;   /* Sky Blue - like haraj */
    --primary-dark:   #1558a0;
    --primary-light:  #2d8ee0;
    --primary-xlight: #e8f3fc;

    --accent:         #00b67a;   /* Green accent */
    --accent-light:   #00d18c;
    --accent-dark:    #009e6a;
    --accent-xlight:  #e6f9f3;

    --success:        #00b67a;
    --success-light:  #e6f9f3;
    --danger:         #e53935;
    --danger-light:   #fdecea;
    --warning:        #f59e0b;
    --warning-light:  #fffbeb;
    --info:           #0891b2;
    --info-light:     #f0f9ff;

    --bg:             #f5f7fa;
    --bg-card:        #ffffff;
    --text:           #1a1a2e;
    --text-muted:     #6b7280;
    --text-light:     #9ca3af;
    --border:         #e5e9ef;
    --border-light:   #f3f5f8;

    --shadow-xs:  0 1px 2px rgba(0,0,0,.05);
    --shadow-sm:  0 1px 4px rgba(0,0,0,.08);
    --shadow:     0 4px 12px rgba(26,115,200,.08);
    --shadow-md:  0 8px 20px rgba(26,115,200,.12);
    --shadow-lg:  0 16px 32px rgba(26,115,200,.15);

    --radius-xs:  6px;
    --radius-sm:  10px;
    --radius:     14px;
    --radius-lg:  20px;
    --radius-xl:  28px;

    --nav-top:    60px;
    --nav-bottom: 68px;
    --max-w:      1280px;

    --transition: .2s cubic-bezier(.4,0,.2,1);
}

/* ─── Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    background: var(--bg);
    color: var(--text);
    direction: rtl;
    line-height: 1.7;
    min-height: 100vh;
    padding-bottom: calc(var(--nav-bottom) + 12px);
}

/* ─── Top Navbar ─────────────────────────────────────── */
.navbar {
    background: var(--primary);
    height: var(--nav-top);
    position: sticky;
    top: 0;
    z-index: 900;
    box-shadow: 0 2px 10px rgba(26,115,200,.3);
}
.navbar-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
}
.navbar-brand {
    color: #fff;
    font-size: 26px;
    font-weight: 900;
    text-decoration: none;
    letter-spacing: -1px;
    white-space: nowrap;
}
.navbar-brand .brand-accent {
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.2);
    width: 34px; height: 34px;
    border-radius: 10px;
    font-size: 18px;
}
.navbar-search { flex: 1; max-width: 520px; }
.navbar-search form {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 8px;
    padding: 0 6px 0 6px;
    overflow: hidden;
}
.navbar-search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    padding: 9px 12px;
    direction: rtl;
}
.navbar-search input::placeholder { color: var(--text-muted); }
.navbar-search .search-btn {
    background: var(--primary);
    border: none;
    color: #fff;
    width: 36px; height: 36px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}
.navbar-search .search-btn:hover { background: var(--primary-dark); }
.navbar-cart {
    position: relative;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    transition: var(--transition);
    flex-shrink: 0;
}
.navbar-cart:hover { background: rgba(255,255,255,.3); color: #fff; }
.cart-badge {
    position: absolute;
    top: -4px; left: -4px;
    background: #e53935;
    color: #fff;
    border-radius: 50%;
    width: 18px; height: 18px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary);
}

/* ─── Categories Bar ─────────────────────────────────── */
.categories-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.categories-bar::-webkit-scrollbar { display: none; }
.categories-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    gap: 6px;
    padding: 0 12px;
    white-space: nowrap;
}
.cat-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    transition: var(--transition);
    background: transparent;
    border: 1.5px solid transparent;
    min-width: 64px;
    cursor: pointer;
}
.cat-item:hover { color: var(--primary); background: var(--primary-xlight); }
.cat-item.active {
    color: var(--primary);
    background: var(--primary-xlight);
    border-color: var(--primary);
}
.cat-item .cat-icon-wrap {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 22px;   /* for emoji icons */
    background: var(--border-light);
}
.cat-item:hover .cat-icon-wrap,
.cat-item.active .cat-icon-wrap {
    background: var(--primary-xlight);
}
/* SVG inside cat-icon-wrap */
.cat-item .cat-icon-wrap svg {
    width: 22px; height: 22px;
    fill: currentColor;
}

/* ─── Category Grid (home page) ─────────────────────── */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}
.cat-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 8px 12px;
    background: var(--bg-card);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    transition: var(--transition);
    border: 1.5px solid var(--border);
    text-align: center;
}
.cat-grid-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--primary);
}
.cat-grid-icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;           /* emoji size */
    transition: var(--transition);
}
/* SVG inside cat-grid-icon */
.cat-grid-icon svg {
    width: 30px; height: 30px;
    fill: currentColor;
}
.cat-grid-item:hover .cat-grid-icon { transform: scale(1.08); }
.cat-count {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
}

/* ─── Bottom Navigation ──────────────────────────────── */
.bottom-nav {
    position: fixed;
    bottom: 0; right: 0; left: 0;
    height: var(--nav-bottom);
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: stretch;
    z-index: 900;
    box-shadow: 0 -4px 16px rgba(0,0,0,.07);
}
.bottom-nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: stretch;
}
.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    transition: var(--transition);
    border: none;
    background: none;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    padding: 8px 4px;
    position: relative;
}
.bottom-nav-item:hover,
.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-item.active::after {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 32px; height: 3px;
    background: var(--primary);
    border-radius: 0 0 4px 4px;
}
.bottom-nav-item svg { width: 22px; height: 22px; fill: currentColor; }
.bottom-nav-fab {
    flex: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.bottom-nav-fab .fab-btn {
    background: var(--primary);
    color: #fff;
    width: 52px; height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(26,115,200,.45);
    transition: var(--transition);
    transform: translateY(-8px);
    border: 3px solid var(--bg-card);
}
.bottom-nav-fab:hover .fab-btn {
    background: var(--primary-dark);
    transform: translateY(-10px);
}
.bottom-nav-fab .fab-btn svg {
    width: 24px; height: 24px;
    fill: none;
    stroke: #fff;
    stroke-width: 2.5;
}

/* ─── Hero Section ───────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
    padding: 40px 16px 52px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 15% 85%, rgba(255,255,255,.08) 0%, transparent 45%),
                      radial-gradient(circle at 85% 15%, rgba(0,182,122,.12) 0%, transparent 40%);
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0; right: 0;
    height: 32px;
    background: var(--bg);
    clip-path: ellipse(55% 100% at 50% 100%);
}
.hero-content {
    max-width: var(--max-w);
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}
.hero h1 { font-size: 30px; font-weight: 900; color: #fff; margin-bottom: 8px; line-height: 1.3; }
.hero h1 span { color: #ffe082; }
.hero p { font-size: 15px; color: rgba(255,255,255,.85); margin-bottom: 24px; }
.hero-search-box {
    max-width: 580px;
    margin: 0 auto;
    display: flex;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
}
.hero-search-box input {
    flex: 1;
    padding: 14px 18px;
    border: none;
    outline: none;
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    color: var(--text);
    direction: rtl;
    background: transparent;
}
.hero-search-box button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 14px 22px;
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    white-space: nowrap;
}
.hero-search-box button:hover { background: var(--primary-dark); }

/* ─── Container ──────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 16px; }
.section { padding: 24px 0; }
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.section-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-title .title-icon {
    width: 32px; height: 32px;
    background: var(--primary-xlight);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 18px;
}
.section-title .title-icon svg { width: 18px; height: 18px; fill: currentColor; }

/* ─── Product Cards ──────────────────────────────────── */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 14px;
}
.product-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.product-card-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    background: var(--border-light);
    display: block;
}
.product-card-body {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.product-card-title {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--primary);
}
.product-card-price { font-size: 17px; font-weight: 900; color: var(--success); }
.product-card-price small { font-size: 12px; font-weight: 500; }
.product-card-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.product-card-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 3px;
}
.product-card-meta svg { width: 12px; height: 12px; fill: currentColor; }

/* ─── Product List Items (mobile) ────────────────────── */
.products-list { display: flex; flex-direction: column; gap: 10px; }
.product-list-item {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    text-decoration: none;
    color: var(--text);
    overflow: hidden;
    transition: var(--transition);
}
.product-list-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}
.product-list-img {
    width: 120px;
    min-width: 120px;
    height: 110px;
    object-fit: cover;
    background: var(--border-light);
    display: block;
}
.product-list-body {
    flex: 1;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}
.product-list-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.5;
}
.product-list-price { font-size: 16px; font-weight: 900; color: var(--success); }
.product-list-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.product-list-meta .meta-item { display: flex; align-items: center; gap: 3px; }
.product-list-meta svg { width: 12px; height: 12px; fill: currentColor; }
.product-list-seller { display: flex; align-items: center; gap: 6px; }
.product-list-seller img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.product-list-seller span { font-size: 11px; font-weight: 600; color: var(--text-muted); }

/* ─── Badges ─────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.badge-primary  { background: var(--primary-xlight); color: var(--primary); }
.badge-success  { background: var(--success-light);  color: var(--success); }
.badge-warning  { background: var(--warning-light);  color: var(--warning); }
.badge-danger   { background: var(--danger-light);   color: var(--danger); }
.badge-info     { background: var(--info-light);     color: var(--info); }
.badge-accent   { background: var(--accent-xlight);  color: var(--accent-dark); }
.badge-gray     { background: var(--border-light);   color: var(--text-muted); }

/* ─── Buttons ────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(26,115,200,.3); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-accent  { background: var(--accent);   color: #fff; }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }
.btn-gold    { background: var(--primary); color: #fff; }
.btn-gold:hover { background: var(--primary-dark); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #009966; color: #fff; }
.btn-danger  { background: var(--danger);  color: #fff; }
.btn-danger:hover  { background: #c62828; color: #fff; }
.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-sm  { padding: 7px 14px; font-size: 12px; border-radius: var(--radius-xs); }
.btn-lg  { padding: 14px 30px; font-size: 16px; border-radius: var(--radius); }
.btn-block { width: 100%; }
.btn-icon { padding: 0; width: 40px; height: 40px; border-radius: 50%; }

/* ─── Forms ──────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg-card);
    transition: var(--transition);
    direction: rtl;
    outline: none;
    appearance: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,115,200,.1); }
.form-control.is-invalid { border-color: var(--danger); }
.invalid-feedback { color: var(--danger); font-size: 12px; margin-top: 4px; display: flex; align-items: center; gap: 4px; }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%231a73c8' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
    padding-left: 36px;
    cursor: pointer;
}

/* ─── Cards ──────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.card-header {
    padding: 13px 18px;
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-header svg { width: 18px; height: 18px; fill: #fff; }
.card-body { padding: 18px; }

/* ─── Stats Grid ─────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 18px;
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--primary);
}
.stat-card .stat-value { font-size: 30px; font-weight: 900; color: var(--primary); line-height: 1; margin-bottom: 4px; }
.stat-card .stat-label { font-size: 12px; color: var(--text-muted); font-weight: 600; }

/* ─── Alerts ─────────────────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
.alert-success { background: var(--success-light); color: var(--success); border-right: 4px solid var(--success); }
.alert-danger  { background: var(--danger-light);  color: var(--danger);  border-right: 4px solid var(--danger); }
.alert-warning { background: var(--warning-light); color: var(--warning); border-right: 4px solid var(--warning); }
.alert-info    { background: var(--info-light);    color: var(--info);    border-right: 4px solid var(--info); }

/* ─── Tables ─────────────────────────────────────────── */
.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { background: var(--primary); color: #fff; padding: 12px 14px; text-align: right; font-weight: 700; white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: right; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--primary-xlight); }

/* ─── Pagination ─────────────────────────────────────── */
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 28px; flex-wrap: wrap; }
.pagination a,
.pagination span {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.pagination a:hover { background: var(--primary-xlight); border-color: var(--primary); color: var(--primary); }
.pagination .active span,
.pagination span[aria-current="page"] span { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ─── Dashboard Layout ───────────────────────────────── */
.dashboard-layout { display: grid; grid-template-columns: 240px 1fr; gap: 20px; padding: 24px 0; }
.sidebar {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    height: fit-content;
    overflow: hidden;
    position: sticky;
    top: calc(var(--nav-top) + 12px);
}
.sidebar-header { background: var(--primary); color: #fff; padding: 20px; text-align: center; }
.sidebar-avatar { width: 64px; height: 64px; border-radius: 50%; border: 3px solid rgba(255,255,255,.4); margin-bottom: 8px; object-fit: cover; }
.sidebar-name { font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.sidebar-role { font-size: 12px; opacity: .75; }
.sidebar-nav { padding: 8px 0; }
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
    border-right: 3px solid transparent;
}
.sidebar-link svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
.sidebar-link:hover, .sidebar-link.active { background: var(--primary-xlight); color: var(--primary); border-right-color: var(--primary); }

/* ─── Empty State ────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 24px; }
.empty-state-icon { width: 80px; height: 80px; background: var(--primary-xlight); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.empty-state-icon svg { width: 40px; height: 40px; fill: var(--primary); opacity: .5; }
.empty-state h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.empty-state p { color: var(--text-muted); font-size: 14px; }

/* ─── Footer ─────────────────────────────────────────── */
footer { background: var(--primary-dark); color: rgba(255,255,255,.75); text-align: center; padding: 22px 16px; font-size: 13px; margin-top: 40px; }
footer strong { color: #ffe082; }

/* ─── Utilities ──────────────────────────────────────── */
.text-center  { text-align: center; }
.text-muted   { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.d-flex { display: flex; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }

/* ─── Image Upload Preview ───────────────────────────── */
.img-preview-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.img-preview-grid img { width: 88px; height: 88px; object-fit: cover; border-radius: var(--radius-sm); border: 2px solid var(--border); }

/* ─── Filter Bar ─────────────────────────────────────── */
.filter-bar { background: var(--bg-card); border-bottom: 1px solid var(--border); padding: 10px 16px; display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.filter-bar::-webkit-scrollbar { display: none; }
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 24px;
    border: 1.5px solid var(--border);
    background: var(--bg-card);
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.filter-chip:hover, .filter-chip.active { background: var(--primary-xlight); border-color: var(--primary); color: var(--primary); }

/* ─── Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 6px; }

/* ═══════════════════════════════════════════════════════
   PRODUCTS INDEX PAGE — Responsive
   ═══════════════════════════════════════════════════════ */
.products-page-layout {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 20px;
    align-items: start;
}
.products-filters-sidebar { /* same as .sidebar but not sticky on mobile */ }

/* Mobile filter toggle */
.filter-toggle-btn {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 12px;
    width: 100%;
    justify-content: center;
}
.filter-toggle-btn svg { width: 18px; height: 18px; fill: #fff; }

.filters-drawer {
    /* default open on desktop */
}

/* ═══════════════════════════════════════════════════════
   PRODUCT SHOW PAGE — Responsive
   ═══════════════════════════════════════════════════════ */
.product-show-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    align-items: start;
}

/* Gallery */
.gallery-main-wrap {
    border-radius: var(--radius) var(--radius) 0 0;
    overflow: hidden;
    background: var(--border-light);
}
.gallery-main-wrap img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    display: block;
}
.gallery-thumbs {
    display: flex;
    gap: 8px;
    padding: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
}
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumb {
    width: 72px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    flex-shrink: 0;
}
.gallery-thumb:hover, .gallery-thumb.active { border-color: var(--primary); }

/* Product meta row */
.product-meta-row {
    display: flex;
    gap: 14px;
    color: var(--text-muted);
    font-size: 13px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.product-meta-row .meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.product-meta-row svg { width: 15px; height: 15px; fill: currentColor; }

/* Seller card */
.seller-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 14px;
}
.seller-card-header {
    background: var(--primary);
    padding: 12px 16px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}
.seller-card-header svg { width: 16px; height: 16px; fill: #fff; }
.seller-card-body { padding: 16px; text-align: center; }
.seller-avatar { width: 68px; height: 68px; border-radius: 50%; border: 3px solid var(--primary-xlight); object-fit: cover; margin-bottom: 8px; }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════════════════ */

/* ── Tablets & small desktops ── */
@media (max-width: 1024px) {
    .cat-grid { grid-template-columns: repeat(5, 1fr); }
    .dashboard-layout { grid-template-columns: 200px 1fr; }
    .products-page-layout { grid-template-columns: 200px 1fr; }
    .product-show-layout { grid-template-columns: 1fr 290px; }
}

/* ── Mobile ── */
@media (max-width: 768px) {
    :root { --nav-top: 56px; }

    .navbar-brand { font-size: 22px; }

    /* Hero */
    .hero h1 { font-size: 22px; }
    .hero { padding: 24px 16px 40px; }
    .hero-search-box button span { display: none; }
    .hero-search-box button { padding: 14px 16px; }

    /* Categories grid */
    .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }

    /* Products grid */
    .products-grid { grid-template-columns: 1fr 1fr; gap: 10px; }

    /* Dashboard */
    .dashboard-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }

    /* ── Products index page ── */
    .products-page-layout {
        grid-template-columns: 1fr;
    }
    .products-filters-sidebar {
        /* Hidden by default on mobile, toggled via JS */
        display: none;
    }
    .products-filters-sidebar.open {
        display: block;
    }
    .filter-toggle-btn { display: flex; }

    /* ── Product show page ── */
    .product-show-layout {
        grid-template-columns: 1fr;
    }
    /* Sidebar goes below main content on mobile */
    .product-show-sidebar {
        order: 2;
    }
    .product-show-main {
        order: 1;
    }
    .gallery-main-wrap img { max-height: 260px; }
}

/* ── Small mobile ── */
@media (max-width: 540px) {
    .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
    .cat-grid-icon { width: 44px; height: 44px; font-size: 22px; }
    .cat-grid-item { font-size: 11px; padding: 10px 4px; }
    .products-grid { grid-template-columns: 1fr 1fr; }
    .product-card-title { font-size: 13px; }
}

@media (max-width: 380px) {
    .cat-grid { grid-template-columns: repeat(3, 1fr); }
    .products-grid { grid-template-columns: 1fr 1fr; }
    .bottom-nav-item { font-size: 9px; }
}

/* ── Responsive: show list on mobile, grid on desktop ── */
@media (max-width: 767px) {
    .d-none-mobile  { display: none !important; }
    .d-none-desktop { display: flex !important; flex-direction: column; gap: 10px; }
}
@media (min-width: 768px) {
    .d-none-mobile  { display: grid !important; }
    .d-none-desktop { display: none !important; }
}


.haraj-cats-section {
    padding-bottom: 8px;
}
 
/* Outer wrapper clips overflow */
.haraj-cats-scroll-wrap {
    position: relative;
    overflow: hidden;
}
 
/* The scrollable track */
.haraj-cats-track {
    display: grid;
    /* 2 rows */
    grid-template-rows: repeat(2, auto);
    /* Auto-flow fills column by column */
    grid-auto-flow: column;
    /* Each column = 1 item wide (~28% of screen, ~3 visible + peek) */
    grid-auto-columns: calc(33.333% - 8px);
    gap: 10px;
 
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 4px 12px 4px;
    cursor: grab;
}
 
.haraj-cats-track:active {
    cursor: grabbing;
}
 
.haraj-cats-track::-webkit-scrollbar {
    display: none;
}
 
/* Each category item */
.haraj-cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    scroll-snap-align: start;
    transition: transform 0.15s ease;
    padding: 2px;
}
 
.haraj-cat-item:active {
    transform: scale(0.94);
}
 
/* Icon wrapper - white rounded square */
.haraj-cat-icon-wrap {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
 
.haraj-cat-icon-wrap svg {
    width: 62px;
    height: 62px;
}
 
.haraj-cat-item:hover .haraj-cat-icon-wrap,
.haraj-cat-item:focus .haraj-cat-icon-wrap {
    box-shadow: 0 4px 16px rgba(36, 113, 163, 0.22), 0 0 0 2px #2471a3;
    transform: translateY(-2px);
}
 
/* Active / selected category */
.haraj-cat-item.active .haraj-cat-icon-wrap {
    box-shadow: 0 0 0 2.5px #2471a3, 0 4px 12px rgba(36,113,163,0.2);
}
 
/* Category name label */
.haraj-cat-name {
    font-size: 12px;
    font-weight: 600;
    color: #1a3a52;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
}
 
/* Scroll dots */
.haraj-cats-dots {
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: 6px 0 2px;
}
 
.haraj-cats-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #c8dcea;
    transition: background 0.2s, width 0.2s;
    cursor: pointer;
}
 
.haraj-cats-dots .dot.active {
    background: #2471a3;
    width: 18px;
    border-radius: 3px;
}
 
/* ── Responsive ──────────────────────────── */
@media (max-width: 480px) {
    .haraj-cats-track {
        grid-auto-columns: calc(33.333% - 6px);
        gap: 8px;
    }
    .haraj-cat-icon-wrap {
        width: 62px;
        height: 62px;
        border-radius: 14px;
    }
    .haraj-cat-icon-wrap svg {
        width: 54px;
        height: 54px;
    }
    .haraj-cat-name {
        font-size: 11px;
    }
}
 
@media (min-width: 768px) {
    /* On desktop show all in a normal grid */
    .haraj-cats-track {
        grid-auto-flow: row;
        grid-template-columns: repeat(5, 1fr);
        grid-template-rows: auto;
        grid-auto-columns: unset;
        overflow-x: hidden;
    }
    .haraj-cat-icon-wrap {
        width: 80px;
        height: 80px;
    }
    .haraj-cat-icon-wrap svg {
        width: 72px;
        height: 72px;
    }
    .haraj-cats-dots { display: none; }
}


/* ═══════════════════════════════════════════════════════
   BMC LOGO STYLES — أضف الكود ده في app.css
   ═══════════════════════════════════════════════════════ */

/* BMC Logo في الـ Navbar */
.bmc-logo {
    display: inline-flex;
    align-items: center;
    gap: 0px;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 2px;
    line-height: 1;
    text-decoration: none;
    font-family: 'Cairo', sans-serif;
}

.bmc-b {
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255,255,255,0.4);
}

.bmc-m {
    color: #ffe082;
    text-shadow: 0 0 20px rgba(255,224,130,0.5);
}

.bmc-c {
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255,255,255,0.4);
}

/* Underline accent تحت الـ Logo */
.navbar-brand {
    position: relative;
    text-decoration: none;
}

.navbar-brand::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ffe082, transparent);
    border-radius: 2px;
    opacity: 0.6;
}

/* Hero section - استبدل "حراج" بـ BMC */
/* في home.blade.php غير النص ده:
   سوق <span>حراج</span> للإعلانات المجانية
   إلى:
   سوق <span class="bmc-hero-name">BMC</span> للإعلانات المجانية
*/
.bmc-hero-name {
    color: #ffe082 !important;
    font-style: italic;
    letter-spacing: 2px;
}

/* CTA Banner - استبدل "حراج" في النص داخل الـ banner */
/* ما محتاج CSS إضافي - بس غير النص في home.blade.php */


/* ═══════════════════════════════════════════════════════
   BMC LOGO STYLES — أضف الكود ده في app.css
   ═══════════════════════════════════════════════════════ */

/* BMC Logo في الـ Navbar */
.bmc-logo {
    display: inline-flex;
    align-items: center;
    gap: 0px;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 2px;
    line-height: 1;
    text-decoration: none;
    font-family: 'Cairo', sans-serif;
    direction: ltr; /* منع عكس الحروف في RTL */
    unicode-bidi: bidi-override;
}

.bmc-b {
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255,255,255,0.4);
}

.bmc-m {
    color: #ffe082;
    text-shadow: 0 0 20px rgba(255,224,130,0.5);
}

.bmc-c {
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255,255,255,0.4);
}

/* Underline accent تحت الـ Logo */
.navbar-brand {
    position: relative;
    text-decoration: none;
}

.navbar-brand::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ffe082, transparent);
    border-radius: 2px;
    opacity: 0.6;
}

/* Hero section - استبدل "حراج" بـ BMC */
/* في home.blade.php غير النص ده:
   سوق <span>حراج</span> للإعلانات المجانية
   إلى:
   سوق <span class="bmc-hero-name">BMC</span> للإعلانات المجانية
*/
.bmc-hero-name {
    color: #ffe082 !important;
    font-style: italic;
    letter-spacing: 2px;
}

/* CTA Banner - استبدل "حراج" في النص داخل الـ banner */
/* ما محتاج CSS إضافي - بس غير النص في home.blade.php */