.my-store-locator {
    --primary: #24325F;
    --accent: #AFE1F0;
    --accent-soft: rgba(175, 225, 240, 0.25);
    --primary-soft: rgba(36, 50, 95, 0.12);

    position: relative;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    min-height: 100vh;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    overflow: hidden;
    background: #e9edf1;
}

/* MAP */

.my-store-locator__map-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.my-store-locator__map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* PANEL */

.my-store-locator__panel {
    position: absolute;
    top: 24px;
    left: 24px;
    width: 380px;
    max-width: calc(100vw - 48px);
    z-index: 99;
    pointer-events: auto;

    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    border-radius: 12px;
    border: 1px solid rgba(175, 225, 240, 0.5);
    box-shadow: 0 18px 50px rgba(36, 50, 95, 0.15);
}

.my-store-locator__panel-inner {
    display: flex;
    flex-direction: column;
    max-height: min(78vh, 820px);
}

/* HEADER */

.my-store-locator__panel-header {
    padding: 22px 22px 8px;
}

.my-store-locator__title {
    margin: 0 0 4px;
    font-size: 1.5rem !important;
    line-height: 1.2 !important;
    font-weight: 700;
    color: var(--primary);
}

.my-store-locator__subtitle {
    margin: 0;
    font-size: 0.95rem;
    color: #5b6b8a;
}

/* SEARCH */

.my-store-locator__search {
    padding: 16px 22px 8px;
    display: grid;
    gap: 12px;
}

.my-store-locator__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.my-store-locator__row {
    display: flex;
    gap: 12px;
}

.my-store-locator__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.my-store-locator__field--grow {
    flex: 1;
}

.my-store-locator__label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #4b5563;
}

/* INPUTS */

.my-store-locator__input,
.my-store-locator__city,
.my-store-locator__postal,
.my-store-locator__radius {
    width: 100%;
    border: 1px solid rgba(36, 50, 95, 0.25) !important;
    background: #fff !important;
    color: var(--primary) !important;
    border-radius: 5px !important;
    padding: 12px 10px !important;
    font-size: 14px;
    line-height: 1.2;
    outline: none;
    transition: all .18s ease;
}

.my-store-locator__input:focus,
.my-store-locator__city:focus,
.my-store-locator__postal:focus,
.my-store-locator__radius:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

/* BUTTONS */

.my-store-locator__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.my-store-locator__button {
    border: 0;
    border-radius: 14px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s ease;
}

.my-store-locator__button--primary {
    background: var(--primary);
    color: #fff;
    /* box-shadow: 0 3px 18px rgba(36, 50, 95, 0.25); */
}

.my-store-locator__button--primary:hover {
    background: #1b274a !important;
    color: white !important;
}

.my-store-locator__button--secondary {
    background: var(--accent);
    color: var(--primary);
}

.my-store-locator__button--secondary:hover {
    background: #9ed6e7;
}

/* META */

.my-store-locator__meta {
    padding: 4px 22px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.my-store-locator__status {
    min-height: 20px;
    font-size: .92rem;
    color: #4b5563;
}

/* RESULTS */

.my-store-locator__results {
    overflow: auto;
    padding: 0 16px 16px 22px;
    display: grid;
    gap: 12px;
    max-height: 42vh;
}

/* CARDS */

.my-store-locator__card {
    border-radius: 18px;
    padding: 15px 16px;
    background: #fff;
    border: 1px solid rgba(36, 50, 95, 0.08);
    box-shadow: 0 8px 20px rgba(0,0,0,.05);
    cursor: pointer;
    transition: all .18s ease;
}

.my-store-locator__card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(36, 50, 95, 0.12);
}

.my-store-locator__card.is-active {
    border-color: var(--primary);
    background: var(--accent-soft);
    box-shadow: 0 0 0 3px var(--accent-soft), 0 14px 30px rgba(36, 50, 95, 0.18);
}

.my-store-locator__card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}

.my-store-locator__card-address,
.my-store-locator__card-phone,
.my-store-locator__card-distance {
    font-size: .92rem;
    color: #4b5563;
    line-height: 1.45;
}

.my-store-locator__card-address {
    text-transform: capitalize;
}

.msl-popup__row span {
    text-transform: capitalize;
}

.my-store-locator__card-distance {
    font-weight: 600;
    color: var(--primary);
}

/* EMPTY */

.my-store-locator__empty {
    padding: 20px 18px;
    background: #fff;
    border-radius: 18px;
    border: 1px solid rgba(36, 50, 95, 0.08);
    color: #6b7280;
    text-align: center;
}
.msl-empty__icon { font-size: 1.8rem; margin-bottom: 6px; }
.msl-empty__hint { font-size: .82rem; color: #9ca3af; margin-top: 4px; }

/* SKELETON */

@keyframes msl-shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}
.msl-skeleton {
    background: #fff; border-radius: 18px; padding: 15px 16px;
    border: 1px solid rgba(36,50,95,.06); margin-bottom: 0;
}
.msl-skeleton__title,
.msl-skeleton__line {
    height: 13px; border-radius: 6px; margin-bottom: 8px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 800px 100%;
    animation: msl-shimmer 1.4s infinite linear;
}
.msl-skeleton__title { width: 60%; height: 16px; }
.msl-skeleton__line  { width: 85%; }
.msl-skeleton__line--short { width: 50%; }

/* DIRECTIONS LINK */

.msl-popup__directions {
    display: inline-flex; align-items: center; gap: 4px;
    margin-top: 10px; padding: 0;
    color: #5b6b8a; font-size: .78rem; font-weight: 500;
    text-decoration: none; opacity: .8; transition: opacity .15s;
    border-bottom: 1px dashed rgba(91,107,138,.4);
}
.msl-popup__directions:hover { opacity: 1; color: #24325F; }
.msl-popup__directions svg path { fill: currentColor; }

/* MOBILE PANEL TOGGLE */

.msl-panel-toggle {
    display: none;
    width: 100%; padding: 10px 22px;
    background: none; border: none; border-bottom: 1px solid rgba(36,50,95,.08);
    cursor: pointer; align-items: center; justify-content: center; gap: 4px;
}
.msl-panel-toggle__bar {
    display: block; width: 22px; height: 2px;
    background: #24325F; border-radius: 2px;
    transition: transform .2s, opacity .2s;
}
.msl-panel-toggle.is-collapsed .msl-panel-toggle__bar:first-child { transform: translateY(4px) rotate(45deg); }
.msl-panel-toggle.is-collapsed .msl-panel-toggle__bar:last-child  { transform: translateY(-4px) rotate(-45deg); }
.my-store-locator__panel-inner.is-collapsed { display: none; }

/* CITY MARKER PULSE */

.msl-city-icon__pulse {
    position: absolute; inset: -8px;
    border-radius: 50%; border: 2px solid rgba(36,50,95,.4);
    animation: msl-pulse 2s ease-out infinite;
    transform: rotate(45deg);
}
@keyframes msl-pulse {
    0%   { transform: rotate(45deg) scale(1);   opacity: .8; }
    70%  { transform: rotate(45deg) scale(1.5); opacity: 0; }
    100% { transform: rotate(45deg) scale(1.5); opacity: 0; }
}
.msl-city-icon { position: relative; }

@media (max-width: 767px) {
    .msl-panel-toggle { display: flex; }
    .my-store-locator__results { max-height: 32vh; }
}

/* MAP STYLE SWITCH */

.my-store-locator__map-style-switch {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 550;
    display: inline-flex;
    gap: 6px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(36, 50, 95, 0.15);
    box-shadow: 0 10px 26px rgba(0,0,0,.14);
}

.my-store-locator__style-btn {
    border: 0;
    background: transparent;
    color: var(--primary);
    padding: 10px 16px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.my-store-locator__style-btn.is-active {
    background: var(--primary);
    color: #fff;
}

/* ZOOM CONTROLS */

.my-store-locator .leaflet-top.leaflet-left {
    left: auto;
    right: 24px;
}

.my-store-locator .leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 12px 24px rgba(0,0,0,.14);
    overflow: hidden;
    border-radius: 16px;
    margin-top: 86px;
}

.my-store-locator .leaflet-control-zoom a {
    width: 42px;
    height: 42px;
    line-height: 42px;
    font-size: 18px;
    color: var(--primary);
    border: none;
}

.my-store-locator .leaflet-control-zoom a:hover {
    background: var(--accent);
}

/* MOBILE — stacked layout: map top, panel below */

@media (max-width: 767px) {
    /* Switch from position:relative+absolute overlay to flex column */
    .my-store-locator {
        height: auto;
        min-height: 100svh;
        display: flex;
        flex-direction: column;
        overflow: visible;
    }

    /* Map takes the top portion — always visible */
    .my-store-locator__map-wrap {
        position: relative;
        height: 45svh;
        min-height: 260px;
        flex-shrink: 0;
        z-index: 1;
    }

    /* Panel slides below the map — no longer overlapping */
    .my-store-locator__panel {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
        width: 100%;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        margin-top: -20px;   /* slight overlap for visual continuity */
        z-index: 200;
        box-shadow: 0 -4px 24px rgba(36, 50, 95, 0.12);
    }

    .my-store-locator__panel-inner {
        height: auto;
        max-height: none;
        border-radius: 20px 20px 0 0;
    }

    /* More room for results now that panel isn't constrained by viewport */
    .my-store-locator__results {
        max-height: 50vh;
    }

    /* Toggle not needed in stacked layout — hide it */
    .msl-panel-toggle {
        display: none;
    }

    /* Single-column search inputs */
    .my-store-locator__grid,
    .my-store-locator__actions {
        grid-template-columns: 1fr;
    }

    /* Zoom controls — keep accessible on right side of map */
    .my-store-locator .leaflet-top.leaflet-left {
        right: 12px;
    }

    .my-store-locator .leaflet-control-zoom {
        margin-top: 12px;
    }

    /* City popup — prevent overflow */
    .msl-city-popup {
        min-width: min(340px, calc(100vw - 56px));
        max-height: 50vh;
    }

    /* Popups — prevent horizontal overflow */
    .msl-popup {
        min-width: min(280px, calc(100vw - 56px));
    }

    .my-store-locator__map-style-switch {
        top: auto;
        right: 12px;
        bottom: 12px;
    }
}

/* ============================================================
   RICH POPUP
   ============================================================ */

.leaflet-popup-content-wrapper {
    border-radius: 14px !important;
    box-shadow: 0 20px 50px rgba(36, 50, 95, 0.22) !important;
    padding: 0 !important;
    overflow: hidden;
    border: 1px solid rgba(175, 225, 240, 0.5) !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    width: auto !important;
}

.msl-popup {
    padding: 14px 16px;
    min-width: 300px;
    box-sizing: border-box;
}

.msl-popup__name {
    font-size: 0.97rem;
    font-weight: 700;
    color: #24325F;
    margin-bottom: 8px;
    line-height: 1.3;
}

.msl-popup__row {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-bottom: 4px;
    font-size: 0.85rem;
    color: #4b5563;
    line-height: 1.35;
}

.msl-popup__row svg {
    color: #24325F;
    flex-shrink: 0;
}

.msl-popup__link {
    color: inherit;
    text-decoration: none;
}

.msl-popup__link:hover {
    color: #24325F;
    text-decoration: underline;
}

.msl-popup__distance {
    font-size: 0.82rem;
    font-weight: 600;
    color: #24325F;
    margin-bottom: 8px;
}

.msl-popup__socials {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.msl-popup__social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f3f4f6;
    color: #24325F;
    text-decoration: none;
    font-size: 13px;
    transition: all .15s ease;
    border: 1px solid rgba(36, 50, 95, 0.1);
}

.msl-popup__social svg,
.msl-popup__social svg path,
.msl-popup__social svg circle,
.msl-popup__social svg rect          { fill: #24325F !important; transition: fill .15s ease; }

.msl-popup__social:hover             { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,.18); }
.msl-popup__social--web:hover        { background: #24325F; border-color: #24325F; }
.msl-popup__social--fb:hover         { background: #1877F2; border-color: #1877F2; }
.msl-popup__social--ig:hover         { background: #E1306C; border-color: #E1306C; }
.msl-popup__social--tt:hover         { background: #111;    border-color: #111; }

.msl-popup__social:hover svg,
.msl-popup__social:hover svg path,
.msl-popup__social:hover svg circle,
.msl-popup__social:hover svg rect    { fill: #fff !important; }

.msl-popup__activities {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(175, 225, 240, 0.6);
}

.msl-popup__activities-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #24325F;
    margin-bottom: 6px;
}

.msl-popup__activity-day {
    display: inline-block;
    background: #AFE1F0;
    color: #24325F;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 20px;
    padding: 2px 10px;
    margin-bottom: 4px;
}

.msl-popup__activity-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2px;
}

.msl-popup__activity-desc {
    font-size: 0.83rem;
    color: #6b7280;
    line-height: 1.45;
    margin: 0;
}

/* ============================================================
   CARD ENHANCEMENTS — Socials + activity badge in panel cards
   ============================================================ */

.my-store-locator__card-socials {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.msl-card__social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: #f3f4f6;
    color: #24325F;
    text-decoration: none;
    font-size: 11px;
    transition: all .15s ease;
    border: 1px solid rgba(36, 50, 95, 0.08);
}

.msl-card__social svg,
.msl-card__social svg path,
.msl-card__social svg circle,
.msl-card__social svg rect           { fill: #24325F !important; transition: fill .15s ease; }

.msl-card__social:hover              { transform: translateY(-1px); }
.msl-card__social--web:hover         { background: #24325F; border-color: #24325F; }
.msl-card__social--fb:hover          { background: #1877F2; border-color: #1877F2; }
.msl-card__social--ig:hover          { background: #E1306C; border-color: #E1306C; }
.msl-card__social--tt:hover          { background: #111;    border-color: #111; }

.msl-card__social:hover svg,
.msl-card__social:hover svg path,
.msl-card__social:hover svg circle,
.msl-card__social:hover svg rect     { fill: #fff !important; }

.my-store-locator__card-activity {
    display: inline-block;
    margin-top: 7px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #24325F;
    background: rgba(175, 225, 240, 0.4);
    border-radius: 20px;
    padding: 3px 10px;
}

/* ============================================================
   CITY INFO — City header above results
   ============================================================ */

.my-store-locator__city-info {
    padding: 0 22px 10px;
}

.msl-city-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    background: rgba(175, 225, 240, 0.2);
    border: 1px solid rgba(175, 225, 240, 0.6);
    border-radius: 12px;
    padding: 12px 14px;
}

.msl-city-info__logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
}

.msl-city-info__name {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 700;
    color: #24325F;
    line-height: 1.2;
}

.msl-city-info__zip {
    font-weight: 400;
    color: #5b6b8a;
    font-size: 0.85rem;
}

.msl-city-info__activities {
    width: 100%;
    border-top: 1px solid rgba(175, 225, 240, 0.6);
    padding-top: 8px;
    display: grid;
    gap: 6px;
}

.msl-city-info__activity {
    font-size: 0.84rem;
    color: #374151;
}

.msl-city-info__activity-day {
    display: inline-block;
    background: #AFE1F0;
    color: #24325F;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 20px;
    padding: 1px 8px;
    margin-right: 4px;
}

.msl-city-info__activity p {
    margin: 2px 0 0;
    color: #6b7280;
    font-size: 0.81rem;
    line-height: 1.4;
}
.msl-city-info__hint {
    width: 100%; margin-top: 8px;
    font-size: .74rem; color: #9ca3af; font-style: italic;
}

/* ============================================================
   CITY MARKER — Municipality pin on the map
   ============================================================ */

.msl-city-icon {
    width: 52px;
    height: 52px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    background: #24325F;
    border: 3px solid #fff;
    box-shadow: 0 4px 14px rgba(36,50,95,.4);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.msl-city-icon img,
.msl-city-icon span { transform: rotate(45deg); }
.msl-city-icon img { width: 38px; height: 38px; object-fit: contain; border-radius: 50%; }
.msl-city-icon--text span { color: #fff; font-size: .85rem; font-weight: 700; line-height: 1; }

/* ============================================================
   CITY POPUP — Popup on the municipality marker
   ============================================================ */

.msl-city-popup { padding: 16px 20px; min-width: 460px; max-height: 60vh; overflow-y: auto; }
.msl-city-popup__logo {
    display: block; width: 56px; height: 56px; object-fit: contain;
    border-radius: 10px; margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.msl-city-popup__name { font-size: 1.05rem; font-weight: 800; color: #24325F; margin-bottom: 2px; line-height: 1.2; }
.msl-city-popup__zip  { font-size: .82rem; color: #6b7280; margin-bottom: 10px; }
.msl-city-popup__activities { border-top: 1px solid rgba(175,225,240,.6); padding-top: 10px; display: grid; gap: 8px; }
.msl-city-popup__activity   { font-size: .85rem; color: #374151; }
.msl-city-popup__day {
    display: inline-block; background: #AFE1F0; color: #24325F;
    font-size: .7rem; font-weight: 600; border-radius: 20px; padding: 2px 9px; margin-bottom: 4px;
}
.msl-city-popup__activity-name { font-weight: 600; color: #1f2937; margin-bottom: 2px; font-size: .9rem; }
.msl-city-popup__activity-desc { color: #6b7280; font-size: .83rem; line-height: 1.45; margin: 0; }

/* Improved panel city info block */
.msl-city-info {
    background: linear-gradient(135deg, rgba(36,50,95,.05) 0%, rgba(175,225,240,.22) 100%);
    border: 1px solid rgba(175,225,240,.7);
}
.msl-city-info__logo {
    background: #fff;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}