/* Сервисные центры: карта с фильтрами (в стилистике сайта, нейтральные оттенки) */
.scm {
    margin: 0 0 48px;
    font-size: 16px;
    line-height: 1.5;
}

/* Шапка (заголовок + фильтры + текст) — в контентной ширине сайта */
.scm__head {
    padding: 40px var(--layout-side-padding, 120px) 8px;
}

/* Заголовок — как .guarantee-block__title */
.scm__title {
    font-family: var(--desktop-h2-font-family, "CoFoWeather", Helvetica, sans-serif);
    font-weight: var(--desktop-h2-font-weight, 700);
    font-size: var(--desktop-h2-font-size, 40px);
    line-height: var(--desktop-h2-line-height, 1.2);
    letter-spacing: var(--desktop-h2-letter-spacing, 0);
    color: var(--gray-scaleblack, #222);
    margin: 0 0 40px 0;
}

.scm__filters {
    display: grid;
    gap: 12px;
    margin-bottom: 12px;
}

/* Кастомные селекты — светло-серые плашки как на макете */
.scm__select {
    position: relative;
    margin: 0;
}

.scm__select-btn {
    position: relative;
    width: 100%;
    display: block;
    border: 0;
    border-radius: 4px;
    background-color: #f1f1f1;
    padding: 22px 56px 22px 28px;
    font-size: 18px;
    line-height: 1.3;
    color: #222;
    text-align: left;
    cursor: pointer;
}

.scm__select-btn::after {
    content: "";
    position: absolute;
    right: 28px;
    top: 50%;
    width: 14px;
    height: 14px;
    border-right: 2px solid #222;
    border-bottom: 2px solid #222;
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.15s ease;
}

.scm__select.is-open .scm__select-btn::after {
    transform: translateY(-30%) rotate(225deg);
}

.scm__select-btn:focus-visible {
    outline: 2px solid var(--primarygreen, #046548);
    outline-offset: 2px;
}

.scm__select-btn:disabled {
    opacity: 0.55;
    cursor: default;
}

.scm__select.is-open {
    z-index: 2000;
}

.scm__dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 2000;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.scm__search {
    padding: 8px;
    border-bottom: 1px solid #e6e6e6;
}

.scm__search input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #8a8a8a;
    border-radius: 2px;
    padding: 10px 14px;
    font-size: 16px;
    color: #222;
    background: #fff;
}

.scm__search input:focus {
    outline: 2px solid var(--primarygreen, #046548);
    outline-offset: -1px;
}

.scm__options {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 320px;
    overflow-y: auto;
}

.scm__options li {
    padding: 16px 28px;
    font-size: 17px;
    cursor: pointer;
}

.scm__options li:hover,
.scm__options li.is-hl {
    background: #f1f1f1;
}

.scm__options li.is-selected {
    background: var(--primarygreen, #046548);
    color: #fff;
}

.scm__options li.is-hidden {
    display: none;
}

.scm__options li.is-disabled {
    color: #8a8a8a;
    cursor: default;
}

.scm__options li.is-disabled:hover {
    background: none;
}

/* Бренды — кнопки в ряд */
.scm__brands {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.scm__brand {
    border: 0;
    border-radius: 4px;
    background: #f1f1f1;
    padding: 20px 12px;
    font-size: 20px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #222;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.scm__brand:hover {
    background: #e4e4e4;
}

.scm__brand.is-active {
    background: #4f4f4f;
    color: #fff;
}

.scm__brand:focus-visible {
    outline: 2px solid var(--primarygreen, #046548);
    outline-offset: 2px;
}

/* Суббренды — второй ряд, компактнее */
.scm__brands--sub {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    margin-top: -12px;
}

.scm__brand--sub {
    padding: 12px 8px;
    font-size: 15px;
    background: #fff;
    box-shadow: inset 0 0 0 1px #d9d9d9;
}

.scm__brand--sub:hover {
    background: #f1f1f1;
}

.scm__brand--sub.is-active {
    background: var(--primarygreen, #046548);
    color: #fff;
}

.scm-card__sub--small {
    margin: -8px 0 16px;
    font-size: 14px;
    color: #555;
}

.scm__note {
    margin: 0 0 24px;
}

/* Карта + список — с теми же боковыми отступами, что у фильтров */
.scm__body {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(300px, 4fr);
    gap: 0;
    margin-top: 16px;
    margin-left: var(--layout-side-padding, 120px);
    margin-right: var(--layout-side-padding, 120px);
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    overflow: hidden;
}

.scm__map {
    position: relative;
    min-height: 560px;
    background: #dfe9ef;
}

/* Плашка со счетчиком и сбросом поверх карты */
.scm__map-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 24px;
    padding: 8px 8px 8px 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    font-size: 14px;
    line-height: 1.3;
    max-width: calc(100% - 24px);
}

.scm__count {
    color: #333;
    white-space: nowrap;
}

.scm__reset {
    border: 0;
    border-radius: 18px;
    background: var(--primarygreen, #046548);
    padding: 8px 18px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.scm__reset:hover {
    background: #034a2e;
}

.scm__reset:focus-visible {
    outline: 2px solid var(--primarygreen, #046548);
    outline-offset: 2px;
}

.scm__sidebar {
    background: #fafafa;
    max-height: 560px;
    overflow-y: auto;
}

.scm__list {
    display: flex;
    flex-direction: column;
}

/* Карточка как на маке: заголовок, подзаголовок, разделитель, АДРЕС / КОНТАКТЫ */
.scm-card {
    padding: 28px 28px 32px;
    border-bottom: 1px solid #e6e6e6;
    background: #fff;
    cursor: pointer;
}

.scm-card:hover {
    background: #f7faf9;
}

.scm-card.is-active {
    background: #eef6f2;
    box-shadow: inset 4px 0 0 var(--primarygreen, #046548);
}

.scm-card h3 {
    margin: 0 0 8px;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 400;
}

.scm-card__sub {
    margin: 0 0 16px;
    font-size: 18px;
}

.scm-card__hr {
    border: 0;
    border-top: 1px solid #cfcfcf;
    margin: 0 0 20px;
}

.scm-card__label {
    margin: 20px 0 8px;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8a8a8a;
}

.scm-card p {
    margin: 0;
}

.scm-card a {
    color: inherit;
    text-decoration: none;
    display: block;
}

.scm-card a:hover {
    text-decoration: underline;
}

.scm-card__empty {
    color: #8a8a8a;
    font-size: 14px;
}

.scm__empty {
    padding: 40px 28px;
    color: #666;
}

/* Балун на карте — в стиле карточек списка */
.scm-balloon {
    min-width: 240px;
    max-width: 320px;
    font-size: 15px;
    line-height: 1.45;
    color: #222;
}

.scm-balloon__title {
    margin: 0 0 4px;
    padding-right: 24px;
    font-size: 22px;
    line-height: 1.2;
}

.scm-balloon__brand {
    margin: 0 0 4px;
    padding-bottom: 0;
    font-size: 15px;
    color: var(--primarygreen, #046548);
}

.scm-balloon__sub {
    margin: 0 0 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #cfcfcf;
    font-size: 13px;
    color: #555;
}

.scm-balloon__label {
    margin: 12px 0 4px;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8a8a8a;
}

.scm-balloon__addr {
    margin: 0;
}

.scm-balloon__link {
    display: block;
    color: #222;
    text-decoration: none;
}

.scm-balloon__link:hover {
    text-decoration: underline;
}

.scm-balloon__time {
    margin-top: 4px;
    color: #555;
}

/* Кастомные кластеры — брендовый зелёный */
.scm-cluster {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primarygreen, #046548);
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    line-height: 46px;
    text-align: center;
    cursor: pointer;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

@media (max-width: 950px) {
    .scm__head {
        padding-top: 24px;
    }

    .scm__title {
        font-size: 28px;
        margin-bottom: 24px;
    }

    .scm__body {
        grid-template-columns: 1fr;
    }

    .scm__map {
        min-height: 380px;
    }

    .scm__sidebar {
        max-height: 420px;
    }

    .scm__brand {
        font-size: 16px;
        padding: 14px 8px;
    }

    .scm__select-btn {
        padding: 16px 48px 16px 18px;
        font-size: 16px;
    }

    .scm__options li {
        padding: 12px 18px;
        font-size: 15px;
    }

    .scm-card h3 {
        font-size: 22px;
    }

    .scm__map-badge {
        font-size: 12px;
        padding: 6px 6px 6px 14px;
        gap: 8px;
    }

    .scm__reset {
        padding: 6px 14px;
        font-size: 12px;
    }
}
