/**
 * wasitalkhayr.com - Main Stylesheet
 * Clean, modern, RTL-ready design system
 */

/* ═══════════════════════════════════════════════════════════
   CSS VARIABLES / DESIGN TOKENS
   ═══════════════════════════════════════════════════════════ */
:root {
    /* Brand Colors */
    --color-primary: #c6268a;
    --color-primary-light: #e84daa;
    --color-primary-dark: #9e1d6e;
    --color-secondary: #faaf40;
    --color-secondary-light: #ffc56e;
    --color-accent: #249f62;
    
    /* Neutrals */
    --color-text: #1a1a2e;
    --color-text-secondary: #6b7280;
    --color-text-muted: #9ca3af;
    --color-bg: #f8f9fc;
    --color-bg-white: #ffffff;
    --color-bg-card: #ffffff;
    --color-border: #e5e7eb;
    --color-border-light: #f0f1f3;
    
    /* Semantic */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #3b82f6;
    
    /* Typography */
    --font-ar: 'Noto Kufi Arabic', 'Tahoma', sans-serif;
    --font-en: 'Noto Sans', 'Helvetica Neue', sans-serif;
    --font-body: var(--font-ar);
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Borders */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-card: 0 2px 8px rgba(0,0,0,0.06);
    
    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --duration: 0.25s;
    
    /* Layout */
    --header-height: 60px;
    --bottom-nav-height: 65px;
    --footer-padding-bottom: calc(var(--bottom-nav-height) + 20px);
}

/* Dark Mode */
.dark-mode {
    --color-text: #e5e7eb;
    --color-text-secondary: #9ca3af;
    --color-bg: #0f0f14;
    --color-bg-white: #1a1a24;
    --color-bg-card: #1e1e2a;
    --color-border: #2d2d3a;
    --color-border-light: #252535;
}

/* Language-specific font */
[lang="en"] { --font-body: var(--font-en); }

/* ═══════════════════════════════════════════════════════════
   RESET & BASE
   Bootstrap 5.3 RTL + jQuery 3.7 compatible
   Grid: Bootstrap 5 uses col-* (no col-xs-*), row-cols-*, g-* gaps
   ═══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.65;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: var(--header-height);
    padding-bottom: var(--footer-padding-bottom);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--duration) var(--ease);
}
a:hover { color: var(--color-primary-dark); }

img { max-width: 100%; height: auto; }

/* Accessibility */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--color-primary);
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 99999;
    transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ═══════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    background: var(--color-bg-white);
    transition: box-shadow var(--duration) var(--ease);
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-inner {
    height: 100%;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    gap: var(--space-sm);
}

/* News Ticker - inside fixed header */
.news-ticker {
    overflow: hidden;
    white-space: nowrap;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    padding: 0;
    display: flex;
    align-items: center;
    height: 32px;
}

.news-ticker-label {
    flex-shrink: 0;
    background: var(--color-secondary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 0 12px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
    position: relative;
}

.news-ticker-label::after {
    content: '';
    position: absolute;
    top: 0;
    width: 0;
    height: 0;
    border-style: solid;
}

[dir="rtl"] .news-ticker-label::after {
    left: -10px;
    border-width: 16px 10px 16px 0;
    border-color: transparent var(--color-secondary) transparent transparent;
}

[dir="ltr"] .news-ticker-label::after {
    right: -10px;
    border-width: 16px 0 16px 10px;
    border-color: transparent transparent transparent var(--color-secondary);
}

.news-ticker-track {
    flex: 1;
    overflow: hidden;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.ticker-content {
    display: inline-block;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    animation: ticker 35s linear infinite;
    padding: 0 30px;
}

.ticker-content .ticker-separator {
    display: inline-block;
    width: 5px;
    height: 5px;
    background: var(--color-secondary);
    border-radius: 50%;
    margin: 0 12px;
    vertical-align: middle;
}

@keyframes ticker {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

[dir="rtl"] .ticker-content {
    animation: ticker-rtl 35s linear infinite;
}

@keyframes ticker-rtl {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Body padding: header(56px) + ticker(32px) = 88px when ticker exists, 56px without */
body { padding-top: 56px; }
body.has-ticker { padding-top: 88px; }

/* Desktop: +36px for desktop-nav bar */
@media (min-width: 1025px) {
    body           { padding-top: 92px;  }  /* 56 + 36 */
    body.has-ticker { padding-top: 124px; }  /* 88 + 36 */
}

.header-start {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.header-center {
    flex: 1;
    max-width: 220px;
    margin: 0 auto;
}

.header-end {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    flex-shrink: 0;
}

/* Menu Toggle */
.menu-toggle {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 22px;
}

.hamburger-icon span {
    display: block;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all var(--duration) var(--ease);
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-text) !important;
}

.site-logo img {
    width: 30px;
    height: 35px;
}

.logo-text {
    font-weight: 700;
    font-size: 16px;
    white-space: nowrap;
}

/* City Selector */
.city-selector {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    padding: 6px 12px;
    font-family: var(--font-body);
    font-size: 13px;
    background: var(--color-bg);
    color: var(--color-text);
}

/* Header Buttons */
.header-btn {
    background: none;
    border: none;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 15px;
    color: var(--color-text);
    border-radius: var(--radius-sm);
    transition: background var(--duration) var(--ease);
    font-family: var(--font-en);
    font-weight: 600;
}

.header-btn:hover {
    background: var(--color-bg);
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-bg-white);
    padding: var(--space-md) 0;
    box-shadow: var(--shadow-lg);
    z-index: 9997;
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s var(--ease);
}

.search-overlay.is-open {
    transform: translateY(0);
    opacity: 1;
}

.search-form {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.search-input {
    flex: 1;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-full);
    padding: 10px 20px;
    font-size: 16px;
    font-family: var(--font-body);
    outline: none;
    background: var(--color-bg);
    color: var(--color-text);
    transition: border-color var(--duration) var(--ease);
}

.search-input:focus {
    border-color: var(--color-primary);
}

.search-submit,
.search-close {
    background: none;
    border: none;
    font-size: 20px;
    padding: 10px;
    cursor: pointer;
    color: var(--color-text);
}

/* ═══════════════════════════════════════════════════════════
   MOBILE DRAWER MENU
   ═══════════════════════════════════════════════════════════ */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease);
}

.mobile-menu.is-open .mobile-menu-overlay {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-panel {
    position: fixed;
    top: 0;
    width: 280px;
    height: 100%;
    background: var(--color-bg-white);
    z-index: 10000;
    overflow-y: auto;
    transition: transform 0.3s var(--ease);
}

[dir="rtl"] .mobile-menu-panel {
    right: 0;
    transform: translateX(100%);
}

[dir="ltr"] .mobile-menu-panel {
    left: 0;
    transform: translateX(-100%);
}

.mobile-menu.is-open .mobile-menu-panel {
    transform: translateX(0) !important;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.mobile-menu-title {
    font-weight: 700;
    font-size: 18px;
    color: var(--color-primary);
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--color-text);
    padding: 4px;
}

.mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: var(--space-sm) 0;
}

.mobile-menu-list li a {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 12px var(--space-lg);
    color: var(--color-text);
    font-size: 15px;
    transition: background var(--duration) var(--ease);
}

.mobile-menu-list li a:hover {
    background: var(--color-bg);
}

.mobile-menu-list li a i {
    width: 20px;
    text-align: center;
    color: var(--color-primary);
}

.mobile-menu-list .divider {
    height: 1px;
    background: var(--color-border);
    margin: var(--space-sm) var(--space-lg);
}

/* ═══════════════════════════════════════════════════════════
   CATEGORIES BAR
   ═══════════════════════════════════════════════════════════ */
.categories-bar {
    display: flex;
    overflow-x: auto;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
}

.categories-bar::-webkit-scrollbar { display: none; }

.cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 85px;
    padding: var(--space-sm) var(--space-xs);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    text-align: center;
    scroll-snap-align: start;
    border: 2px solid transparent;
}

.cat-item:hover,
.cat-item.active {
    border-color: var(--color-primary);
    background: rgba(198, 38, 138, 0.05);
}

.cat-item img {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.cat-item span {
    font-size: 11px;
    font-weight: 500;
    color: var(--color-text);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════
   AD CARDS
   ═══════════════════════════════════════════════════════════ */
.ads-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    padding: var(--space-md) 0;
}

@media (min-width: 768px) {
    .ads-grid { grid-template-columns: repeat(2, 1fr); }
    .ad-card-img { height: 145px; }
}

@media (min-width: 1024px) {
    .ads-grid { grid-template-columns: repeat(4, 1fr); }
    /*.ad-card-img { height: 200px; }*/
    .ads-grid .ad-card-vip {
        grid-column: span 2;
        height: 280px;
    }
    .ads-grid .ad-card-vip .vip-img-wrap { width: 240px; min-width: 240px; max-width: 240px; }
}

.ad-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all var(--duration) var(--ease);
    position: relative;
}

.ad-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.ad-card-img {
    position: relative;
    display: block;
    width: 100%;
    height: 145px;
    overflow: hidden;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.ad-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s var(--ease);
}

.ad-card:hover .ad-card-img img {
    transform: scale(1.05);
}

.ad-card-badge {
    position: absolute;
    top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 600;
}

[dir="rtl"] .ad-card-badge { right: 8px; }
[dir="ltr"] .ad-card-badge { left: 8px; }

.badge-featured {
    background: var(--color-secondary);
    color: #fff;
}

.badge-discount {
    background: var(--color-error);
    color: #fff;
}

.ad-card-gallery-count {
    position: absolute;
    bottom: 8px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
}

[dir="rtl"] .ad-card-gallery-count { left: 8px; }
[dir="ltr"] .ad-card-gallery-count { right: 8px; }

.ad-card-body {
    padding: 10px 12px;
}

.ad-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.45;
}

.ad-card-price {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: 6px;
}

.ad-card-price .current {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-primary);
}

.ad-card-price .old {
    font-size: 12px;
    color: var(--color-text-muted);
    text-decoration: line-through;
}

.ad-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--color-text-muted);
}

.ad-card-views {
    display: flex;
    align-items: center;
    gap: 3px;
}

.ad-card-actions {
    display: flex;
    gap: var(--space-xs);
    padding: 8px 12px;
    border-top: 1px solid var(--color-border-light);
}

.ad-card-actions .btn-action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all var(--duration) var(--ease);
}

.btn-whatsapp {
    background: #e9f7f0;
    color: #249f62;
}
.btn-whatsapp:hover { background: #d1f0e1; }

.btn-call {
    background: #fce4f0;
    color: var(--color-primary);
}
.btn-call:hover { background: #f8cce3; }

/* ═══════════════════════════════════════════════════════════
   FILTERS PANEL
   ═══════════════════════════════════════════════════════════ */
.filters-panel {
    background: var(--color-bg-white);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-sm);
}

.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: center;
}

.filter-group {
    flex: 1;
    min-width: 140px;
}

.filter-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 4px;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    outline: none;
    transition: border-color var(--duration) var(--ease);
}

.filter-group select:focus,
.filter-group input:focus {
    border-color: var(--color-primary);
}

.btn-filter {
    padding: 8px 20px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: background var(--duration) var(--ease);
}

.btn-filter:hover {
    background: var(--color-primary-dark);
}

.btn-filter-clear {
    padding: 8px 16px;
    background: var(--color-bg);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: var(--font-body);
    cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════
   SKELETON LOADING
   ═══════════════════════════════════════════════════════════ */
.skeleton {
    background: linear-gradient(90deg, var(--color-border-light) 25%, var(--color-bg) 50%, var(--color-border-light) 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.skeleton-img {
    aspect-ratio: 4/3;
}

.skeleton-text {
    height: 14px;
    margin: 10px 12px;
}

.skeleton-text.short { width: 60%; }

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
.site-footer {
    background: var(--color-bg-white);
    border-top: 1px solid var(--color-border);
    margin-bottom: var(--bottom-nav-height);
}

.footer-main {
    padding: var(--space-2xl) 0;
}

.footer-heading {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-primary);
    display: inline-block;
}

.footer-about-text {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

.footer-app-links {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.app-badge img {
    height: 36px;
    width: auto;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    font-size: 13px;
    color: var(--color-text-secondary);
    transition: color var(--duration) var(--ease);
}

.footer-links a:hover {
    color: var(--color-primary);
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--color-text-secondary);
}

.footer-contact i {
    color: var(--color-primary);
    width: 18px;
    text-align: center;
}

.footer-social {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    background: var(--color-bg);
    color: var(--color-text-secondary);
    font-size: 16px;
    transition: all var(--duration) var(--ease);
}

.social-icon:hover {
    background: var(--color-primary);
    color: #fff;
}

.footer-bottom {
    padding: var(--space-md) 0;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    font-size: 12px;
    color: var(--color-text-muted);
}

/* ═══════════════════════════════════════════════════════════
   BOTTOM NAVIGATION (Mobile)
   ═══════════════════════════════════════════════════════════ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--color-bg-white);
    border-top: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    z-index: 9990;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 16px;
    color: var(--color-text-muted);
    font-size: 10px;
    text-decoration: none;
    transition: color var(--duration) var(--ease);
    position: relative;
    white-space: nowrap;
}

/* موبايل صغير فقط (< 400px): مفرودين على كامل العرض */
@media (max-width: 400px) {
    .bottom-nav { justify-content: space-around; }
    .bottom-nav-item { padding: 6px 0; flex: 1; }
}

.bottom-nav-item i {
    font-size: 20px;
}

.bottom-nav-item.active {
    color: var(--color-primary);
}

.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--color-primary);
    border-radius: 0 0 3px 3px;
}

/* Add button (center) */
.bottom-nav-add {
    position: relative;
    top: -7px;
    background: var(--color-primary);
    color: #fff !important;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    justify-content: center;
    box-shadow: 0 4px 15px rgba(198, 38, 138, 0.35);
    padding: 0;
    flex-shrink: 0;
}
.bottom-nav-add i { font-size: 20px; }
.bottom-nav-add span { display: none; }

/* Logo أيقونة الرئيسية */
.bottom-nav-logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
    border-radius: 4px;
}


/* ═══════════════════════════════════════════════════════════
   DESKTOP NAV BAR
   ═══════════════════════════════════════════════════════════ */
.desktop-nav {
    background: var(--color-bg-white);
    border-bottom: 1px solid var(--color-border);
    display: none;
    height: 36px;
}
@media (min-width: 1025px) {
    .desktop-nav { display: flex; align-items: center; }
}
/* Container داخل الـ nav يحتوي على الـ inner */
.desktop-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 36px;
    position: relative;
    width: 100%;
}

/* الروابط في المنتصف تماماً */
.desktop-nav-inner {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 2px;
    height: 36px;
}
[dir="rtl"] .desktop-nav-inner {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

.desktop-nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
}

.desktop-nav-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--color-text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: color .2s, background .2s;
    white-space: nowrap;
}
.desktop-nav-link:hover {
    color: var(--color-primary);
    background: rgba(198,38,138,.06);
}
.desktop-nav-link.active {
    color: var(--color-primary);
    font-weight: 600;
}
.desktop-nav-link i { font-size: 12px; }

/* زرار أضف إعلانك — على الطرف */
.desktop-nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: var(--color-primary);
    color: #fff !important;
    font-size: 12.5px;
    font-weight: 700;
    border-radius: var(--radius-full);
    text-decoration: none;
    white-space: nowrap;
    transition: opacity .2s, transform .15s;
    box-shadow: 0 2px 10px rgba(198,38,138,.25);
    flex-shrink: 0;
}
.desktop-nav-cta:hover {
    opacity: .92;
    transform: translateY(-1px);
}
.desktop-nav-cta i { font-size: 13px; }


.ads-grid .ad-card-vip {
    grid-column: span 2;
    display: flex;
    flex-direction: row-reverse;
    height: 240px;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 3px 16px rgba(212,160,23,.15);
    border: 1.5px solid rgba(212,160,23,.35);
    position: relative;
    transition: box-shadow .25s, transform .2s;
}
.ads-grid .ad-card-vip:hover {
    box-shadow: 0 6px 24px rgba(212,160,23,.28);
    transform: translateY(-2px);
}

/* خط ذهبي متحرك */
.ad-card-vip::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, #b8860b, #ffd700, #fffacd, #ffd700, #b8860b);
    background-size: 300%;
    animation: vip-shimmer 2.5s linear infinite;
    z-index: 2;
}
@keyframes vip-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* صورة يمين — ثابتة الحجم */
.vip-img-wrap {
    width: 220px; min-width: 220px; max-width: 220px;
    height: 100%;
    position: relative; overflow: hidden;
    display: block; flex-shrink: 0;
}
.vip-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .35s;
    display: block;
}
.ad-card-vip:hover .vip-img-wrap img { transform: scale(1.05); }

/* badge VIP — ذهبي Gold */
.vip-badge {
    display: inline-flex; align-items: center; gap: 5px;
    background: linear-gradient(135deg, #7a5c00, #c9960c);
    color: #fff8dc;
    font-size: 10.5px; font-weight: 800;
    padding: 4px 12px 4px 10px;
    border-radius: 20px;
    margin-bottom: 5px;
    border: 1px solid #ffd70044;
    box-shadow: 0 1px 6px #ffd70033;
    white-space: nowrap; line-height: 1.4;
    align-self: flex-start;
}
.vip-crown-svg { flex-shrink: 0; vertical-align: middle; width: 13px !important; height: 13px !important; }

.vip-gallery-count {
    position: absolute; bottom: 7px; inset-inline-end: 7px;
    background: rgba(0,0,0,.55); color: #fff;
    font-size: 10px; padding: 2px 6px; border-radius: 7px;
}

/* body — يسار الكارت */
.vip-body {
    flex: 1; min-width: 0;
    padding: 10px 14px;
    display: flex; flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.vip-title {
    font-size: 14.5px; font-weight: 800;
    color: #1a1a2e; line-height: 1.35;
    margin: 0 0 4px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vip-title a { color: inherit; text-decoration: none; }
.vip-title a:hover { color: var(--color-primary); }

.vip-desc {
    font-size: 12px; color: #777; line-height: 1.5;
    margin: 0 0 4px;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
    flex: 1;
}

/* صف السعر + مشاهدات */
.vip-footer {
    display: flex; align-items: center;
    justify-content: space-between;
    margin: 4px 0; gap: 6px;
}
.vip-price-current { font-size: 15px; font-weight: 800; color: var(--color-primary); }
.vip-price-old {
    font-size: 12px; color: #bbb;
    text-decoration: line-through; margin-inline-start: 5px;
}
.vip-free { font-size: 13px; font-weight: 700; color: #22c55e; }
.vip-meta { font-size: 11.5px; color: #aaa; display: flex; align-items: center; gap: 3px; }
.vip-meta .fa { font-size: 11px; color: var(--color-primary); }

/* أزرار */
.vip-actions { display: flex; gap: 7px; }
.vip-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 13px; border-radius: 9px;
    font-size: 12.5px; font-weight: 700;
    text-decoration: none;
    transition: opacity .2s, transform .15s;
    white-space: nowrap;
}
.vip-btn:hover { opacity: .9; transform: translateY(-1px); }
.vip-btn-wa   { background: #25d366; color: #fff; }
.vip-btn-call { background: var(--color-primary); color: #fff; }

/* موبايل */
@media (max-width: 767px) {
    .ads-grid .ad-card-vip {
        grid-column: 1 / -1;
        height: 190px;
    }
    .vip-img-wrap { width: 155px; min-width: 155px; }
    .vip-body { padding: 10px 12px; }
    .vip-title { font-size: 13.5px; }
    .vip-desc { -webkit-line-clamp: 2; font-size: 12px; }
    .vip-btn { padding: 6px 11px; font-size: 12px; }
}
@media (min-width: 768px) and (max-width: 1023px) {
    .ads-grid { grid-template-columns: repeat(2, 1fr); }
    .ads-grid .ad-card-vip {
        grid-column: span 2;
        height: 240px;
    }
    .ads-grid .ad-card-vip .vip-img-wrap { width: 200px; min-width: 200px; }
}

/* VIP فردي → full width على كل الشاشات */
.ads-grid .ad-card-vip.vip-full {
    grid-column: 1 / -1 !important;
}
.ads-grid .ad-card-vip.vip-full .vip-img-wrap {
    width: 260px; min-width: 260px; max-width: 260px;
}
.ads-grid .ad-card-vip.vip-full .vip-desc {
    -webkit-line-clamp: 3;
}
@media (max-width: 767px) {
    .ads-grid .ad-card-vip.vip-full .vip-img-wrap {
        width: 100%; min-width: unset; max-width: unset; height: 200px;
    }
    .ads-grid .ad-card-vip.vip-full {
        flex-direction: column;
    }
}


/* ═══════════════════════════════════════════════════════════
   SCROLL TO TOP BUTTON
   ═══════════════════════════════════════════════════════════ */
#scroll-top-btn {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 14px);
    inset-inline-end: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 3px 12px rgba(198,38,138,.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .25s, visibility .25s, transform .25s;
    z-index: 9980;
}
#scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
#scroll-top-btn:hover {
    opacity: .85;
    transform: translateY(-2px);
}
@media (min-width: 1024px) {
    #scroll-top-btn {
        bottom: 24px;
        width: 44px;
        height: 44px;
    }
}

/* ═══════════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════════ */
.text-primary { color: var(--color-primary) !important; }
.text-muted { color: var(--color-text-muted) !important; }
.bg-primary { background-color: var(--color-primary) !important; }

.section {
    padding: var(--space-lg) 0;
}

/* Hide on desktop / mobile */
@media (min-width: 1025px) {
    .bottom-nav { display: none; }
    .site-footer { margin-bottom: 0; }
    body { padding-bottom: 0; }
}

@media (max-width: 768px) {
    .footer-col { margin-bottom: var(--space-xl); }
}

/* ═══════════════════════════════════════════════════════════
   BREADCRUMB
   ═══════════════════════════════════════════════════════════ */
.breadcrumb-nav {
    padding: var(--space-sm) 0;
    font-size: 13px;
}

.breadcrumb-nav ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs);
    padding: 0;
    margin: 0;
}

.breadcrumb-nav li + li::before {
    content: '/';
    color: var(--color-text-muted);
    margin-inline-end: var(--space-xs);
}

.breadcrumb-nav a {
    color: var(--color-text-secondary);
}

.breadcrumb-nav a:hover {
    color: var(--color-primary);
}

.breadcrumb-nav .current {
    color: var(--color-primary);
    font-weight: 500;
}

/* Loading more indicator */
.loading-more {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-lg);
}

.loading-more::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Load More Button */
.load-more-wrap {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-lg) 0;
}

.btn-load-more {
    display: inline-block;
    padding: 12px 40px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all var(--duration) var(--ease);
}

.btn-load-more:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(198, 38, 138, 0.3);
}

/* ═══════════════════════════════════════════════════════════
   DESIGN TOKENS v3 (18/10/2026) — ألوان ومقاسات الكروت الموحّدة
   نفس القيم في التطبيق: lib/util/site_theme.dart
   الكروت بتستخدمها بـ fallback: var(--wk-brand, #9e1d6e)
   ═══════════════════════════════════════════════════════════ */
:root {
    --wk-brand: #9e1d6e;      /* لون الأكشن الأساسي (اتصال / روابط) */
    --wk-ink:   #111827;      /* العناوين والأسعار */
    --wk-mute:  #6b7280;      /* المنطقة / الوقت / المشاهدات */
    --wk-bg:    #f4f4f6;      /* خلفية الـ chips */
    --wk-card:  #ffffff;
    --wk-r:     14px;         /* انحناء الكارت */
    /* سلّم الخط: سعر 1.15rem · عنوان .92rem · chip/meta .72rem (الموبايل أصغر درجة) */
}
.dark-mode {
    --wk-ink:  #f3f4f6;
    --wk-mute: #9ca3af;
    --wk-bg:   #2a2a38;
    --wk-card: #1e1e2a;
}

/* ═══════════════════════════════════════════════════════════
   19/10/2026: الهيدر كان أعرض من شاشة الموبايل (452px على 387px)
   السبب: خانة المدينة (select / select2) بتاخد عرض أطول اسم مدينة ومابتصغرش
   (عنصر flex من غير min-width:0) ← الصفحة كلها بتتزق يمين وشمال
   ═══════════════════════════════════════════════════════════ */
.header-row { min-width: 0; }
.header-center { min-width: 0; flex: 1 1 auto; }
.header-center .city-selector { min-width: 0; max-width: 100%; width: 100%; text-overflow: ellipsis; }
.header-center .select2-container { width: 100% !important; max-width: 100% !important; min-width: 0 !important; }
.header-center .select2-selection__rendered { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-header { max-width: 100vw; overflow-x: clip; }
@media (max-width: 420px) {
    .header-row { gap: 6px; }
    .header-start, .site-logo { gap: 6px; }
    .logo-text { font-size: 14px; }
    .header-btn { padding: 8px 6px; }
    .menu-toggle { padding: 6px; }
}
@media (max-width: 360px) {
    .logo-text { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   29/10/2026: خانة البحث كانت أعرض من الشاشة بالعربي (الأزرار بتطلع برّه)
   السبب: الـ input جوه flex ومالوش min-width:0 ← أقل عرض ليه = 20 حرف من خط
   Noto Kufi Arabic (حروفه عريضة) فبيبقى أعرض من الموبايل. بالإنجليزي الخط أضيق فكان باين سليم.
   ═══════════════════════════════════════════════════════════ */
.search-form { min-width: 0; flex-wrap: nowrap; }
.search-form > * { min-width: 0; }
.search-form .search-input { min-width: 0; width: 100%; }
.search-submit, .search-close { flex: 0 0 auto; }
@media (max-width: 420px) {
    .search-input { padding: 10px 16px; }
    .search-submit, .search-close { padding: 8px; }
}

/* ═══════════════════════════════════════════════════════════
   31/10/2026 (ب14): كلمة «أضف إعلان» تحت زرار ＋ (زي التطبيق)
   المرة اللي فاتت الـ ＋ بقى مستطيل عريض: على الشاشات ≤ 400px القاعدة
   .bottom-nav-item { flex: 1 } كانت بتلغي عرضه الثابت 48px.
   الحل: الدايرة ثابتة 46px في كل المقاسات (مرفوعة شوية فوق الشريط)، والكلمة position:absolute
   تحتها فمش بتغيّر عرض الشريط ولا بتزق «المزيد».
   ═══════════════════════════════════════════════════════════ */
.bottom-nav .bottom-nav-add {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    padding: 0;
    top: -16px;
    overflow: visible;
}
.bottom-nav .bottom-nav-add .bottom-nav-add-label {
    display: block;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 4px;
    font-size: 10px;
    line-height: 1.2;
    font-weight: 600;
    color: var(--color-primary);
    white-space: nowrap;
    pointer-events: none;
}
.bottom-nav .bottom-nav-add.active::before { display: none; }

/* ═══════════════════════════════════════════════════════════
   31/10/2026: علامة التاب المفتوح = كبسولة وردي فاتح ورا الأيقونة
   (بدل الشرطة فوق) — نفس التطبيق (bottomnav.dart → _NavItem).
   كل الأيقونات واخدة نفس المقاس (56×30) عشان الأسماء تفضل على خط واحد.
   ═══════════════════════════════════════════════════════════ */
.bottom-nav-item:not(.bottom-nav-add) > i,
.bottom-nav-item > .bottom-nav-logo {
    border-radius: 15px;
    transition: background-color var(--duration) var(--ease);
}
.bottom-nav-item:not(.bottom-nav-add) > i {
    width: 56px;
    height: 30px;
    line-height: 30px;
    text-align: center;
}
.bottom-nav-item > .bottom-nav-logo {
    box-sizing: content-box;
    padding: 4px 17px;
}
.bottom-nav-item.active:not(.bottom-nav-add) > i,
.bottom-nav-item.active > .bottom-nav-logo {
    background: rgba(198, 38, 138, 0.12);
}
.bottom-nav-item.active::before { display: none; }

/* ═══════════════════════════════════════════════════════════
   31/10/2026: الهيدر بشكل التطبيق (home_screen في Flutter)
   خلفية سماوي فاتح، علم قطر + اسم الموقع بلون البراند (من غير خانة المدينة)،
   والأزرار (جرس/مفضلة/بحث/EN) دواير رمادي فاتح. مفيش تغيير في الـ HTML غير الجرس والدبوس.
   ═══════════════════════════════════════════════════════════ */
.site-header { background: #eef6fc; }
.site-header.scrolled { box-shadow: 0 4px 14px rgba(16,24,40,.08); }
.dark-mode .site-header { background: var(--color-bg-white); }
.logo-text { color: var(--color-primary); font-weight: 800; }
.dark-mode .logo-text { color: #f472b6; }

.header-end { gap: 6px; }
.header-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(17,24,39,.05);
    color: var(--color-primary);
    font-size: 16px;
    line-height: 1;
}
.header-btn:hover { background: rgba(198,38,138,.10); color: var(--color-primary); }
.header-btn.lang-toggle { font-size: 13px; font-weight: 700; color: var(--color-primary); }
.dark-mode .header-btn { background: rgba(255,255,255,.08); }

/* علم قطر مكان اللوجو */
.site-flag { display: block; width: 34px; height: 22px; flex: 0 0 auto; border-radius: 4px; box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.12); }
/* من غير خانة المدينة: الأزرار على الطرف التاني */
.header-row { justify-content: space-between; }

/* الموبايل الصغير: الأزرار أصغر شوية عشان كله يدخل في سطر واحد */
@media (max-width: 420px) {
    .header-btn { width: 34px; height: 34px; font-size: 15px; padding: 0; }
    .header-end { gap: 4px; }
    .site-flag { width: 30px; height: 19px; }
}
/* من غير خانة المدينة فيه مكان: الاسم والجرس يفضلوا ظاهرين حتى على الشاشات الصغيرة */
@media (max-width: 360px) {
    .logo-text { display: inline; font-size: 13px; }
    .header-btn { width: 32px; height: 32px; font-size: 14px; }
    .header-end { gap: 3px; }
}
