.map-page-hero{background:linear-gradient(135deg,#0b2948,#143f68)}
.map-view-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:18px;padding:18px 20px;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 10px 28px rgba(13,41,71,.05)}
.map-view-toolbar strong{display:block;color:var(--navy);font-size:1.05rem}
.map-view-toolbar span{color:var(--muted);font-size:.86rem}
.map-view-buttons{display:flex;gap:8px;flex-wrap:wrap}
.map-filter-bar{display:grid;grid-template-columns:1fr 1fr 1.15fr .85fr .85fr auto auto;align-items:end;gap:10px;background:#f7f8fa;border:1px solid var(--line);padding:16px;border-radius:18px;margin-bottom:18px}
.map-filter-bar label{display:flex;flex-direction:column;gap:6px;font-size:.78rem;font-weight:800;color:var(--navy)}
.map-filter-bar select,.map-filter-bar input{height:44px;border:1px solid #d8e0e7;border-radius:10px;background:#fff;padding:7px 10px;color:var(--navy);min-width:0}
.map-filter-bar .btn{height:44px;white-space:nowrap}
.map-reset-link{height:44px;display:flex;align-items:center;color:var(--muted);font-size:.82rem;font-weight:800;padding-inline:4px}
.properties-map-layout{display:grid;grid-template-columns:minmax(0,1fr) 350px;gap:18px;align-items:stretch}
.properties-map-shell{position:relative;background:#fff;border:1px solid var(--line);border-radius:22px;overflow:hidden;box-shadow:0 15px 45px rgba(8,31,56,.08);min-height:680px}
.properties-map-canvas{width:100%;height:680px;background:#e8eef3;z-index:1}
.map-loading{position:absolute;top:18px;right:50%;transform:translateX(50%);z-index:500;background:rgba(7,29,51,.92);color:#fff;border-radius:999px;padding:9px 16px;font-size:.8rem;font-weight:800;box-shadow:0 10px 24px rgba(0,0,0,.18)}
.map-loading[hidden]{display:none}
.map-privacy-note{position:absolute;right:14px;bottom:14px;z-index:450;background:rgba(255,255,255,.94);border:1px solid rgba(13,41,71,.12);border-radius:10px;padding:8px 10px;color:#536376;font-size:.72rem;max-width:330px;box-shadow:0 8px 20px rgba(0,0,0,.1)}
.map-results-panel{background:#fff;border:1px solid var(--line);border-radius:22px;overflow:hidden;box-shadow:0 15px 45px rgba(8,31,56,.07);height:680px;display:flex;flex-direction:column}
.map-results-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:17px;border-bottom:1px solid var(--line)}
.map-results-heading span{display:block;color:var(--muted);font-size:.76rem}
.map-results-heading strong{display:block;color:var(--navy);font-size:1.15rem;margin-top:2px}
.map-fit-button{border:0;background:#edf3f8;color:var(--navy);font-weight:900;border-radius:9px;padding:8px 11px;cursor:pointer}
.map-results-list{overflow:auto;padding:10px;display:flex;flex-direction:column;gap:10px}
.map-result-card{width:100%;font:inherit;color:inherit;display:grid;grid-template-columns:104px 1fr;gap:11px;border:1px solid #e6ebef;border-radius:15px;padding:8px;background:#fff;cursor:pointer;transition:.18s ease;text-align:right}
.map-result-card:hover,.map-result-card.is-active{border-color:rgba(182,154,104,.65);box-shadow:0 9px 22px rgba(13,41,71,.08);transform:translateY(-1px)}
.map-result-card img{width:104px;height:92px;object-fit:cover;border-radius:10px;background:#eef2f5}
.map-result-card__body{min-width:0}
.map-result-card__tag{font-size:.68rem;color:#8a6b32;font-weight:900}
.map-result-card h3{font-size:.9rem;line-height:1.55;margin:3px 0;color:var(--navy);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.map-result-card__location{font-size:.74rem;color:var(--muted)}
.map-result-card__price{font-size:.88rem;font-weight:900;color:#0a3256;margin-top:5px}
.map-empty-state{padding:36px 22px;text-align:center;color:var(--muted)}
.map-empty-state strong{display:block;color:var(--navy);margin-bottom:5px}
.property-price-marker{background:transparent!important;border:0!important}
.property-price-marker span{display:inline-flex;align-items:center;justify-content:center;min-width:76px;height:34px;padding:0 10px;border-radius:9px;background:#0d2947;color:#fff;border:2px solid #fff;box-shadow:0 7px 18px rgba(4,22,39,.28);font-family:inherit;font-size:.74rem;font-weight:900;white-space:nowrap;position:relative}
.property-price-marker span:after{content:"";position:absolute;right:50%;transform:translateX(50%);bottom:-7px;border-width:6px 6px 0;border-style:solid;border-color:#0d2947 transparent transparent}
.leaflet-popup-content-wrapper{border-radius:15px;overflow:hidden;padding:0;box-shadow:0 18px 45px rgba(4,22,39,.24)}
.leaflet-popup-content{margin:0!important;width:260px!important}
.leaflet-popup-tip{background:#fff}
.map-popup-card img{width:100%;height:150px;object-fit:cover;background:#eef2f5}
.map-popup-card__content{padding:13px;text-align:right;direction:rtl}
.map-popup-card__badge{display:inline-block;color:#8a6b32;font-size:.72rem;font-weight:900;margin-bottom:3px}
.map-popup-card h3{font-size:.95rem;line-height:1.55;color:var(--navy);margin:0 0 4px}
.map-popup-card p{font-size:.76rem;color:var(--muted);margin:0 0 8px}
.map-popup-card strong{display:block;color:#0a3256;font-size:.95rem;margin-bottom:9px}
.map-popup-card a{display:block;text-align:center;background:#0d2947;color:#fff;padding:9px 11px;border-radius:9px;font-weight:900;font-size:.78rem}
.marker-cluster-small,.marker-cluster-medium,.marker-cluster-large{background:rgba(182,154,104,.32)!important}
.marker-cluster-small div,.marker-cluster-medium div,.marker-cluster-large div{background:#b69a68!important;color:#fff!important;font-weight:900!important}
.property-detail-map-wrap{margin-top:24px}
.property-detail-map{height:360px;border-radius:18px;overflow:hidden;border:1px solid var(--line);background:#e8eef3}
.property-detail-map-note{margin-top:8px;color:var(--muted);font-size:.8rem}
.home-map-cta{padding-top:0}
.home-map-cta__card{position:relative;overflow:hidden;display:grid;grid-template-columns:1fr auto;align-items:center;gap:24px;background:linear-gradient(135deg,#0a2745,#123f6c);border-radius:26px;padding:38px;color:#fff;box-shadow:0 22px 55px rgba(8,31,56,.2)}
.home-map-cta__card:before{content:"";position:absolute;inset:0;background-image:linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px);background-size:34px 34px;mask-image:linear-gradient(90deg,#000,transparent)}
.home-map-cta__content,.home-map-cta__actions{position:relative;z-index:1}
.home-map-cta h2{color:#fff;font-size:2rem;margin:6px 0 8px}
.home-map-cta p{color:rgba(255,255,255,.72);margin:0;max-width:650px}
.home-map-cta__actions{display:flex;gap:9px;flex-wrap:wrap}
@media(max-width:1180px){.map-filter-bar{grid-template-columns:repeat(3,1fr)}.properties-map-layout{grid-template-columns:minmax(0,1fr) 315px}}
@media(max-width:900px){.properties-map-layout{grid-template-columns:1fr}.map-results-panel{height:auto;max-height:none}.map-results-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-height:480px}.properties-map-shell,.properties-map-canvas{min-height:520px;height:520px}.home-map-cta__card{grid-template-columns:1fr}}
@media(max-width:620px){.map-view-toolbar{align-items:flex-start;flex-direction:column}.map-filter-bar{grid-template-columns:1fr 1fr}.map-filter-bar label:nth-child(3){grid-column:1/-1}.map-filter-bar .btn{grid-column:1/-1}.map-reset-link{grid-column:1/-1;justify-content:center}.properties-map-shell,.properties-map-canvas{height:430px;min-height:430px}.map-results-list{grid-template-columns:1fr}.map-result-card{grid-template-columns:92px 1fr}.map-result-card img{width:92px;height:86px}.map-privacy-note{right:8px;left:8px;max-width:none;font-size:.66rem}.home-map-cta__card{padding:27px 22px}.home-map-cta h2{font-size:1.55rem}.home-map-cta__actions{flex-direction:column}.home-map-cta__actions .btn{width:100%}}

/* V8.3 — ضبط صفحة خريطة العقارات للجوال ومنع التمدد الأفقي */
.map-page-hero,
.properties-map-page{
  max-width:100%;
  overflow-x:hidden;
  overflow-x:clip;
}
.map-page-hero .container,
.properties-map-page .container,
.map-view-toolbar,
.map-filter-bar,
.properties-map-layout,
.properties-map-shell,
.map-results-panel{
  min-width:0;
  max-width:100%;
}
.map-view-toolbar > div,
.map-view-buttons,
.map-filter-bar > *,
.map-filter-bar label{
  min-width:0;
}
.map-view-toolbar > div:first-child > span{
  display:block;
  color:var(--muted);
  font-size:.86rem;
}
.map-view-buttons .btn{
  margin:0;
}
.map-view-buttons .btn-primary{
  color:#fff;
}
.map-filter-bar select,
.map-filter-bar input{
  display:block;
  width:100%;
  max-width:100%;
}
.properties-map-canvas,
.properties-map-canvas.leaflet-container{
  width:100%;
  max-width:100%;
}
.map-results-list,
.map-result-card,
.map-result-card__body{
  min-width:0;
  max-width:100%;
}
.map-result-card h3,
.map-result-card__location,
.map-result-card__price{
  overflow-wrap:anywhere;
}

@media (max-width:900px){
  .properties-map-page{
    padding-top:46px;
  }
  .properties-map-layout{
    width:100%;
    grid-template-columns:minmax(0,1fr);
  }
  .properties-map-shell,
  .map-results-panel{
    width:100%;
  }
}

@media (max-width:620px){
  .map-page-hero.compact{
    padding:44px 0 46px;
  }
  .map-page-hero .container{
    width:calc(100% - 28px);
  }
  .map-page-hero h1{
    max-width:100%;
    margin-bottom:12px;
    font-size:clamp(2rem,10vw,2.65rem);
    line-height:1.28;
    letter-spacing:-.025em;
    overflow-wrap:anywhere;
  }
  .map-page-hero p{
    max-width:100%;
    margin-bottom:0;
    font-size:.98rem;
    line-height:1.9;
  }
  .properties-map-page{
    padding:34px 0 78px;
  }
  .properties-map-page > .container{
    width:calc(100% - 22px);
  }
  .map-view-toolbar{
    width:100%;
    padding:16px;
    gap:14px;
    border-radius:16px;
  }
  .map-view-toolbar strong{
    font-size:1rem;
  }
  .map-view-toolbar > div:first-child > span{
    font-size:.8rem;
  }
  .map-view-buttons{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    width:100%;
    gap:8px;
  }
  .map-view-buttons .btn{
    width:100%;
    min-width:0;
    min-height:44px;
    padding-inline:10px;
    white-space:normal;
    text-align:center;
  }
  .map-filter-bar{
    width:100%;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:12px 10px;
    padding:14px;
    border-radius:16px;
  }
  .map-filter-bar label{
    width:100%;
    font-size:.76rem;
  }
  .map-filter-bar label:nth-child(3){
    grid-column:1/-1;
  }
  .map-filter-bar select,
  .map-filter-bar input{
    height:46px;
    min-height:46px;
    padding-inline:9px;
    font-size:.88rem;
  }
  .map-filter-bar .btn{
    width:100%;
    min-width:0;
    grid-column:1/-1;
    white-space:normal;
  }
  .map-reset-link{
    width:100%;
    min-width:0;
    grid-column:1/-1;
    height:auto;
    min-height:40px;
    justify-content:center;
  }
  .properties-map-layout{
    gap:14px;
  }
  .properties-map-shell,
  .map-results-panel{
    border-radius:17px;
  }
  .properties-map-shell,
  .properties-map-canvas{
    width:100%;
    height:430px;
    min-height:430px;
  }
  .map-results-heading{
    padding:14px;
  }
  .map-results-list{
    width:100%;
    grid-template-columns:minmax(0,1fr);
    padding:9px;
  }
  .map-result-card{
    width:100%;
    grid-template-columns:88px minmax(0,1fr);
    gap:10px;
  }
  .map-result-card img{
    width:88px;
    height:82px;
  }
  .map-privacy-note{
    max-width:calc(100% - 16px);
  }
  .leaflet-popup-content-wrapper,
  .leaflet-popup-content{
    max-width:calc(100vw - 48px)!important;
  }
  .leaflet-popup-content{
    width:250px!important;
  }
}

@media (max-width:390px){
  .map-filter-bar{
    grid-template-columns:minmax(0,1fr);
  }
  .map-filter-bar label,
  .map-filter-bar label:nth-child(3),
  .map-filter-bar .btn,
  .map-reset-link{
    grid-column:1;
  }
  .map-page-hero h1{
    font-size:1.95rem;
  }
  .properties-map-shell,
  .properties-map-canvas{
    height:390px;
    min-height:390px;
  }
}
