:root {
--bg:#ffffff; --text:#162138; --muted:#9a9b9e;
--gold:#CBA363; --border:#e0e0e0; --hover:#214357;
--m-bg-gray:#F2F2F7; --tag-bg:#F0EBE5; --tag-text:#595046;
}
* { box-sizing:border-box; }
body { margin:0; padding:0; font-family:'Inter Tight',sans-serif; background:var(--bg); color:var(--text); -webkit-tap-highlight-color:transparent; }
.hidden-desktop { display:none !important; }
.hidden-mobile  { display:block !important; }
@media(max-width:900px) { .hidden-desktop{display:flex !important;} .hidden-mobile{display:none !important;} }
.real-estate-filter { width:100%; padding:40px 5%; }
@media(max-width:900px) { .real-estate-filter{padding:20px 15px;} }
.apartments-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:20px; margin-top:40px; }
@media(max-width:1300px) { .apartments-grid{grid-template-columns:repeat(3,1fr);} }
@media(max-width:900px)  { .apartments-grid{grid-template-columns:repeat(2,1fr); gap:10px; margin-top:20px;} }
.apt-card { background:#fff; border-radius:12px; overflow:hidden; display:flex; flex-direction:column; transition:0.3s; cursor:pointer; }
.apt-plan-wrapper { width:100%; aspect-ratio:1/1; position:relative; overflow:hidden; background:#fff; border:1px solid #e8e8e8; border-radius:8px; }
.apt-plan { width:100%; height:100%; object-fit:contain; opacity:0; transition:opacity 0.3s; cursor:zoom-in; mix-blend-mode:multiply; padding:12px; box-sizing:border-box; }
.apt-plan.loaded { opacity:1; }
.no-plan { width:100%; height:100%; display:flex; align-items:center; justify-content:center; color:#ccc; font-size:13px; }
.apt-discount-badge { position:absolute; top:-1px; left:-1px; background:#e8244b; color:#fff; font-size:12px; font-weight:600; padding:4px 8px; border-radius:8px 0 8px 0; z-index:2; }
@media(max-width:900px) { .apt-discount-badge{font-size:11px; padding:3px 6px;} }
.fav-panel-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.5); z-index:3999; }
.fav-panel-overlay.open { display:block; }
.fav-panel { position:fixed; top:0; right:0; bottom:0; width:100%; max-width:480px; background:#fff; z-index:4000; transform:translateX(100%); transition:transform 0.35s cubic-bezier(0.23,1,0.32,1); display:flex; flex-direction:column; }
.fav-panel.open { transform:translateX(0); }
.fav-panel-header { display:flex; align-items:center; justify-content:space-between; padding:16px 16px 12px; border-bottom:1px solid #f0f0f0; flex-shrink:0; }
.fav-panel-title { font-size:22px; font-weight:700; color:#1a1a1a; }
.fav-panel-count { font-size:16px; font-weight:400; color:#aaa; margin-left:8px; }
.fav-panel-close { width:36px; height:36px; border:none; background:#f5f5f5; border-radius:50%; cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:18px; color:#555; }
.fav-panel-sort { display:flex; align-items:center; gap:6px; padding:10px 16px; border-bottom:1px solid #f0f0f0; flex-shrink:0; flex-wrap:wrap; }
.fav-sort-btn { font-size:13px; color:#888; background:#f5f5f5; border:none; border-radius:20px; padding:6px 14px; cursor:pointer; transition:0.2s; }
.fav-sort-btn.active { background:#1a1a1a; color:#fff; }
.fav-panel-list { flex:1; overflow-y:auto; padding:0 16px; }
.fav-panel-empty { display:flex; flex-direction:column; align-items:center; justify-content:center; height:200px; color:#aaa; font-size:15px; }
.fav-item { display:flex; gap:12px; padding:16px 0; border-bottom:1px solid #f0f0f0; }
.fav-item:last-child { border-bottom:none; }
.fav-item-img { width:80px; height:80px; border-radius:8px; background:#f5f5f5; flex-shrink:0; position:relative; overflow:hidden; }
.fav-item-img img { width:100%; height:100%; object-fit:contain; padding:4px; box-sizing:border-box; }
.fav-item-heart { position:absolute; top:4px; right:4px; width:24px; height:24px; background:rgba(255,255,255,0.9); border-radius:50%; border:none; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.fav-item-heart svg { width:12px; height:12px; stroke:#e8244b; fill:#e8244b; stroke-width:2; }
.fav-item-info { flex:1; min-width:0; }
.fav-item-district { font-size:12px; color:#aaa; margin-bottom:2px; }
.fav-item-type { font-size:13px; color:#555; margin-bottom:2px; }
.fav-item-price { font-size:16px; font-weight:600; color:#1a1a1a; margin-bottom:8px; }
.fav-item-price .fav-old { font-size:12px; color:#aaa; text-decoration:line-through; font-weight:400; margin-left:4px; }
.fav-item-btn { width:100%; padding:10px 0; background:#fff; border:1px solid #c8a96e; border-radius:8px; font-size:13px; font-weight:500; color:#c8a96e; cursor:pointer; text-align:center; letter-spacing:0.5px; text-transform:uppercase; transition:0.2s; }
.fav-item-btn:hover { background:#c8a96e; color:#fff; }
.apt-heart { position:absolute; top:8px; right:8px; z-index:3; width:32px; height:32px; background:rgba(255,255,255,0.85); border-radius:50%; border:none; cursor:pointer; display:flex; align-items:center; justify-content:center; backdrop-filter:blur(4px); transition:transform 0.15s; }
.apt-heart:active { transform:scale(0.88); }
.apt-heart svg { width:16px; height:16px; stroke:#aaa; fill:none; stroke-width:2; transition:stroke 0.2s, fill 0.2s; }
.apt-heart.liked svg { stroke:#e8244b; fill:#e8244b; }
@keyframes heartPop { 0%{transform:scale(1)} 30%{transform:scale(1.45)} 60%{transform:scale(0.88)} 100%{transform:scale(1)} }
.apt-heart.pop { animation:heartPop 0.4s cubic-bezier(0.36,0.07,0.19,0.97); }
@keyframes heartParticle { 0%{opacity:1;transform:translate(-50%,-50%) scale(1)} 100%{opacity:0;transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy))) scale(0)} }
.heart-particle { position:absolute; pointer-events:none; width:6px; height:6px; border-radius:50%; background:#e8244b; animation:heartParticle 0.5s ease-out forwards; z-index:10; }
.apt-info { padding:10px 4px 14px; }
.apt-price-row { display:flex; align-items:baseline; gap:8px; margin-bottom:4px; flex-wrap:wrap; }
.apt-price { font-size:18px; font-weight:600; color:#1a1a1a; white-space:nowrap; }
.apt-old-price { font-size:14px; font-weight:400; color:#aaa; text-decoration:line-through; white-space:nowrap; }
.apt-type-area { font-size:14px; font-weight:400; color:#1a1a1a; margin-bottom:2px; }
.apt-district { font-size:13px; color:#888; font-weight:300; }
@media(max-width:900px) { .apt-price{font-size:15px;} .apt-old-price{font-size:12px;} .apt-type-area{font-size:12px;} .apt-district{font-size:11px;} .apt-info{padding:8px 2px 10px;} }
.btn-primary { width:100%; padding:16px 0; display:block; text-transform:uppercase; font-size:13px; letter-spacing:1.5px; cursor:pointer; text-align:center; border-radius:8px; font-weight:500; transition:0.3s; background:#fff; color:var(--hover); border:1px solid var(--hover); margin-top:16px; }
.btn-primary:hover { background:var(--hover); color:#fff; }
.desktop-filter-container { margin-bottom:50px; }
.filter-top-row { display:flex; align-items:center; justify-content:center; gap:16px; margin-bottom:36px; flex-wrap:wrap; }
.district-btn { border:1px solid var(--border); background:#fff; padding:14px 28px; cursor:pointer; font-size:15px; font-weight:300; border-radius:6px; transition:0.3s; color:var(--text); white-space:nowrap; }
.district-btn:hover { background:#ebebeb; }
.main-room-selector { display:flex; gap:8px; flex-wrap:wrap; justify-content:center; }
.room-btn { border:1px solid var(--border); background:#fff; padding:12px 22px; cursor:pointer; font-size:14px; font-weight:300; text-transform:uppercase; border-radius:6px; transition:0.3s; color:var(--text); text-align:center; }
.room-btn.active,.room-btn:hover { background:var(--gold); border-color:var(--gold); color:#fff; }
.desktop-modal-rooms .room-btn { padding:12px 22px; }
.sort-bar { display:flex; align-items:center; gap:12px; margin-bottom:10px; flex-wrap:wrap; }
.sort-label { font-size:12px; font-weight:300; letter-spacing:0.08em; color:var(--muted); white-space:nowrap; }
.sort-track { display:flex; gap:8px; flex-wrap:wrap; }
.sort-btn { border:1px solid var(--border); background:#fff; padding:8px 16px; cursor:pointer; font-size:12px; font-weight:300; letter-spacing:0.06em; border-radius:6px; transition:0.3s; color:var(--text); font-family:'Inter Tight',sans-serif; white-space:nowrap; }
.sort-btn.active { background:var(--gold); border-color:var(--gold); color:#fff; }
.sort-btn:hover:not(.active) { border-color:var(--text); }
@media(max-width:900px) {
  .sort-bar { flex-direction:column; align-items:stretch; gap:8px; background:#fff; border-radius:12px; border:1px solid transparent; padding:12px 20px; margin-bottom:12px; }
  .sort-label { font-size:13px; font-weight:400; color:#666; padding-left:4px; letter-spacing:0.5px; }
  .sort-track { background:var(--m-bg-gray); padding:4px; border-radius:100px; display:flex; justify-content:space-between; gap:1px; width:100%; box-sizing:border-box; flex-wrap:nowrap; }
  .sort-btn { flex:none; text-align:center; padding:9px 12px; font-size:13px; font-weight:300; color:#8E8E93; border-radius:100px; border:none; background:transparent; letter-spacing:0; white-space:nowrap; }
  .sort-btn.active { background:#fff; color:var(--hover); font-weight:600; box-shadow:0 4px 10px rgba(0,0,0,0.15); }
  .sort-btn:hover:not(.active) { border:none; background:transparent; }
}
.main-filters-row { display:flex; justify-content:center; gap:32px; margin-bottom:36px; padding:28px 0; border-top:1px solid #dcdcdc; border-bottom:1px solid #dcdcdc; flex-wrap:wrap; }
.main-filter-item { flex:1; min-width:240px; max-width:420px; }
.filter-label { display:flex; justify-content:space-between; margin-bottom:18px; font-size:14px; font-weight:300; text-transform:uppercase; color:var(--text); }
.filter-values { color:var(--gold); font-weight:400; }
.noUi-target { border:none; background:#e0e0e0; height:2px; box-shadow:none; }
.noUi-connect { background:var(--gold); }
.noUi-horizontal .noUi-handle { width:20px; height:20px; right:-10px; top:-9px; border-radius:50%; background:#fff; border:2px solid var(--gold); box-shadow:0 2px 5px rgba(0,0,0,0.1); cursor:grab; }
.noUi-handle:before,.noUi-handle:after { display:none; }
.main-towers-wrapper { display:flex; justify-content:center; gap:16px; margin-bottom:36px; flex-wrap:wrap; }
.main-tower-cb-wrapper { display:flex; align-items:center; gap:10px; cursor:pointer; padding:10px 18px; border-radius:8px; transition:0.2s; user-select:none; }
.main-tower-cb-wrapper:hover { background:#ebebeb; }
.main-tower-cb-wrapper input { display:none; }
.main-tower-custom { width:22px; height:22px; border:1px solid #ccc; border-radius:5px; display:flex; align-items:center; justify-content:center; background:#fff; transition:0.2s; flex-shrink:0; }
.main-tower-cb-wrapper input:checked + .main-tower-custom { background:var(--gold); border-color:var(--gold); }
.main-tower-cb-wrapper input:checked + .main-tower-custom:after { content:'✔'; color:#fff; font-size:13px; }
.main-tower-label-text { font-size:15px; font-weight:300; text-transform:uppercase; letter-spacing:0.8px; }
#floating-filter-btn { position:fixed; bottom:30px; left:50%; transform:translateX(-50%) translateY(20px); background:var(--text); color:#fff; padding:14px 28px; border-radius:30px; box-shadow:0 10px 30px rgba(0,0,0,0.3); cursor:pointer; font-size:15px; font-weight:400; text-transform:uppercase; letter-spacing:1px; z-index:1000; opacity:0; visibility:hidden; transition:0.3s; display:flex; align-items:center; gap:10px; white-space:nowrap; }
#floating-filter-btn.visible { opacity:1; visibility:visible; transform:translateX(-50%) translateY(0); }
#floating-filter-btn svg { fill:#fff; width:16px; height:16px; flex-shrink:0; }
/* Мобильная верхняя панель */
#mobile-top-bar { display:none; position:fixed; top:0; left:0; right:0; z-index:1000; background:#fff; padding:10px 16px 10px; box-shadow:0 1px 0 rgba(0,0,0,0.08); transform:translateY(-100%); transition:transform 0.35s cubic-bezier(0.23,1,0.32,1); }
#mobile-top-bar.visible { transform:translateY(0); }
@media(max-width:900px) { #mobile-top-bar { display:flex; align-items:center; gap:10px; } }
.mtb-inner { display:flex; align-items:center; width:100%; gap:10px; }
.mtb-icon-track { background:var(--m-bg-gray); padding:2px; border-radius:50%; display:flex; flex-shrink:0; border:2px solid transparent; transition:border-color 0.2s; }
#mtb-fav-track.has-favs { border-color:#e8244b; background:#fff3f5; }
.mtb-fav-badge { position:absolute; bottom:-4px; right:-4px; min-width:18px; height:18px; background:#e8244b; color:#fff; font-size:11px; font-weight:700; border-radius:9px; display:none; align-items:center; justify-content:center; padding:0 4px; box-sizing:border-box; border:2px solid #fff; }
.mtb-fav-badge.visible { display:flex; }
.mtb-icon-btn { width:36px; height:36px; border-radius:50%; border:none; background:transparent; display:flex; align-items:center; justify-content:center; cursor:pointer; transition:all 0.2s; color:#8E8E93; }
.mtb-icon-btn svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; transition:stroke 0.2s; }
.mtb-icon-btn.active { background:#fff; color:var(--hover); box-shadow:0 4px 10px rgba(0,0,0,0.15); }
.mtb-center { flex:1; text-align:center; }
.mtb-count { font-size:15px; font-weight:500; color:#1a1a1a; }
.mtb-label { font-size:12px; color:#888; font-weight:300; margin-top:1px; }
.filter-popup-overlay { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.6); backdrop-filter:blur(5px); z-index:2000; opacity:0; transition:opacity 0.3s; }
.filter-popup-overlay.active { display:block; opacity:1; }
.filter-popup { position:fixed; z-index:2001; background:#fff; display:flex; flex-direction:column; box-shadow:0 10px 40px rgba(0,0,0,0.2); transform:translate3d(0,110%,0); transition:transform 0.5s cubic-bezier(0.23,1,0.32,1); will-change:transform; }
/* Sort popup */
#sort-popup-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.4); z-index:3000; opacity:0; transition:opacity 0.3s; }
#sort-popup-overlay.active { display:block; opacity:1; }
#sort-popup { position:fixed; bottom:0; left:0; right:0; background:#fff; border-radius:20px 20px 0 0; z-index:3001; padding:24px 20px 40px; transform:translateY(100%); transition:transform 0.4s cubic-bezier(0.23,1,0.32,1); }
#sort-popup.active { transform:translateY(0); }
.sort-popup-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.sort-popup-title { font-size:17px; font-weight:600; color:#1a1a1a; }
.sort-popup-close { width:32px; height:32px; background:none; border:none; cursor:pointer; font-size:22px; color:#888; display:flex; align-items:center; justify-content:center; padding:0; }
.sort-popup-item { display:flex; align-items:center; justify-content:space-between; padding:16px 0; border-bottom:1px solid #f0f0f0; cursor:pointer; }
.sort-popup-item:last-child { border-bottom:none; }
.sort-popup-item-label { font-size:16px; font-weight:300; color:#1a1a1a; }
.sort-popup-radio { width:22px; height:22px; border-radius:50%; border:2px solid #d0d0d0; display:flex; align-items:center; justify-content:center; flex-shrink:0; transition:border-color 0.2s; }
.sort-popup-item.active .sort-popup-radio { border-color:#e8244b; }
.sort-popup-item.active .sort-popup-radio::after { content:''; width:10px; height:10px; border-radius:50%; background:#e8244b; }
.filter-popup.active { transform:translate3d(0,0,0) !important; }
@media(max-width:900px) {
.filter-popup { bottom:10px; left:10px; right:10px; width:calc(100% - 20px); height:85vh; border-radius:30px; overflow:visible !important; }
.m-header { padding:30px 20px 20px 20px !important; cursor:grab; touch-action:none; }
.m-handle { width:40px; height:4px; background:#E5E5EA; border-radius:2px; margin:0 auto 10px auto; }
}
@media(min-width:901px) {
.filter-popup { top:50%; left:50%; width:520px; height:auto; max-height:85vh; border-radius:24px; transform:translate(-50%,-50%) scale(0.95); opacity:0; visibility:hidden; }
.filter-popup.active { transform:translate(-50%,-50%) scale(1); opacity:1; visibility:visible; }
.m-handle { display:none; }
.m-header { padding:25px 30px !important; }
.m-content { padding:0 30px 30px 30px !important; }
.m-footer { position:static !important; padding:20px 30px 30px 30px !important; border-top:none !important; }
}
.m-header { display:flex; flex-direction:column; align-items:center; justify-content:center; position:relative; }
.m-title  { font-size:20px; font-weight:700; color:var(--text); text-align:left; width:100%; padding-left:10px; }
.m-back-btn { width:44px; height:44px; border-radius:50%; background:rgba(255,255,255,0.3); backdrop-filter:blur(8px); border:1px solid rgba(255,255,255,0.5); display:flex; align-items:center; justify-content:center; cursor:pointer; position:absolute; left:15px; top:-60px; z-index:2002; }
.m-back-btn svg { width:18px; height:18px; stroke:#fff; stroke-width:2.5; }
@media(min-width:901px) { .m-back-btn{position:static;background:#f2f2f2;border:none;width:32px;height:32px;} .m-back-btn svg{stroke:var(--text);} }
.m-content { padding:0 20px 80px 20px; overflow-y:auto; flex-grow:1; }
.m-section-label { font-size:13px; font-weight:400; color:#666; margin-bottom:10px; padding-left:4px; letter-spacing:0.5px; }
.m-block-spacer { margin-bottom:28px; }
.inline-mobile-filter { display:none; background:#fff; border-radius:12px; padding:20px; margin-bottom:28px; border:1px solid #e0e0e0; }
@media(max-width:900px) { .inline-mobile-filter{display:block;} }
.m-segment-track { background:var(--m-bg-gray); padding:4px; border-radius:100px; display:flex; gap:2px; overflow-x:auto; }
.m-segment-btn { flex:1; text-align:center; padding:9px 4px; font-size:13px; font-weight:300; color:#8E8E93; border-radius:100px; cursor:pointer; transition:all 0.2s; background:transparent; user-select:none; white-space:nowrap; min-width:36px; }
.m-segment-btn.active { background:#fff; color:var(--hover); font-weight:600; box-shadow:0 4px 10px rgba(0,0,0,0.15); }
.m-chips-track { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.m-chip-btn { display:flex; align-items:center; gap:8px; padding:11px 14px; font-size:13px; color:var(--text); background:#fff; border:1px solid #E5E5EA; border-radius:50px; cursor:pointer; transition:all 0.2s; user-select:none; }
.m-chip-btn.active { color:var(--hover); border-color:#fff; box-shadow:0 4px 10px rgba(0,0,0,0.15); font-weight:600; }
.m-chip-btn input { display:none; }
.m-feature-icon { color:#9a9b9e; display:flex; align-items:center; transition:0.2s; flex-shrink:0; }
.m-chip-btn.active .m-feature-icon { color:var(--gold) !important; }
.finish-icon-img { filter: brightness(0) opacity(0.45); transition: filter 0.2s; }
.m-chip-btn.active .finish-icon-img { filter: invert(72%) sepia(26%) saturate(687%) hue-rotate(358deg) brightness(96%) contrast(88%); }
.m-district-btn { width:100%; padding:14px 20px; background:#fff; border:1px solid var(--border); border-radius:50px; font-family:'Inter Tight',sans-serif; font-size:13px; font-weight:300; color:#8E8E93; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:8px; transition:0.2s; }
.m-district-btn:hover { background:#f5f5f5; }
.m-district-btn.has-selection { border-color:var(--gold); color:var(--gold); font-weight:500; }
/* MAP POPUP */
.map-popup-overlay { display:none; position:fixed; inset:0; background:rgba(180,175,170,0.35); backdrop-filter:blur(2px); -webkit-backdrop-filter:blur(2px); z-index:3000; align-items:flex-end; justify-content:center; }
.map-popup-overlay.active { display:flex; }
.map-popup { background:#ffffff; border-radius:20px; width:calc(100% - 20px); max-width:600px; margin:0 10px calc(10px + env(safe-area-inset-bottom, 16px)); height:calc(100dvh - 60px); display:flex; flex-direction:column; opacity:0; transform:translateY(40px); transition:opacity 0.4s ease, transform 0.45s cubic-bezier(0.23,1,0.32,1); pointer-events:none; overflow:hidden; position:relative; }
.map-popup.active { opacity:1; transform:translateY(0); pointer-events:all; }
.map-popup-header { position:absolute; top:0; left:0; right:0; display:flex; align-items:center; justify-content:space-between; padding:16px 18px 36px; background:linear-gradient(to bottom, #ffffff 50%, transparent 100%); z-index:15; pointer-events:none; }
.map-popup-title { font-size:15px; font-weight:500; color:#1a1a1a; letter-spacing:0.01em; pointer-events:auto; }
.map-popup-close { width:32px; height:32px; border-radius:0; background:none; border:none; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:0.2s; flex-shrink:0; padding:0; pointer-events:auto; }
.map-popup-close:hover { opacity:0.5; }
.map-popup-close svg { width:20px; height:20px; stroke:#222; stroke-width:2.5; fill:none; }
.map-svg-wrap { flex:1; position:relative; display:flex; align-items:center; justify-content:center; min-height:0; overflow:hidden; background:#ffffff; padding-bottom:80px; padding-top:60px; }
.map-svg-wrap svg { height:100%; width:auto; display:block; max-width:100%; transform-origin:0 0; filter:drop-shadow(0 1px 6px rgba(0,0,0,0.09)); }
.map-svg-wrap svg.animating { animation: mapZoomIn 0.35s cubic-bezier(0.22,1,0.36,1) forwards; }
.map-svg-wrap::after { content:''; position:absolute; inset:0; pointer-events:none; background:radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.06) 100%); z-index:2; }
@keyframes mapZoomIn { from { opacity:0; transform:translate(var(--tx0),var(--ty0)) scale(var(--s0)); } to { opacity:1; transform:translate(var(--tx1),var(--ty1)) scale(var(--s1)); } }
@media (hover: none) { .map-district:not(.selected):hover { fill:#d9d9d9; } .map-district.hover { fill:#d9d9d9; } }

.map-compass { position:absolute !important; top:130px !important; right:12px; z-index:10; pointer-events:none; width:47px !important; height:47px !important; flex:none; }
.water-body { fill:#C8DFF0; stroke:none; pointer-events:none; }
.map-loading { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:rgba(0,0,0,0.25); font-size:12px; letter-spacing:0.15em; text-transform:uppercase; min-height:300px; }
.map-district { fill:#d9d9d9; stroke:#ffffff; stroke-width:1.5; cursor:pointer; transition:fill 0.2s; }
.map-district:hover, .map-district.hover { fill:#c8c8c8; }
.map-district.selected { fill:var(--gold); stroke:#ffffff; filter:none; }
.map-district.selected:hover, .map-district.selected.hover { fill:#d4aa6a; }
/* Нижняя панель — поверх карты, не сдвигает её */
.map-bottom-panel { position:absolute; bottom:0; left:0; right:0; background:linear-gradient(to bottom, transparent 0%, #ffffff 28px); padding:36px 18px calc(16px + env(safe-area-inset-bottom)); display:flex; flex-direction:column; gap:10px; z-index:5; }
@media(min-width:901px) {
  .map-popup-overlay { align-items:center; }
  .map-popup { max-width:760px; height:88vh; max-height:800px; margin:0; transform:translateY(20px); overflow:hidden; }
  .map-popup-header { position:absolute; background:linear-gradient(to bottom, #ffffff 60%, transparent 100%); padding:14px 18px 40px; }
  .map-bottom-panel { position:absolute; background:linear-gradient(to top, #ffffff 60%, transparent 100%); padding:40px 18px 16px; }
  .map-svg-wrap { padding-top:0; padding-bottom:0; overflow:visible; }
  .map-svg-wrap svg { overflow:visible; }
  .map-compass { top:auto !important; bottom:100px !important; }
}
.map-selected-bar { display:none; align-items:flex-start; gap:8px; flex-wrap:wrap; }
.map-selected-bar.visible { display:flex; }
.map-selected-chip { background:rgba(203,163,99,0.12); color:#9a7840; border:1px solid rgba(203,163,99,0.35); border-radius:20px; padding:4px 12px; font-size:12px; font-weight:400; letter-spacing:0.04em; }
.map-reset-btn { background:none; border:none; padding:0; font-size:12px; color:rgba(0,0,0,0.3); cursor:pointer; font-family:'Inter Tight',sans-serif; text-decoration:underline; text-underline-offset:3px; transition:0.2s; white-space:nowrap; }
.map-reset-btn:hover { color:rgba(0,0,0,0.6); }
.map-apply-btn { width:100%; padding:14px; border:1px solid rgba(0,0,0,0.18); border-radius:50px; background:transparent; color:rgba(0,0,0,0.7); font-size:13px; font-weight:400; letter-spacing:0.08em; text-transform:uppercase; cursor:pointer; font-family:'Inter Tight',sans-serif; transition:0.25s; }
.map-apply-btn:hover { background:var(--gold); border-color:var(--gold); color:#fff; }
.m-footer { position:absolute; bottom:0; left:0; width:100%; padding:20px; box-sizing:border-box; display:flex; justify-content:center; }
.m-apply-btn { width:100%; padding:17px; border:1px solid var(--text); border-radius:30px; background:#fff; color:var(--text); font-size:16px; font-weight:600; cursor:pointer; }
.m-slider-row { margin-bottom:60px; position:relative; }
.m-slider-row:last-child { margin-bottom:68px; }
.m-slider-label-row { display:flex; justify-content:space-between; margin-bottom:10px; font-size:13px; color:#666; }
.m-slider-styled .noUi-target  { background:#F2F2F2; height:24px; border-radius:12px; border:none; padding:0 12px; }
.m-slider-styled .noUi-connect { background:#fff; height:16px; top:4px; border-radius:8px; box-shadow:0 1px 3px rgba(0,0,0,0.1); }
.m-slider-styled .noUi-handle  { width:16px; height:16px; background:#fff; border-radius:50%; border:none; box-shadow:0 2px 4px rgba(0,0,0,0.25); cursor:grab; top:4px; right:-8px; z-index:10; }
.m-slider-styled .noUi-handle::after  { content:''; position:absolute; width:4px; height:4px; background:#162138; border-radius:50%; top:50%; left:50%; transform:translate(-50%,-50%); }
.m-slider-styled .noUi-handle::before { display:none; }
.m-slider-styled .noUi-tooltip { background:#162138; color:#fff; border-radius:20px; padding:6px 14px; font-size:13px; font-weight:600; border:none; border:1px solid rgba(255,255,255,0.2); bottom:auto; top:32px; left:50%; white-space:nowrap; z-index:20; box-shadow:0 4px 10px rgba(0,0,0,0.2); cursor:grab; display:flex; align-items:center; justify-content:center; gap:6px; transition:top 0.2s, background-color 0.2s, box-shadow 0.2s; }
.noUi-handle-lower .noUi-tooltip { transform:translateX(-50%); }
.noUi-handle-upper .noUi-tooltip { transform:translateX(-85%); }
.noUi-handle.noUi-active .noUi-tooltip { bottom:auto; top:-45px; transform:translateX(-50%); background:#000; box-shadow:0 8px 20px rgba(0,0,0,0.3); cursor:grabbing; }
.desktop-filter-modal-overlay { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.6); backdrop-filter:blur(5px); z-index:10000; align-items:center; justify-content:center; }
.desktop-filter-modal-overlay.active { display:flex; }
.desktop-filter-modal { background:var(--bg); border-radius:12px; padding:50px 60px; max-width:1100px; width:90%; max-height:90vh; overflow-y:auto; position:relative; box-shadow:0 20px 60px rgba(0,0,0,0.3); }
.desktop-modal-close { position:absolute; top:25px; right:25px; width:40px; height:40px; border-radius:50%; background:transparent; display:flex; align-items:center; justify-content:center; cursor:pointer; border:none; }
.desktop-modal-close:hover { background:rgba(0,0,0,0.05); }
.desktop-modal-close svg { width:24px; height:24px; stroke:var(--text); stroke-width:2; }
.desktop-modal-title { font-size:30px; font-weight:600; margin-bottom:36px; color:var(--text); text-align:center; }
.desktop-modal-rooms { display:flex; justify-content:center; gap:8px; margin-bottom:36px; flex-wrap:wrap; }
.desktop-modal-sliders { display:flex; justify-content:center; gap:32px; padding:28px 0; border-top:1px solid #dcdcdc; border-bottom:1px solid #dcdcdc; margin-bottom:36px; flex-wrap:wrap; }
.desktop-modal-slider-item { flex:1; max-width:300px; min-width:180px; }
.desktop-modal-features { display:flex; justify-content:center; gap:12px; flex-wrap:wrap; margin-bottom:36px; }
.desktop-modal-apply { width:100%; max-width:400px; margin:0 auto; padding:17px 0; display:block; text-transform:uppercase; font-size:14px; letter-spacing:1.5px; cursor:pointer; text-align:center; border-radius:8px; font-weight:500; transition:0.3s; background:#fff; color:var(--hover); border:1px solid var(--hover); }
.desktop-modal-apply:hover { background:var(--hover); color:#fff; }
@media(max-width:900px) { .desktop-filter-modal-overlay{display:none !important;} }
.load-more-wrapper { text-align:center; margin:40px 0; }
#load-more-btn { padding:14px 38px; background:transparent; border:1px solid var(--text); border-radius:8px; text-transform:uppercase; cursor:pointer; font-weight:300; font-size:14px; }
#no-results { display:none; text-align:center; padding:50px; color:var(--muted); grid-column:1/-1; }
.found-counter-wrapper { text-align:center; margin-bottom:28px; margin-top:20px; font-size:15px; font-weight:500; color:#1a1a1a; display:flex; align-items:baseline; justify-content:center; gap:5px; }
@media(max-width:900px) { .found-counter-wrapper { margin-top:16px; margin-bottom:24px; font-size:15px; font-weight:500; } .apartments-grid { margin-top:0; } }
.count-num { color:var(--gold); font-weight:700; font-size:22px; }
.img-modal-overlay { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.92); align-items:center; justify-content:center; z-index:9999; }
.img-modal-overlay.active { display:flex; }
.img-modal-img { max-width:95%; max-height:95%; object-fit:contain; }
.img-modal-close { position:absolute; top:20px; right:20px; color:#fff; font-size:40px; cursor:pointer; line-height:1; }
/* Full-screen apartment card */
#apt-card-overlay { display:none; position:fixed; inset:0; z-index:5000; background:#fff; flex-direction:column; overflow-y:auto; -webkit-overflow-scrolling:touch; }
#apt-card-overlay.active { display:flex; }
.apc-header { position:fixed; top:0; left:0; right:0; z-index:5010; display:flex; align-items:center; justify-content:space-between; padding:12px 16px; pointer-events:none; }
.apc-header-btn { width:40px; height:40px; border-radius:50%; background:rgba(255,255,255,0.9); border:none; cursor:pointer; display:flex; align-items:center; justify-content:center; pointer-events:all; backdrop-filter:blur(6px); flex-shrink:0; }
.apc-header-btn svg { width:18px; height:18px; stroke:#1a1a1a; fill:none; stroke-width:2; stroke-linecap:round; }
.apc-header-right { display:flex; gap:8px; }
.apc-likes { font-size:11px; font-weight:600; color:#1a1a1a; margin-top:2px; }
.apc-plan-area { width:100%; aspect-ratio:1/1; background:#f8f8f8; flex-shrink:0; overflow:hidden; position:relative; cursor:zoom-in; }
.apc-slides { display:flex; flex-direction:row; flex-wrap:nowrap; width:100%; height:100%; transition:transform 0.35s cubic-bezier(0.25,1,0.5,1); will-change:transform; }
.apc-slide { flex:0 0 100%; width:100%; height:100%; display:flex; align-items:center; justify-content:center; background:#f8f8f8; overflow:hidden; box-sizing:border-box; }
.apc-slide img { width:100%; height:100%; object-fit:contain; mix-blend-mode:multiply; padding:24px; box-sizing:border-box; display:block; }
.apc-slide.render img { object-fit:cover; mix-blend-mode:normal; padding:0; }
.apc-plan-placeholder { color:#ccc; font-size:13px; }
.apc-inline-dots { position:absolute; bottom:10px; left:50%; transform:translateX(-50%); display:flex; gap:5px; z-index:2; pointer-events:none; }
.apc-inline-dot { width:6px; height:6px; border-radius:50%; background:rgba(0,0,0,0.18); transition:background 0.2s; }
.apc-inline-dot.active { background:rgba(0,0,0,0.55); }
#apc-img-popup { display:none; position:fixed; inset:0; z-index:7000; background:#fff; flex-direction:column; }
#apc-img-popup.active { display:flex; }
.apc-img-popup-header { display:flex; justify-content:space-between; align-items:center; padding:14px 16px 8px; flex-shrink:0; }
.apc-img-popup-dots { display:flex; gap:6px; align-items:center; }
.apc-img-popup-dot { width:7px; height:7px; border-radius:50%; background:#e0e0e0; transition:background 0.2s,transform 0.2s; cursor:pointer; }
.apc-img-popup-dot.active { background:#1a1a1a; transform:scale(1.25); }
.apc-img-popup-close { width:36px; height:36px; border-radius:50%; background:#f5f5f5; border:none; cursor:pointer; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.apc-img-popup-close svg { width:16px; height:16px; stroke:#1a1a1a; fill:none; stroke-width:2; stroke-linecap:round; }
.apc-img-popup-slides { flex:1; overflow:hidden; position:relative; }
.apc-img-popup-track { display:flex; flex-direction:row; flex-wrap:nowrap; height:100%; transition:transform 0.35s cubic-bezier(0.25,1,0.5,1); }
.apc-img-popup-slide { flex:0 0 100%; width:100%; height:100%; display:flex; align-items:center; justify-content:center; background:#fff; }
.apc-img-popup-slide img { max-width:100%; max-height:100%; object-fit:contain; mix-blend-mode:multiply; padding:16px; box-sizing:border-box; display:block; }
.apc-img-popup-slide.render img { object-fit:cover; mix-blend-mode:normal; padding:0; }
.apc-gallery { display:flex; gap:8px; padding:10px 16px 4px; overflow-x:auto; flex-shrink:0; scrollbar-width:none; }
.apc-gallery::-webkit-scrollbar { display:none; }
.apc-gallery-thumb { width:64px; height:64px; border-radius:8px; border:2px solid #e8e8e8; background:#f5f5f5; flex-shrink:0; overflow:hidden; display:flex; align-items:center; justify-content:center; cursor:pointer; transition:border-color 0.2s; }
.apc-gallery-thumb img { width:100%; height:100%; object-fit:contain; mix-blend-mode:multiply; padding:4px; box-sizing:border-box; }
.apc-gallery-thumb.render img { object-fit:cover; mix-blend-mode:normal; padding:0; }
.apc-gallery-thumb.active { border-color:var(--gold); }
.apc-dots { display:none; }
.apc-body { padding:16px 16px 120px; flex:1; }
.apc-badge-row { display:flex; align-items:center; gap:8px; margin-bottom:14px; }
.apc-discount-badge { background:#e8244b; color:#fff; font-size:12px; font-weight:700; padding:4px 10px; border-radius:6px; }
.apc-row { display:flex; justify-content:space-between; align-items:baseline; padding:10px 0; border-bottom:1px solid #f0f0f0; gap:8px; }
.apc-row:last-of-type { border-bottom:none; }
.apc-label { font-size:14px; color:#888; font-weight:300; }
.apc-value { font-size:14px; color:#1a1a1a; font-weight:400; text-align:right; }
.apc-district { font-size:14px; color:#888; font-weight:300; margin:14px 0; }
.apc-price-row { display:flex; align-items:center; gap:10px; margin:16px 0 10px; flex-wrap:nowrap; }
.apc-price { font-size:22px; font-weight:600; color:#1a1a1a; white-space:nowrap; }
.apc-old-price { font-size:18px; color:#aaa; text-decoration:line-through; font-weight:300; }
.apc-footer { position:fixed; bottom:0; left:0; right:0; background:#fff; padding:12px 16px calc(12px + env(safe-area-inset-bottom)); border-top:1px solid #f0f0f0; z-index:5010; }
.apc-finance-block { margin-top:0; }
.apc-about-wrap { position:relative; margin:8px 0 4px; }
.apc-about-text { font-size:14px; color:#555; line-height:1.6; max-height:72px; overflow:hidden; transition:max-height 0.3s ease; }
.apc-about-text.expanded { max-height:1000px; }
.apc-about-fade { position:absolute; bottom:0; left:0; right:0; height:40px; background:linear-gradient(transparent, #fff); pointer-events:none; transition:opacity 0.3s; }
.apc-about-fade.hidden { opacity:0; }
.apc-about-more { font-size:13px; color:#c8a96e; cursor:pointer; margin-bottom:12px; margin-top:4px; padding-bottom:0; display:inline-block; }
.apc-promo-hidden { display:none !important; }
.apc-promo-hidden.visible { display:flex !important; }
.apc-finance-item.apc-promo-hidden.visible { display:grid !important; grid-template-columns:1fr 85px 110px; align-items:start; column-gap:12px; }
.apc-features-scroll { display:flex; gap:8px; overflow-x:auto; padding:4px 0 12px; scrollbar-width:none; }
.apc-features-scroll::-webkit-scrollbar { display:none; }
.apc-feature-card { flex:0 0 140px; border-radius:10px; overflow:hidden; background:#f5f5f5; }
.apc-feature-card img { width:100%; height:80px; object-fit:cover; display:block; }
.apc-feature-card-text { font-size:11px; color:#1a1a1a; padding:6px 8px; line-height:1.3; }
.apc-promo-item { display:flex; justify-content:space-between; align-items:center; padding:10px 0; border-bottom:1px solid #f0f0f0; gap:8px; position:relative; }
.apc-promo-item:last-child { border-bottom:none; }
.apc-promo-right { display:flex; align-items:center; flex-shrink:0; gap:6px; }
.apc-promo-info { width:14px; height:14px; border-radius:50%; border:1px solid #bbb; color:#bbb; font-size:9px; font-weight:600; display:inline-flex; align-items:center; justify-content:center; cursor:pointer; flex-shrink:0; user-select:none; background:none; transition:border-color 0.15s,color 0.15s; }
.apc-promo-info.active { border-color:#555; color:#555; }
.apc-promo-tooltip { display:none; position:absolute; right:0; top:calc(100% + 6px); width:240px; background:#fff; border:1px solid #e0e0e0; border-radius:10px; padding:10px 12px; font-size:13px; color:#555; line-height:1.5; z-index:10; box-shadow:0 4px 16px rgba(0,0,0,0.10); }
.apc-promo-tooltip.visible { display:block; }
.apc-promo-name { font-size:14px; color:#555; font-weight:400; flex:1; line-height:1.6; }
.apc-promo-value { font-size:14px; color:#555; font-weight:400; white-space:nowrap; line-height:1.6; }
.apc-finance-divider { height:8px; background:#f5f5f5; margin:0 -16px; }
.apc-finance-section { padding:16px 0 0; }
.apc-finance-title { font-size:17px; font-weight:600; color:#1a1a1a; margin-bottom:4px; }
.apc-finance-item { display:grid; grid-template-columns:1fr 85px 110px; align-items:start; padding:10px 0; border-bottom:1px solid #f0f0f0; column-gap:12px; box-sizing:border-box; width:100%; }
.apc-finance-item:last-child { border-bottom:none; }
.apc-finance-name { font-size:14px; color:#555; font-weight:400; min-width:0; padding-top:14px; line-height:1.6; }
.apc-finance-cols { display:contents; }
.apc-finance-col { text-align:right; display:flex; flex-direction:column; align-items:flex-end; }
.apc-finance-col-label { font-size:11px; color:#bbb; display:block; text-align:right; }
.apc-finance-col-value { font-size:14px; color:#555; font-weight:400; white-space:normal; word-break:break-word; display:block; text-align:right; line-height:1.6; }
.apc-finance-detail { font-size:14px; color:#1a1a1a; font-weight:400; text-align:right; }
.apc-finance-rate { font-size:14px; color:#1a1a1a; font-weight:400; text-align:right; white-space:nowrap; }
.apc-finance-disclaimer { font-size:11px; color:#bbb; line-height:1.4; margin-top:12px; padding-top:10px; border-top:1px solid #f0f0f0; }
.apc-fin-wrap { position:relative; }
.apc-fin-fade { position:absolute; bottom:0; left:0; right:0; height:40px; background:linear-gradient(transparent, #fff); pointer-events:none; transition:opacity 0.3s; }
.apc-fin-fade.hidden { opacity:0; }
.apc-fin-more { font-size:13px; color:#c8a96e; cursor:pointer; margin-top:4px; padding-bottom:12px; display:inline-block; }
.apc-hoff-row { display:flex; align-items:center; gap:5px; }
.apc-hoff-logo { height:18px; width:auto; border-radius:3px; }
.apc-hoff-amount { font-size:13px; font-weight:600; color:#1a1a1a; white-space:nowrap; }
.apc-hoff-q { display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; border-radius:50%; border:1.5px solid #bbb; color:#bbb; font-size:11px; font-weight:600; cursor:pointer; flex-shrink:0; user-select:none; }
.apc-hoff-tooltip { display:none; font-size:12px; color:#888; line-height:1.5; margin-bottom:8px; padding:8px 12px; background:#faf8f5; border-radius:8px; border-left:3px solid #d4a96a; }
.apc-hoff-tooltip.visible { display:block; }
.apc-onreq-badge { display:inline-flex; align-items:center; gap:5px; background:#f5f0eb; color:#8a6a3a; font-size:13px; font-weight:500; padding:4px 10px; border-radius:20px; cursor:pointer; user-select:none; position:relative; }
.apc-onreq-badge svg { width:14px; height:14px; flex-shrink:0; }
.apc-onreq-tooltip { display:none; position:absolute; top:calc(100% + 8px); right:0; width:240px; background:#1a1a1a; color:#fff; font-size:12px; line-height:1.5; padding:10px 12px; border-radius:10px; z-index:20; box-shadow:0 4px 16px rgba(0,0,0,0.2); }
.apc-onreq-tooltip::before { content:''; position:absolute; top:-5px; right:14px; width:10px; height:10px; background:#1a1a1a; transform:rotate(45deg); border-radius:2px; }
.apc-onreq-badge.open .apc-onreq-tooltip { display:block; }
.apt-price.onreq { color:#8a6a3a; }
.apc-consult-btn { width:100%; padding:18px; background:var(--text); color:#fff; border:none; border-radius:14px; font-size:16px; font-weight:500; font-family:'Inter Tight',sans-serif; cursor:pointer; letter-spacing:0.02em; transition:opacity 0.2s; }
.apc-consult-btn:active { opacity:0.85; }
