/*
Theme Name: Booking Service
Theme URI: https://github.com/your-org/booking-service-theme
Description: قالب ووردبريس مخصص لموقع بوكينج سيرفس للخدمات والإعلانات بتصميم عصري واحترافي. يعتمد مكتبة أيقونات Phosphor الحديثة (مستضافة محلياً للأمان والسرعة). يدعم RTL، الوضع الليلي، شريط جوال قابل للتخصيص بالكامل، نظام إعلانات مدفوعة، Schema.org تلقائي، Open Graph، نسخ احتياطية، وغيرها. متوافق مع PHP 7.4+ (مختبر حتى PHP 8.3) وأحدث إصدارات ووردبريس.
Author: Booking Service Team
Author URI: https://github.com/your-org
Version: 2.4.1
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Tested PHP up to: 8.3
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bookingservice
Domain Path: /languages
Tags: rtl-language-support, custom-logo, custom-menu, threaded-comments, translation-ready, classifieds, services
*/

/* --------------------------------------------------------------------------
   Reset & Base Typography (Tajawal Font)
   -------------------------------------------------------------------------- */
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    padding: 0;
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
    background-color: #f5f5f5;
    color: #333;
}
a {
    text-decoration: none;
    color: inherit;
}
ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --------------------------------------------------------------------------
   Header Styles (4 Layers)
   -------------------------------------------------------------------------- */
.bs-site-header {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    font-family: 'Tajawal', sans-serif;
}

/* Layer 1: Top Bar */
.header-top-bar {
    background-color: #f8f9fa;
    border-bottom: 1px solid #eaeaea;
    padding: 5px 0;
}
.header-top-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-bar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
}
.top-bar-menu li a {
    color: #666;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.3s;
}
.top-bar-menu li a:hover {
    color: var(--primary-color, #0066cc);
}

/* Layer 2: Main Branding Bar (Blue) */
.header-main-bar {
    background-color: var(--primary-color, #0066cc);
    padding: 10px 0;
    color: #fff;
}
.header-main-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-logo .site-logo-img {
    max-height: 45px;
    width: auto;
}
.header-logo .site-logo-text {
    color: #fff;
    margin: 0;
    font-size: 28px;
    font-weight: 800;
}
.header-user-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.btn-user {
    color: #fff;
    background-color: rgba(0,0,0,0.15);
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.3s;
}
.btn-user:hover {
    background-color: rgba(0,0,0,0.25);
    color: #fff;
}

.header-mobile-search {
    display: none; /* Hidden on desktop */
}

/* Layer 3: Search and Action Bar (White) */
.header-search-bar {
    background-color: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}
.header-search-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}
.add-ad-container {
    flex-shrink: 0;
}
.btn-add-ad {
    background-color: #ffbc5d; /* Booking Service orange/yellow */
    color: #333;
    padding: 12px 25px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
}
.btn-add-ad:hover {
    background-color: #f5a623;
    color: #000;
}
.search-container {
    flex-grow: 1;
    max-width: 800px;
}
.search-form {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
    height: 48px;
}
.search-category-dropdown {
    border-left: 1px solid #ccc;
    background: #f8f9fa;
    height: 100%;
}
.search-category-dropdown select {
    border: none;
    background: transparent;
    padding: 0 15px;
    height: 100%;
    outline: none;
    color: #555;
    font-size: 14px;
    cursor: pointer;
}
.search-field {
    flex-grow: 1;
    border: none;
    padding: 0 15px;
    outline: none;
    font-size: 15px;
    height: 100%;
}
.search-submit {
    background-color: var(--primary-color, #0066cc);
    color: #fff;
    border: none;
    padding: 0 25px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    height: 100%;
}
.search-submit:hover {
    background-color: #005bb5;
}

/* Categories Icons Bar */
.header-cats-bar {
    background-color: #fff;
}
.cats-flex {
    display: flex;
    justify-content: center;
    padding: 10px 0;
    overflow-x: auto;
}
.cats-menu-list {
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.cats-menu-list li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #555;
    font-weight: bold;
    font-size: 14px;
    padding: 10px;
    border-radius: 8px;
    min-width: 80px;
    transition: background 0.2s;
}
.cats-menu-list li a .icon {
    font-size: 24px;
    margin-bottom: 5px;
    color: #888;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 30px; /* fixed height for consistency */
}
.cats-menu-list li a .icon img {
    max-height: 28px;
    max-width: 28px;
    object-fit: contain;
}
.cats-menu-list li a:hover, .cats-menu-list li.current-menu-item > a {
    background-color: #f0f8ff;
    color: var(--primary-color, #0066cc);
}
.cats-menu-list li a:hover .icon, .cats-menu-list li.current-menu-item > a .icon {
    color: var(--primary-color, #0066cc);
}

/* --------------------------------------------------------------------------
   Main Layout Structure
   -------------------------------------------------------------------------- */
.main-wrapper {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

/* Sidebar Right */
.sidebar-right {
    width: 25%;
    flex-shrink: 0;
}
.sidebar-widget {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.sidebar-search {
    display: flex;
    margin-bottom: 20px;
}
.sidebar-search input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 0 4px 4px 0;
    border-left: none;
    font-family: inherit;
}
.sidebar-search button {
    background: #eee;
    border: 1px solid #ddd;
    padding: 0 15px;
    border-radius: 4px 0 0 4px;
    cursor: pointer;
    color: #555;
}
.widget-title {
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #f5f5f5;
    padding-bottom: 10px;
}
.widget-title i {
    color: var(--primary-color, #0066cc);
    margin-left: 5px;
}
.city-list li {
    margin-bottom: 10px;
}
.city-list a {
    color: #555;
    display: block;
    padding: 5px;
    border-radius: 4px;
}
.city-list a:hover {
    background: #f9f9f9;
    color: var(--primary-color, #0066cc);
}

/* Services Grid Sidebar */
.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.service-item {
    background: #f9f9f9;
    border: 1px solid #eee;
    padding: 15px 5px;
    border-radius: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.2s;
}
.service-item i {
    font-size: 24px;
    color: #888;
    margin-bottom: 8px;
    transition: color 0.2s;
}
.service-item span {
    font-size: 13px;
    font-weight: bold;
    color: #555;
}
.service-item:hover {
    border-color: var(--primary-color, #0066cc);
    background: #fff;
}
.service-item:hover i {
    color: var(--primary-color, #0066cc);
}

/* Feed Column (Main Left) */
.feed-column {
    width: 75%;
}

/* Filter Bar above Ads */
.feed-filter-bar {
    background: #fff;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.btn-filter {
    background: #f0f2f5;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
}
.feed-search-quick {
    flex: 1;
    margin: 0 20px;
    position: relative;
}
.feed-search-quick input {
    width: 100%;
    padding: 8px 30px 8px 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-family: inherit;
}
.feed-search-quick i {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}
.feed-sort a {
    color: #0066cc;
    font-weight: bold;
}

/* --------------------------------------------------------------------------
   Ad Card Component (Archive & Index) — Booking Service horizontal rows
   Single horizontal row: [image] [content] [compact action icons]
   -------------------------------------------------------------------------- */
.ads-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ad-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    flex-wrap: nowrap;          /* one horizontal row */
    align-items: stretch;
    gap: 14px;
    padding: 12px 14px;
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
    border: 1px solid #f0f2f5;
}
.ad-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #d8e3f0;
}

/* IMAGE — compact, on the right (RTL) */
.ad-card-image {
    width: 110px;
    height: 110px;
    flex-shrink: 0;
    margin-right: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f4f6f8;
}
.ad-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* DETAILS — flexible middle area */
.ad-card-details {
    flex: 1;
    min-width: 0;               /* allow ellipsis on long titles */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2px 0;
}
.ad-title {
    margin: 0 0 6px 0;
    font-size: 16px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.ad-title a {
    color: #00a69c;
}
.ad-title a:hover {
    text-decoration: underline;
}
.ad-excerpt {
    margin: 0 0 6px;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 100%;
}
.ad-card-rating {
    margin-bottom: 5px;
    font-size: 12px;
    color: #f5c518;
}
.ad-card-rating i {
    margin-left: 1px;
}
.ad-meta-row {
    margin-top: auto;
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #595959; /* a11y: AAA contrast */
    flex-wrap: wrap;
}
.ad-meta-item i {
    margin-left: 3px;
    color: #6b6b6b; /* a11y: improved icon contrast */
}

/* Ad Card Contact Buttons — compact icon-style, aligned to the LEFT side (RTL) */
.ad-card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: auto;
    margin-top: 0;
    padding-top: 0;
    padding-right: 8px;
    border-top: none;
    border-right: 1px solid #f0f2f5;
    align-self: stretch;
    justify-content: center;
    flex-shrink: 0;
}
.ad-card-actions a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 14px;
    min-width: 88px;
    min-height: 44px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s;
}
.btn-card-whatsapp {
    background-color: #25d366;
    color: #fff !important;
}
.btn-card-whatsapp:hover {
    background-color: #1da851;
}
.btn-card-whatsapp i {
    font-size: 16px;
}
.btn-card-call {
    background-color: #f0f2f5;
    color: #333 !important;
    border: 1px solid #e0e0e0;
}
.btn-card-call:hover {
    background-color: #e2e6ea;
}
.btn-card-call i {
    font-size: 14px;
    color: var(--primary-color, #0066cc);
}

/* --------------------------------------------------------------------------
   Single Ad Layout (Reversed: Main Right, Sidebar Left)
   -------------------------------------------------------------------------- */
.single-ad-container {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.single-ad-title {
    color: #00a69c; /* Teal */
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 15px;
}
.single-ad-meta-bar {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
    color: #595959; /* a11y: AAA contrast */
    font-size: 14px;
}
.single-ad-meta-bar span i {
    margin-left: 5px;
}
.meta-report {
    margin-right: auto;
    color: #dc3545;
    cursor: pointer;
}

/* Author Box */
.single-ad-author-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.author-info {
    display: flex;
    align-items: center;
    gap: 15px;
}
.author-avatar {
    width: 50px;
    height: 50px;
    background: #e1e1e1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
}
.author-name a {
    font-weight: bold;
    font-size: 16px;
    color: #333;
}
.author-rating {
    color: #f5c518;
    font-size: 12px;
    margin-top: 5px;
}
.btn-follow {
    background: #fff;
    border: 1px solid #0066cc;
    color: #0066cc;
    padding: 8px 20px;
    border-radius: 20px;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
}
.btn-follow:hover {
    background: #0066cc;
    color: #fff;
}

/* Vertical Gallery */
.single-ad-gallery {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}
.single-ad-gallery img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    max-height: 600px;
    object-fit: cover;
}

/* Content */
.single-ad-content {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
    white-space: pre-wrap;
}

/* Sidebar Left (Related Ads & Contact) */
.widget-author-contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.btn-contact {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}
.btn-call {
    background: #28a745;
    color: #fff;
}
.btn-chat {
    background: #0066cc;
    color: #fff;
}
.widget-related-ads .related-ad-item {
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}
.widget-related-ads .related-ad-item:last-child {
    border-bottom: none;
}
.widget-related-ads .related-ad-item a {
    display: flex;
    gap: 10px;
}
.widget-related-ads .related-ad-item img, .related-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}
.related-placeholder {
    background: #eee;
}
.widget-related-ads .related-ad-item h4 {
    margin: 0;
    font-size: 14px;
    color: #00a69c;
    line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Footer (4-Column Widget Layout)
   -------------------------------------------------------------------------- */
.site-footer {
    background-color: var(--footer-bg-color, #222);
    color: var(--footer-text-color, #aaa);
    padding: 40px 0 20px;
    margin-top: 50px;
    font-size: 14px;
}
.site-footer a {
    color: var(--footer-text-color, #ccc);
    text-decoration: none;
    transition: color 0.3s;
}
.site-footer a:hover {
    color: #fff;
}
.footer-widgets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}
.footer-col {
    text-align: right;
}
.footer-widget {
    margin-bottom: 20px;
}
.footer-widget h3,
.footer-widget .widget-title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-widget ul li {
    margin-bottom: 8px;
}
.footer-widget ul li a {
    color: var(--footer-text-color, #aaa);
    font-size: 14px;
}
.footer-widget ul li a:hover {
    color: #fff;
    padding-right: 5px;
}
.footer-bottom {
    text-align: center;
    padding-top: 10px;
    font-size: 13px;
    color: var(--footer-text-color, #777);
}
@media (max-width: 768px) {
    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}
@media (max-width: 480px) {
    .footer-widgets {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   Responsive Design
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
    .main-wrapper {
        flex-direction: column;
    }
    .sidebar-right, .feed-column {
        width: 100%;
    }
    .single-ad-column, .sidebar-left {
        width: 100% !important;
    }
    .header-top-bar {
        display: none;
    }
    .header-search-flex {
        flex-direction: column;
    }
    .search-form {
        max-width: 100%;
    }
}
/* --------------------------------------------------------------------------
   Mobile specific Layout (Bottom Nav & Header Tweaks)
   -------------------------------------------------------------------------- */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}
.mobile-nav-list {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 0;
    padding: 10px 0;
    list-style: none;
}
.mobile-nav-list li {
    flex: 1;
    text-align: center;
}
.mobile-nav-list li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    color: #666;
    text-decoration: none;
    font-weight: bold;
}
.mobile-nav-list li a i {
    font-size: 20px;
    margin-bottom: 4px;
}
.mobile-nav-list li a .icon {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 24px;
    margin-bottom: 4px;
}
.mobile-nav-list li a .icon img {
    max-height: 22px;
    max-width: 22px;
    object-fit: contain;
}

@media (max-width: 768px) {
    /* Header adjustments for Mobile */
    .header-top-bar { display: none; } /* Hide layer 1 */
    .desktop-only-search { display: none; } /* Hide layer 3 */
    
    .header-main-bar { padding: 10px 0; }
    .header-main-flex { gap: 10px; }
    
    .header-logo .site-logo-img { max-height: 25px; } /* Reduce logo size */
    .header-logo .site-logo-text { font-size: 18px; }
    
    .header-mobile-search {
        display: block; /* Show mobile search */
        flex-grow: 1;
    }
    .header-mobile-search .search-form {
        height: 44px; /* a11y: minimum touch target */
        border: none;
        background-color: rgba(255,255,255,0.95);
        border-radius: 8px;
    }
    .header-mobile-search .search-field {
        background: transparent;
        color: #1a1a1a;
        font-size: 14px;
        padding: 0 12px;
        min-height: 44px; /* a11y: tappable height */
    }
    .header-mobile-search .search-field::placeholder {
        color: #595959; /* a11y: improved contrast */
    }
    .header-mobile-search .search-submit {
        background: transparent;
        min-width: 44px;  /* a11y: minimum touch target */
        min-height: 44px;
        padding: 0 12px;
        font-size: 16px;
        color: #003d7a;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .header-mobile-search .search-submit:hover {
        background: transparent;
        color: #002a5c;
    }

    .header-user-actions { gap: 5px; }
    .btn-user {
        padding: 6px;
        background: transparent;
        font-size: 16px;
    }
    .btn-user .user-text { display: none; } /* Hide text, show only icon */
    .btn-lang, .btn-darkmode { display: none; } /* Optional: Hide lang/darkmode to save space, or keep them */
    .btn-darkmode { display: flex; } /* keep moon */

    /* Categories as squares with blue bg */
    .header-cats-bar { padding: 10px 0; }
    .cats-menu-list {
        gap: 15px;
        padding: 5px 10px;
        width: max-content;
    }
    .cats-menu-list li a {
        background-color: #f0f8ff;
        border: 1px solid #e0f0ff;
        border-radius: 12px;
        min-width: 60px;
        padding: 10px 5px;
        color: #333;
        font-size: 12px;
    }
    .cats-menu-list li a .icon { font-size: 24px; height: 26px; }
    .cats-menu-list li a .icon img { max-width: 24px; max-height: 24px; }
    
    /* Ad Card adjustments — keep horizontal row even on mobile */
    .ad-card {
        padding: 10px;
        gap: 10px;
        border-radius: 10px;
    }
    .ad-card-image {
        width: 88px;
        height: 88px;
        border-radius: 8px;
        margin-left: 0;
        margin-right: 0;
    }
    .ad-title { font-size: 14px; margin-bottom: 4px; -webkit-line-clamp: 2; }
    .ad-excerpt { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* compact on small screens */
    .ad-meta-row { gap: 8px; font-size: 11px; }
    .ad-card-actions { padding-right: 6px; gap: 8px; }
    .ad-card-actions a { min-width: 80px; min-height: 44px; padding: 0 12px; font-size: 12px; }
    .btn-card-quickview { min-width: 80px; min-height: 44px; padding: 0 12px; font-size: 12px; }
    .btn-card-share { min-width: 80px; min-height: 44px; padding: 0 12px; font-size: 12px; }
    .ad-card-actions a span,
    .btn-card-whatsapp::after { /* keep icons only on phones if needed */ }
    .bs-fav-toggle { width: 40px; height: 40px; font-size: 14px; top: 6px; left: 6px; }
    .ad-card-price { padding: 3px 8px; font-size: 12px; }
    
    /* Bottom Nav */
    .mobile-bottom-nav { display: block; }
    body { padding-bottom: 70px; /* space for bottom nav */ }
}

/* ==========================================================
   BOOKING SERVICE — EXTENSIONS (favorites, share, advanced search,
   custom fields, dashboard, edit form, ad-card price/heart)
   ========================================================== */

/* --- Ad card heart (favorite toggle) --- */
.ad-card { position: relative; }
.bs-fav-toggle {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255,255,255,0.95);
    border: 1px solid #eee;
    width: 44px; height: 44px;
    border-radius: 50%;
    cursor: pointer;
    color: #888;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    z-index: 5;
    transition: all .2s;
    padding: 0;
    touch-action: manipulation;
}
.bs-fav-toggle:hover { color: #dc3545; transform: scale(1.08); }
.bs-fav-toggle.is-fav { color: #dc3545; border-color: #dc3545; background: #fff; }
.bs-fav-toggle.is-loading { opacity: .5; pointer-events: none; }

.ad-card-price {
    display: inline-block;
    background: linear-gradient(135deg, #00a69c, #0a8a82);
    color: #fff;
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    margin: 6px 0 8px;
    align-self: flex-start;
}
.ad-no-image {
    width: 100%; height: 100%;
    background: #eef2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a0aab2;
}

/* --- Single ad price + favorite + specs + share --- */
.single-ad-price {
    display: inline-block;
    background: linear-gradient(135deg, #00a69c, #0a8a82);
    color: #fff;
    padding: 12px 25px;
    border-radius: 10px;
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 20px;
    box-shadow: 0 4px 15px rgba(0,166,156,0.25);
}
.bs-fav-large {
    position: static;
    width: auto; height: auto;
    border-radius: 20px;
    padding: 6px 16px;
    background: #fff;
    border: 1px solid #ddd;
    color: #555;
    font-size: 13px;
    font-weight: 600;
    gap: 6px;
    margin-right: auto;
    font-family: inherit;
}
.bs-fav-large.is-fav { color: #dc3545; border-color: #dc3545; background: #fff5f5; }
.bs-fav-large i { font-size: 14px; }

.bs-section-title {
    font-size: 18px;
    color: #333;
    margin: 25px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}
.bs-section-title i { color: var(--primary-color, #0066cc); margin-left: 5px; }

.single-ad-specs { margin: 20px 0; }
.bs-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.bs-spec {
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
}
.bs-spec-label { font-size: 12px; color: #595959; margin-bottom: 4px; } /* a11y: AAA */
.bs-spec-value { font-size: 16px; font-weight: 700; color: #333; }

.single-ad-share { margin: 25px 0 10px; }
.bs-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.bs-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    color: #fff !important;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all .2s;
}
.bs-share-btn:hover { transform: translateY(-2px); opacity: .95; }
.bs-share-whatsapp { background: #25d366; }
.bs-share-twitter  { background: #000; }
.bs-share-facebook { background: #1877f2; }
.bs-share-telegram { background: #0088cc; }
.bs-share-copy     { background: #6c757d; }
.bs-share-copy.is-copied { background: #28a745; }

.ad-no-photos {
    width: 100%;
    height: 300px;
    background: #eef2f5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #a0aab2;
    border-radius: 8px;
    gap: 10px;
}

/* Contact buttons in single ad sidebar */
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-whatsapp:hover { background: #1da851; color: #fff; }
.btn-contact-disabled {
    background: #f0f0f0; color: #999; cursor: not-allowed;
    font-family: inherit; font-weight: 600; font-size: 15px;
}

/* --- Sidebar advanced search --- */
.bs-advanced-search {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}
.bs-as-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #555;
    margin: 10px 0 5px;
}
.bs-as-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    background: #fff;
    box-sizing: border-box;
}
.bs-as-row { display: flex; gap: 8px; }
.bs-as-row .bs-as-input { flex: 1; }
.bs-as-submit {
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    background: var(--primary-color, #0066cc);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
}
.bs-as-submit:hover { filter: brightness(.9); }
.bs-as-reset {
    display: block;
    text-align: center;
    margin-top: 8px;
    font-size: 12px;
    color: #888;
    text-decoration: underline;
}

/* --- Feed filter form --- */
.feed-filter-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}
.feed-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    background: #fff;
    cursor: pointer;
}
.feed-filter-form .feed-search-quick { flex: 1; min-width: 200px; margin: 0; }

/* --- Form pages (add-ad, edit-ad) --- */
.bs-form-page {
    flex: 1 1 100%;
    margin-top: 20px;
    min-height: 60vh;
}
.bs-form-card {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    max-width: 850px;
    margin: 0 auto;
}
.bs-form-title {
    font-size: 24px;
    color: var(--primary-color, #0066cc);
    margin: 0 0 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.bs-form-title i { color: var(--primary-color, #0066cc); }

.bs-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.6;
}
.bs-alert i { font-size: 22px; margin-top: 2px; }
.bs-alert-success { background: #d4edda; color: #155724; border-right: 4px solid #28a745; }
.bs-alert-error { background: #f8d7da; color: #721c24; border-right: 4px solid #dc3545; }
.bs-alert-link {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
    margin-top: 4px;
    display: inline-block;
}

.bs-form .bs-field { margin-bottom: 18px; }
.bs-form label {
    display: block;
    font-weight: 700;
    color: #444;
    margin-bottom: 8px;
    font-size: 14px;
}
.bs-form .bs-req { color: #dc3545; }
.bs-form .bs-hint { color: #595959; font-weight: normal; font-size: 12px; } /* a11y: AAA */
.bs-form input[type="text"],
.bs-form input[type="number"],
.bs-form input[type="email"],
.bs-form select,
.bs-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 15px;
    box-sizing: border-box;
    background: #fff;
    transition: border-color .2s;
}
.bs-form input:focus, .bs-form select:focus, .bs-form textarea:focus {
    border-color: var(--primary-color, #0066cc);
    outline: none;
}
.bs-form .bs-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-bottom: 18px;
}
.bs-form .bs-row > .bs-field { margin-bottom: 0; }
.bs-form .bs-row.bs-row-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 600px) {
    .bs-form .bs-row { grid-template-columns: 1fr; }
}

.bs-upload-box {
    border: 2px dashed #ccc;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    background: #fafbfc;
    transition: border-color .2s;
}
.bs-upload-box:hover { border-color: var(--primary-color, #0066cc); }
.bs-upload-box i {
    font-size: 28px;
    color: #aaa;
    display: block;
    margin-bottom: 10px;
}
.bs-upload-box input[type="file"] { max-width: 100%; }

.bs-btn-submit {
    background: var(--primary-color, #0066cc);
    color: #fff;
    padding: 14px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    transition: filter .2s;
}
.bs-btn-submit:hover { filter: brightness(.9); }

/* Edit ad gallery preview */
.bs-gallery-current { display: flex; flex-wrap: wrap; gap: 12px; }
.bs-gallery-current-item {
    position: relative;
    width: 110px;
    cursor: pointer;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}
.bs-gallery-current-item img { width: 100%; height: 90px; object-fit: cover; display: block; }
.bs-gallery-current-item span {
    display: block;
    padding: 6px;
    text-align: center;
    font-size: 12px;
    color: #444;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

/* --- Dashboard --- */
.bs-dashboard-page { flex: 1 1 100%; margin-top: 20px; }
.bs-dash-header {
    background: #fff;
    padding: 25px 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.bs-dash-header h1 { margin: 0; font-size: 22px; color: var(--primary-color, #0066cc); }
.bs-dash-sub { margin: 6px 0 0; color: #595959; font-size: 14px; } /* a11y: AAA */
.bs-dash-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.bs-btn-primary {
    background: var(--primary-color, #0066cc);
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: filter .2s;
    font-family: inherit;
    border: none;
    cursor: pointer;
}
.bs-btn-primary:hover { filter: brightness(.9); color: #fff; }
.bs-btn-ghost {
    background: #fff;
    color: #444;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid #ddd;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all .2s;
}
.bs-btn-ghost:hover { background: #f8f9fa; color: #444; }

.bs-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}
.bs-stat-card {
    background: #fff;
    padding: 18px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 14px;
}
.bs-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.bs-stat-num { display: block; font-size: 22px; font-weight: 800; color: #1a1a1a; }
.bs-stat-label { display: block; font-size: 13px; color: #595959; margin-top: 2px; }

.bs-tabs {
    display: flex;
    gap: 6px;
    background: #fff;
    padding: 6px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.bs-tab {
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    color: #666;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .2s;
}
.bs-tab:hover { background: #f0f4f8; color: var(--primary-color, #0066cc); }
.bs-tab.active { background: var(--primary-color, #0066cc); color: #fff; }

.bs-panel {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
}
.bs-panel-head {
    padding: 18px 25px;
    border-bottom: 1px solid #f0f0f0;
}
.bs-panel-head h2 { margin: 0; font-size: 18px; color: #333; }

.bs-table-wrap { overflow-x: auto; }
.bs-data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}
.bs-data-table thead { background: #f8f9fa; }
.bs-data-table th {
    padding: 14px 18px;
    text-align: right;
    font-weight: 700;
    color: #555;
    font-size: 13px;
    border-bottom: 1px solid #eaeaea;
    white-space: nowrap;
}
.bs-data-table td {
    padding: 12px 18px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 14px;
    color: #333;
}
.bs-data-table tr:hover { background: #fafbfc; }
.bs-cell-title a { font-weight: 700; color: #222; text-decoration: none; }
.bs-cell-title a:hover { color: var(--primary-color, #0066cc); }
.bs-thumb {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
    display: block;
}
.bs-thumb-empty {
    background: #eef2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
}

.bs-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}
.bs-badge-success { background: #d4edda; color: #155724; }
.bs-badge-warning { background: #fff3cd; color: #856404; }

.bs-cell-actions { white-space: nowrap; }
.bs-btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    text-decoration: none;
    margin-left: 4px;
    transition: all .2s;
}
.bs-btn-edit { background: #e3f2fd; color: #0066cc; }
.bs-btn-edit:hover { background: #0066cc; color: #fff; }
.bs-btn-delete { background: #ffeeee; color: #dc3545; }
.bs-btn-delete:hover { background: #dc3545; color: #fff; }
.bs-btn-stats { background: #f3e8ff; color: #7c3aed; border: 0; cursor: pointer; }
.bs-btn-stats:hover { background: #7c3aed; color: #fff; }

/* فلاتر الأقسام في لوحة العضو (تبويب «إعلاناتي») */
.bs-cat-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
    padding: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}
.bs-cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
}
.bs-cat-chip:hover { border-color: #0066cc; color: #0066cc; }
.bs-cat-chip.is-active {
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
}
.bs-cat-chip .bs-cat-count {
    background: rgba(15, 23, 42, .08);
    color: inherit;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 700;
}
.bs-cat-chip.is-active .bs-cat-count { background: rgba(255, 255, 255, .25); }
.bs-cat-empty-msg {
    background: #fff7ed;
    color: #92400e;
    border: 1px dashed #fdba74;
    padding: 14px;
    border-radius: 8px;
    text-align: center;
    margin: 12px 0 0;
}

/* === Per-Ad Analytics Modal === */
.bs-an-modal { position: fixed; inset: 0; z-index: 9998; display: none; }
.bs-an-modal.open { display: block; }
.bs-an-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.55); }
.bs-an-dialog {
    position: relative;
    width: min(960px, 94vw);
    max-height: 90vh;
    margin: 4vh auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 25px 60px rgba(0,0,0,.25);
    padding: 22px 24px 28px;
    overflow-y: auto;
    direction: rtl;
}
.bs-an-x {
    position: absolute; top: 10px; left: 14px;
    width: 36px; height: 36px;
    border: 0; background: #f1f5f9; color: #0f172a;
    border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer;
}
.bs-an-x:hover { background: #e2e8f0; }
.bs-an-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding-left: 44px; flex-wrap: wrap; }
.bs-an-title { margin: 0; font-size: 20px; color: #0f172a; }
.bs-an-export {
    display: inline-flex; align-items: center; gap: 6px;
    background: #16a34a; color: #fff;
    border: 0; border-radius: 8px;
    padding: 8px 14px; font-size: 13px; font-weight: 600;
    cursor: pointer; transition: background .2s;
}
.bs-an-export:hover { background: #15803d; }
.bs-an-export[hidden] { display: none; }
.bs-an-loading { text-align: center; padding: 40px 10px; color: #64748b; }
.bs-an-empty { text-align: center; padding: 24px 10px; color: #64748b; background: #f8fafc; border-radius: 8px; margin: 16px 0 0; }

.bs-an-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.bs-an-stat {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-top: 3px solid var(--c, #0066cc);
    border-radius: 10px;
    padding: 12px 10px;
    text-align: center;
}
.bs-an-stat-icon { font-size: 22px; color: var(--c, #0066cc); margin-bottom: 4px; }
.bs-an-stat-num  { font-size: 22px; font-weight: 800; color: #0f172a; }
.bs-an-stat-lbl  { font-size: 12px; color: #64748b; margin-top: 2px; }

.bs-an-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.bs-an-chart-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    height: 220px;
    display: flex; flex-direction: column;
}
.bs-an-chart-wrap h4 { margin: 0 0 8px; font-size: 14px; color: #334155; font-weight: 700; }
.bs-an-chart-wrap canvas { flex: 1; min-height: 0; }
.bs-an-chart-wrap.bs-an-share { height: 280px; margin-top: 14px; grid-column: 1 / -1; }

@media (max-width: 720px) {
    .bs-an-stats { grid-template-columns: repeat(2, 1fr); }
    .bs-an-grid  { grid-template-columns: 1fr; }
    .bs-an-dialog { padding: 18px 14px 20px; }
}

.bs-empty {
    padding: 50px 20px;
    text-align: center;
    color: #595959; /* a11y: AAA */
}
.bs-empty i { font-size: 50px; color: #ddd; margin-bottom: 15px; display: block; }
.bs-empty p { font-size: 15px; margin: 8px 0; }
.bs-empty .bs-btn-primary { margin-top: 15px; }

/* --- Favorites page --- */
.bs-favorites-page { flex: 1 1 100%; margin-top: 20px; }
.bs-page-header {
    background: #fff;
    padding: 25px 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}
.bs-page-header h1 { margin: 0 0 6px; font-size: 22px; color: #333; }
.bs-page-header .bs-btn-ghost { margin-top: 10px; }

/* Mobile tweaks for new components */
@media (max-width: 768px) {
    .bs-dash-header { padding: 15px; }
    .bs-form-card { padding: 20px; }
    .feed-filter-form { gap: 6px; }
    .feed-filter-form .feed-search-quick { min-width: 0; flex-basis: 100%; order: -1; }
    .single-ad-meta-bar { flex-wrap: wrap; }
    .bs-fav-large { margin-right: 0; }
    .single-ad-price { font-size: 20px; padding: 10px 18px; }
}

/* --------------------------------------------------------------------------
   Accessibility Helpers (WCAG)
   -------------------------------------------------------------------------- */

/* Visually hidden but available for screen readers */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Strong focus ring for keyboard users (Lighthouse a11y) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
    outline: 3px solid #ffbf47;
    outline-offset: 2px;
    box-shadow: 0 0 0 1px #1f1f1f inset;
}

/* --------------------------------------------------------------------------
   Higher Contrast Color Refresh (WCAG AA / AAA)
   -------------------------------------------------------------------------- */

/* Body text, links, primary surfaces */
body { color: #1f1f1f; background-color: #f0f2f5; }
a { color: #003d7a; }
a:hover { color: #002a5c; }

/* Replace washed-out grays with stronger contrast */
.ad-meta-row .ad-meta-item,
.ad-card-details .ad-excerpt,
.bs-dash-sub,
.bs-stat-label,
.bs-form .bs-hint,
.bs-spec-label,
.bs-empty p,
.bs-empty .bs-hint,
.feed-filter-form select,
.related-ad-item h4,
.author-rating + *,
.archive-description,
.post-excerpt,
.single-ad-meta {
    color: #444 !important;
}

/* Stronger title color */
.ad-title a,
.single-ad-title,
.widget-related-ads .related-ad-item h4 {
    color: #003d7a;
}

/* Stronger primary buttons */
.bs-btn-primary,
.btn-add-ad,
.search-submit,
.bs-as-submit {
    background-color: #003d7a !important;
    color: #ffffff !important;
}
.bs-btn-primary:hover,
.bs-as-submit:hover {
    background-color: #002a5c !important;
}

/* Ghost / outline buttons need visible borders */
.bs-btn-ghost {
    background: #ffffff;
    color: #003d7a;
    border: 2px solid #003d7a;
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    text-decoration: none;
}
.bs-btn-ghost:hover {
    background: #003d7a;
    color: #ffffff;
}

/* Footer (dark background needs lighter text — bumped above #aaa to ~#d4d4d4) */
.site-footer { background-color: #1a1a1a !important; color: #e0e0e0 !important; }
.site-footer a { color: #d4d4d4; text-decoration: underline; }
.site-footer a:hover { color: #ffffff; }
.footer-bottom p { color: #e0e0e0; }

/* Mobile bottom nav contrast */
.mobile-bottom-nav { color: #1f1f1f; }
.mobile-bottom-nav a { color: #1f1f1f; font-weight: 600; }

/* Disabled state — clearly distinguishable */
button:disabled,
.btn-contact-disabled {
    background: #cccccc !important;
    color: #555 !important;
    cursor: not-allowed;
}

/* ============================================================================
   Homepage Builder — Section Styles (Front-End)
   ============================================================================ */
.bs-homepage { width: 100%; }
.bs-sec { width: 100%; padding: 60px 0; position: relative; }
.bs-sec-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.bs-sec-heading { text-align: center; margin-bottom: 40px; }
.bs-sec-title { font-size: 28px; color: #1f1f1f; margin: 0 0 8px; font-weight: 800; }
.bs-sec-title-light { color: #fff; }
.bs-sec-sub { color: #666; font-size: 15px; margin: 0; max-width: 600px; margin-right: auto; margin-left: auto; }
.bs-grid { display: grid; gap: 22px; }
.bs-cols-1 { grid-template-columns: 1fr; }
.bs-cols-2 { grid-template-columns: repeat(2, 1fr); }
.bs-cols-3 { grid-template-columns: repeat(3, 1fr); }
.bs-cols-4 { grid-template-columns: repeat(4, 1fr); }
.bs-cols-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 992px) { .bs-cols-4, .bs-cols-6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .bs-cols-3, .bs-cols-4, .bs-cols-6 { grid-template-columns: repeat(2, 1fr); } .bs-cols-2 { grid-template-columns: 1fr; } .bs-sec { padding: 40px 0; } }
@media (max-width: 480px) { .bs-cols-3, .bs-cols-4, .bs-cols-6, .bs-cols-2 { grid-template-columns: 1fr; } }

/* HERO */
.bs-sec-hero {
    background-size: cover; background-position: center;
    background-color: #003d7a;
    display: flex; align-items: center; justify-content: center;
    color: #fff; text-align: center; padding: 80px 20px;
}
.bs-sec-hero-overlay { position: absolute; inset: 0; pointer-events: none; }
.bs-sec-hero-inner { position: relative; max-width: 800px; margin: 0 auto; }
.bs-sec-hero-title { font-size: 42px; color: #fff; margin: 0 0 14px; font-weight: 800; line-height: 1.2; }
.bs-sec-hero-sub { font-size: 18px; color: #f0f0f0; margin: 0 0 28px; line-height: 1.6; }
.bs-sec-hero-search { display: flex; gap: 8px; max-width: 580px; margin: 0 auto 24px; background: #fff; border-radius: 50px; padding: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.bs-sec-hero-search input { flex: 1; padding: 12px 18px; border: none; outline: none; font-size: 15px; background: transparent; color: #1f1f1f; border-radius: 50px; }
.bs-sec-hero-search button { padding: 12px 22px; background: #003d7a; color: #fff; border: none; border-radius: 50px; cursor: pointer; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.bs-sec-hero-search button:hover { background: #002a5c; }
.bs-sec-hero-cta { display: inline-flex; align-items: center; gap: 8px; background: #e88a00; color: #1a1a1a; padding: 14px 32px; border-radius: 50px; text-decoration: none; font-weight: 700; font-size: 16px; transition: background .15s; }
.bs-sec-hero-cta:hover { background: #c87600; color: #1a1a1a; }
@media (max-width: 768px) { .bs-sec-hero-title { font-size: 30px; } .bs-sec-hero-sub { font-size: 15px; } }

/* CATEGORIES GRID */
.bs-cat-card { background: #fff; border-radius: 12px; padding: 24px 16px; text-align: center; text-decoration: none; color: #1f1f1f; border: 1px solid #eef0f3; transition: all .2s; display: block; }
.bs-cat-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,.08); border-color: #003d7a; }
.bs-cat-img { display: block; width: 70px; height: 70px; border-radius: 50%; margin: 0 auto 12px; background-size: cover; background-position: center; background-color: #f0f2f5; display: flex; align-items: center; justify-content: center; color: #999; font-size: 28px; }
.bs-cat-img-default { color: #003d7a; }
.bs-cat-name { display: block; font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.bs-cat-count { font-size: 12px; color: #5a5a5a; }

/* CITIES */
.bs-city-card { background: #fff; border-radius: 12px; padding: 22px; text-align: center; text-decoration: none; color: #1f1f1f; border: 1px solid #eef0f3; transition: all .2s; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bs-city-card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,.08); border-color: #003d7a; color: #003d7a; }
.bs-city-card .fa-location-dot { color: #003d7a; font-size: 24px; }
.bs-city-name { font-weight: 700; font-size: 15px; }
.bs-city-count { font-size: 12px; color: #595959; } /* a11y: AAA */

/* LATEST ADS */
.bs-sec-latest { background: #f7f8fa; }
.bs-sec-featured { background: #fff; }
.bs-ads-grid > .ad-card { width: auto; }
.bs-sec-actions-row { text-align: center; margin-top: 30px; }
.bs-sec-actions-row .bs-btn-primary { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; border-radius: 50px; }

/* STATS COUNTER */
.bs-sec-stats { color: #fff; }
.bs-stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; }
.bs-stat-box { text-align: center; padding: 20px 10px; }
.bs-stat-icon { font-size: 36px; margin-bottom: 12px; opacity: .9; }
.bs-stat-num { font-size: 38px; font-weight: 800; line-height: 1; margin-bottom: 6px; }
.bs-stat-label { font-size: 14px; opacity: .9; }
/* Ensure stats text on dark background always passes contrast (overrides generic rules) */
.bs-sec-stats .bs-stat-num { color: #fff !important; }
.bs-sec-stats .bs-stat-label { color: rgba(255,255,255,0.92) !important; opacity: 1; }

/* HOW IT WORKS */
.bs-how-step { background: #fff; padding: 32px 24px; border-radius: 12px; text-align: center; border: 1px solid #eef0f3; position: relative; transition: all .2s; }
.bs-how-step:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,.08); }
.bs-how-num { position: absolute; top: -16px; right: 16px; background: #003d7a; color: #fff; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.bs-how-icon { font-size: 40px; color: #003d7a; margin: 10px 0 16px; }
.bs-how-title { font-size: 18px; margin: 0 0 8px; color: #1f1f1f; }
.bs-how-text { color: #555; font-size: 14px; line-height: 1.7; margin: 0; }

/* TESTIMONIALS */
.bs-testi-card { background: #fff; padding: 28px 22px; border-radius: 12px; border: 1px solid #eef0f3; }
.bs-testi-stars { color: #f5c518; margin-bottom: 12px; font-size: 16px; }
.bs-testi-text { font-size: 15px; line-height: 1.8; color: #444; margin: 0 0 18px; font-style: italic; }
.bs-testi-author { display: flex; align-items: center; gap: 12px; }
.bs-testi-avatar { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; background: #f0f2f5; display: inline-flex; align-items: center; justify-content: center; color: #999; }
.bs-testi-name { font-weight: 700; color: #1f1f1f; font-size: 14px; }
.bs-testi-role { color: #595959; font-size: 12px; } /* a11y: AAA */

/* CTA */
.bs-cta-inner { display: flex; gap: 24px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.bs-cta-title { font-size: 28px; margin: 0 0 6px; font-weight: 800; }
.bs-cta-sub { font-size: 16px; margin: 0; opacity: .92; }
.bs-cta-btn { background: #fff; color: #003d7a; padding: 14px 32px; border-radius: 50px; text-decoration: none; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; transition: transform .15s; }
.bs-cta-btn:hover { transform: translateY(-2px); color: #003d7a; }

/* NEWSLETTER */
.bs-sec-newsletter { text-align: center; }
.bs-newsletter-form { display: inline-flex; gap: 8px; max-width: 480px; width: 100%; margin-top: 18px; background: #fff; border-radius: 50px; padding: 6px; box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.bs-newsletter-form input { flex: 1; padding: 12px 18px; border: none; outline: none; font-size: 14px; background: transparent; border-radius: 50px; }
.bs-newsletter-form button { padding: 12px 24px; background: #003d7a; color: #fff; border: none; border-radius: 50px; cursor: pointer; font-weight: 600; }
.bs-newsletter-form button:hover { background: #002a5c; }

/* FAQ */
.bs-faq-list { max-width: 800px; margin: 0 auto; }
.bs-faq-item { background: #fff; border: 1px solid #eef0f3; border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.bs-faq-item summary { padding: 16px 20px; cursor: pointer; font-weight: 700; color: #1f1f1f; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.bs-faq-item summary::-webkit-details-marker { display: none; }
.bs-faq-item summary i { transition: transform .2s; color: #003d7a; }
.bs-faq-item[open] summary i { transform: rotate(180deg); }
.bs-faq-answer { padding: 0 20px 18px; color: #555; line-height: 1.8; font-size: 14px; }

/* PARTNERS */
.bs-partners-row { display: flex; flex-wrap: wrap; gap: 28px; justify-content: center; align-items: center; }
.bs-partner-item { display: inline-block; padding: 10px; }
.bs-partner-item img { max-width: 140px; max-height: 60px; object-fit: contain; filter: grayscale(1); opacity: .7; transition: all .2s; }
.bs-partner-item:hover img { filter: grayscale(0); opacity: 1; }

/* RICH TEXT */
.bs-sec-rich .bs-sec-inner :first-child { margin-top: 0; }
.bs-sec-rich .bs-sec-inner :last-child  { margin-bottom: 0; }

/* ==========================================================
   QUICK VIEW MODAL — popup ad details without leaving page
   ========================================================== */

/* Quick view trigger button — inside ad-card-actions, below call button */
.ad-card { position: relative; }

.btn-card-quickview {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 14px;
    min-width: 88px;
    min-height: 44px;
    border-radius: 6px;
    border: 1px solid #d0d7de;
    background-color: #fff;
    color: #444 !important;
    font-size: 13px;
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-card-quickview i {
    font-size: 14px;
    color: var(--primary-color, #0066cc);
}
.btn-card-quickview:hover {
    background-color: #eaf0fb;
    border-color: var(--primary-color, #0066cc);
    color: var(--primary-color, #0066cc) !important;
}
.btn-card-quickview:hover i { color: var(--primary-color, #0066cc); }
.btn-card-quickview:active { transform: scale(0.97); }

/* Hint that the card body is clickable for quick view */
.ad-card[data-ad-id] .ad-card-details { cursor: pointer; }

/* ad-card-actions is rendered only when phone exists */

/* ===== Quick Share Button & Dropdown ===== */
.bs-share-wrap {
    position: relative;
    flex: 0 0 auto;
}
.btn-card-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 14px;
    min-width: 88px;
    min-height: 44px;
    border-radius: 6px;
    border: 1px solid #d0d7de;
    background-color: #fff;
    color: #444;
    font-size: 13px;
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-card-share i {
    font-size: 14px;
    color: #e88a00;
    transition: color 0.2s;
}
.btn-card-share:hover,
.bs-share-wrap.is-open .btn-card-share {
    background-color: #fff8ee;
    border-color: #e88a00;
    color: #e88a00;
}
.btn-card-share:hover i,
.bs-share-wrap.is-open .btn-card-share i { color: #e88a00; }
.btn-card-share:active { transform: scale(0.97); }

.bs-share-dropdown {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    right: 0;
    min-width: 160px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.13);
    padding: 6px 0;
    z-index: 500;
    animation: bsShareFadeIn 0.15s ease;
    overflow: hidden;
}
@keyframes bsShareFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.bs-share-wrap.is-open .bs-share-dropdown { display: block; }

.bs-share-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: #333;
    background: none;
    border: none;
    text-decoration: none;
    cursor: pointer;
    text-align: right;
    transition: background 0.15s;
    white-space: nowrap;
}
.bs-share-item:hover { background: #f5f5f5; color: #111; }
.bs-share-item i { width: 18px; text-align: center; font-size: 15px; }
.bs-share-wa  i { color: #25d366; }
.bs-share-tw  i { color: #000; }
.bs-share-copy i { color: #0066cc; }
.bs-share-copy.is-copied i { color: #28a745; }
.bs-share-copy.is-copied { color: #28a745; }

/* ===== Overlay & modal shell ===== */
body.bs-qv-locked { overflow: hidden; }
.bs-qv-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, visibility .22s;
}
.bs-qv-overlay.is-open { opacity: 1; visibility: visible; }

.bs-qv-modal {
    position: relative;
    background: #fff;
    width: 100%;
    max-width: 920px;
    max-height: 92vh;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0,0,0,.32);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.94) translateY(12px);
    transition: transform .25s cubic-bezier(.2, .9, .3, 1.2);
    direction: rtl;
}
.bs-qv-overlay.is-open .bs-qv-modal { transform: scale(1) translateY(0); }

.bs-qv-close {
    position: absolute;
    top: 10px;
    left: 12px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.95);
    color: #444;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
    transition: background .15s, color .15s, transform .12s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bs-qv-close:hover { background: #d63638; color: #fff; transform: rotate(90deg); }

/* ===== Loader ===== */
.bs-qv-loader {
    padding: 80px 20px;
    text-align: center;
    color: #666;
}
.bs-qv-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #eef0f3;
    border-top-color: #0066cc;
    border-radius: 50%;
    margin: 0 auto 14px;
    animation: bsQvSpin .8s linear infinite;
}
@keyframes bsQvSpin { to { transform: rotate(360deg); } }

/* ===== Error state ===== */
.bs-qv-error {
    padding: 60px 20px;
    text-align: center;
    color: #d63638;
}
.bs-qv-error i { font-size: 36px; margin-bottom: 10px; }
.bs-qv-error p { font-size: 15px; margin: 0; }

/* ===== Content grid ===== */
.bs-qv-inner {
    overflow-y: auto;
    flex: 1;
}
.bs-qv-grid {
    display: grid;
    grid-template-columns: 42% 1fr;
    gap: 0;
    min-height: 380px;
}

/* ===== Gallery (left/right side in RTL) ===== */
.bs-qv-gallery {
    background: #1a1d20;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
}
.bs-qv-main-img {
    width: 100%;
    flex: 1;
    object-fit: contain;
    max-height: 480px;
    border-radius: 8px;
    background: #000;
}
.bs-qv-thumbs {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.bs-qv-thumb {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    background: #000;
    cursor: pointer;
    transition: border-color .15s, transform .12s;
}
.bs-qv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bs-qv-thumb:hover { border-color: #66a3e0; transform: translateY(-2px); }
.bs-qv-thumb.is-active { border-color: #0066cc; }
.bs-qv-no-image {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666;
    gap: 10px;
    font-size: 14px;
}
.bs-qv-no-image i { font-size: 48px; }

/* ===== Info column ===== */
.bs-qv-info {
    padding: 50px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
}
.bs-qv-title {
    font-size: 22px;
    font-weight: 700;
    color: #1d2327;
    margin: 0;
    line-height: 1.4;
}
.bs-qv-price-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.bs-qv-price {
    font-size: 22px;
    font-weight: 800;
    color: #00a32a;
}
.bs-qv-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #e6f0fb;
    color: #0066cc;
}
.bs-qv-badge--cat i { font-size: 11px; }

.bs-qv-meta {
    list-style: none;
    margin: 0;
    padding: 10px 0;
    border-top: 1px solid #eef0f3;
    border-bottom: 1px solid #eef0f3;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}
.bs-qv-meta li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #555;
}
.bs-qv-meta i { color: #0066cc; }

/* Specs grid */
.bs-qv-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}
.bs-qv-spec {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f5f9ff;
    border: 1px solid #dce8f8;
    border-radius: 8px;
}
.bs-qv-spec i { font-size: 18px; color: #0066cc; flex-shrink: 0; }
.bs-qv-spec small { display: block; font-size: 11px; color: #595959; } /* a11y: AAA */
.bs-qv-spec strong { display: block; font-size: 14px; color: #1d2327; }

/* Description */
.bs-qv-desc h3 {
    font-size: 14px;
    font-weight: 700;
    color: #555;
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.bs-qv-desc-body {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    max-height: 220px;
    overflow-y: auto;
    padding-left: 4px;
}
.bs-qv-desc-body p { margin: 0 0 8px; }

/* Actions */
.bs-qv-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #eef0f3;
}
.bs-qv-btn {
    flex: 1 1 auto;
    min-width: 110px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: transform .12s, box-shadow .15s, opacity .15s;
}
.bs-qv-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,.12); }
.bs-qv-btn--wa   { background: #25d366; color: #fff; }
.bs-qv-btn--wa:hover  { background: #1ebe5b; color: #fff; }
.bs-qv-btn--call { background: #0066cc; color: #fff; }
.bs-qv-btn--call:hover { background: #004d99; color: #fff; }
.bs-qv-btn--full { background: #f1f3f5; color: #1d2327; }
.bs-qv-btn--full:hover { background: #e2e6ea; color: #1d2327; }

/* ===== Mobile ===== */
@media (max-width: 760px) {
    .bs-qv-overlay { padding: 0; align-items: stretch; }
    .bs-qv-modal { max-width: 100%; max-height: 100vh; height: 100vh; border-radius: 0; }
    .bs-qv-grid { grid-template-columns: 1fr; min-height: 0; }
    .bs-qv-gallery { padding: 10px; max-height: 42vh; }
    .bs-qv-main-img { max-height: 38vh; }
    .bs-qv-info { padding: 16px 16px 18px; }
    .bs-qv-title { font-size: 18px; }
    .bs-qv-price { font-size: 19px; }
    .bs-qv-close { top: 6px; left: 6px; width: 34px; height: 34px; font-size: 22px; }
    .bs-qv-btn { font-size: 13px; padding: 10px 12px; min-width: 90px; }
    .bs-qv-desc-body { max-height: none; }
}

/* ==========================================================================
   قالب عرض الإعلانات — Grid Card (bs-grid-card)
   ========================================================================== */
.bs-listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.bs-grid-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.07);
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
}
.bs-grid-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,.12);
}

.bs-grid-card__img-wrap {
    position: relative;
    display: block;
    height: 180px;
    overflow: hidden;
    background: #f0f0f0;
}
.bs-grid-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.bs-grid-card:hover .bs-grid-card__img { transform: scale(1.04); }

.bs-grid-card__no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.bs-grid-card__fav {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,.85);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ccc;
    font-size: 15px;
    transition: color .15s, background .15s;
    backdrop-filter: blur(4px);
}
.bs-grid-card__fav:hover,
.bs-grid-card__fav.is-fav { color: #e53935; background: #fff; }

.bs-grid-card__body {
    padding: 12px 14px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.bs-grid-card__title {
    font-size: 14px;
    font-weight: 700;
    color: #1d2327;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.bs-grid-card__title:hover { color: #0066cc; }
.bs-grid-card__price {
    font-size: 15px;
    font-weight: 800;
    color: #0066cc;
}
.bs-grid-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    color: #888;
    margin-top: auto;
}
.bs-grid-card__meta span { display: flex; align-items: center; gap: 3px; }

/* Responsive */
@media (max-width: 640px) {
    .bs-listing-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .bs-grid-card__img-wrap { height: 140px; }
}
@media (max-width: 380px) {
    .bs-listing-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Header — sticky behavior + top info bar (text + phone)
   تستهلك إعدادات تبويب «الهيدر» في لوحة الإعدادات
   ========================================================================== */
.bs-site-header.header-sticky {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.header-top-info {
    background: #1f6feb;
    color: #fff;
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,.15);
}
.header-top-info-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.header-top-info .top-info-text {
    font-weight: 500;
}
.header-top-info .top-info-phone {
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    direction: ltr;
}
.header-top-info .top-info-phone:hover {
    opacity: .85;
}
@media (max-width: 640px) {
    .header-top-info { font-size: 12px; }
    .header-top-info-flex { justify-content: center; text-align: center; }
}

/* ============================================================
   ACCESSIBILITY (a11y) IMPROVEMENTS
   - Touch targets: min 44x44px on all interactive elements
   - Color contrast: ensure 4.5:1 minimum for text
   - Screen reader helpers
   ============================================================ */

/* Ensure all primary interactive elements meet WCAG 2.5.5 (44x44) */
.search-submit,
.btn-filter,
.bs-share-btn,
.meta-report,
.btn-follow,
.bs-btn-primary,
.bs-btn-edit,
.bs-btn-delete,
.bs-btn-submit,
.btn-contact {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* meta-report icon button — give it proper padding */
.meta-report {
    padding: 8px 12px;
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 14px;
    border-radius: 6px;
}
.meta-report:hover {
    background: rgba(220,53,69,0.08);
}

/* Filter button: bump padding for touch */
.btn-filter {
    padding: 10px 18px;
    font-size: 14px;
}

/* Favorite toggle — keep 44px even on mobile */
@media (max-width: 768px) {
    .bs-fav-toggle {
        width: 44px !important;
        height: 44px !important;
        font-size: 16px !important;
    }
}

/* Share buttons: ensure adequate height & spacing */
.bs-share-btn {
    padding: 10px 16px;
    min-height: 44px;
}

/* Improve placeholder contrast everywhere */
::placeholder {
    color: #595959 !important;
    opacity: 1;
}

/* (.sr-only و a:focus-visible معرّفتان مسبقاً في قسم Accessibility Helpers أعلاه) */

/* Footer links: slightly brighter for contrast on dark bg */
.site-footer a:not(.bs-fb-socials-list a) {
    color: #d4d4d4;
}
.site-footer p,
.site-footer .footer-bottom {
    color: #d4d4d4;
}

/* Tap target spacing in mobile bottom nav */
.mobile-bottom-nav a,
.mobile-bottom-nav button {
    min-width: 44px;
    min-height: 44px;
}

/* --------------------------------------------------------------------------
   Skip-Link & Performance Helpers (Lighthouse)
   -------------------------------------------------------------------------- */

/* Skip-link: hidden until focused — keyboard users can jump past the header. */
.bs-skip-link {
    position: absolute !important;
    right: 8px;
    top: -100px;
    z-index: 100000;
    background: #0066cc;
    color: #fff !important;
    padding: 10px 18px;
    border-radius: 0 0 6px 6px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: top 0.2s;
}
.bs-skip-link:focus,
.bs-skip-link:focus-visible {
    top: 0;
    outline: 3px solid #ffbf47;
    outline-offset: 0;
}
.sr-only-focusable:not(:focus):not(:focus-within) {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Prevent CLS from images by enforcing intrinsic ratio when sizes are known */
.ad-card-image img,
.related-ad-item img,
.bs-listing-grid img {
    height: auto;
    max-width: 100%;
    object-fit: cover;
    background-color: #f0f0f0;
}

/* Optimise font fallback to reduce CLS while Tajawal is loading */
body {
    font-family: 'Tajawal', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
    font-display: swap;
}

/* Star rating accessibility — make decorative groups distinguishable */
.author-rating {
    display: inline-flex;
    gap: 2px;
    color: #ffc107;
}

/* Inline footer-mobile-nav style replacement helpers (moved out of footer.php) */
.mobile-nav-list li.bs-mn-floating > a,
.mobile-nav-list li.add-ad-item > a {
    border-radius: 10px;
    padding: 10px 15px !important;
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* --------------------------------------------------------------------------
   Latest Posts Widget (sidebar on desktop, after-ads on mobile)
   -------------------------------------------------------------------------- */
.widget-latest-posts .bs-latest-posts-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.widget-latest-posts .bs-lp-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #f1f1f1;
}
.widget-latest-posts .bs-lp-item:last-child {
    border-bottom: 0;
}
.widget-latest-posts .bs-lp-thumb {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    display: block;
}
.widget-latest-posts .bs-lp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.widget-latest-posts .bs-lp-noimg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 22px;
}
.widget-latest-posts .bs-lp-body {
    flex: 1;
    min-width: 0;
}
.widget-latest-posts .bs-lp-title {
    display: block;
    font-weight: bold;
    color: #333;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 4px;
    text-decoration: none;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.widget-latest-posts .bs-lp-title:hover {
    color: var(--primary-color, #0066cc);
}
.widget-latest-posts .bs-lp-meta {
    font-size: 12px;
    color: #888;
}
.widget-latest-posts .bs-lp-meta i {
    margin-left: 4px;
}
.widget-latest-posts .bs-lp-all {
    display: inline-block;
    margin-top: 12px;
    font-size: 13px;
    font-weight: bold;
    color: var(--primary-color, #0066cc);
    text-decoration: none;
}
.widget-latest-posts .bs-lp-all:hover {
    text-decoration: underline;
}
.widget-latest-posts .bs-lp-all i {
    margin-right: 4px;
    font-size: 11px;
}
/* When relocated to mobile (after the ads), give it a top spacing */
.widget-latest-posts.bs-lp-on-mobile {
    margin-top: 20px;
}

/* --------------------------------------------------------------------------
   Latest Ads Widget — additional styling on top of .widget-latest-posts
   -------------------------------------------------------------------------- */
.widget-latest-ads .bs-lp-noimg {
    color: #bbb;
}
.widget-latest-ads .bs-lp-price {
    display: inline-block;
    background: #e8f3ff;
    color: var(--primary-color, #0066cc);
    font-weight: bold;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    margin: 2px 0 4px;
}

/* --------------------------------------------------------------------------
   Single Blog Post Page
   -------------------------------------------------------------------------- */
.bs-single-post {
    background: #fff;
    border-radius: 10px;
    padding: 25px 30px;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.bs-single-post-header {
    margin-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
}
.bs-sp-cat {
    font-size: 13px;
    margin-bottom: 8px;
    color: #777;
}
.bs-sp-cat a {
    color: var(--primary-color, #0066cc);
    text-decoration: none;
    font-weight: bold;
}
.bs-sp-cat a:hover {
    text-decoration: underline;
}
.bs-sp-cat i {
    margin-left: 4px;
    color: var(--primary-color, #0066cc);
}
.bs-sp-title {
    font-size: 26px;
    line-height: 1.4;
    color: #222;
    margin: 4px 0 12px;
}
.bs-sp-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: #888;
    font-size: 13px;
}
.bs-sp-meta i {
    margin-left: 4px;
    color: var(--primary-color, #0066cc);
}
.bs-sp-thumbnail {
    margin: 0 -30px 22px;
    overflow: hidden;
}
.bs-sp-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}
.bs-sp-content {
    color: #333;
    font-size: 16px;
    line-height: 1.85;
}
.bs-sp-content p { margin: 0 0 16px; }
.bs-sp-content h2 { font-size: 22px; margin: 28px 0 14px; }
.bs-sp-content h3 { font-size: 19px; margin: 24px 0 12px; }
.bs-sp-content ul, .bs-sp-content ol { padding-right: 24px; margin: 0 0 18px; }
.bs-sp-content blockquote {
    border-right: 4px solid var(--primary-color, #0066cc);
    background: #f8fbff;
    padding: 12px 18px;
    margin: 18px 0;
    color: #444;
    font-style: italic;
}
.bs-sp-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
.bs-sp-content a { color: var(--primary-color, #0066cc); }
.bs-sp-pagelinks {
    margin-top: 18px;
    font-size: 14px;
    font-weight: bold;
    color: #555;
}

.bs-sp-tags {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.bs-sp-tags > i {
    color: var(--primary-color, #0066cc);
    margin-left: 4px;
}
.bs-sp-tag {
    background: #f5f5f5;
    color: #555;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 13px;
    text-decoration: none;
}
.bs-sp-tag:hover {
    background: var(--primary-color, #0066cc);
    color: #fff;
}

.bs-sp-share {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.bs-sp-share-label {
    font-weight: bold;
    color: #444;
    margin-left: 6px;
}
.bs-sp-share-label i {
    color: var(--primary-color, #0066cc);
    margin-left: 4px;
}
.bs-sp-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 20px;
    border: 1px solid #e5e5e5;
    background: #fafafa;
    color: #444;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: all .15s;
}
.bs-sp-share-btn:hover {
    background: var(--primary-color, #0066cc);
    color: #fff;
    border-color: var(--primary-color, #0066cc);
}
.bs-sp-share-btn.bs-share-wa:hover { background: #25D366; border-color: #25D366; }
.bs-sp-share-btn.bs-share-tw:hover { background: #000; border-color: #000; }

.bs-related-section {
    margin-top: 10px;
    margin-bottom: 25px;
}
.bs-related-title {
    font-size: 20px;
    margin: 0 0 16px;
    color: #222;
}
.bs-related-title i {
    color: var(--primary-color, #0066cc);
    margin-left: 6px;
}

@media (max-width: 768px) {
    .bs-single-post { padding: 18px 16px; }
    .bs-sp-thumbnail { margin: 0 -16px 18px; }
    .bs-sp-title { font-size: 22px; }
    .bs-sp-meta { gap: 12px; font-size: 12px; }
    .bs-sp-content { font-size: 15px; line-height: 1.8; }
}

/* ============================================================
   EXTRA FEATURES — Report Modal / Featured Ribbon / Follow Btn
   ============================================================ */

/* Featured Ad Card Ribbon + Glow */
.ad-card.is-featured {
    border: 2px solid #ffd700;
    box-shadow: 0 4px 18px rgba(255, 165, 0, 0.18);
    position: relative;
    overflow: visible;
}
.ad-card-featured-ribbon {
    position: absolute;
    top: 8px;
    inset-inline-start: 8px;
    background: linear-gradient(135deg, #ffd700, #ffa500);
    color: #5a3e00;
    font-weight: 700;
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 14px;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.4);
}
.ad-card-featured-ribbon i { font-size: 10px; margin-inline-end: 3px; }

/* Follow Button States */
.btn-follow {
    cursor: pointer;
    transition: all 0.2s;
}
.btn-follow.is-following {
    background: #28a745 !important;
    color: #fff !important;
    border-color: #28a745 !important;
}
.btn-follow:hover { transform: translateY(-1px); }
.btn-follow:disabled { opacity: 0.6; cursor: wait; }

/* Report Modal */
.bs-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(3px);
    animation: bsFadeIn 0.18s ease-out;
}
@keyframes bsFadeIn { from {opacity:0;} to {opacity:1;} }
.bs-modal {
    background: #fff;
    border-radius: 12px;
    padding: 26px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: bsSlideUp 0.22s ease-out;
}
@keyframes bsSlideUp { from {transform:translateY(20px); opacity:0;} to {transform:translateY(0); opacity:1;} }
.bs-modal h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #222;
    display: flex; align-items: center; gap: 8px;
}
.bs-modal-close {
    position: absolute;
    top: 10px;
    inset-inline-end: 14px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 4px 10px;
    border-radius: 4px;
}
.bs-modal-close:hover { background: #f3f3f3; color: #333; }
.bs-modal-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}
.bs-modal-input:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.12);
}
.bs-modal-btn-primary {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
}
.bs-modal-btn-primary:hover { background: #c12434; }
.bs-modal-btn-primary:disabled { opacity: 0.7; cursor: wait; }
.bs-modal-btn-ghost {
    background: #f1f1f1;
    color: #333;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}
.bs-modal-btn-ghost:hover { background: #e2e2e2; }

/* Dark mode for modal */
body.dark-mode .bs-modal { background: #1f2937; color: #e5e7eb; }
body.dark-mode .bs-modal h3 { color: #f3f4f6; }
body.dark-mode .bs-modal-input {
    background: #111827; border-color: #374151; color: #e5e7eb;
}
body.dark-mode .bs-modal-btn-ghost { background: #374151; color: #e5e7eb; }

/* ================================================================
   AD RATING SYSTEM
   ================================================================ */
.bs-ad-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 6px 0;
}
.bs-stars {
    display: flex;
    align-items: center;
    gap: 2px;
    color: #f5a623;
    font-size: 16px;
}
.bs-stars i { color: #f5a623; }
.bs-star-btn {
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    color: #f5a623;
    font-size: 18px;
    line-height: 1;
    transition: transform .12s, color .12s;
}
.bs-star-btn:hover,
.bs-star-btn:focus { transform: scale(1.25); outline: none; }
.bs-star-btn i { color: #f5a623; pointer-events: none; }
.bs-ad-rating--interactive .bs-star-btn i { color: #ddd; }
.bs-ad-rating--interactive .bs-star-btn.active i,
.bs-ad-rating--interactive .bs-star-btn:hover i { color: #f5a623; }
.bs-rating-count {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}
.bs-rating-count small { font-size: 11px; color: #999; }
.bs-no-ratings { color: #aaa; font-style: italic; }
.bs-rating-login-msg {
    font-size: 12px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 4px;
}
.bs-ad-rating.bs-rating-loading { opacity: .5; pointer-events: none; }
.bs-ad-rating.bs-rating-loading .bs-stars::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #f5a623;
    border-top-color: transparent;
    border-radius: 50%;
    animation: bsRateSpin .6s linear infinite;
    margin-right: 6px;
}
@keyframes bsRateSpin { to { transform: rotate(360deg); } }

/* Single-ad rating section */
.single-ad-rating-section {
    margin: 24px 0;
    padding: 18px 20px;
    background: #fffbf0;
    border: 1px solid #fde9a2;
    border-radius: 10px;
}
.single-ad-rating-section .bs-section-title {
    margin-bottom: 12px;
}
.single-ad-rating-section .bs-ad-rating { gap: 10px; }
.single-ad-rating-section .bs-stars { font-size: 22px; }
.single-ad-rating-section .bs-star-btn { font-size: 24px; }
.single-ad-rating-section .bs-rating-count { font-size: 15px; }

/* Card company name */
.ad-meta-company { color: #0066cc; font-weight: 500; }

/* Dark mode */
body.dark-mode .bs-ad-rating--interactive .bs-star-btn i { color: #555; }
body.dark-mode .bs-rating-count { color: #aaa; }
body.dark-mode .single-ad-rating-section { background: #1e2535; border-color: #3d3d00; }

/* ==========================================================================
   Search Bar — Extended Controls (shapes, sizes, colours via CSS vars)
   ========================================================================== */

/* ── CSS Variables defaults (overridden per-element via inline style) ─────── */
.header-search-bar {
    --bs-search-bg:         #ffffff;
    --bs-search-txt:        #1f1f1f;
    --bs-search-border:     #cccccc;
    --bs-search-btn-bg:     var(--primary-color, #004d99);
    --bs-search-btn-color:  #ffffff;
}

/* ── Input wrapper (wraps input + suggestions) ────────────────────────────── */
.bs-search-input-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}

/* ── Base input overrides using CSS vars ──────────────────────────────────── */
.search-form .search-field {
    background-color: var(--bs-search-bg) !important;
    color:            var(--bs-search-txt) !important;
    border-color:     var(--bs-search-border) !important;
    width: 100%;
    box-sizing: border-box;
}
.search-form .search-field::placeholder {
    color: color-mix(in srgb, var(--bs-search-txt) 50%, transparent);
}
.search-form .search-submit {
    background-color: var(--bs-search-btn-bg) !important;
    color:            var(--bs-search-btn-color) !important;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}
.search-btn-label { font-size: 14px; }

/* ── SHAPES ───────────────────────────────────────────────────────────────── */
/* rounded (default) */
.bs-search-style-rounded .search-field,
.bs-search-style-rounded .search-submit,
.bs-search-style-rounded .search-category-dropdown select {
    border-radius: 6px;
}
/* square */
.bs-search-style-square .search-field,
.bs-search-style-square .search-submit,
.bs-search-style-square .search-category-dropdown select {
    border-radius: 0 !important;
}
/* pill */
.bs-search-style-pill .search-field          { border-radius: 100px 0 0 100px; }
.bs-search-style-pill .search-submit         { border-radius: 0 100px 100px 0; }
.bs-search-style-pill .search-category-dropdown select { border-radius: 100px 0 0 100px; }

/* ── SIZES ────────────────────────────────────────────────────────────────── */
.bs-search-size-sm .search-field,
.bs-search-size-sm .search-submit,
.bs-search-size-sm .search-category-dropdown select {
    height: 38px !important;
    font-size: 13px;
    padding-inline: 10px;
}
.bs-search-size-md .search-field,
.bs-search-size-md .search-submit,
.bs-search-size-md .search-category-dropdown select {
    height: 46px !important;
    font-size: 14px;
    padding-inline: 14px;
}
.bs-search-size-lg .search-field,
.bs-search-size-lg .search-submit,
.bs-search-size-lg .search-category-dropdown select {
    height: 56px !important;
    font-size: 16px;
    padding-inline: 18px;
}
.bs-search-size-xl .search-field,
.bs-search-size-xl .search-submit,
.bs-search-size-xl .search-category-dropdown select {
    height: 68px !important;
    font-size: 18px;
    padding-inline: 22px;
}
.bs-search-size-xl .search-submit i  { font-size: 20px; }
.bs-search-size-lg .search-submit i  { font-size: 18px; }
.bs-search-size-sm .search-submit i  { font-size: 13px; }

/* ── AJAX Suggestions Dropdown ─────────────────────────────────────────────── */
.bs-search-suggestions {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    inset-inline-start: 0;
    inset-inline-end: 0;
    background: #fff;
    border: 1px solid #dde1e7;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    z-index: 9999;
    overflow: hidden;
    max-height: 340px;
    overflow-y: auto;
}
.bs-suggest-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: #1f2937;
    text-decoration: none;
    transition: background .15s;
    border-bottom: 1px solid #f3f4f6;
}
.bs-suggest-item:last-child { border-bottom: none; }
.bs-suggest-item:hover,
.bs-suggest-item:focus     { background: #f0f5ff; outline: none; }
.bs-suggest-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}
.bs-suggest-no-thumb {
    width: 44px;
    height: 44px;
    background: #f3f4f6;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #9ca3af;
}
.bs-suggest-text   { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bs-suggest-title  { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs-suggest-price  { font-size: 12px; color: #0066cc; font-weight: 700; }
.bs-suggest-empty  { display: block; padding: 12px 16px; color: #9ca3af; font-size: 13px; }

/* ── Breadcrumb (single-ad.php) ───────────────────────────────────────────── */
.bs-breadcrumb {
    margin-bottom: 14px;
}
.bs-breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}
.bs-breadcrumb-list li a {
    color: #0066cc;
    text-decoration: none;
    transition: color .15s;
}
.bs-breadcrumb-list li a:hover { color: #004d99; text-decoration: underline; }
.bs-breadcrumb-list li[aria-current="page"] { color: #374151; font-weight: 600; }
.bs-breadcrumb-sep { color: #d1d5db; font-size: 11px; }

/* ── Related ads price label ──────────────────────────────────────────────── */
.related-ad-info { display: flex; flex-direction: column; gap: 2px; }
.related-ad-price { font-size: 12px; color: #0066cc; font-weight: 700; }

/* Dark mode — search + breadcrumb + suggestions */
[data-theme="dark"] .bs-search-suggestions { background:#1e2535; border-color:#2d3748; }
[data-theme="dark"] .bs-suggest-item        { color:#e2e8f0; border-color:#2d3748; }
[data-theme="dark"] .bs-suggest-item:hover  { background:#2d3748; }
[data-theme="dark"] .bs-suggest-no-thumb    { background:#2d3748; }
[data-theme="dark"] .bs-breadcrumb-list li a { color:#60a5fa; }
[data-theme="dark"] .bs-breadcrumb-list li[aria-current="page"] { color:#e2e8f0; }

/* --------------------------------------------------------------------------
   ▼ v2.3.0 — قواعد جديدة
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   ▼ v2.3.6 — تحديث تصميم السايدبار للبحث والفلاتر (الديسكتوب)
   تصميم عصري بطاقة موحّدة بهيدر متدرّج، حقول مدوّرة بأيقونات داخلية،
   اختيارات Selects بمظهر مخصّص، وزر تطبيق بتدرّج وظلّ ناعم.
   -------------------------------------------------------------------------- */
.widget-filters {
    background: #ffffff;
    border: 1px solid #e3e9f3;
    border-radius: 16px;
    padding: 0;
    margin-bottom: 18px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(15, 37, 69, 0.06);
}
.widget-filters .sidebar-search {
    position: relative;
    background: linear-gradient(135deg, #0066cc, #0080ff);
    padding: 16px 14px;
    margin: 0;
    display: flex;
    gap: 8px;
}
.widget-filters .sidebar-search::before {
    content: "\\f4ea"; /* placeholder; we use Phosphor inline icons in markup */
    display: none;
}
.widget-filters .sidebar-search input {
    flex: 1;
    height: 42px;
    padding: 0 14px;
    font-size: 14px;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.95);
    color: #0f2545;
    border: none;
    border-radius: 10px;
    outline: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.widget-filters .sidebar-search input::placeholder { color: #6c7a92; }
.widget-filters .sidebar-search input:focus {
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}
.widget-filters .sidebar-search button {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s ease, transform 0.18s ease;
}
.widget-filters .sidebar-search button:hover,
.widget-filters .sidebar-search button:focus-visible {
    background: rgba(255, 255, 255, 0.32);
    transform: scale(1.05);
    outline: none;
}

.widget-filters .bs-advanced-search {
    padding: 16px 16px 14px;
    background: #fff;
}
.widget-filters .bs-advanced-search .widget-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f2545;
    margin: 0 0 12px;
    padding: 0 0 10px;
    border-bottom: 1px dashed #e3e9f3;
    display: flex;
    align-items: center;
    gap: 8px;
}
.widget-filters .bs-advanced-search .widget-title i { color: #0066cc; font-size: 16px; }
.widget-filters .bs-as-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #4a5b78;
    margin: 10px 0 4px;
}
.widget-filters .bs-as-input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    font-size: 13.5px;
    font-family: inherit;
    color: #0f2545;
    background: #f7f9fd;
    border: 1px solid #e3e9f3;
    border-radius: 10px;
    box-sizing: border-box;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    appearance: none;
    -webkit-appearance: none;
}
.widget-filters select.bs-as-input {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234a5b78'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: left 10px center; /* RTL friendly */
    background-size: 18px;
    padding-left: 32px;
}
.widget-filters .bs-as-input:hover { border-color: #c9d4ea; }
.widget-filters .bs-as-input:focus {
    background: #fff;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
    outline: none;
}
.widget-filters .bs-as-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.widget-filters .bs-as-submit {
    width: 100%;
    height: 44px;
    margin-top: 14px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    background: linear-gradient(135deg, #0066cc, #0080ff);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.widget-filters .bs-as-submit:hover,
.widget-filters .bs-as-submit:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 102, 204, 0.4);
    outline: none;
}
.widget-filters .bs-as-reset {
    display: block;
    text-align: center;
    margin-top: 8px;
    font-size: 12.5px;
    color: #4a5b78;
    text-decoration: none;
    padding: 8px;
    border-radius: 8px;
    background: #f4f6fb;
    transition: background 0.15s ease;
}
.widget-filters .bs-as-reset:hover { background: #e7ebf3; color: #0066cc; }

.widget-filters .sidebar-cities {
    padding: 12px 16px 16px;
    background: #fafbfd;
    border-top: 1px solid #eef2f7;
}
.widget-filters .sidebar-cities .widget-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f2545;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.widget-filters .sidebar-cities .widget-title i { color: #0066cc; }
.widget-filters .sidebar-cities .city-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.widget-filters .sidebar-cities .city-list li { margin: 0; }
.widget-filters .sidebar-cities .city-list a {
    display: inline-block;
    padding: 6px 12px;
    font-size: 12.5px;
    color: #0066cc;
    background: #eaf2ff;
    border-radius: 999px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.widget-filters .sidebar-cities .city-list a:hover {
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
}

/* (1) إخفاء البحث والفلاتر تماماً على الجوال (≤ 768px):
   - شريط البحث الرئيسي في الهيدر وقائمة الأقسام المنسدلة
   - حاوية البحث المتقدّم في السايدبار + كامل ودجت السايدبار للبحث
   - شريط الفلاتر الموحّد فوق الإعلانات (يحتوي بحث + قوائم + زر فلترة)
   - شريط الفلاتر النصّي/الكلاسيكي إن وُجِد (.feed-filter-form و bs_filters_render)
   تنتقل التجربة على الجوال إلى: عنوان القسم → إعلانات مباشرةً، كما في تصميم
   الموبايل المعتمد. */
@media (max-width: 768px) {
    .header-search-bar,
    .header-search-bar.desktop-only-search,
    .search-category-dropdown,
    .bs-advanced-search,
    .widget-filters,
    .feed-filter-bar,
    .feed-filter-form,
    .bs-filters-wrap {
        display: none !important;
    }
}

/* (2) Focus-visible لجميع العناصر التفاعلية المهمة (a11y) */
.btn-user:focus-visible,
.btn-add-ad:focus-visible,
.btn-lang:focus-visible,
.btn-darkmode:focus-visible,
.btn-logout:focus-visible,
.bs-fav-toggle:focus-visible,
.btn-follow:focus-visible,
.btn-filter:focus-visible,
.btn-contact:focus-visible,
.bs-share-btn:focus-visible,
.search-submit:focus-visible,
.search-field:focus-visible,
.feed-select:focus-visible,
.bs-as-input:focus-visible,
.bs-as-submit:focus-visible {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

/* (3) Skip-link مرئي عند التركيز فعلياً */
.bs-skip-link.sr-only-focusable {
    position: absolute;
    inset-inline-start: -9999px;
    top: 0;
    z-index: 100000;
    padding: 10px 16px;
    background: #0066cc;
    color: #fff;
    font-weight: bold;
    text-decoration: none;
    border-radius: 0 0 6px 0;
}
.bs-skip-link.sr-only-focusable:focus {
    inset-inline-start: 0;
}

/* (4) تحسينات لأداء الصور (CLS) */
.ads-list img,
.related-ad-item img,
.bs-ads-grid img {
    height: auto;
}
