.nearby-map-pin {
    position: absolute;
    display: grid;
    place-items: center;
    width: 56px;
    height: 64px;
    padding: 0 0 10px;
    border: 0;
    background: transparent;
    cursor: pointer;
    transform: translate(-50%, -100%);
    overflow: visible;
    -webkit-tap-highlight-color: transparent;
}

.nearby-map-pin::before {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 22px;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: 3px 3px 5px rgb(15 23 42 / 14%);
}

.nearby-map-pin__face {
    position: relative;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: 54px;
    height: 54px;
    padding: 6px;
    border: 3px solid #fff;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 3px 12px rgb(15 23 42 / 22%), 0 0 0 1px rgb(15 23 42 / 8%);
    transition: box-shadow .18s ease;
}

.nearby-map-pin__logo {
    position: absolute;
    inset: 4px;
    width: calc(100% - 8px);
    height: calc(100% - 8px);
    max-width: none;
    object-fit: contain;
    border-radius: 9px;
}

.nearby-map-pin__initial {
    color: #25475d;
    font: 700 22px/1 system-ui, sans-serif;
}

.nearby-map-pin__initial[hidden] { display: none; }

.nearby-map-pin__label {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    max-width: 180px;
    padding: 7px 10px;
    border-radius: 8px;
    background: #172d3d;
    color: #fff;
    font: 600 12px/1.4 system-ui, sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 3px 10px rgb(15 23 42 / 18%);
    transform: translateX(-50%);
    visibility: hidden;
    pointer-events: none;
}

.nearby-map-pin:hover,
.nearby-map-pin:focus-visible { z-index: 1000; }
.nearby-map-pin:hover .nearby-map-pin__label,
.nearby-map-pin:focus-visible .nearby-map-pin__label { visibility: visible; }
.nearby-map-pin:hover .nearby-map-pin__face,
.nearby-map-pin:focus-visible .nearby-map-pin__face {
    box-shadow: 0 0 0 3px #2563eb, 0 5px 16px rgb(15 23 42 / 24%);
}
.nearby-map-pin:focus-visible { outline: none; }

@media (prefers-reduced-motion: reduce) {
    .nearby-map-pin__face { transition: none; }
}

dialog.nearby-store-profile::backdrop {
    background: rgb(15 23 42 / 38%);
    backdrop-filter: blur(3px);
}

dialog.nearby-store-profile {
    position: fixed;
    inset: 0;
    box-sizing: border-box;
    width: min(560px, calc(100% - 32px));
    max-height: calc(100dvh - 40px);
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 24px;
    background: #fff;
    color: #182b3a;
    box-shadow: 0 24px 80px rgb(0 0 0 / 28%);
    overflow: auto;
    overscroll-behavior: contain;
    font: 400 14px/1.6 system-ui, sans-serif;
}
.nearby-store-profile__cover { position: relative; height: 200px; background: linear-gradient(130deg, #16384c, #639092); }
.nearby-store-profile__cover-image { display: block; width: 100%; height: 100%; }
.nearby-store-profile__close {
    position: absolute; top: 14px; right: 14px; display: grid; place-items: center;
    width: 42px; height: 42px; padding: 0; border: 1px solid #e2e8f0;
    border-radius: 50%; background: #fff; color: #182b3a; font: 28px/1 system-ui;
    box-shadow: 0 2px 12px #0002; cursor: pointer;
}
.nearby-store-profile__content { position: relative; padding: 0 28px 24px; }
.nearby-store-profile__avatar {
    position: relative; display: grid; place-items: center; width: 88px; height: 88px;
    margin-top: -44px; margin-bottom: 16px; border: 0; border-radius: 50%;
    background: transparent; color: #25475d; box-shadow: none;
    overflow: hidden; font-size: 30px; font-weight: 700;
}
.nearby-store-profile__avatar img { width: 100%; height: 100%; padding: 0; border: 0; border-radius: 50%; background: transparent; box-shadow: none; box-sizing: border-box; object-fit: contain; }
.nearby-store-profile__name { margin: 0; font: 750 clamp(22px, 4vw, 28px)/1.2 system-ui; letter-spacing: -.6px; overflow-wrap: anywhere; }
.nearby-store-profile__tagline { margin: 8px 0 0; color: #64748b; font-size: 15px; }
.nearby-store-profile__gallery {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-bottom: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: #b5c5d0 transparent;
    border-radius: 14px;
}
.nearby-store-profile__photo {
    display: block;
    flex: 0 0 86%;
    width: 86%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 14px;
    scroll-snap-align: start;
    background: #f1f5f9;
}
.nearby-store-profile__photo:only-child { flex-basis: 100%; width: 100%; }
.nearby-store-profile__gallery:focus-visible { outline: 3px solid #3580df; outline-offset: 3px; }
.nearby-store-profile__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 16px 0 10px; color: #64748b; font-size: 13px; }
.nearby-store-profile__status { padding: 4px 10px; background: #f1f5f9; color: #334155; border-radius: 8px; font-weight: 600; }
.nearby-store-profile__rating { display: inline-block; margin: 4px 0 0; color: #325b76; font-weight: 600; text-decoration: none; }
.nearby-store-profile__section-title { margin: 24px 0 8px; font-size: 14px; font-weight: 700; }
.nearby-store-profile__description,.nearby-store-profile__address { margin: 0; color: #526475; line-height: 1.7; }
.nearby-store-profile__arrival { margin-top: 20px; }
.nearby-store-profile__arrival .wa-arrival { margin: 0; }
.nearby-store-profile__arrival summary { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 14px; box-sizing: border-box; border-radius: 12px; background: #edf4f7; color: #193e54; cursor: pointer; font-weight: 650; list-style: none; }
.nearby-store-profile__arrival summary::-webkit-details-marker { display: none; }
.nearby-store-profile__arrival .wa-arrival__icon,.nearby-store-profile__arrival .wa-arrival__chevron { display: inline-flex; }
.nearby-store-profile__arrival .wa-arrival__chevron { margin-left: auto; transform: rotate(90deg); }
.nearby-store-profile__arrival details[open] .wa-arrival__chevron { transform: rotate(-90deg); }
.nearby-store-profile__arrival .wa-arrival__content { padding: 14px 0 0; }
.nearby-store-profile__arrival .wa-arrival__address { margin: 0 0 12px; color: #526475; }
.nearby-store-profile__arrival .wa-arrival__street,.nearby-store-profile__arrival .wa-arrival__place { display: block; }
.nearby-store-profile__arrival .wa-arrival__options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.nearby-store-profile__arrival .wa-arrival__choice { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid #dce5eb; border-radius: 12px; color: #193e54; text-decoration: none; }
.nearby-store-profile__arrival .wa-arrival__choice:hover { background: #f1f5f9; }
.nearby-store-profile__arrival .wa-arrival__choice svg { flex-shrink: 0; }
.nearby-store-profile__arrival .wa-arrival__choice strong,.nearby-store-profile__arrival .wa-arrival__choice small { display: block; }
.nearby-store-profile__arrival .wa-arrival__choice small { color: #64748b; font-size: 12px; }
.nearby-store-profile__footer { padding: 18px 28px; border-top: 1px solid #e8edf1; background: #fff; }
.nearby-store-profile__visit,.nearby-store-profile__return {
    display: flex; align-items: center; justify-content: center; box-sizing: border-box;
    width: 100%; min-height: 46px; padding: 10px 16px; border: 0; border-radius: 12px;
    font: 600 14px/1.5 system-ui; text-align: center; cursor: pointer; text-decoration: none;
}
.nearby-store-profile__visit { background: #193e54; color: #fff; }
.nearby-store-profile__visit:hover { background: #25536c; color: #fff; }
.nearby-store-profile__return { margin-top: 8px; background: #f1f5f9; color: #36546a; }
.nearby-store-profile :is(button,a,summary):focus-visible { outline: 3px solid #3580df; outline-offset: 3px; }
@media(max-width: 600px) {
    dialog.nearby-store-profile { width: calc(100% - 20px); max-height: calc(100dvh - 24px); border-radius: 20px; }
    .nearby-store-profile__cover { height: 165px; }
    .nearby-store-profile__content { padding-right: 20px; padding-left: 20px; }
    .nearby-store-profile__footer { padding: 16px 20px; }
}


/* Os marcadores avançados já são ancorados pelo próprio Google Maps. */
.nearby-map-pin--advanced { position: relative; transform: none; }
.nearby-store-profile__loading { margin: 18px 0 8px; color: #64748b; font-size: 14px; }
.nearby-store-profile.is-loading .nearby-store-profile__cover {
    background: linear-gradient(100deg, #d5dee6 30%, #f7fafc 50%, #d5dee6 70%);
    background-size: 200% 100%;
    animation: sc-profile-shimmer 1.15s ease-in-out infinite;
}
@keyframes sc-profile-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) {
    .nearby-store-profile.is-loading .nearby-store-profile__cover { animation: none; }
}
.nearby-store-profile.is-loading .nearby-store-profile__avatar { background: #e9eef3; color: #64748b; }
