/* ============ الخطوط ============ */
/* ============ الخطوط ============ */
@font-face {
    font-family: 'Almarai';
    src: url('/fonts/Almarai-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Almarai';
    src: url('/fonts/Almarai-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
/* ============ متغيرات ألوان عامة ============ */
:root {
    --primary: #0b63b8;          /* أزرق قريب من حراج */
    --primary-soft: #e0edff;
    --primary-deep: #094f96;
    --accent: #10b981;
    --danger: #ef4444;
    --bg-body: #ffffff;
    --bg-card: #ffffff;
    --border-soft: #e2e8f0;
    --text-main: #1f2933;
    --text-muted: #6b7280;
    --radius-lg: 16px;
    --radius-md: 10px;
    --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);
    --shadow-sm: 0 4px 10px rgba(15, 23, 42, 0.06);
}

/* ============ أساسيات ============ */
html {
    font-family: 'Almarai', sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}


body {
    margin: 0;
    direction: rtl;
    text-align: right;
    background-color: var(--bg-body);
    color: var(--text-main);
    font-size: 14px;
}

a {
    text-decoration: none;
    color: inherit;
}
a:hover {
    text-decoration: none;
}

/* ============ كلاس واحد لتحديد عرض الموقع كله ============ */
.site-container {
    max-width: 80rem;
    width: 100%;
    margin-right: auto;
    margin-left: auto;
}

/* ============ الهيدر (ستايل شبيه حراج) ============ */
.header {
    background-color: #0b63b8;      /* شريط أزرق صافي */
    color: #fff;
    line-height: 1;
    border: none;
    box-shadow: none;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* المحتوى الداخلي للهيدر داخل .site-container */
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 44px;                  /* ارتفاع الشريط */
    padding-top: 0;
    padding: 0 5px;
    padding-bottom: 0;
    gap: 10px;
}

/* يمين الهيدر: الشعار */
.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-text {
    font-weight: 700;
    font-size: 1.6rem;       
    color: #ffffff;          
    letter-spacing: 0.5px;
}
@media (max-width: 768px) {
  .logo-text {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .logo-text {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
    .dropdown-btn span:not(.arrow) {
        display: none;
    }
}
.i{
  width:14px;
  height:14px;
  display:inline-flex;     /* أفضل من inline-block */
  flex-shrink:0;
  vertical-align:middle;
  margin:0;               /* نخلي المسافة من gap بدل margin */
}

.footer-icon .i{
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: -4px;
  margin-bottom: 4px;
}

/* أيقونات الهيدر فقط */
.header .i{
  width: 20px;
  height: 20px;
}

/* =================== شريط البحث في الهيدر =================== */

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 44px;
    padding-top: 0;
    padding-bottom: 0;
    gap: 10px;
}

/* حاوية البحث بين الشعار وباقي الأزرار */
.header-search-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

/* زر العودة (يظهر فقط عند التوسّع في الجوال) */
.search-back-btn {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

/* شكل الفورم الصغير في الوضع العادي */
.header-search-form {
    margin: 0;                               /* يلغي ستايل الفورم العام */
    width: 240px;
    background-color: #f5f9ff;
    border-radius: 999px;
    padding: 0;
    display: flex;
    align-items: center;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.6);
}

/* نلغي تأثير ستايل الأزرار العامة هنا */
.header-search-form button,
.search-back-btn {
    background: transparent;
    border: none;
    box-shadow: none;
    margin: 0;
    padding: 0;
}

/* حقل البحث */
.header-search-form input[type="text"] {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    margin: 0px;
    padding: 5px;
    font-size: 13px;
    color: #111827;
}

.header-search-form input::placeholder {
    color: #9ca3af;
}

/* زر أيقونة البحث */
.search-icon-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* هوفر بسيط */
.search-icon-btn:hover {
    background-color: rgba(148, 163, 184, 0.25);
}

/* ========== وضع التوسّع مثل حراج (فقط في الجوال) ========== */

@media (max-width: 768px) {

    /* في الجوال يكون العرض الافتراضي أصغر شوي */
    .header-search-form {
        width: 180px;
    }

    /* عند التوسّع: نخفي الشعار + الأزرار */
    body.search-expanded .logo,
    body.search-expanded .header-actions {
        display: none;              /* نخفي الشعار وباقي الأزرار */
    }

    body.search-expanded .header-inner {
        justify-content: center;
    }

    body.search-expanded .header-search-wrapper {
        flex: 1;
        justify-content: flex-start;
    }

    /* الفورم يأخذ عرض الهيدر تقريبًا */
    body.search-expanded .header-search-form {
        width: 100%;
    }

    /* إظهار زر العودة فقط في التوسّع */
    body.search-expanded .search-back-btn {
        display: inline-block;
    }
}


/* نص أو محتوى ترحيب (لو استخدمته) */
.user-greeting {
    font-size: 12px;
}

/* زر الدخول (لغير المسجّل) */
.login-link {
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    height: auto;
    display: inline-flex;
    align-items: center;
}
.login-link .login {
    color: #ffffff;
    font-weight: 700;
}

/* رابط نصي صغير في الهيدر */
.inf-link {
    color: #fff;
    padding: 4px 10px;
    background: rgba(15, 23, 42, 0.2);
    border-radius: 999px;
    font-size: 11px;
}

/* حاوية الإشعارات في الهيدر */
#notifications-desktop {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

/* زر الأكشن (رسالة / إشعار / مرغوب / متابعة) مثل روابط الهيدر في حراج */
.user-action {
    padding: 8px 10px;
    font-weight: 700;
    font-size: 16px;
}

/* بادج الأرقام */
.notification-badge {
    background-color: #ef4444;
    color: #fff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 999px;
    margin-left: 2px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.6);
}

/* زر إضافة */
.adds {
    background-color: #ffc928;
    color: #000;
    border: none;
    height: auto;
    padding: 8px 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius:15px;
}
.adds:hover {
    background-color: #ffb800;
    color: #000;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* حاوية الأزرار */
.acharaty {
    margin: 0;
    padding: 0;
}

/* منيو المستخدم + الأزرار */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* منيو المستخدم / تسجيل الدخول (المسجّل) */
.user-dropdown {
    background-color: rgba(255, 255, 255, 0.18);
    padding: 3px 10px;
    border-radius: 999px;
    box-shadow: none;
    display: inline-block;
    backdrop-filter: none;

    position: relative; /* 👈 أضف هذه */
}


.dropdown-btn {
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #ffffff;
}
/* ===== منيو المستخدم على الجوال ===== */
@media (max-width: 768px) {

    /* لا نريد أن تكون مرجعية التموضع هي user-dropdown الصغير */
    .user-dropdown {
        position: static;
    }

    /* نخلي القائمة تتمركز تحت الشريط وتكون داخل الشاشة */
    .dropdown-content {
        position: absolute;
        top: calc(44px + 6px);   /* 44px ارتفاع الهيدر عندك */
        right: 8px;
        left: 8px;
        min-width: 0;
        width: auto;
        max-width: none;
    }
}

.user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid #fff;
    object-fit: cover;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9fafb;
    border-radius: 10px;
    z-index: 1000;
    padding: 4px;
    min-width: 160px;
    box-shadow: var(--shadow-soft);

    top: calc(100% + 6px); /* 👈 تحت الزر بـ 6px */
      left: 0;
    right: auto;
}

.dropdown-content.show {
    display: block;
}
.dropdown-content a {
    display: block;
    background: #eef2ff;
    margin: 3px;
    padding: 8px 10px;
    color: #111827;
    text-decoration: none;
    font-size: 1em;
    border-radius: 8px;
    transition: background-color 0.15s ease, transform 0.1s ease;
}
.dropdown-content a:hover {
    background-color: #e0ebff;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .acharaty {
        display: none;    /* نخفي أزرار الرسالة/الإشعار في الجوال مثل حراج */
    }
    .header-actions {
        gap: 6px;
    }
}

/* ============ فورم عام ============ */
form {
    width: 100%;
    margin: 16px 0;
    background: var(--bg-card);
    padding: 14px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

label {
    display: block;
    margin-bottom: 4px;
    font-weight: 700;
    font-size: 12px;
    color: var(--text-muted);
}

input,
select,
textarea {
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 12px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    font-size: 13px;
    background-color: #f9fafb;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
/* ================= منع تكبير الصفحة عند الكتابة (iOS Fix) ================= */
@media (max-width: 768px) {
    input,
    textarea,
    select {
        font-size: 16px !important;   /* 👈 يمنع الـ zoom نهائيًا */
    }
}

textarea {
    border-radius: var(--radius-md);
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background-color: #fff;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}

button {
    background-color: var(--primary);
    color: #fff;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    padding: 5px 10px;
}

/* ============ كونتينر + سيكشنات ============ */

/* زر عام */
.btn {
    display: inline-block;
    text-decoration: none;
    padding: 7px 18px;
    border-radius: 999px;
    color: #fff;
    background-color: var(--accent);
    font-size: 12px;
    transition: background-color 0.2s ease, transform 0.1s ease;
}
.btn:hover {
    background-color: #059669;
    transform: translateY(-1px);
}
/* ============ جداول ============ */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.85em;
    background-color: #fff;
    box-shadow: var(--shadow-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
table th,
table td {
    padding: 10px 12px;
    text-align: right;
    border-bottom: 1px solid #edf2f7;
}
table th {
    background-color: #f9fafb;
    font-weight: 700;
    color: var(--text-muted);
}
table tr:hover {
    background-color: #f3f4ff;
}

/* ============ بطاقة بروفايل ============ */
.profile-card {
    background-color: #fff;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    padding: 12px;
    direction: rtl;
    position: relative;
    border-radius: var(--radius-lg);
    margin: 12px 0 20px;
}

.btn-edit {
    position: absolute;
    left: 10px;
    padding: 4px 8px;
    background-color: var(--primary);
    color: #fff;
    text-decoration: none;
    border-radius: 999px;
    font-size: 10px;
    transition: background-color 0.2s ease, transform 0.1s ease;
}
.btn-edit:hover {
    background-color: var(--primary-deep);
    transform: translateY(-1px);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.profile-image img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-deep);
    box-shadow: var(--shadow-soft);
}

.profile-main-details {
    flex: 1;
}

.profile-name {
    font-size: 1rem;
    color: #0f172a;
    margin: 0;
}
.profile-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.profile-info {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #e5e7eb;
    padding-top: 6px;
    margin-top: 6px;
}
.info-item {
    font-size: 0.75em;
    color: var(--text-muted);
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ============ رسائل نجاح ============ */
.success-message {
    margin-top: 16px;
    padding: 10px;
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #22c55e;
    border-radius: 999px;
    font-size: 0.85em;
    text-align: center;
}

/* ============ أزرار تواصل ============ */
.contact-icon {
    display: inline-block;
    font-size: 0.8em;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 999px;
    background-color: var(--primary);
    transition: transform 0.1s ease, background-color 0.2s ease;
}
.contact-icon:hover {
    transform: translateY(-1px) scale(1.02);
    background-color: var(--primary-deep);
}
.contact-icon.whatsapp {
    background-color: #22c55e;
}
.contact-icon.whatsapp:hover {
    background-color: #16a34a;
}

/* ============ أقسام أفقية (القائمة العلوية مثل حراج) ============ */

.section-bg {
    background-color: #ffffff;
}

.section-bg-inner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 8px 0 10px;
}

/* شريط التمرير */
.section-bg-inner::-webkit-scrollbar {
    height: 4px;
    background: #f3f4f6;
}
.section-bg-inner::-webkit-scrollbar-thumb {
    background: var(--primary-deep);
    border-radius: 999px;
}

/* الكرت نفسه */
.section-bg-inner .card {
    flex: 0 0 auto;
    min-width: 90px;
    padding: 8px 14px;
    border-radius: 16px;
    background: transparent;
    box-shadow: none;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        transform 0.15s ease;
}

/* الأيقونة */
.section-bg-inner .card img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    display: block;
    margin: 0 auto 4px;
}

/* عنوان القسم */
.section-bg-inner .card .card-title {
    font-size: 12px;
    font-weight: 700;
    color: #4b5563;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* هوفر بسيط */
.section-bg-inner .card:hover {
    background-color: #f3f4ff;
}

/* القسم النشط (مثل "سيارات") */
.section-bg-inner .card.active-card {
    background-color: #e5f1ff;
    transform: translateY(0);
}
.section-bg-inner .card.active-card .card-title {
    color: var(--primary-deep);
}

/* ============ الأقسام الفرعية (أزرار صغيرة) ============ */
.small-button {
    display: inline-block;
    padding: 4px 8px;
    background-color: #eef2ff;
    border-radius: 999px;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
    border: none;
    color: #374151;
    margin-left: 4px;
}

.small-button.active-subcat {
    background-color: var(--primary);
    color: #ffffff;
    border: none;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

/* ============ السعر (input number) ============ */
#price {
    -moz-appearance: textfield;
    -webkit-appearance: none;
    appearance: none;
}
#price::-webkit-inner-spin-button,
#price::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ============ Checkbox مخصص ============ */
.checkbox-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.custom-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}
.checkbox-label span {
    font-weight: 700;
    color: #dc2626;
}

/* ============ ترويسة ترحيبية مصغرة ============ */
.welcome-adshaedr {
    display: flex;
    padding: 6px 0;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
}

/* ============ تخطيط الصفحة الرئيسية (إعلانات + سايدبار) ============ */
.layout-wrapper {
    display: grid;
    grid-template-columns: 3fr 1.1fr;
    gap: 10px;
    margin: 10px 0;
}

.ads-content {
    flex: 3;
    min-width: 0;
}

.sidebar {
    flex: 1.1;
    padding: 8px;
    border-radius: var(--radius-lg);
    background-color: #f9fafb;
    position: sticky;
    top: 54px;        
    height: fit-content;
}


@media (max-width: 768px) {
    .layout-wrapper {
       grid-template-columns: 1fr;
    }

    .ads-content,
    .sidebar {
        flex: 1;
    }

    .sidebar {
        display: none;
    }
}

/* ===== كروت السايدبار (تستخدم نفس ألوان الموقع) ===== */

.sidebar-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 8px;
    margin-bottom: 8px;
}

.sidebar-card-title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-deep);
}

.sidebar-card-subtitle {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}

.sidebar-card-text {
    margin: 0 0 8px;
    color: var(--text-muted);
    font-size: 12px;
}

.sidebar-card-btn {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background-color: #ffc928;
    color: #000;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}
.sidebar-card-btn:hover {
    background-color: #ffb800;
}

/* قائمة الروابط داخل كرت السايدبار */
.sidebar-card-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-card-links li {
    margin-bottom: 4px;
}
.sidebar-card-links a {
    color: #1e78b8;
    text-decoration: none;
    font-size: 12px;
}
.sidebar-card-links a:hover {
    text-decoration: underline;
}

/* ============ بانرات الإعلانات ============ */
.ads-bnrsymn {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
}
.ads-bnrsymn__img {
    max-width: 100%;
    height: auto;
    border: 1px solid rgb(35 177 0);
    border-radius: 10px; 
}
.ads-bnrsymn__content {
    line-height: 1.5;
    margin: 0;
    font-size: 12px;
}
.ads-bnrsymn__ad--text {
    border-radius: 8px;
    padding: 6px;
    margin-top: 10px; /* 👈 هذا هو المطلوب */
}
/* ===== وسم إعلان ممول ===== */
.ads-bnrsymn {
    position: relative;
}

.ads-sponsored-badge {
    position: absolute;
    font-size: 10px;
    background:#23b100;
    color: #ffffff;
    padding: 2px 3px;
    border-radius: 999px;
    font-weight: 700;
    z-index: 5;
    line-height: 1.2;
    pointer-events: none;
}

/* ============ قائمة المستخدمين الصغار ============ */
.user-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0;
    list-style: none;
    justify-content: center;
}
.user-title {
    font-size: 0.9rem;
}
.user-item {
    text-align: center;
    width: 66px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 3px;
    background-color: #fff;
    box-shadow: var(--shadow-sm);
}
.user-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.user-avatar.online {
    border: 2px solid #22c55e;
}
.user-avatar.offline {
    border: 2px solid #f97316;
}
.user-name {
    display: block;
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.no-users {
    text-align: center;
    font-size: 0.9rem;
    color: #9ca3af;
}

/* ============ زر "عرض المزيد" ============ */
#load-more-button {
    display: block;
    margin: 10px auto 16px;
    padding: 6px 26px;
    background-color: #facc15;
    color: #1f2937;
    border-radius: 999px;
    border: none;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}
#load-more-button:hover {
    background-color: #eab308;
}

/* ============ الفوتر ============ */
footer {
    background-color: #f9fafb;
    text-align: center;
    font-size: 0.75em;
    color: #9ca3af;
    padding: 10px 0 60px;
    margin-top:10px;
}
.footer-divider {
    border-bottom: 1px solid #bfdbfe;
    width: 100%;
    margin: 10px 0;
}

/* شريط سفلي (موبايل) */
.footer-bar {
    background-color: #f1f5f9;
    border-top: 1px solid #e5e7eb;
    position: fixed;
    bottom: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 54px;
    z-index: 1100;
    box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.15);
}
.footer-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px;
    position: relative;
    line-height: 1.1;
    color: #64748b;
}
.footer-icon i {
    font-size: 18px;
    margin-bottom: 1px;
    font-style: normal;
}
.footer-icon:hover {
    color: var(--primary);
}
.footer-badge {
    background-color: var(--danger);
    color: #fff;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 999px;
    font-weight: 700;
    position: absolute;
    top: -4px;
    right: -10px;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.6);
}
@media (min-width: 768px) {
    .footer-bar {
        display: none;
    }
}

/* ============ سايدبار منزلق (موبايل) ============ */
.custom-sidebar {
    height: 100%;
    width: 0;
    position: fixed;
    top: 0;
    right: 0;
    background-color: #e5f2ff;
    overflow-x: hidden;
    transition: 0.3s;
    padding-top: 0;
    box-shadow: -10px 0 25px rgba(15, 23, 42, 0.25);
    z-index: 1200;
}
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--primary);
    color: #fff;
    padding: 6px 10px;
    line-height: 1.4;
}
.sidebar-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}
.custom-closebtn {
    font-size: 22px;
    cursor: pointer;
    color: #fff;
    background: none;
    border: none;
    outline: none;
}
.custom-sidebar p {
    font-size: 13px;
    padding: 10px;
}

/* ============ حاوية الصفحة الرئيسية ============ */
.home-container {
    padding: 3px;
    max-width: 1000px;
    margin: auto;
}

/* التعليقات + الإعجاب في صف واحد */
.ad-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}

/* جدول الإعلانات (وضع القائمة الافتراضي) */
.ads-table {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ألوان الصفوف */
.ads-table-row:nth-child(odd) { background-color: #fafafa; }
.ads-table-row:nth-child(even) { background-color: #ffffff; }

/* شكل البطاقة (قائمة) */
.ads-table-row {
    border-radius:10px;
    overflow: hidden;
    display: flex;
    padding: 1px;
}

/* تفاصيل الإعلان */
.ad-details {
    flex: 3;
    display: flex;
    flex-direction: column;
    padding: 0px 5px;
    font-size: 0.85em;
}

/* عنوان الإعلان */
.ad-title {
    font-size: 16px;
    margin: 0;
    font-weight: bold;
}
.ad-title a {
    color: #1e78b8;
    text-decoration: none;
}
.ad-title a:hover { text-decoration: underline; }

/* توزيع الأعمدة */
.ad-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}
.ad-column { flex: 1; }

/* صورة الإعلان */
.ad-image {
    padding: 2px;
    display: flex;
    align-items: center;
}
.ad-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
}

/* نصوص صغيرة */
.ad-category,
.ad-city,
.ad-price,
.ad-comments,
.ad-favorite,
.ad-rating,
.ad-date,
.ad-user {
    font-size: 11px;
    color: #444;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* السعر */
.ad-price {
    color: green;
}
.ad-price .currency { color:#766f6f; }

/* لا يوجد إعلانات */
.no-ads {
    text-align: center;
    font-size: 0.9em;
    color: #777;
    margin-top: 10px;
}

/* زر تسجيل الدخول باستخدام Google */
.btn-google-login {
    text-align: center;
    margin: 10px 0 0;
    padding: 7px 18px;
    border-radius: 999px;
    background-color: #ea4335;
    color: #fff;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}
.btn-google-login:hover {
    background-color: #c53030;
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

/* تنبيه "ليس لديك حساب؟" */
.login-hint {
    text-align: center;
    margin: 16px 0 0;
    padding: 10px;
    background-color: #f6fbff;
    border: 1px solid #c2d7ff;
    border-radius: 10px;
    font-size: 13px;
    color: #1f2933;
}
.login-hint a {
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
}
.login-hint a:hover {
    text-decoration: underline;
}

/* ================= وضع الشبكة (grid-view) ================= */
.ads-table.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 8px;
}

.ads-table.grid-view .ads-table-row {
    flex-direction: column;
    padding: 1px;
}

.ads-table.grid-view .ads-table-row:nth-child(odd),
.ads-table.grid-view .ads-table-row:nth-child(even) {
 
}

/* صورة الإعلان في الشبكة */
.ads-table.grid-view .ad-image {
    order: -1;
    padding: 0 0 4px 0;
}
.ads-table.grid-view .ad-image img {
    width: 100%;
    height: 120px;
    border-radius: 10px;
}

/* تفاصيل الإعلان في الشبكة */
.ads-table.grid-view .ad-details {
    padding: 2px;
    gap: 3px;
}

/* الأعمدة في الشبكة */
.ads-table.grid-view .ad-columns {
    grid-template-columns: repeat(2, 1fr);
}

/* التعليقات + الإعجاب في الشبكة */
.ads-table.grid-view .ad-actions {
    display: flex;
    justify-content: space-between;
}

/* موبايل */
@media (max-width: 768px) {
    .ad-title { font-size: 15px; }

    .ad-category,
    .ad-city,
    .ad-price,
    .ad-comments,
    .ad-rating,
    .ad-date,
    .ad-user {
        font-size: 10px;
    }


    .ads-table.grid-view .ad-image img {
        height: 110px;
    }
}

/* موبايل صغير */
@media (max-width: 480px) {
    .ad-title { font-size: 14px; }
}
