.map-layout {
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
}

.map-feature-container {
    display: flex;
    flex: 1 1 auto;
    position: relative;
    width: 100%;
    height: calc(100vh - 75px - 60px);
    margin-top: 75px;
}

.map-sidebar {
    width: 420px;
    height: 100%;
    background-color: #ffffff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    z-index: 10;
    flex-shrink: 0;
}

.map-floating-controls {
    padding: 1.25rem 1rem 1rem 1rem;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.map-search-box input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.95rem;
    outline: none;
    background-color: #f8fafc;
    color: #1e293b;
}

.map-categories-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
}

.map-categories-bar {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 0.25rem 0;
}

.map-categories-bar::-webkit-scrollbar {
    display: none;
}

.map-cat-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 0.45rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.map-cat-btn.active {
    background-color: #00667e;
    color: #ffffff;
    border-color: #00667e;
}

.cat-nav-arrow {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    color: #374151;
    z-index: 5;
    flex-shrink: 0;
}

.cat-nav-prev {
    margin-right: 4px;
}

.cat-nav-next {
    margin-left: 4px;
}

.map-business-list {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    background-color: #f9fafb;
}

.sidebar-business-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.85rem;
    display: flex;
    gap: 0.85rem;
    cursor: pointer;
}

.sidebar-business-card.active {
    border-color: #00667e;
    box-shadow: 0 0 0 2px rgba(0, 102, 126, 0.2);
    background-color: #f8fafc;
}

.sidebar-card-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background-color: #f1f5f9;
}

.sidebar-card-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    min-width: 0;
}

.sidebar-card-cat {
    font-size: 0.7rem;
    font-weight: 700;
    color: #00667e;
    text-transform: uppercase;
}

.sidebar-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-card-title a {
    color: inherit;
    text-decoration: none;
}

.sidebar-card-desc {
    font-size: 0.82rem;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #64748b;
}

.sidebar-card-link {
    color: #00667e;
    font-weight: 600;
    text-decoration: none;
}

.map-canvas-wrapper {
    flex: 1 1 auto;
    height: 100%;
    position: relative;
}

.leaflet-map-canvas {
    width: 100%;
    height: 100%;
    background-color: #e5e7eb;
}

.leaflet-top.leaflet-right {
    top: 45% !important;
    transform: translateY(-50%);
}

.map-custom-marker {
    background: transparent;
    border: none;
}

.marker-bubble {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    background-color: #ffffff;
    cursor: pointer;
}

.marker-bubble.active-pin {
    border-color: #00667e;
    transform: scale(1.15);
}

.marker-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.map-bottom-card {
    position: absolute;
    bottom: calc(4.5rem + 15px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    width: 90%;
    max-width: 420px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.map-bottom-card.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.bottom-card-overlay {
    background: rgba(20, 34, 51, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    gap: 1rem;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.bottom-card-close {
    position: absolute;
    top: 6px;
    right: 8px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.8;
}

.bottom-card-content {
    display: flex;
    gap: 0.85rem;
    width: 100%;
    align-items: center;
}

.map-card-thumb-link {
    display: block;
    width: 75px;
    height: 75px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.map-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-card-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    flex: 1;
}

.map-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.map-card-title a {
    color: inherit;
    text-decoration: none;
}

.map-card-desc {
    font-size: 0.82rem;
    color: #cbd5e1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.map-footer-global {
    display: none;
}

.fixed-bottom-nav {
    display: none;
}

@media (max-width: 950px) {
    .map-feature-container {
        height: calc(100vh - 120px - 56px - env(safe-area-inset-bottom));
        margin-top: 120px;
    }

    .desktop-only-sidebar {
        display: none !important;
    }

    .map-footer-global {
        display: none !important;
    }

    .mobile-navbar-search-bar {
        width: 100%;
        background-color: #ffffff;
        padding: 0.6rem 1rem;
        border-bottom: 1px solid #e2e8f0;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    }

    .mobile-navbar-search-trigger {
        display: flex;
        align-items: center;
        width: 100%;
        background-color: #f8fafc;
        border: 1px solid #cbd5e1;
        border-radius: 8px;
        padding: 0.55rem 0.85rem;
        cursor: pointer;
        gap: 0.5rem;
    }

    .search-trigger-icon {
        color: #64748b;
        flex-shrink: 0;
    }

    .search-placeholder-text {
        color: #64748b;
        font-size: 0.88rem;
        font-weight: 400;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .fixed-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        border-top: 1px solid #e2e8f0;
        height: 56px;
        padding-bottom: env(safe-area-inset-bottom);
        z-index: 2000;
        align-items: center;
        justify-content: space-around;
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.05);
    }

    .bottom-nav-link {
        color: #374151;
        text-decoration: none;
        font-size: 0.9rem;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
    }

    .bottom-nav-link.active {
        color: #00667e;
    }

    .bottom-nav-separator {
        color: #cbd5e1;
    }

    .map-bottom-card {
        bottom: calc(4.8rem + env(safe-area-inset-bottom));
    }

    .mobile-filter-modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(20, 34, 51, 0.75);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        z-index: 3000;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding-top: 15px;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease, visibility 0.25s ease;
    }

    .mobile-filter-modal.active {
        opacity: 1;
        visibility: visible;
    }

    .mobile-filter-content {
        background: #ffffff;
        width: 92%;
        max-width: 440px;
        border-radius: 14px;
        padding: 1.25rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        max-height: 85vh;
        overflow-y: auto;
    }

    .mobile-filter-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1rem;
        border-bottom: 1px solid #e2e8f0;
        padding-bottom: 0.5rem;
    }

    .mobile-filter-close {
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
        color: #64748b;
    }

    .mobile-filter-body {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .mobile-search-group {
        display: flex;
        gap: 0.5rem;
    }

    .mobile-search-group input {
        flex: 1;
        padding: 0.65rem 0.85rem;
        border: 1px solid #cbd5e1;
        border-radius: 8px;
        font-size: 0.95rem;
        outline: none;
    }

    .mobile-search-submit-btn,
    .mobile-filter-apply-btn {
        background-color: #00667e;
        color: #ffffff;
        border: none;
        border-radius: 8px;
        padding: 0.65rem 1rem;
        font-weight: 600;
        cursor: pointer;
    }

    .mobile-categories-group {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .filter-label {
        font-size: 0.9rem;
        font-weight: 700;
        color: #1e293b;
    }

    .mobile-radio-list {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        max-height: 160px;
        overflow-y: auto;
    }

    .radio-item {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.9rem;
        color: #374151;
        cursor: pointer;
    }
}

@media (min-width: 951px) {

    .mobile-navbar-search-bar,
    .mobile-filter-modal {
        display: none !important;
    }
}