.smjrgoma-frontend-wrap {
    width: 100%;
    margin-bottom: 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

/* Map Container */
.smjrgoma-map-container {
    width: 100%;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .12);
}

/* Loading state */
.smjrgoma-map-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #f0f4f8;
    z-index: 5;
    transition: opacity .4s;
    font-size: 13px;
    color: #667;
}

.smjrgoma-map-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.smjrgoma-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #d0d8e4;
    border-top-color: #3a7bd5;
    border-radius: 50%;
    animation: smjrgoma-spin .8s linear infinite;
}

@keyframes smjrgoma-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Popup styles */
.smjrgoma-popup {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    width: 100%;
    height: 100%;
    min-width: 200px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    display: block;
}

.smjrgoma-popup-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.smjrgoma-popup-body {
    padding: 14px 16px 16px;
}

.smjrgoma-popup-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.3;
}

.smjrgoma-popup-address {
    font-size: 11px;
    opacity: .65;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 4px;
}

.smjrgoma-popup-desc {
    font-size: 13px;
    line-height: 1.5;
    margin: 0 0 12px;
    opacity: .85;
}

.smjrgoma-popup-link {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    background: currentColor;
    transition: opacity .2s;
}

.smjrgoma-popup-link:hover {
    opacity: .85;
}

/* Close button */
.gm-style .gm-style-iw {
    background-color: transparent !important;
    box-shadow: none !important;
}

.gm-style .gm-style-iw-c {
    border-radius: 10px !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: transparent !important;
    box-shadow: none !important;
}

.gm-style .gm-style-iw-d {
    overflow: hidden !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

.gm-style .gm-style-iw-t::after {
    display: none !important;
}

.gm-ui-hover-effect {
    opacity: 1 !important;
    background: rgba(0, 0, 0, 0.1) !important;
    border-radius: 50% !important;
}

.gm-ui-hover-effect img {
    filter: brightness(0) !important;
    /* Forces the X to be black */
}

.gm-ui-hover-effect:focus {
    outline: 0;
}

.gm-ui-hover-effect {
    top: 4px !important;
    right: 4px !important;
    width: 35px !important;
    height: 35px !important;
}

.gm-ui-hover-effect span {
    width: 18px !important;
    height: 18px !important;
}

/* Leaflet Popup Overrides */
.leaflet-popup-content-wrapper {
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 10px !important;
    background: transparent !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .2) !important;
}

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

.leaflet-popup-tip {
    background: white;
    /* Optional: might need to match popup-bg dynamically, but usually white is safe for light popups */
}

/* Location List */
.smjrgoma-location-list {
    --smjrgoma-cols: 3; /* fallback; overridden by inline style from PHP list_columns setting */
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 20px 0;
}

.smjrgoma-location-list .smjrgoma-location-card {
    width: calc((100% / var(--smjrgoma-cols)) - (16px * (var(--smjrgoma-cols) - 1) / var(--smjrgoma-cols)));
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .smjrgoma-location-list .smjrgoma-location-card {
        width: calc(50% - 8px);
    }
}

#store-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 30px 20px;
    justify-content: center;
}

.store-block {
    padding: 10px;
    border: 1px solid #ccc;
    cursor: pointer;
    width: 18%;
    min-width: 200px;
    text-align: center;
    background: #fff;
    transition: box-shadow .2s ease;
}

.store-block.active {
    background-color: #f0f0f0;
    border-color: #000;
}

@media(max-width: 768px) {
    .store-block {
        min-width: unset;
        width: 45%;
    }
}

.smjrgoma-location-card {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e8edf2;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
}

.smjrgoma-location-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

.smjrgoma-location-card.active {
    border-color: #3a7bd5;
    box-shadow: 0 0 0 2px rgba(58, 123, 213, .25), 0 8px 24px rgba(0, 0, 0, .12);
}

.smjrgoma-card-img {
    height: 120px;
    background-size: contain;
    background-position: center;
    flex-shrink: 0;
    background-repeat: no-repeat;
}

.smjrgoma-card-body {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.smjrgoma-card-title {
    font-size: 14px;
    font-weight: 700;
    color: #1a2840;
    display: block;
}

.smjrgoma-card-address {
    font-size: 11px;
    color: #888;
    display: block;
}

.smjrgoma-card-desc {
    font-size: 12px;
    color: #555;
    margin: 4px 0 0;
    line-height: 1.4;
    flex: 1;
}

.smjrgoma-card-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #3a7bd5;
    text-decoration: none;
}

.smjrgoma-card-link:hover {
    text-decoration: underline;
}

/* Cluster styles override */
.smjrgoma-cluster-label {
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
}