:root { --brand: #0d6efd; --brand-dark: #0a3d91; }
body { font-family: 'Inter', system-ui, sans-serif; background: #f5f7fb; }
body.lang-ar { font-family: 'Cairo', system-ui, sans-serif; }
body.lang-ur { font-family: 'Noto Nastaliq Urdu', 'Cairo', serif; line-height: 2; }
body.lang-hi { font-family: 'Noto Sans Devanagari', 'Inter', sans-serif; }
body.lang-zh { font-family: 'Noto Sans SC', 'Inter', sans-serif; }

.hero { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%); color: #fff; padding: 56px 0 72px; }
.hero h1 { font-weight: 700; }
.hero .search-box { background: #fff; border-radius: 12px; padding: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.15); }

.section-title { font-weight: 700; margin-bottom: 1rem; }
.section-title i { color: var(--brand); }

.cat-card { background: #fff; border-radius: 12px; padding: 18px 10px; text-align: center; transition: .2s; height: 100%; border: 1px solid #e9ecef; display: block; color: #212529; text-decoration: none; }
.cat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(13,110,253,.15); color: var(--brand); }
.cat-card i { font-size: 2rem; color: var(--brand); margin-bottom: 8px; }
.cat-card .small { color: #6c757d; }

.ad-card { border: 1px solid #e9ecef; border-radius: 12px; overflow: hidden; background: #fff; height: 100%; transition: .2s; position: relative; }
.ad-card:hover { box-shadow: 0 8px 22px rgba(0,0,0,.08); }
.ad-card .thumb { aspect-ratio: 4/3; background: #eef2f7; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ad-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.ad-card .thumb i { font-size: 3rem; color: #b6c2d2; }
.ad-card .title { font-weight: 600; color: #212529; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.ad-card .price { color: var(--brand); font-weight: 700; }
.badge-top { position: absolute; top: 10px; inset-inline-start: 10px; background: #ffc107; color: #000; z-index: 2; }

.filter-card { background: #fff; border-radius: 12px; border: 1px solid #e9ecef; }
.ad-gallery img { width: 100%; max-height: 460px; object-fit: contain; background: #000; border-radius: 8px; }

.site-footer { background: #1d2333; }
.site-footer a { color: #cfd6e4; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.social-icons a { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.1); display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; transition: .2s; }
.social-icons a:hover { background: var(--brand); }

/* Admin */
.admin-sidebar { background: #1d2333; min-height: 100vh; }
.admin-sidebar .nav-link { color: #cfd6e4; border-radius: 8px; margin-bottom: 2px; }
.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active { background: rgba(255,255,255,.1); color: #fff; }
.admin-sidebar .nav-link i { width: 22px; }
.stat-card { border: 0; border-radius: 12px; }
.form-switch .form-check-input { width: 3em; height: 1.5em; cursor: pointer; }
.form-switch .form-check-label { padding-inline-start: .5rem; padding-top: .15rem; cursor: pointer; }
.setting-switch { display: flex; align-items: flex-start; gap: .75rem; padding-inline-start: 0; }
.setting-switch .form-check-input { flex-shrink: 0; float: none; margin: .1rem 0 0 0; }
.setting-switch .form-check-label { padding: 0; }

.lang-flag { width: 28px; height: 21px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.lang-switcher .dropdown-toggle::after { margin-inline-start: .4rem; color: #6c757d; }
.lang-switcher .dropdown-item .lang-flag { width: 24px; height: 18px; }
.lang-flag-text { font-weight: 600; font-size: .85rem; }

.country-menu { max-height: 70vh; overflow-y: auto; min-width: 240px; }
.country-switcher .dropdown-toggle::after { margin-inline-start: .4rem; color: #6c757d; }

.country-switcher .country-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; }

/* v2: social features */
.loc-link { color: inherit; text-decoration: underline dotted; }
.loc-link:hover { color: var(--bs-primary); }
.profile-links a, .profile-links-lg a { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: #eef2ff; color: #3b5bdb; text-decoration: none; }
.profile-links a:hover { background: #3b5bdb; color: #fff; }
.chat-box { max-height: 60vh; overflow-y: auto; background: #f6f7fb; }
.chat-msg { max-width: 75%; padding: .6rem .9rem; border-radius: 1rem; margin-bottom: .5rem; white-space: pre-wrap; word-wrap: break-word; }
.chat-msg.mine { background: #0d6efd; color: #fff; margin-inline-start: auto; border-end-end-radius: .25rem; }
.chat-msg.theirs { background: #fff; border: 1px solid #e3e6ef; border-end-start-radius: .25rem; }
.chat-msg .meta { font-size: .72rem; opacity: .75; margin-top: .25rem; }
.google-ad-slot { overflow: hidden; }
.ad-description a { word-break: break-all; }
