.map-filter-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(73, 38, 232, 0.15);
    padding: 20px 25px;
    margin-bottom: 20px;
}
.map-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    cursor: pointer;
}
.map-filter-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 16px;
    color: #4926e8;
}
.map-filter-title svg {
    width: 22px;
    height: 22px;
}
.map-filter-toggle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(91.2deg, #4926e8 .29%, #2dc8ff 112.3%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}
.map-filter-toggle svg {
    width: 16px;
    height: 16px;
    stroke: #fff;
    transition: transform 0.3s ease;
}
.map-filter-toggle.active svg {
    transform: rotate(180deg);
}
.map-filter-body {
    display: none;
    padding-top: 15px;
    border-top: 1px solid #eee;
}
.map-filter-body.active {
    display: block;
}
.map-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}
.map-filter-item {
    flex: 1;
    min-width: 150px;
}
.map-filter-item label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    margin-bottom: 8px;
}
.map-filter-item select {
    width: 100%;
    padding: 10px 35px 10px 12px;
    font-size: 14px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg width='12' height='8' xmlns='http://www.w3.org/2000/svg'><path d='M1 1l5 5 5-5' fill='none' stroke='%234926e8' stroke-width='2' stroke-linecap='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
.map-filter-item select:focus {
    outline: none;
    border-color: #4926e8;
}
.map-filter-slider {
    flex: 1;
    min-width: 180px;
}
.map-filter-slider label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    margin-bottom: 12px;
}
.map-filter-slider .slider-container {
    padding: 0 10px;
    margin-top: 5px;
}
.map-filter-slider .slider-values {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
}
.map-filter-slider .slider-values input {
    width: 70px;
    padding: 6px 8px;
    font-size: 14px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    text-align: center;
    background: #f8f8f8;
    color: #4926e8;
    font-weight: 600;
}
/* noUiSlider custom styles */
.map-filter-slider .noUi-target {
    background: #e8e8e8;
    border: none;
    box-shadow: none;
    height: 6px;
    border-radius: 3px;
}
.map-filter-slider .noUi-connect {
    background: linear-gradient(91.2deg, #4926e8 .29%, #2dc8ff 112.3%);
    border-radius: 3px;
}
.map-filter-slider .noUi-horizontal .noUi-handle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #4926e8;
    box-shadow: 0 2px 6px rgba(73, 38, 232, 0.3);
    cursor: pointer;
    top: -7px;
    right: -10px;
}
.map-filter-slider .noUi-horizontal .noUi-handle:hover {
    transform: scale(1.1);
}
.map-filter-slider .noUi-handle:before,
.map-filter-slider .noUi-handle:after {
    display: none;
}
.map-filter-slider .noUi-tooltip {
    background: #4926e8;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    padding: 4px 8px;
}
.map-filter-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 15px;
    border-top: 1px solid #eee;
}
.map-filter-btn {
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}
.map-filter-btn-primary {
    background: linear-gradient(91.2deg, #4926e8 .29%, #2dc8ff 112.3%);
    color: #fff;
}
.map-filter-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(73, 38, 232, 0.4);
}
.map-filter-btn-secondary {
    background: #f0f0f0;
    color: #666;
}
.map-filter-btn-secondary:hover {
    background: #e0e0e0;
}
.map-filter-count {
    background: linear-gradient(91.2deg, #4926e8 .29%, #2dc8ff 112.3%);
    color: #fff;
    font-size: 14px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
}
#yandex-map {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
#map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255,255,255,0.95);
    padding: 20px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 100;
}
#map-loading span {
    color: #4926e8;
    font-weight: 500;
}
.map-container {
    position: relative;
}
@media (max-width: 768px) {
    .map-filter-row {
        flex-direction: column;
    }
    .map-filter-buttons {
        flex-direction: column;
    }
    .map-filter-btn {
        width: 100%;
    }
}

/* Yandex Maps cluster tabs — list of items shown when a cluster is opened.
   Version-agnostic selectors (Yandex bakes the API version into class names). */
[class*="b-cluster-tabs__menu-item"] {
    cursor: pointer;
}
[class*="b-cluster-tabs__menu-item-text"] {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    font-size: 14px;
    line-height: 1.3;
    color: #333;
    border-radius: 8px;
    transition: background 0.15s;
}
[class*="b-cluster-tabs__menu-item"]:hover [class*="b-cluster-tabs__menu-item-text"] {
    background: rgba(73, 38, 232, 0.06);
}
[class*="b-cluster-tabs__menu-item_current_yes"] [class*="b-cluster-tabs__menu-item-text"] {
    background: linear-gradient(91.2deg, rgba(73, 38, 232, 0.1), rgba(45, 200, 255, 0.1));
    color: #4926e8;
    font-weight: 600;
}

.cl-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
}
.cl-tab__thumb {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: #f0f0f0;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(73, 38, 232, 0.18);
}
[class*="b-cluster-tabs__menu-item_current_yes"] .cl-tab__thumb {
    border-color: #4926e8;
    box-shadow: 0 2px 8px rgba(73, 38, 232, 0.35);
}
.cl-tab__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cl-tab__name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Reset Yandex's default padding inside the cluster content / single-point balloon */
[class*="b-cluster-content__body"],
[class*="b-cluster-tabs__item-body"],
[class*="b-balloon__content"] > ymaps {
    padding: 0 !important;
}

/* Card shown inside a cluster popup or a single-point balloon */
.cl-card {
    display: block;
    width: 260px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.3;
}
.cl-card__photo {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #f0f0f0;
    overflow: hidden;
    text-decoration: none;
}
.cl-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.cl-card__photo:hover img {
    transform: scale(1.04);
}
.cl-card__photo::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.45), transparent);
    pointer-events: none;
}
.cl-card__price {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 11px;
    background: linear-gradient(91.2deg, #4926e8 .29%, #2dc8ff 112.3%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.2px;
    border-radius: 20px;
    box-shadow: 0 3px 10px rgba(73, 38, 232, 0.35);
    z-index: 2;
}
.cl-card__body {
    padding: 12px 14px 14px;
}
.cl-card__name {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cl-card__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 11px 14px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: pointer;
}
.cl-card__btn svg {
    flex-shrink: 0;
    transition: transform 0.15s;
}
.cl-card__btn--more {
    background: linear-gradient(91.2deg, #4926e8 .29%, #2dc8ff 112.3%);
    color: #fff;
}
.cl-card__btn--more:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(73, 38, 232, 0.35);
    color: #fff;
}
.cl-card__btn--more:hover svg {
    transform: translateX(2px);
}
