.dealer-map-section,
.dealer-map-section * {
    box-sizing: border-box;
}

.dealer-map-section {
    --dealer-blue: #087a93;
    --dealer-blue-deep: #075b70;
    --dealer-cyan: #20a9b7;
    --dealer-ink: #18323b;
    --dealer-muted: #637982;
    --dealer-line: #d5e6e9;
    position: relative;
    width: calc(100% - 40px);
    max-width: 1400px;
    margin: 88px auto 82px;
    scroll-margin-top: 100px;
    color: var(--dealer-ink);
}

.dealer-map-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 24px;
}

.dealer-map-heading h2,
.dealer-map-heading p {
    margin: 0;
}

.dealer-map-eyebrow {
    display: block;
    margin-bottom: 8px;
    color: var(--dealer-blue);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .18em;
}

.dealer-map-heading h2 {
    color: #173640;
    font-size: clamp(28px, 3vw, 44px);
    font-weight: 500;
    line-height: 1.2;
}

.dealer-map-heading p {
    margin-top: 10px;
    color: var(--dealer-muted);
    font-size: 16px;
    line-height: 1.7;
}

.dealer-map-directory-link {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid rgba(8, 122, 147, .3);
    border-radius: 24px;
    color: var(--dealer-blue-deep);
    background: rgba(255, 255, 255, .76);
    font-size: 14px;
    text-decoration: none;
    transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}

.dealer-map-directory-link:hover,
.dealer-map-directory-link:focus-visible {
    border-color: var(--dealer-blue);
    color: #fff;
    background: var(--dealer-blue);
    text-decoration: none;
    outline: none;
}

.dealer-map-panel {
    position: relative;
    overflow: visible;
    padding: 18px;
    border: 1px solid rgba(105, 164, 176, .28);
    border-radius: 22px;
    background:
        radial-gradient(circle at 17% 12%, rgba(116, 205, 214, .17), transparent 27%),
        linear-gradient(145deg, #f9fdfd 0%, #eef7f8 100%);
    box-shadow: 0 26px 65px rgba(28, 84, 96, .13), 0 3px 10px rgba(28, 84, 96, .06);
}

.dealer-map-panel::before {
    position: absolute;
    z-index: -1;
    right: 3.5%;
    bottom: -12px;
    left: 3.5%;
    height: 30px;
    border-radius: 50%;
    background: rgba(29, 93, 105, .13);
    filter: blur(16px);
    content: "";
}

.dealer-map-toolbar {
    position: relative;
    z-index: 8;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 2px 2px 14px;
}

.dealer-map-search {
    position: relative;
    width: min(390px, 100%);
}

.dealer-map-search > label {
    display: block;
    margin-bottom: 7px;
    color: #3c5e67;
    font-size: 13px;
    font-weight: 600;
}

.dealer-map-search-control {
    position: relative;
}

.dealer-map-search-control > span {
    position: absolute;
    top: 50%;
    right: 16px;
    width: 13px;
    height: 13px;
    border: 2px solid #4d8c9b;
    border-radius: 50%;
    pointer-events: none;
    transform: translateY(-62%);
}

.dealer-map-search-control > span::after {
    position: absolute;
    right: -5px;
    bottom: -4px;
    width: 6px;
    height: 2px;
    border-radius: 1px;
    background: #4d8c9b;
    content: "";
    transform: rotate(45deg);
}

.dealer-map-search input {
    display: block;
    width: 100%;
    height: 46px;
    padding: 0 44px 0 15px;
    border: 1px solid #c9e0e4;
    border-radius: 10px;
    color: #173640;
    background: rgba(255, 255, 255, .95);
    font: inherit;
    font-size: 15px;
    box-shadow: 0 5px 16px rgba(45, 103, 114, .06);
    outline: none;
}

.dealer-map-search input:focus {
    border-color: var(--dealer-cyan);
    box-shadow: 0 0 0 3px rgba(32, 169, 183, .13);
}

.dealer-map-search-results {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    left: 0;
    z-index: 30;
    max-height: 290px;
    margin: 0;
    padding: 7px;
    overflow-y: auto;
    border: 1px solid #cde0e4;
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(23, 77, 89, .16);
    list-style: none;
}

.dealer-map-search-results[hidden] {
    display: none;
}

.dealer-map-search-results button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 42px;
    padding: 7px 10px;
    border: 0;
    border-radius: 7px;
    color: #24434b;
    background: transparent;
    font: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}

.dealer-map-search-results button:hover,
.dealer-map-search-results button:focus-visible {
    color: var(--dealer-blue-deep);
    background: #eaf6f7;
    outline: none;
}

.dealer-map-search-results small {
    flex: none;
    color: #72878d;
    font-size: 12px;
}

.dealer-map-search-results .dealer-map-no-result {
    padding: 12px 10px;
    color: #6a7c82;
    font-size: 14px;
}

.dealer-map-zoom {
    display: flex;
    overflow: hidden;
    border: 1px solid #c9e0e4;
    border-radius: 10px;
    background: rgba(255, 255, 255, .93);
    box-shadow: 0 5px 16px rgba(45, 103, 114, .06);
}

.dealer-map-zoom button {
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border: 0;
    border-right: 1px solid #dbe9eb;
    color: #285a66;
    background: transparent;
    font: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.dealer-map-zoom button:last-child {
    border-right: 0;
}

.dealer-map-zoom button:hover,
.dealer-map-zoom button:focus-visible {
    color: #fff;
    background: var(--dealer-blue);
    outline: none;
}

.dealer-map-zoom button:disabled {
    color: #9eb0b5;
    background: #f2f7f8;
    cursor: default;
}

.dealer-map-zoom-reset {
    font-size: 13px !important;
}

.dealer-map-status {
    min-height: 24px;
    padding: 0 3px 12px;
    color: #587079;
    font-size: 13px;
    line-height: 1.6;
}

.dealer-map-status.is-error {
    color: #9d493d;
}

.dealer-map-viewport {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1200 / 850;
    overflow: auto;
    border: 1px solid rgba(101, 164, 176, .22);
    border-radius: 15px;
    background:
        linear-gradient(rgba(255, 255, 255, .34) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .34) 1px, transparent 1px),
        linear-gradient(145deg, #dff1f3, #f5fbfb 63%, #e7f3f4);
    background-size: 42px 42px, 42px 42px, auto;
    box-shadow: inset 0 1px 0 #fff, inset 0 -18px 35px rgba(72, 138, 150, .07);
    overscroll-behavior: auto;
    -webkit-overflow-scrolling: touch;
}

.dealer-map-viewport:focus-visible {
    outline: 3px solid rgba(32, 169, 183, .35);
    outline-offset: 3px;
}

.dealer-map-viewport.can-drag { cursor: grab; overscroll-behavior: contain; }
.dealer-map-viewport.is-dragging { cursor: grabbing; user-select: none; }

.dealer-map-labels {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.dealer-map-canvas {
    position: relative;
    width: 100%;
    min-width: 100%;
    aspect-ratio: 1200 / 850;
    overflow: hidden;
    transform-origin: 0 0;
}

.dealer-map-image {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: saturate(.94);
    pointer-events: none;
    user-select: none;
}

.dealer-map-brand {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    fill: #266773;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    font-size: 30px;
    font-weight: 600;
    letter-spacing: 2px;
    pointer-events: none;
    user-select: none;
}

.dealer-map-markers {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
}

.dealer-map-marker {
    position: absolute;
    width: 9px;
    height: 9px;
    margin: -4.5px 0 0 -4.5px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--dealer-blue);
    box-shadow: 0 1px 4px rgba(4, 73, 88, .4);
    cursor: pointer;
    pointer-events: auto;
    transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.dealer-map-marker::after {
    position: absolute;
    inset: -8px;
    border: 1px solid transparent;
    border-radius: 50%;
    content: "";
    opacity: 0;
    transition: border-color .18s ease, opacity .18s ease;
}

.dealer-map-marker:hover,
.dealer-map-marker:focus-visible,
.dealer-map-marker[aria-expanded="true"] {
    z-index: 8;
    background: #de8b3b;
    box-shadow: 0 2px 7px rgba(116, 67, 19, .38), 0 0 0 4px rgba(222, 139, 59, .16);
    outline: none;
    transform: scale(1.55);
}

.dealer-map-marker:hover::after,
.dealer-map-marker:focus-visible::after,
.dealer-map-marker[aria-expanded="true"]::after {
    border-color: rgba(222, 139, 59, .38);
    opacity: 1;
}

.dealer-map-marker-label {
    position: absolute;
    left: 50%;
    margin-top: 12px;
    display: block;
    width: max-content;
    padding: 2px 3px;
    border-radius: 3px;
    color: #2a5963;
    background: rgba(255, 255, 255, .78);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 3px 8px rgba(30, 83, 94, .08);
    transform: translateX(-50%);
    pointer-events: none;
}

.dealer-map-marker-label.is-active { z-index: 1; background: #fff4df; color: #854c1c; }

.dealer-map-card {
    position: absolute;
    z-index: 20;
    width: min(310px, calc(100% - 28px));
    padding: 18px;
    border: 1px solid rgba(83, 147, 159, .35);
    border-radius: 13px;
    color: #25434b;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 18px 44px rgba(19, 73, 84, .22);
    overflow-y: auto;
    transform: none;
}

.dealer-map-card[hidden] {
    display: none;
}

.dealer-map-card > strong {
    display: block;
    padding-right: 24px;
    color: #153f4a;
    font-size: 18px;
    line-height: 1.35;
}

.dealer-map-card-count {
    display: block;
    margin: 4px 0 12px;
    color: #74878d;
    font-size: 12px;
}

.dealer-map-card-links {
    display: grid;
    gap: 7px;
}

.dealer-map-card-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 40px;
    padding: 8px 10px;
    border-radius: 7px;
    color: #1d5f6e;
    background: #edf7f8;
    font-size: 13px;
    line-height: 1.45;
    text-decoration: none;
}

.dealer-map-card-links a::after {
    flex: none;
    content: "→";
}

.dealer-map-card-links a:hover,
.dealer-map-card-links a:focus-visible {
    color: #fff;
    background: var(--dealer-blue);
    text-decoration: none;
    outline: none;
}

.dealer-map-card-close {
    position: absolute;
    top: 9px;
    right: 9px;
    display: none;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #567178;
    background: #edf4f5;
    font: inherit;
    font-size: 20px;
    line-height: 28px;
    cursor: pointer;
}

.dealer-map-card.is-locked .dealer-map-card-close {
    display: block;
}

.dealer-map-card-close:hover,
.dealer-map-card-close:focus-visible {
    color: #fff;
    background: var(--dealer-blue);
    outline: none;
}

.dealer-map-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px 18px;
    padding: 18px 20px 3px;
    text-align: center;
}

.dealer-map-empty[hidden] {
    display: none;
}

.dealer-map-empty strong {
    color: #235b67;
    font-size: 17px;
}

.dealer-map-empty span {
    color: #71868c;
    font-size: 13px;
}

.dealer-map-noscript {
    margin: 14px 2px 0;
    color: #6b7e84;
    font-size: 13px;
    text-align: center;
}

.dealer-map-noscript a {
    color: var(--dealer-blue-deep);
}

@media (max-width: 767px) {
    .dealer-map-section {
        width: calc(100% - 24px);
        margin: 54px auto 50px;
        scroll-margin-top: 80px;
    }

    .dealer-map-heading {
        display: block;
        margin-bottom: 18px;
    }

    .dealer-map-heading h2 {
        font-size: 28px;
    }

    .dealer-map-heading p {
        font-size: 14px;
    }

    .dealer-map-directory-link {
        margin-top: 15px;
    }

    .dealer-map-panel {
        padding: 10px;
        border-radius: 15px;
    }

    .dealer-map-toolbar {
        align-items: stretch;
        gap: 9px;
    }

    .dealer-map-search {
        min-width: 0;
    }

    .dealer-map-search > label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .dealer-map-search input {
        height: 42px;
        padding-left: 12px;
        font-size: 14px;
    }

    .dealer-map-zoom {
        flex: none;
    }

    .dealer-map-zoom button {
        min-width: 38px;
        height: 40px;
        padding: 0 8px;
    }

    .dealer-map-zoom-reset {
        display: none;
    }

    .dealer-map-status {
        padding-top: 2px;
        font-size: 12px;
    }

    .dealer-map-marker-label {
        margin-top: 8px;
        padding: 1px 2px;
        font-size: 10px;
    }

    .dealer-map-marker {
        width: 6px;
        height: 6px;
        margin: -3px 0 0 -3px;
        border-width: 1px;
        box-shadow: 0 1px 3px rgba(4, 73, 88, .38);
    }

    .dealer-map-marker:hover,
    .dealer-map-marker:focus-visible,
    .dealer-map-marker[aria-expanded="true"] {
        box-shadow: 0 2px 6px rgba(116, 67, 19, .38), 0 0 0 3px rgba(222, 139, 59, .14);
        transform: scale(1.65);
    }

    .dealer-map-card {
        width: min(270px, calc(100% - 20px));
        padding: 15px;
    }

    .dealer-map-card.is-mobile-sheet {
        position: relative;
        inset: auto !important;
        width: 100%;
        max-height: min(42vh, 310px);
        margin-top: 10px;
        overflow-y: auto;
        border-radius: 11px;
        box-shadow: 0 10px 28px rgba(19, 73, 84, .16);
        transform: none;
    }

    .dealer-map-card.is-mobile-sheet .dealer-map-card-close {
        position: sticky;
        z-index: 2;
        top: 0;
        float: right;
    }

    .dealer-map-empty {
        display: block;
        padding-bottom: 7px;
    }

    .dealer-map-empty strong,
    .dealer-map-empty span {
        display: block;
    }

    .dealer-map-empty span {
        margin-top: 5px;
        line-height: 1.6;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dealer-map-section *,
    .dealer-map-section *::before,
    .dealer-map-section *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
