/* ==========================================================================
   جوار | صفحة الوحدة (property.html) — مبنية على jewar-pro.css
   ========================================================================== */

body.jp .bg-orbs { display: none; }
body.jp #main-content { padding-top: var(--jp-header-h) !important; background: #fff; }

/* ── Loading skeleton ─────────────────────────────────────────────────── */
body.jp #pdLoading { max-width: var(--jp-container); margin: 0 auto; padding: 24px; box-sizing: border-box; }
body.jp .pd-skeleton-hero { height: 440px; border-radius: var(--jp-radius) !important; min-height: 0 !important; }
body.jp .pd-error-wrap { text-align: center; padding: 80px 16px; color: var(--jp-muted); }
body.jp .pd-error-wrap a { color: var(--jp-primary); font-weight: 800; }

/* ── Breadcrumb + quick actions ──────────────────────────────────────── */
body.jp .pd-topline {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding-top: 18px; padding-bottom: 14px;
}
body.jp .pd-topline .jp-crumbs { margin: 0; min-width: 0; }
body.jp .pd-topline .jp-crumbs > span:last-child { max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.jp .pd-acts { display: flex; gap: 8px; flex-wrap: wrap; }
body.jp .pd-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--jp-line); border-radius: 999px; background: #fff;
  color: var(--jp-ink-2); font: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; text-decoration: none; transition: border-color .15s, color .15s, background .15s;
}
body.jp .pd-chip:hover { border-color: var(--jp-primary-100); color: var(--jp-primary); }
body.jp .pd-chip.fav-active { color: #e0245e; border-color: #f6c6d4; background: #fff5f8; }
body.jp .pd-chip.comp-active { background: var(--jp-primary); border-color: var(--jp-primary); color: #fff; }
body.jp .pd-chip-allam { background: var(--jp-primary-50); border-color: var(--jp-primary-100); color: var(--jp-primary); }
body.jp .pd-chip-allam svg { color: var(--jp-accent); }

/* ── Gallery mosaic ──────────────────────────────────────────────────── */
body.jp .pd-gallery-wrap { position: relative; }
body.jp .pd-mosaic {
  position: relative;
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  height: 460px;
}
body.jp .pd-mosaic.is-single { grid-template-columns: 1fr; }
body.jp .pd-mosaic.is-double .pd-mosaic-side { grid-template-rows: 1fr; }
body.jp .pd-mosaic .pd-hero {
  grid-row: 1 / -1;
  position: relative;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  border-radius: var(--jp-radius) !important;
  overflow: hidden;
  background: var(--jp-bg-soft);
  box-shadow: none !important;
}
body.jp #pdSliderWrap, body.jp .pd-slider, body.jp .pd-track { height: 100% !important; }
body.jp .pd-slide img { aspect-ratio: auto !important; height: 100% !important; }
body.jp .pd-mosaic-side { grid-row: 1 / -1; display: grid; grid-template-rows: 1fr 1fr; gap: 8px; min-height: 0; }
body.jp .pd-mosaic.is-single .pd-mosaic-side { display: none; }
body.jp .pd-mosaic-cell {
  display: block; padding: 0; border: 0; cursor: pointer; min-height: 0;
  border-radius: var(--jp-radius); overflow: hidden; background: var(--jp-bg-soft);
}
body.jp .pd-mosaic-cell img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; display: block; }
body.jp .pd-mosaic-cell:hover img { transform: scale(1.04); }
body.jp .pd-all-photos {
  position: absolute; bottom: 14px; left: 14px; z-index: 4;
  display: inline-flex !important; align-items: center; gap: 8px;
  height: 38px; padding: 0 14px;
  background: #fff; color: var(--jp-ink); border: 1px solid var(--jp-line); border-radius: 10px;
  font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; box-shadow: var(--jp-shadow-sm);
}
body.jp .pd-all-photos[style*="none"] { display: none !important; }
body.jp .pd-all-photos:hover { color: var(--jp-primary); }
body.jp .pd-thumbs-wrap { display: none !important; }

/* slider controls */
body.jp .pd-nav {
  width: 38px !important; height: 38px !important; border-radius: 50% !important;
  background: rgba(255, 255, 255, .92) !important; color: var(--jp-ink) !important;
  border: 0 !important; box-shadow: var(--jp-shadow-sm) !important; font-size: 16px !important;
  opacity: 0; transition: opacity .2s;
}
body.jp .pd-hero:hover .pd-nav, body.jp .pd-nav:focus-visible { opacity: 1; }
body.jp .pd-nav:hover { background: #fff !important; color: var(--jp-primary) !important; transform: translateY(-50%) !important; }
body.jp .pd-counter-pill {
  top: 14px !important; bottom: auto !important; right: 14px !important; left: auto !important;
  background: rgba(23, 21, 28, .6) !important; color: #fff !important; backdrop-filter: blur(4px);
  font-size: 12px !important; font-weight: 700; padding: 4px 10px !important; border-radius: 999px !important;
  direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums;
}
body.jp .pd-hero-botbar { bottom: 16px !important; }
body.jp .pd-hero-gradient-top, body.jp .pd-hero-gradient-bot, body.jp .pd-hero-topbar { display: none !important; }

/* ── Header ──────────────────────────────────────────────────────────── */
body.jp .pd-headbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--jp-line);
}
body.jp .pd-ident { display: flex; align-items: center; gap: 16px; min-width: 0; }
body.jp .pd-dev-logo {
  flex-shrink: 0; width: 64px; height: 64px; border-radius: 50%; overflow: hidden;
  border: 1px solid var(--jp-line); background: #fff; box-shadow: var(--jp-shadow-xs);
}
body.jp .pd-dev-logo img { width: 100%; height: 100%; object-fit: cover; }
body.jp .pd-ident-text { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
body.jp .pd-badges { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 !important; }
body.jp .pd-badge {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px !important;
  border-radius: 999px !important; font-size: 12px !important; font-weight: 800 !important;
  border: 0 !important; box-shadow: none !important;
}
body.jp .pd-badge-sale { background: var(--jp-primary-50) !important; color: var(--jp-primary) !important; }
body.jp .pd-badge-feat { background: var(--jp-accent-50) !important; color: #7a5d0d !important; }
body.jp .pd-badge-ready { background: #e7f7ee !important; color: #13733b !important; }
body.jp .pd-badge-sold { background: #f1f0f3 !important; color: var(--jp-muted) !important; }
body.jp .pd-badge-type { background: #f1f0f3 !important; color: var(--jp-ink-2) !important; }
body.jp .pd-title {
  margin: 0 !important; font-size: 26px !important; font-weight: 800 !important; line-height: 1.35 !important;
  color: var(--jp-ink) !important; background: none !important; -webkit-text-fill-color: currentColor !important;
  text-wrap: balance;
}
body.jp .pd-location {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  margin: 0 !important; font-size: 14px !important; color: var(--jp-muted) !important; font-weight: 500 !important;
}
body.jp .pd-location svg { flex-shrink: 0; }
body.jp .pd-location a { color: var(--jp-primary) !important; font-weight: 700; text-decoration: none; }
body.jp .pd-location a:hover { text-decoration: underline; }
body.jp .pd-loc-detail { color: var(--jp-muted); }

body.jp .pd-pricebox { display: flex; flex-direction: column; gap: 2px; padding-inline: 24px; border-inline: 1px solid var(--jp-line); }
body.jp .pd-price-lbl { font-size: 12px; color: var(--jp-muted); font-weight: 600; }
body.jp .pd-price-val { display: flex; align-items: baseline; gap: 6px; }
body.jp .pd-price-val strong {
  font-size: 28px; font-weight: 800; color: var(--jp-ink); letter-spacing: 0;
  font-variant-numeric: tabular-nums; background: none; -webkit-text-fill-color: currentColor;
}
body.jp .pd-price-val span { font-size: 14px; font-weight: 700; color: var(--jp-muted); }
body.jp .pd-price-plan { font-size: 12.5px; color: var(--jp-ink-2); font-weight: 600; }
body.jp .pd-head-ctas { display: flex; gap: 10px; }
body.jp .pd-head-ctas .jp-btn { height: 48px; padding: 0 20px; font-size: 15px; }

/* ── Layout ──────────────────────────────────────────────────────────── */
body.jp .pd-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 40px;
  align-items: start;
  padding-top: 32px;
}
body.jp .pd-main { padding: 0 !important; background: none !important; min-width: 0; }
body.jp .pd-section { margin: 0 0 36px !important; padding: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; }
body.jp .pd-section-title {
  margin: 0 0 14px !important; padding: 0 !important;
  font-size: 20px !important; font-weight: 800 !important; color: var(--jp-ink) !important;
  display: block !important; border: 0 !important;
}
body.jp .pd-section-title::before, body.jp .pd-section-title::after { display: none !important; content: none !important; }

/* specs table */
body.jp .pd-specs-table {
  width: 100%; max-width: 640px; border-collapse: collapse; font-size: 15px;
  border: 0 !important; border-radius: 0 !important; overflow: visible; box-shadow: none !important;
}
body.jp .pd-specs-table tr { border-bottom: 1px solid var(--jp-line-2); background: none !important; }
body.jp .pd-specs-table tr:nth-child(odd) { background: var(--jp-bg-soft) !important; }
body.jp .pd-specs-table th,
body.jp .pd-specs-table td { padding: 11px 14px !important; text-align: start; border: 0 !important; background: none !important; }
body.jp .pd-specs-table th { width: 42%; color: var(--jp-muted) !important; font-weight: 600 !important; font-size: 14px; }
body.jp .pd-specs-table td { color: var(--jp-ink) !important; font-weight: 700 !important; }
body.jp .pd-specs-table a { color: var(--jp-primary); text-decoration: underline; text-underline-offset: 3px; }

/* tiles */
body.jp .pd-tiles { display: flex; flex-wrap: wrap; gap: 12px; }
body.jp .pd-tile {
  width: 132px; min-height: 112px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 14px 8px; background: #fff; border: 1px solid var(--jp-line); border-radius: var(--jp-radius);
  font: inherit; color: var(--jp-ink-2); text-decoration: none; cursor: pointer; text-align: center;
  transition: border-color .15s, box-shadow .15s, color .15s;
}
body.jp .pd-tile[style*="flex"], body.jp .pd-tile:not([style]) { display: flex !important; }
body.jp .pd-tile:hover { border-color: var(--jp-primary-100); box-shadow: var(--jp-shadow-sm); color: var(--jp-primary); }
body.jp .pd-tile-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--jp-primary-50); color: var(--jp-primary); }
body.jp .pd-tile-lbl { font-size: 13.5px; font-weight: 800; }
body.jp .pd-tile small { font-size: 11.5px; color: var(--jp-muted); font-weight: 500; }

/* features & facilities */
body.jp .pd-feat-grid, body.jp .pd-facil-grid {
  display: grid !important; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important; gap: 10px 20px !important;
}
body.jp .pd-feat-item, body.jp .pd-facil-item {
  display: flex !important; flex-direction: row !important; justify-content: flex-start !important; text-align: start !important;
  align-items: center; gap: 10px; padding: 6px 0 !important; min-height: 0 !important;
  background: none !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important;
  font-size: 14.5px; font-weight: 600; color: var(--jp-ink-2) !important;
}
body.jp .pd-feat-ico, body.jp .pd-facil-ico {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center;
  background: var(--jp-primary-50) !important; color: var(--jp-primary) !important; font-size: 0;
}

/* payment plans */
body.jp .pd-plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
body.jp .pd-plan-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px 18px; background: #fff; border: 1px solid var(--jp-line); border-radius: var(--jp-radius);
}
body.jp .pd-plan-top { display: flex; align-items: center; gap: 8px; }
body.jp .pd-plan-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--jp-primary-50); color: var(--jp-primary); }
body.jp .pd-plan-label { font-size: 13.5px; font-weight: 700; color: var(--jp-ink-2); }
body.jp .pd-plan-val { font-size: 24px; font-weight: 800; color: var(--jp-primary); line-height: 1.3; font-variant-numeric: tabular-nums; }
body.jp .pd-plan-notes { font-size: 13px; color: var(--jp-muted); line-height: 1.6; }
body.jp .pd-plan-due {
  align-self: flex-start; margin-top: 2px; padding: 3px 10px; border-radius: 999px;
  background: var(--jp-accent-50); color: #7a5d0d; font-size: 12px; font-weight: 700;
}

/* resale */
body.jp .pd-resale-badge {
  display: inline-flex !important; align-items: baseline; gap: 8px; padding: 14px 18px !important;
  background: var(--jp-bg-soft) !important; border: 1px solid var(--jp-line) !important; border-radius: var(--jp-radius) !important;
  color: var(--jp-muted) !important; font-size: 14px; box-shadow: none !important;
}
body.jp .pd-resale-badge strong { font-size: 22px !important; font-weight: 800; color: var(--jp-ink) !important; margin: 0 !important; }

/* description */
body.jp .pd-description {
  margin: 0 !important; max-width: 72ch; white-space: pre-line;
  font-size: 15.5px !important; line-height: 1.95 !important; color: var(--jp-ink-2) !important;
}

/* developer */
body.jp .pd-dev-card { padding: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; }
body.jp .pd-dev-link {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px;
  border: 1px solid var(--jp-line); border-radius: var(--jp-radius); text-decoration: none; background: #fff;
  transition: border-color .15s, box-shadow .15s; max-width: 640px;
}
body.jp .pd-dev-link:hover { border-color: var(--jp-primary-100); box-shadow: var(--jp-shadow-sm); }
body.jp .pd-dev-link img { width: 64px !important; height: 64px !important; border-radius: 50% !important; object-fit: cover; border: 1px solid var(--jp-line); flex-shrink: 0; box-shadow: none !important; }
body.jp .pd-dev-name { font-size: 17px !important; font-weight: 800 !important; color: var(--jp-ink) !important; }
body.jp .pd-dev-desc { font-size: 13.5px !important; color: var(--jp-muted) !important; margin-top: 2px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
body.jp .pd-dev-more { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 800; color: var(--jp-primary); }

/* ── Sidebar ─────────────────────────────────────────────────────────── */
body.jp .pd-sidebar { position: sticky; top: calc(var(--jp-header-h) + 20px); display: block !important; }
body.jp .pd-sidecard {
  border: 1px solid var(--jp-line); border-radius: var(--jp-radius-lg); background: #fff;
  box-shadow: var(--jp-shadow); overflow: hidden;
}
body.jp .pd-lead { display: flex; flex-direction: column; padding: 22px 22px 14px; }
body.jp .pd-lead h3 { margin: 0 0 4px; font-size: 18px; font-weight: 800; color: var(--jp-ink); }
body.jp .pd-lead > p { margin: 0 0 16px; font-size: 13.5px; color: var(--jp-muted); line-height: 1.7; }
body.jp .pd-lead label { font-size: 13px; font-weight: 700; color: var(--jp-ink-2); margin: 0 0 6px; }
body.jp .pd-lead input, body.jp .pd-lead select {
  height: 46px; width: 100%; box-sizing: border-box; margin: 0 0 12px;
  border: 1px solid var(--jp-line); border-radius: var(--jp-radius-sm); background: #fff;
  padding: 0 12px; font: inherit; font-size: 14.5px; color: var(--jp-ink);
}
body.jp .pd-lead input:focus, body.jp .pd-lead select:focus { outline: none; border-color: var(--jp-primary-600); box-shadow: 0 0 0 3px var(--jp-primary-50); }
body.jp .pd-lead-phone { display: flex; gap: 8px; }
body.jp .pd-lead-phone select { width: 92px; flex-shrink: 0; padding: 0 8px; }
body.jp .pd-lead-phone input { text-align: right; }
body.jp .pd-lead .jp-btn { height: 48px; width: 100%; font-size: 15px; margin-top: 2px; border: 0; }
body.jp .pd-lead .jp-btn:disabled { opacity: .7; cursor: progress; }
body.jp .pd-lead-note { min-height: 20px; margin: 10px 0 0; font-size: 13px; font-weight: 700; text-align: center; }
body.jp .pd-lead-note.is-ok { color: var(--jp-green); }
body.jp .pd-lead-note.is-error { color: #c62828; }
body.jp .pd-side-acts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--jp-line); }
body.jp .pd-side-act {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 46px; background: #fff; border: 0; border-inline-start: 1px solid var(--jp-line);
  font: inherit; font-size: 13px; font-weight: 700; color: var(--jp-ink-2); cursor: pointer;
}
body.jp .pd-side-act:first-child { border-inline-start: 0; }
body.jp .pd-side-act:hover { color: var(--jp-primary); background: var(--jp-bg-soft); }
body.jp .pd-side-act.fav-active { color: #e0245e; }
body.jp .pd-side-act.comp-active { color: var(--jp-primary); background: var(--jp-primary-50); }

/* ── Similar properties ──────────────────────────────────────────────── */
body.jp .pd-recs { padding-top: 12px; padding-bottom: 8px; margin: 0 auto !important; background: none !important; }
body.jp #pdRecsGrid { margin: 0 !important; }

/* ── Mobile sticky CTA ───────────────────────────────────────────────── */
body.jp .pd-mob-cta {
  background: #fff !important; border-top: 1px solid var(--jp-line) !important; box-shadow: 0 -6px 20px rgba(23, 21, 28, .08) !important;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)) !important; border-radius: 0 !important;
}
body.jp .pd-mob-cta-inner { display: flex !important; align-items: center; justify-content: space-between; gap: 12px; }
body.jp .pd-mob-price-lbl { font-size: 11px !important; color: var(--jp-muted) !important; }
body.jp .pd-mob-price-val { font-size: 18px !important; font-weight: 800 !important; color: var(--jp-ink) !important; font-variant-numeric: tabular-nums; }
body.jp .pd-mob-price-val::after { content: " جم"; font-size: 12px; color: var(--jp-muted); font-weight: 700; }
body.jp .pd-mob-btns { display: flex !important; gap: 8px; }
body.jp .pd-mob-wa, body.jp .pd-mob-call {
  display: inline-flex !important; align-items: center; gap: 6px; height: 44px; padding: 0 16px !important;
  border-radius: var(--jp-radius-sm) !important; font-weight: 800 !important; font-size: 14px !important;
  box-shadow: none !important; text-decoration: none;
}
body.jp .pd-mob-wa { background: var(--jp-wa) !important; color: #fff !important; border: 0 !important; }
body.jp .pd-mob-call { background: #fff !important; color: var(--jp-primary) !important; border: 1px solid var(--jp-primary-100) !important; }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  body.jp .pd-headbar { grid-template-columns: minmax(0, 1fr) auto; }
  body.jp .pd-head-ctas { grid-column: 1 / -1; }
  body.jp .pd-pricebox { border-inline-end: 0; }
  body.jp .pd-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; }
}
@media (max-width: 900px) {
  body.jp .pd-layout { grid-template-columns: 1fr; }
  body.jp .pd-main { order: 1; }
  body.jp .pd-sidebar { order: 2; }
  body.jp .pd-sidebar { position: static; }
  body.jp .pd-sidecard { box-shadow: none; }
}
@media (max-width: 768px) {
  body.jp .pd-topline { padding-top: 12px; padding-bottom: 10px; }
  body.jp .pd-topline .jp-crumbs { display: none; }
  body.jp .pd-acts { width: 100%; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  body.jp .pd-chip { flex-shrink: 0; }
  body.jp .pd-gallery-wrap { padding-inline: 0 !important; }
  body.jp .pd-mosaic { grid-template-columns: 1fr; grid-template-rows: auto; height: auto; }
  body.jp .pd-mosaic .pd-hero { height: 64vw !important; max-height: 420px !important; border-radius: 0 !important; }
  body.jp .pd-mosaic-side { display: none; }
  body.jp .pd-all-photos { bottom: 12px; left: 12px; height: 34px; font-size: 12px; }
  body.jp .pd-nav { display: none !important; }
  body.jp .pd-headbar { grid-template-columns: 1fr; gap: 14px; padding: 18px 0; }
  body.jp .pd-title { font-size: 21px !important; }
  body.jp .pd-dev-logo { width: 52px; height: 52px; }
  body.jp .pd-pricebox { padding: 12px 14px; border: 1px solid var(--jp-line); border-radius: var(--jp-radius); background: var(--jp-bg-soft); }
  body.jp .pd-price-val strong { font-size: 24px; }
  body.jp .pd-head-ctas { display: none; }
  body.jp .pd-layout { padding-top: 24px; }
  body.jp .pd-section { margin-bottom: 28px !important; }
  body.jp .pd-section-title { font-size: 18px !important; }
  body.jp .pd-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
  body.jp .pd-tile { width: auto; min-height: 96px; }
  body.jp .pd-specs-table { font-size: 14px; }
  body.jp .pd-plan-grid { grid-template-columns: 1fr 1fr; }
  body.jp .pd-plan-val { font-size: 20px; }
  body.jp #main-content { padding-bottom: 76px; }
}
@media (max-width: 380px) {
  body.jp .pd-plan-grid { grid-template-columns: 1fr; }
}
