/* Autos Esquivel — localizador de sucursales premium. */

.ae-contact-map {
    margin: 22px 0 clamp(68px, 7vw, 110px);
}

.ae-contact-map__shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--contact-border);
    border-radius: 28px;
    background: var(--contact-panel);
    box-shadow: var(--contact-shadow);
}

.ae-contact-map__topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 82px;
    padding: 18px 20px 18px 24px;
    border-bottom: 1px solid var(--contact-border);
    background: var(--contact-panel);
}

.ae-contact-map__topbar-copy {
    min-width: 0;
}

.ae-contact-map__topbar-copy span {
    display: block;
    margin-bottom: 5px;
    color: var(--contact-muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.ae-contact-map__topbar-copy strong {
    display: block;
    overflow: hidden;
    color: var(--contact-text);
    font-family: var(--contact-font-display);
    font-size: clamp(18px, 2vw, 25px);
    font-weight: 580;
    letter-spacing: -.025em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ae-contact-map__toolbar {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 0 0 auto;
}

.ae-contact-map__tool {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--contact-border);
    border-radius: 13px;
    background: var(--contact-input);
    color: var(--contact-soft);
    font: inherit;
    font-size: 11px;
    font-weight: 650;
    cursor: pointer;
    transition: border-color 180ms ease, color 180ms ease, transform 180ms ease, background 180ms ease;
}

.ae-contact-map__tool:hover,
.ae-contact-map__tool:focus-visible {
    transform: translateY(-1px);
    border-color: var(--contact-border-strong);
    background: var(--contact-panel-strong);
    color: var(--contact-text);
    outline: none;
}

.ae-contact-map__tool svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.ae-contact-map__main {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(330px, .58fr);
    min-height: 620px;
}

.ae-contact-map__canvas-wrap {
    position: relative;
    min-width: 0;
    min-height: 620px;
    overflow: hidden;
    background: #0a0b0d;
}

html[data-theme="light"] .ae-contact-map__canvas-wrap {
    background: #e7e9ed;
}

.ae-contact-map__canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.ae-contact-map__canvas.leaflet-container {
    width: 100%;
    height: 100%;
    background: #0a0b0d;
    font-family: var(--contact-font-text);
}

html[data-theme="light"] .ae-contact-map__canvas.leaflet-container {
    background: #e7e9ed;
}

.ae-contact-map__canvas .leaflet-tile-pane {
    filter: grayscale(1) contrast(1.04) saturate(.15);
}

html:not([data-theme="light"]) .ae-contact-map__canvas .leaflet-tile-pane {
    opacity: .92;
}

.ae-contact-map__canvas .leaflet-control-zoom {
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 13px;
    box-shadow: 0 14px 30px rgba(0,0,0,.24);
}

.ae-contact-map__canvas .leaflet-control-zoom a {
    width: 40px;
    height: 40px;
    border: 0;
    border-bottom: 1px solid rgba(255,255,255,.10);
    background: rgba(8,9,11,.94);
    color: #f6f7f8;
    font-size: 20px;
    line-height: 40px;
}

.ae-contact-map__canvas .leaflet-control-zoom a:last-child {
    border-bottom: 0;
}

html[data-theme="light"] .ae-contact-map__canvas .leaflet-control-zoom {
    border-color: rgba(16,17,19,.14);
    box-shadow: 0 12px 28px rgba(20,22,26,.12);
}

html[data-theme="light"] .ae-contact-map__canvas .leaflet-control-zoom a {
    border-bottom-color: rgba(16,17,19,.10);
    background: rgba(255,255,255,.96);
    color: #111214;
}

.ae-contact-map__canvas .leaflet-control-attribution {
    padding: 3px 7px;
    background: rgba(8,9,11,.72);
    color: rgba(255,255,255,.5);
    font-size: 8px;
}

.ae-contact-map__canvas .leaflet-control-attribution a {
    color: rgba(255,255,255,.7);
}

html[data-theme="light"] .ae-contact-map__canvas .leaflet-control-attribution {
    background: rgba(255,255,255,.82);
    color: #74777d;
}

html[data-theme="light"] .ae-contact-map__canvas .leaflet-control-attribution a {
    color: #4c5057;
}

.ae-contact-map__floating-label {
    position: absolute;
    top: 18px;
    left: 74px;
    z-index: 600;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    max-width: calc(100% - 98px);
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 12px;
    background: rgba(8,9,11,.88);
    color: rgba(255,255,255,.82);
    box-shadow: 0 14px 35px rgba(0,0,0,.2);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    font-size: 10px;
    font-weight: 650;
    pointer-events: none;
}

.ae-contact-map__floating-label::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 5px rgba(255,255,255,.08);
}

html[data-theme="light"] .ae-contact-map__floating-label {
    border-color: rgba(16,17,19,.13);
    background: rgba(255,255,255,.9);
    color: #34373c;
    box-shadow: 0 14px 35px rgba(20,22,26,.10);
}

html[data-theme="light"] .ae-contact-map__floating-label::before {
    background: #151619;
    box-shadow: 0 0 0 5px rgba(16,17,19,.07);
}

.ae-contact-map__tabs {
    position: absolute;
    right: 18px;
    bottom: 18px;
    left: 18px;
    z-index: 600;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    pointer-events: none;
}

.ae-contact-map__tab {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 13px;
    background: rgba(8,9,11,.88);
    color: rgba(255,255,255,.72);
    font: inherit;
    font-size: 10px;
    font-weight: 650;
    box-shadow: 0 12px 30px rgba(0,0,0,.18);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    cursor: pointer;
    pointer-events: auto;
    transition: transform 180ms ease, border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.ae-contact-map__tab:hover,
.ae-contact-map__tab:focus-visible,
.ae-contact-map__tab.is-active {
    transform: translateY(-1px);
    border-color: rgba(255,255,255,.5);
    background: rgba(18,19,22,.95);
    color: #fff;
    outline: none;
}

.ae-contact-map__tab-dot {
    width: 7px;
    height: 7px;
    border: 1px solid currentColor;
    border-radius: 50%;
}

.ae-contact-map__tab.is-active .ae-contact-map__tab-dot {
    border-color: #fff;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255,255,255,.09);
}

html[data-theme="light"] .ae-contact-map__tab {
    border-color: rgba(16,17,19,.12);
    background: rgba(255,255,255,.91);
    color: #5c6067;
    box-shadow: 0 12px 30px rgba(20,22,26,.10);
}

html[data-theme="light"] .ae-contact-map__tab:hover,
html[data-theme="light"] .ae-contact-map__tab:focus-visible,
html[data-theme="light"] .ae-contact-map__tab.is-active {
    border-color: rgba(16,17,19,.35);
    background: #fff;
    color: #111214;
}

.ae-contact-map__sidebar {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-left: 1px solid var(--contact-border);
    background: var(--contact-panel);
}

.ae-contact-map__sidebar-head {
    padding: 24px 24px 18px;
    border-bottom: 1px solid var(--contact-border);
}

.ae-contact-map__sidebar-head span {
    display: block;
    margin-bottom: 6px;
    color: var(--contact-muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.ae-contact-map__sidebar-head strong {
    display: block;
    font-family: var(--contact-font-display);
    font-size: 24px;
    font-weight: 570;
    letter-spacing: -.032em;
}

.ae-contact-map__branch-list {
    display: grid;
    gap: 12px;
    padding: 16px;
    overflow: auto;
}

.ae-contact-map__branch {
    position: relative;
    overflow: hidden;
    padding: 20px;
    border: 1px solid var(--contact-border);
    border-radius: 18px;
    background: var(--contact-input);
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.ae-contact-map__branch.is-active {
    border-color: var(--contact-border-strong);
    background: var(--contact-panel-strong);
}

.ae-contact-map__branch.is-active::before {
    content: "";
    position: absolute;
    top: 0;
    right: 20px;
    left: 20px;
    height: 2px;
    background: var(--contact-text);
}

.ae-contact-map__branch-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.ae-contact-map__branch-status span {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 0 8px;
    border: 1px solid var(--contact-border);
    border-radius: 999px;
    color: var(--contact-muted);
    font-size: 8px;
    font-weight: 750;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.ae-contact-map__branch.is-active .ae-contact-map__branch-status span {
    border-color: var(--contact-border-strong);
    color: var(--contact-text);
}

.ae-contact-map__select-indicator {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border: 1px solid var(--contact-border-strong);
    border-radius: 50%;
    color: transparent;
    font-size: 11px;
}

.ae-contact-map__branch.is-active .ae-contact-map__select-indicator {
    background: var(--contact-text);
    color: var(--contact-bg);
}

.ae-contact-map__branch h3 {
    margin: 0;
    color: var(--contact-text);
    font-family: var(--contact-font-display);
    font-size: 24px;
    font-weight: 590;
    letter-spacing: -.032em;
    line-height: 1;
}

.ae-contact-map__address {
    min-height: 44px;
    margin: 11px 0 0;
    color: var(--contact-soft);
    font-size: 11px;
    line-height: 1.55;
}

.ae-contact-map__meta {
    display: grid;
    gap: 9px;
    margin: 16px 0 0;
    padding: 15px 0;
    border-top: 1px solid var(--contact-border);
    border-bottom: 1px solid var(--contact-border);
}

.ae-contact-map__meta-row {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    color: var(--contact-soft);
    font-size: 10px;
    line-height: 1.45;
}

.ae-contact-map__meta-row svg {
    width: 15px;
    height: 15px;
    margin-top: 1px;
    stroke: var(--contact-muted);
}

.ae-contact-map__meta-row a {
    color: inherit;
    text-decoration: none;
}

.ae-contact-map__meta-row a:hover,
.ae-contact-map__meta-row a:focus-visible {
    color: var(--contact-text);
    outline: none;
}

.ae-contact-map__actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-top: 14px;
}

.ae-contact-map__action {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 8px;
    border: 1px solid var(--contact-border);
    border-radius: 11px;
    background: transparent;
    color: var(--contact-soft);
    text-decoration: none;
    font: inherit;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 170ms ease, color 170ms ease, background 170ms ease, transform 170ms ease;
}

.ae-contact-map__action:hover,
.ae-contact-map__action:focus-visible {
    transform: translateY(-1px);
    border-color: var(--contact-border-strong);
    background: var(--contact-panel);
    color: var(--contact-text);
    outline: none;
}

.ae-contact-map__action svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

.ae-contact-map__choose {
    width: 100%;
    min-height: 43px;
    margin-top: 9px;
    border: 1px solid var(--contact-text);
    border-radius: 11px;
    background: var(--contact-text);
    color: var(--contact-bg);
    font: inherit;
    font-size: 10px;
    font-weight: 760;
    cursor: pointer;
    transition: transform 170ms ease, opacity 170ms ease;
}

.ae-contact-map__choose:hover,
.ae-contact-map__choose:focus-visible {
    transform: translateY(-1px);
    opacity: .9;
    outline: none;
}

.ae-contact-map__empty {
    min-height: 300px;
    display: grid;
    place-items: center;
    padding: 36px;
    color: var(--contact-soft);
    text-align: center;
}

.ae-contact-map__empty strong {
    display: block;
    color: var(--contact-text);
    font-size: 17px;
}

.ae-contact-map__empty p {
    max-width: 430px;
    margin: 9px auto 0;
    font-size: 12px;
    line-height: 1.55;
}

.ae-map-pin {
    position: relative;
    width: 66px;
    height: 78px;
    transform-origin: 50% 100%;
    transition: transform 190ms ease, filter 190ms ease;
}

.ae-map-pin__halo {
    position: absolute;
    left: 50%;
    bottom: 3px;
    width: 34px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,.20);
    filter: blur(10px);
    transform: translateX(-50%);
}

.ae-map-pin__shell {
    position: absolute;
    top: 0;
    left: 50%;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    padding: 8px;
    border: 1px solid rgba(255,255,255,.62);
    border-radius: 18px 18px 18px 5px;
    background: #090a0c;
    box-shadow: 0 14px 32px rgba(0,0,0,.38), 0 0 0 5px rgba(255,255,255,.055);
    transform: translateX(-50%) rotate(-45deg);
}

.ae-map-pin__shell img {
    width: 42px;
    max-height: 36px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    transform: rotate(45deg);
}

.ae-map-pin__tip {
    position: absolute;
    left: 50%;
    bottom: 1px;
    width: 8px;
    height: 8px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #090a0c;
    transform: translateX(-50%);
}

.ae-branch-marker.is-active .ae-map-pin,
.leaflet-marker-icon:hover .ae-map-pin {
    transform: translateY(-4px) scale(1.08);
    filter: drop-shadow(0 12px 18px rgba(255,255,255,.12));
}

.ae-branch-marker.is-active .ae-map-pin__shell {
    border-color: #fff;
    box-shadow: 0 18px 38px rgba(0,0,0,.42), 0 0 0 7px rgba(255,255,255,.08);
}

.ae-user-location {
    width: 18px;
    height: 18px;
    border: 4px solid #fff;
    border-radius: 50%;
    background: #111214;
    box-shadow: 0 0 0 7px rgba(255,255,255,.16), 0 10px 24px rgba(0,0,0,.28);
}

@media (max-width: 1100px) {
    .ae-contact-map__main {
        grid-template-columns: minmax(0, 1fr) 340px;
    }

    .ae-contact-map__canvas-wrap,
    .ae-contact-map__main {
        min-height: 570px;
    }
}

@media (max-width: 900px) {
    .ae-contact-map__topbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .ae-contact-map__toolbar {
        width: 100%;
    }

    .ae-contact-map__tool {
        flex: 1 1 0;
    }

    .ae-contact-map__main {
        display: block;
        min-height: 0;
    }

    .ae-contact-map__canvas-wrap {
        min-height: 520px;
    }

    .ae-contact-map__sidebar {
        border-top: 1px solid var(--contact-border);
        border-left: 0;
    }

    .ae-contact-map__branch-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: visible;
    }
}

@media (max-width: 640px) {
    .ae-contact-map__shell {
        border-radius: 20px;
    }

    .ae-contact-map__topbar {
        min-height: 0;
        padding: 18px;
    }

    .ae-contact-map__toolbar {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .ae-contact-map__tool {
        padding-inline: 9px;
        font-size: 9px;
    }

    .ae-contact-map__canvas-wrap {
        min-height: 460px;
    }

    .ae-contact-map__floating-label {
        top: 14px;
        left: 62px;
        max-width: calc(100% - 76px);
        min-height: 34px;
        font-size: 9px;
    }

    .ae-contact-map__tabs {
        right: 12px;
        bottom: 12px;
        left: 12px;
        gap: 6px;
    }

    .ae-contact-map__tab {
        min-height: 38px;
        padding: 0 11px;
        font-size: 9px;
    }

    .ae-contact-map__sidebar-head {
        padding: 20px 18px 15px;
    }

    .ae-contact-map__branch-list {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .ae-contact-map__branch {
        padding: 18px;
    }

    .ae-contact-map__actions {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .ae-map-pin {
        width: 58px;
        height: 70px;
    }

    .ae-map-pin__shell {
        width: 50px;
        height: 50px;
        border-radius: 16px 16px 16px 5px;
    }

    .ae-map-pin__shell img {
        width: 36px;
        max-height: 31px;
    }
}

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