/* =========================================================
   ديارك - التصميم العام للموقع (RTL + Mobile App Feel)
   ========================================================= */
:root {
  --primary: #0f766e;
  --primary-dark: #0b5a53;
  --primary-rgb: 15, 118, 110;
  --accent: #f59e0b;
  --accent-rgb: 245, 158, 11;
  --wa: #25d366;
  --wa-dark: #1ebe5b;
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --border: #e6e9f0;
  --danger: #e11d48;
  --success: #16a34a;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .05);
  --shadow: 0 6px 24px rgba(15, 23, 42, .07);
  --shadow-lg: 0 18px 50px rgba(15, 23, 42, .14);
  --header-h: 68px;
  --bottom-nav-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 16px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.4; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 18px; }
.muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.text-danger { color: var(--danger); }
.mt-2 { margin-top: 12px; }
.hp { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 14px; border: 1.5px solid transparent;
  font-weight: 700; font-size: 15px; line-height: 1.3; white-space: nowrap;
  transition: transform .15s, background .2s, box-shadow .2s, color .2s, border-color .2s;
  background: #eef1f6; color: var(--text);
}
.btn:active { transform: scale(.97); }
.btn i { font-size: 1.1em; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 18px rgba(var(--primary-rgb), .28); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-wa { background: var(--wa); color: #fff; box-shadow: 0 6px 18px rgba(37, 211, 102, .3); }
.btn-wa:hover { background: var(--wa-dark); }
.btn-outline { background: #fff; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: #eef1f6; color: var(--text); }
.btn-light { background: #fff; color: var(--primary); }
.btn-sm { padding: 7px 14px; font-size: 14px; border-radius: 11px; }
.btn-lg { padding: 14px 26px; font-size: 16px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 13px; border: 0; background: #f1f4f9; color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; font-size: 19px; position: relative;
  transition: background .2s, color .2s; flex-shrink: 0;
}
.icon-btn:hover { background: rgba(var(--primary-rgb), .1); color: var(--primary); }
.dot-count, .bn-badge {
  position: absolute; top: 2px; left: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; line-height: 1;
}

/* ===== Forms ===== */
.form-control {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 13px; background: #fff; color: var(--text);
  transition: border-color .2s, box-shadow .2s; outline: none; appearance: none; -webkit-appearance: none;
}
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 14px center; padding-left: 34px;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .12); }
.form-control-sm { padding: 7px 12px; font-size: 14px; border-radius: 11px; }
textarea.form-control { resize: vertical; min-height: 90px; }
.fg { margin-bottom: 14px; }
.fg > label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; color: var(--text-2); }
.fg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; cursor: pointer; font-weight: 600; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }

/* segmented control */
.seg { display: flex; background: #eef1f6; border-radius: 14px; padding: 4px; gap: 4px; }
.seg label { flex: 1; margin: 0; cursor: pointer; }
.seg input { display: none; }
.seg span { display: block; text-align: center; padding: 8px 10px; border-radius: 11px; font-weight: 700; font-size: 14px; color: var(--muted); transition: .2s; }
.seg input:checked + span { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
.seg-sm span { padding: 6px 8px; font-size: 13px; }
.seg-wrap { flex-wrap: wrap; }
.seg-wrap label { flex: 1 0 auto; }

/* ===== Alerts ===== */
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; margin-bottom: 14px; font-weight: 600; font-size: 14px; }
.alert > i { font-size: 18px; margin-top: 1px; }
.alert span { flex: 1; }
.alert-close { background: none; border: 0; font-size: 22px; line-height: 1; color: inherit; opacity: .6; padding: 0 4px; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #ffe4e6; color: #9f1239; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-info { background: #e0f2fe; color: #075985; }

/* ===== Admin strip ===== */
.admin-strip { background: #0f172a; color: #e2e8f0; font-size: 13px; padding: 6px 18px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.admin-strip a { color: #fff; font-weight: 700; margin-inline-start: 14px; }
.admin-strip a:hover { color: var(--accent); }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(230, 233, 240, .8); padding-top: var(--safe-t);
}
.hdr-inner { display: flex; align-items: center; gap: 14px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), .3);
}
.brand-logo { height: 44px; width: auto; max-width: 140px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text strong { font-size: 20px; font-weight: 800; color: var(--primary); }
.brand-text small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main-nav { display: flex; gap: 4px; margin-inline-start: auto; }
.main-nav a { padding: 8px 14px; border-radius: 12px; font-weight: 700; color: var(--text-2); font-size: 15px; transition: .2s; }
.main-nav a:hover { background: #f1f4f9; color: var(--primary); }
.main-nav a.active { background: rgba(var(--primary-rgb), .1); color: var(--primary); }
.hdr-actions { display: flex; align-items: center; gap: 8px; }
.back-btn { display: none; }

/* ===== Bottom nav (mobile app) ===== */
.bottom-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border); height: calc(var(--bottom-nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  box-shadow: 0 -6px 24px rgba(15, 23, 42, .06);
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: #94a3b8; font-size: 11px; font-weight: 700; position: relative; transition: color .2s;
}
.bottom-nav a i { font-size: 22px; line-height: 1; }
.bottom-nav a.active { color: var(--primary); }
.bottom-nav .bn-badge { top: 6px; left: calc(50% - 22px); }
.bn-center .bn-center-icon {
  width: 54px; height: 54px; border-radius: 18px; background: var(--wa); color: #fff; display: flex; align-items: center; justify-content: center;
  margin-top: -26px; box-shadow: 0 8px 20px rgba(37, 211, 102, .45); border: 4px solid #fff;
}
.bn-center .bn-center-icon i { font-size: 26px; }
.bottom-nav a.bn-center { color: var(--text-2); }

/* ===== Floating WhatsApp ===== */
.wa-float {
  position: fixed; bottom: 24px; left: 24px; z-index: 55; width: 60px; height: 60px; border-radius: 50%;
  background: var(--wa); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 30px;
  box-shadow: 0 10px 30px rgba(37, 211, 102, .45); animation: waPulse 2.4s infinite;
}
@keyframes waPulse { 0%, 100% { box-shadow: 0 10px 30px rgba(37, 211, 102, .45), 0 0 0 0 rgba(37, 211, 102, .45); } 50% { box-shadow: 0 10px 30px rgba(37, 211, 102, .45), 0 0 0 14px rgba(37, 211, 102, 0); } }

/* ===== Hero ===== */
.hero {
  position: relative; color: #fff; padding: 70px 0 60px; overflow: hidden;
  background: radial-gradient(1200px 400px at 80% -10%, rgba(var(--accent-rgb), .35), transparent 60%), linear-gradient(135deg, var(--primary-dark), var(--primary));
}
.hero.has-img { background: linear-gradient(180deg, rgba(2, 6, 23, .55), rgba(2, 6, 23, .7)), var(--hero-img) center/cover no-repeat; }
.hero::after { content: ''; position: absolute; inset: auto 0 -1px 0; height: 40px; background: var(--bg); border-radius: 40px 40px 0 0; }
.hero-inner { position: relative; z-index: 1; text-align: center; }
.hero h1 { font-size: 42px; font-weight: 800; margin-bottom: 10px; }
.hero p { font-size: 18px; opacity: .92; max-width: 680px; margin: 0 auto 28px; }
.search-box { background: #fff; color: var(--text); border-radius: 22px; padding: 14px; max-width: 920px; margin: 0 auto; box-shadow: var(--shadow-lg); text-align: right; }
.search-box .seg { max-width: 330px; margin-bottom: 12px; }
.search-fields { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 10px; }
.sf { position: relative; }
.sf i { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.sf input, .sf select { width: 100%; height: 50px; border: 1.5px solid var(--border); border-radius: 14px; padding: 0 40px 0 14px; background: #f8fafc; outline: none; appearance: none; -webkit-appearance: none; color: var(--text); }
.sf input:focus, .sf select:focus { border-color: var(--primary); background: #fff; }
.btn-search { height: 50px; padding: 0 28px; }
.hero-stats { display: flex; justify-content: center; gap: 40px; margin-top: 30px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 26px; font-weight: 800; }
.hero-stats span { font-size: 13px; opacity: .85; }

/* ===== Sections ===== */
.section { padding: 26px 0; }
.section-tight { padding: 14px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.section-head h2 { font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.section-head a { color: var(--primary); font-weight: 700; font-size: 14px; white-space: nowrap; }
.section-head.center { justify-content: center; text-align: center; }
.page-pad { padding-top: 22px; padding-bottom: 30px; }
.page-head { margin-bottom: 18px; }
.page-head h1 { font-size: 26px; font-weight: 800; display: flex; align-items: center; gap: 10px; }

.h-scroll { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 14px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.h-scroll::-webkit-scrollbar { display: none; }
.h-scroll > * { scroll-snap-align: start; flex-shrink: 0; }

.type-chip {
  width: 124px; background: #fff; border-radius: var(--radius); padding: 16px 10px; text-align: center; border: 1.5px solid var(--border);
  display: flex; flex-direction: column; align-items: center; gap: 4px; transition: .2s;
}
.type-chip:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow); }
.tc-icon { width: 52px; height: 52px; border-radius: 16px; background: rgba(var(--primary-rgb), .1); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 4px; }
.tc-name { font-weight: 800; font-size: 14px; }
.tc-count { font-size: 12px; color: var(--muted); }

.city-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.city-chip { background: #fff; border: 1.5px solid var(--border); border-radius: 50px; padding: 8px 16px; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; transition: .2s; }
.city-chip i { color: var(--primary); }
.city-chip span { background: #f1f4f9; border-radius: 20px; padding: 0 8px; font-size: 12px; color: var(--muted); }
.city-chip:hover { border-color: var(--primary); color: var(--primary); }

/* ===== Property card ===== */
.props-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.cards-row .pcard { width: 300px; }
.pcard { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); position: relative; transition: transform .25s, box-shadow .25s; display: flex; flex-direction: column; border: 1px solid #eef0f5; }
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.pcard-media { position: relative; display: block; aspect-ratio: 4 / 3; background: #e2e8f0; overflow: hidden; }
.pcard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.pcard:hover .pcard-media img { transform: scale(1.05); }
.pbadge { position: absolute; top: 12px; right: 12px; padding: 4px 12px; border-radius: 10px; font-size: 12px; font-weight: 800; color: #fff; z-index: 2; }
.g-badges .pbadge { position: static; }
.pbadge-sale { background: var(--primary); }
.pbadge-rent { background: #7c3aed; }
.pbadge-status { position: absolute; top: 44px; right: 12px; padding: 4px 12px; border-radius: 10px; font-size: 12px; font-weight: 800; color: #fff; z-index: 2; background: #475569; }
.g-badges .pbadge-status { position: static; }
.st-sold, .st-rented { background: var(--danger) !important; }
.st-reserved { background: #d97706 !important; }
.pbadge-feat { position: absolute; bottom: 12px; right: 12px; padding: 3px 10px; border-radius: 10px; font-size: 12px; font-weight: 800; background: var(--accent); color: #1f1300; z-index: 2; }
.g-badges .pbadge-feat { position: static; }
.pcard-count { position: absolute; bottom: 12px; left: 12px; background: rgba(15, 23, 42, .65); color: #fff; font-size: 12px; padding: 3px 9px; border-radius: 9px; backdrop-filter: blur(4px); }
.fav-btn {
  position: absolute; top: 10px; left: 10px; z-index: 3; width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .92); color: var(--text); display: flex; align-items: center; justify-content: center; font-size: 18px; box-shadow: var(--shadow-sm); transition: transform .2s;
}
.fav-btn:active, .fav-btn-inline:active { transform: scale(.85); }
.fav-btn.on, .fav-btn-inline.on { color: var(--danger); }
.pcard-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pcard-price { color: var(--primary); font-weight: 800; font-size: 19px; }
.pcard-price small { font-size: 12px; font-weight: 700; color: var(--muted); }
.price-ask { font-size: 15px; color: var(--accent); font-weight: 800; }
.pcard-title { font-size: 16px; font-weight: 700; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-title a:hover { color: var(--primary); }
.pcard-loc { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard-specs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--border); }
.pcard-specs span { font-size: 12px; font-weight: 700; color: var(--text-2); background: #f5f7fb; padding: 3px 9px; border-radius: 8px; display: inline-flex; align-items: center; gap: 4px; }
.pcard-specs i { color: var(--primary); }

/* ===== Why us / CTA ===== */
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.why-item { background: #fff; border-radius: var(--radius); padding: 20px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-sm); }
.why-item span { width: 50px; height: 50px; border-radius: 15px; flex-shrink: 0; background: rgba(var(--accent-rgb), .15); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.why-item p { margin: 0; font-weight: 700; }
.cta-box {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; border-radius: 24px; padding: 34px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; position: relative; overflow: hidden;
}
.cta-box::before { content: ''; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .07); left: -60px; top: -80px; }
.cta-box h2 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.cta-box p { margin: 0; opacity: .9; }
.cta-actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; }

/* ===== Listing ===== */
.listing-page { padding-top: 18px; padding-bottom: 30px; }
.listing-top { display: none; gap: 10px; margin-bottom: 12px; }
.quick-search { flex: 1; position: relative; }
.quick-search i { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.quick-search input { width: 100%; height: 46px; border-radius: 14px; border: 1.5px solid var(--border); padding: 0 40px 0 14px; outline: none; background: #fff; }
.quick-search input:focus { border-color: var(--primary); }
.badge-num { background: var(--primary); color: #fff; border-radius: 10px; font-size: 12px; padding: 0 7px; }
.purpose-tabs { display: none; gap: 8px; margin-bottom: 14px; }
.purpose-tabs a { padding: 7px 18px; border-radius: 12px; background: #fff; border: 1.5px solid var(--border); font-weight: 700; font-size: 14px; }
.purpose-tabs a.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.listing { display: grid; grid-template-columns: 290px 1fr; gap: 22px; align-items: start; }
.filters { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-head h3 { font-size: 17px; font-weight: 800; display: flex; gap: 8px; align-items: center; }
.sheet-head .icon-btn { display: none; }
.filter-actions { display: grid; gap: 8px; margin-top: 10px; }
.sheet-backdrop { display: none; }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.results-head h1 { font-size: 22px; font-weight: 800; }
.sort-form { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.sort-form select { width: auto; min-width: 170px; }
.active-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.active-chips a { background: rgba(var(--primary-rgb), .1); color: var(--primary); padding: 4px 12px; border-radius: 20px; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.active-chips a.clear { background: transparent; color: var(--danger); }

.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 28px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: #fff; font-weight: 700; border: 1.5px solid var(--border); padding: 0 10px; }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .dots { border: 0; background: transparent; }

.empty-state { text-align: center; padding: 50px 20px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.empty-state > i { font-size: 56px; color: #cbd5e1; display: block; margin-bottom: 10px; }
.empty-state h3, .empty-state h2 { font-size: 20px; margin-bottom: 6px; }
.empty-state p { color: var(--muted); margin: 0 0 18px; }
.empty-state.big { margin: 40px 0; }
.empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.loading-block { text-align: center; padding: 40px; color: var(--muted); }
.spinner { width: 22px; height: 22px; border: 3px solid #e2e8f0; border-top-color: var(--primary); border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; vertical-align: middle; margin-left: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Property page ===== */
.property-page { padding-top: 16px; padding-bottom: 30px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 14px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb i { font-size: 10px; }
.prop-layout { display: grid; grid-template-columns: 1fr 360px; gap: 22px; align-items: start; }
.prop-side { position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; gap: 16px; }
.card { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); margin-bottom: 16px; border: 1px solid #eef0f5; }
.prop-side .card { margin-bottom: 0; }
.card-title { font-size: 18px; font-weight: 800; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card-title i { color: var(--primary); }

.gallery { position: relative; border-radius: var(--radius); overflow: hidden; background: #0f172a; margin-bottom: 10px; }
.g-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 16 / 10; }
.g-track::-webkit-scrollbar { display: none; }
.g-slide { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; cursor: zoom-in; }
.g-slide img { width: 100%; height: 100%; object-fit: cover; }
.g-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); color: var(--text); font-size: 18px; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); z-index: 2; }
.g-prev { right: 14px; }
.g-next { left: 14px; }
.g-counter { position: absolute; bottom: 14px; left: 14px; background: rgba(15, 23, 42, .7); color: #fff; padding: 4px 12px; border-radius: 10px; font-size: 13px; font-weight: 700; z-index: 2; }
.g-badges { position: absolute; top: 14px; right: 14px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 2; }
.g-badges > * { padding: 4px 12px; border-radius: 10px; font-size: 13px; font-weight: 800; }
.g-actions { position: absolute; top: 14px; left: 14px; display: flex; gap: 8px; z-index: 2; }
.g-act { width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); font-size: 18px; display: flex; align-items: center; justify-content: center; color: var(--text); box-shadow: var(--shadow-sm); }
.g-thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 16px; scrollbar-width: thin; }
.g-thumb { flex: 0 0 88px; height: 64px; border-radius: 12px; overflow: hidden; border: 2.5px solid transparent; padding: 0; background: #e2e8f0; opacity: .65; transition: .2s; }
.g-thumb img { width: 100%; height: 100%; object-fit: cover; }
.g-thumb.active { border-color: var(--primary); opacity: 1; }

.prop-head h1 { font-size: 24px; font-weight: 800; margin: 6px 0; }
.prop-price { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--primary); font-size: 28px; font-weight: 800; }
.prop-price small { font-size: 15px; color: var(--muted); }
.tag { font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 8px; }
.tag-soft { background: rgba(var(--primary-rgb), .1); color: var(--primary); }
.tag-accent { background: rgba(var(--accent-rgb), .15); color: #b45309; }
.prop-loc { color: var(--muted); margin: 0 0 10px; }
.prop-loc i { color: var(--danger); }
.prop-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.quick-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; margin-top: 16px; }
.quick-specs div { background: #f6f8fb; border-radius: 14px; padding: 12px 8px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.quick-specs i { font-size: 22px; color: var(--primary); }
.quick-specs strong { font-size: 16px; }
.quick-specs span { font-size: 12px; color: var(--muted); }
.prop-desc { color: var(--text-2); line-height: 2; white-space: normal; }
.specs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 20px; }
.spec { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.spec i { color: var(--primary); font-size: 17px; width: 20px; text-align: center; }
.spec span { color: var(--muted); }
.spec strong { margin-inline-start: auto; font-weight: 800; text-align: left; }
.features-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.features-list li { background: #f6f8fb; border-radius: 12px; padding: 10px 12px; font-weight: 600; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.features-list i { color: var(--success); }
.video-wrap, .map-wrap { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 9; background: #e2e8f0; }
.map-wrap.tall { aspect-ratio: 4 / 3; }
.video-wrap iframe, .map-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.contact-card { display: flex; flex-direction: column; gap: 10px; }
.cc-price { font-size: 24px; font-weight: 800; color: var(--primary); }
.cc-price small { font-size: 14px; color: var(--muted); }
.contact-card p { margin: 0 0 4px; font-size: 14px; }
.action-bar { display: none; }

/* ===== Contact / About ===== */
.about-box { background: #fff; border-radius: 24px; padding: 30px; text-align: center; box-shadow: var(--shadow-sm); margin-bottom: 18px; }
.about-icon { width: 70px; height: 70px; margin: 0 auto 12px; border-radius: 22px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 32px; }
.about-box h1 { font-size: 26px; font-weight: 800; margin-bottom: 10px; }
.about-text { color: var(--text-2); max-width: 760px; margin: 0 auto; line-height: 2; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 18px; }
.contact-tile { background: #fff; border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow-sm); border: 1.5px solid transparent; transition: .2s; }
a.contact-tile:hover { border-color: var(--primary); }
.contact-tile i { font-size: 26px; color: var(--primary); margin-bottom: 4px; }
.contact-tile.wa i { color: var(--wa); }
.contact-tile span { font-size: 13px; color: var(--muted); }
.contact-tile strong { font-size: 15px; word-break: break-word; text-align: right; }
.socials-big { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.socials-big a { background: #fff; border-radius: 14px; padding: 10px 16px; font-weight: 700; display: inline-flex; gap: 8px; align-items: center; box-shadow: var(--shadow-sm); }
.sb-facebook i { color: #1877f2; } .sb-instagram i { color: #e1306c; } .sb-youtube i { color: #ff0000; } .sb-tiktok i { color: #000; } .sb-telegram i { color: #229ed9; } .sb-snapchat i { color: #f7c600; }
.contact-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; align-items: start; }

/* ===== Footer ===== */
.site-footer { background: #0b1220; color: #cbd5e1; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 30px; padding: 46px 18px 30px; }
.f-col { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.f-col h4 { color: #fff; font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.f-col a:hover { color: #fff; }
.f-col i { color: var(--accent); margin-left: 4px; }
.f-about p { margin: 10px 0; line-height: 1.9; }
.brand-light .brand-text strong { color: #fff; }
.brand-light .brand-text small { color: #94a3b8; }
.socials { display: flex; gap: 8px; flex-wrap: wrap; }
.socials a { width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .08); display: flex; align-items: center; justify-content: center; font-size: 18px; transition: .2s; }
.socials a i { color: #fff; margin: 0; }
.socials a:hover { background: var(--primary); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 16px 0; font-size: 13px; text-align: center; color: #94a3b8; }

/* ===== Install banner / modal / toast / lightbox ===== */
.install-banner {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--bottom-nav-h) + var(--safe-b) + 12px); z-index: 70;
  background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); padding: 12px; display: flex; align-items: center; gap: 12px;
  animation: slideUp .4s ease; max-width: 480px; margin: 0 auto;
}
.install-banner img { width: 48px; height: 48px; border-radius: 13px; }
.ib-text { flex: 1; display: flex; flex-direction: column; line-height: 1.4; }
.ib-text strong { font-size: 14px; }
.ib-text small { font-size: 12px; color: var(--muted); }
.ib-close { background: none; border: 0; font-size: 24px; color: var(--muted); padding: 0 4px; }
@keyframes slideUp { from { transform: translateY(120%); opacity: 0; } to { transform: none; opacity: 1; } }

.modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); z-index: 100; display: flex; align-items: flex-end; justify-content: center; padding: 16px; animation: fadeIn .2s; }
.modal-box { background: #fff; border-radius: 24px; padding: 26px; width: 100%; max-width: 420px; position: relative; text-align: center; animation: slideUp .3s ease; margin-bottom: var(--safe-b); }
.modal-close { position: absolute; top: 10px; left: 14px; background: none; border: 0; font-size: 28px; color: var(--muted); }
.modal-icon { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 12px; }
.modal-box h3 { font-size: 19px; margin-bottom: 12px; }
.ios-steps { text-align: right; padding-right: 20px; margin: 0; line-height: 2.2; }
.ios-steps i { color: #007aff; }
@keyframes fadeIn { from { opacity: 0; } }

.toast-wrap { position: fixed; top: calc(var(--header-h) + var(--safe-t) + 10px); left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #0f172a; color: #fff; padding: 10px 18px; border-radius: 14px; font-weight: 700; font-size: 14px; box-shadow: var(--shadow-lg); animation: toastIn .3s ease; display: flex; gap: 8px; align-items: center; }
@keyframes toastIn { from { transform: translateY(-14px); opacity: 0; } }

.lightbox { position: fixed; inset: 0; background: #000; z-index: 200; display: flex; flex-direction: column; justify-content: center; }
.lb-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; height: 100%; scrollbar-width: none; }
.lb-track::-webkit-scrollbar { display: none; }
.lb-slide { flex: 0 0 100%; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; }
.lb-slide img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-close { position: absolute; top: calc(14px + var(--safe-t)); right: 14px; z-index: 3; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .15); color: #fff; font-size: 20px; }
.lb-counter { position: absolute; top: calc(24px + var(--safe-t)); left: 50%; transform: translateX(-50%); color: #fff; font-weight: 700; z-index: 3; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 50px; height: 50px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .15); color: #fff; font-size: 22px; }
.lb-prev { right: 14px; }
.lb-next { left: 14px; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
  .main-nav a { padding: 8px 10px; font-size: 14px; }
  .prop-layout { grid-template-columns: 1fr 320px; }
}

@media (max-width: 991px) {
  :root { --header-h: 60px; }
  body { padding-bottom: calc(var(--bottom-nav-h) + var(--safe-b)); }
  body.has-action-bar { padding-bottom: calc(76px + var(--safe-b)); }
  .main-nav, .hide-mobile, .wa-float { display: none !important; }
  .bottom-nav { display: flex; }
  .back-btn { display: inline-flex; }
  .brand-text small { display: none; }
  .brand-mark { width: 38px; height: 38px; font-size: 19px; border-radius: 12px; }
  .brand-logo { height: 38px; }
  .brand-text strong { font-size: 18px; }
  .hdr-actions { margin-inline-start: auto; }
  .site-footer { margin-top: 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; padding-top: 30px; }
  .f-about { grid-column: 1 / -1; }

  .hero { padding: 34px 0 44px; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 15px; margin-bottom: 18px; }
  .search-fields { grid-template-columns: 1fr 1fr; }
  .sf-q { grid-column: 1 / -1; }
  .btn-search { grid-column: 1 / -1; }
  .search-box .seg { max-width: none; }
  .hero-stats { gap: 24px; margin-top: 20px; }
  .hero-stats strong { font-size: 20px; }

  .listing-top { display: flex; }
  .purpose-tabs { display: flex; }
  .listing { grid-template-columns: 1fr; }
  .results-head h1 { font-size: 19px; }
  .sheet {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 90; max-height: 88vh; border-radius: 24px 24px 0 0;
    transform: translateY(105%); transition: transform .32s cubic-bezier(.2, .8, .2, 1); padding-bottom: calc(18px + var(--safe-b));
    box-shadow: 0 -10px 40px rgba(15, 23, 42, .2);
  }
  .sheet::before { content: ''; display: block; width: 44px; height: 5px; border-radius: 3px; background: #cbd5e1; margin: -6px auto 12px; }
  .sheet.open { transform: none; }
  .sheet .sheet-head .icon-btn { display: inline-flex; }
  .sheet.open + .sheet-backdrop { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 85; animation: fadeIn .2s; }

  .prop-layout { grid-template-columns: 1fr; }
  .prop-side { position: static; }
  .prop-side .contact-card { display: none; }
  .property-page .gallery { margin-left: -18px; margin-right: -18px; border-radius: 0; }
  .property-page { padding-top: 0; }
  .breadcrumb { display: none; }
  .g-nav { display: none; }
  .prop-head h1 { font-size: 20px; }
  .prop-price { font-size: 24px; }
  .contact-layout { grid-template-columns: 1fr; }
  .action-bar {
    display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #fff; padding: 10px 14px calc(10px + var(--safe-b));
    box-shadow: 0 -6px 24px rgba(15, 23, 42, .1); border-top: 1px solid var(--border);
  }
  .action-bar .btn { flex: 1; padding: 13px; font-size: 16px; }
  .action-bar .btn-wa { flex: 1.6; }
}

@media (max-width: 600px) {
  .container { padding: 0 14px; }
  .property-page .gallery { margin-left: -14px; margin-right: -14px; }
  .props-grid { grid-template-columns: 1fr; gap: 14px; }
  .cards-row .pcard { width: 80vw; max-width: 320px; }
  .section { padding: 18px 0; }
  .section-head h2 { font-size: 19px; }
  .specs-grid { grid-template-columns: 1fr; }
  .card { padding: 16px; border-radius: 16px; }
  .cta-box { padding: 24px; text-align: center; justify-content: center; }
  .cta-actions { justify-content: center; width: 100%; }
  .cta-actions .btn { flex: 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .type-chip { width: 104px; padding: 12px 8px; }
  .tc-icon { width: 44px; height: 44px; font-size: 20px; }
  .g-track { aspect-ratio: 4 / 3; }
  .sort-form select { min-width: 140px; }
  .admin-strip { font-size: 12px; }
  .about-box { padding: 22px; }
}

/* وضع التطبيق المثبّت */
@media (display-mode: standalone) and (max-width: 991px) {
  .site-footer { display: none; }
  body { user-select: none; -webkit-user-select: none; }
  input, textarea { user-select: text; -webkit-user-select: text; }
}
