/* Global Styles */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark: #1f2937;
    --dark-light: #374151;
    --gray: #6b7280;
    --gray-light: #d1d5db;
    --gray-lighter: #f3f4f6;
    --white: #ffffff;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    position: fixed;
    touch-action: pan-x pan-y;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--dark);
    line-height: 1.5;
    font-size: 16px; /* Base font size */
    /* Safe area insets for notched devices */
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* Header */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-content {
    max-width: 100%;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    transition: var(--transition);
}

.logo:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.logo i {
    font-size: 1.75rem;
}

.logo-image {
    height: 50px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    background: var(--gray-lighter);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

/* Mobile Menu Dropdown */
.mobile-menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--white);
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: 2000;
    overflow: hidden;
}

.mobile-menu-dropdown.active {
    display: block;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 0.9rem;
    color: var(--dark);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.mobile-menu-item:hover {
    background: var(--gray-lighter);
}

.mobile-menu-item i {
    width: 20px;
    text-align: center;
    color: var(--primary-color);
}

.mobile-menu-item span {
    flex: 1;
}

.mobile-user-menu .mobile-menu-item:first-child {
    font-weight: 600;
    border-bottom: 1px solid var(--gray-light);
    padding-bottom: 0.75rem;
    margin-bottom: 0.25rem;
}

.mobile-user-menu .mobile-menu-item:first-child:hover {
    background: transparent;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-name {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
}

.auth-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-menu .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--dark);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--gray-lighter);
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

/* Main Container */
.main-container {
    display: flex;
    flex-direction: row; /* Ensure horizontal layout on desktop */
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100); /* Use custom property for real viewport height */
    padding-top: 60px;
    position: relative;
    overflow: hidden;
}

/* Filters Panel */
.filters-panel {
    width: 320px;
    background: var(--white);
    border-right: 1px solid var(--gray-light);
    border-left: none;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    z-index: 100;
    order: 1; /* On desktop, filters appear first (left side) */
}

.filters-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filters-header h2 {
    font-size: 1.25rem;
    color: var(--dark);
}

.close-filters {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray);
    cursor: pointer;
}

.filter-group {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-lighter);
}

.filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.filter-group label i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.input-group {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.input-group .form-input {
    flex: 1;
}

.input-group .btn {
    flex-shrink: 0;
}

.btn-icon {
    padding: 0.75rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--primary-dark);
}

.range-input {
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: var(--gray-lighter);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.range-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-height: 300px;
    overflow-y: auto;
}

.service-checkbox {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--gray-lighter);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
}

.service-checkbox:hover {
    background: var(--gray-light);
}

.service-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
    cursor: pointer;
    flex-shrink: 0;
}

.service-checkbox label {
    cursor: pointer;
    margin: 0;
    font-weight: normal;
    font-size: 0.875rem;
    line-height: 1.4;
}

.filter-results-count {
    margin-bottom: 1rem;
    display: none; /* Hidden by default, shown on mobile when services are selected */
}

.filter-results-count p {
    margin: 0;
    padding: 0.75rem;
    background: var(--gray-lighter);
    border-radius: var(--border-radius);
    text-align: center;
    font-size: 0.875rem;
    color: var(--gray-dark);
}

.filter-actions {
    padding: 1.5rem;
    display: flex;
    gap: 0.75rem;
}

.btn {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--gray-lighter);
    color: var(--dark);
}

.btn-secondary:hover {
    background: var(--gray-light);
}

.btn-success {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-success:hover {
    background: #059669;
}

.btn-warning {
    background: var(--warning-color);
    color: var(--white);
}

.btn-warning:hover {
    background: #d97706;
}

.btn-danger {
    background: var(--danger-color);
    color: var(--white);
}

.btn-danger:hover {
    background: #dc2626;
}

/* Content Area */
.content-area {
    flex: 1;
    display: flex;
    position: relative;
    order: 2; /* On desktop, content area appears in middle */
}

/* Sidebar */
.sidebar {
    width: 400px;
    background: var(--white);
    border-right: 1px solid var(--gray-light);
    border-left: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    order: 3; /* On desktop, sidebar appears last (right side) */
}

/* Desktop: Sidebar on right side */
@media (min-width: 769px) {
    .sidebar {
        border-right: none;
        border-left: 1px solid var(--gray-light);
    }
}

.sidebar-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.sidebar-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.sidebar-header h3 {
    font-size: 1.125rem;
    color: var(--dark);
    margin: 0;
}

.close-sidebar {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray);
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: var(--transition);
    border-radius: 4px;
}

.close-sidebar:hover {
    background: var(--gray-lighter);
    color: var(--dark);
}

.results-count {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    position: relative;
}

.pull-to-refresh {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease, top 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.pull-to-refresh.active {
    opacity: 1;
    top: 10px;
}

.pull-to-refresh.refreshing {
    opacity: 1;
    top: 10px;
}

.pull-to-refresh.refreshing i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--gray);
}

.loading i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.business-card {
    background: var(--white);
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    padding: 0.875rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
}

.business-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.business-card.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.business-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}

.business-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.125rem;
    line-height: 1.3;
}

.business-rating {
    display: none; /* Temporarily hidden */
    align-items: center;
    gap: 0.25rem;
    color: var(--warning-color);
    font-size: 0.75rem;
}

.business-distance {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.business-address {
    color: var(--gray);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: start;
    gap: 0.4rem;
    line-height: 1.3;
}

.business-address i {
    font-size: 0.75rem;
    margin-top: 0.15rem;
}

.business-services {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.service-tag {
    background: var(--gray-lighter);
    color: var(--dark);
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
}

.business-contact {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--gray-lighter);
}

.contact-btn {
    flex: 1;
    padding: 0.5rem 0.75rem;
    background: var(--gray-lighter);
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.contact-btn i {
    font-size: 0.7rem;
}

.contact-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

.no-results {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--gray);
}

.no-results i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Map Container */
.map-container {
    flex: 1;
    position: relative;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
}

.mobile-toggle,
.filter-toggle {
    display: none;
    position: absolute;
    bottom: 5rem;
    right: 3.5rem;
    padding: 0.875rem 1.25rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 400;
    gap: 0.5rem;
    align-items: center;
}

.filter-toggle {
    bottom: auto;
    top: 0.5rem;
    right: 3.5rem;
}

/* Cookie Disclaimer */
.cookie-disclaimer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--gray-light);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    padding: 1rem;
}

.cookie-disclaimer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cookie-disclaimer-text {
    flex: 1;
    min-width: 250px;
}

.cookie-disclaimer-text p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--gray-dark);
}

.cookie-disclaimer-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-disclaimer-actions .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .cookie-disclaimer {
        padding: 1rem;
    }
    
    .cookie-disclaimer-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cookie-disclaimer-actions {
        width: 100%;
    }
    
    .cookie-disclaimer-actions .btn {
        flex: 1;
    }
}


/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.5rem;
    color: var(--dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray);
    cursor: pointer;
}

.modal-body {
    padding: 1.5rem;
}

/* Alert Modal Specific Styles */
#alertModal .modal-content {
    max-width: 400px;
}

#alertModal .modal-body p {
    margin: 0;
    color: var(--dark);
    line-height: 1.6;
}

#alertModal .modal-body .btn {
    min-width: 80px;
}

/* Welcome Modal Specific Styles */
#welcomeModal .modal-content {
    max-width: 500px;
}

#welcomeModal .modal-body p {
    margin: 0;
    color: var(--dark);
    line-height: 1.6;
}

#welcomeModal .modal-body p:last-of-type {
    margin-bottom: 0;
}

/* Google Maps Info Window Styling */
.popup-content h3 {
    margin: 0 0 0.5rem 0;
    color: var(--dark);
}

.popup-content p {
    margin: 0.25rem 0;
    font-size: 0.875rem;
    color: var(--gray);
}

/* Google Maps Controls - Ensure they don't overlap filter panel */
.gm-style .gm-control-active,
.gm-style .gm-fullscreen-control,
.gm-style .gm-zoom-control,
.gm-style .gm-style-cc {
    z-index: 1000 !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        width: 350px;
    }
    
    .filters-panel {
        width: 280px;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 14px; /* Smaller base font for mobile */
        line-height: 1.4;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Hide desktop menu items on mobile */
    .user-menu,
    .auth-menu {
        display: none !important;
    }
    
    /* Show mobile menu dropdown */
    .mobile-menu-dropdown {
        display: block;
    }
    
    .mobile-menu-dropdown:not(.active) {
        display: none;
    }
    
    /* My Businesses Modal - Stack buttons on mobile */
    .business-mgmt-header > div:last-child {
        flex-direction: column;
        width: 100%;
    }
    
    .business-mgmt-header > div:last-child .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .business-mgmt-header > div:last-child .btn:last-child {
        margin-bottom: 0;
    }
    
    .filters-panel {
        position: fixed;
        left: -100%;
        top: 60px;
        width: 100%;
        max-width: 350px;
        height: calc(100vh - 60px);
        height: calc((var(--vh, 1vh) * 100) - 60px);
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
        z-index: 900;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        order: 0; /* Reset order on mobile */
        border-left: none;
        border-right: 1px solid var(--gray-light);
    }
    
    .filters-panel.active {
        left: 0;
        z-index: 1200;
    }
    
    /* Lower Google Maps controls z-index when filter panel is active on mobile */
    body.filters-open .gm-style .gm-control-active,
    body.filters-open .gm-style .gm-fullscreen-control,
    body.filters-open .gm-style .gm-zoom-control,
    body.filters-open .gm-style .gm-style-cc {
        z-index: 100 !important;
    }
    
    .close-filters {
        display: block;
    }
    
    .filters-header {
        padding: 0.75rem 1rem;
    }
    
    .filters-header h2 {
        font-size: 0.95rem;
    }
    
    .filter-group {
        padding: 0.75rem 1rem;
    }
    
    .filter-group label {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .form-input {
        font-size: 0.8rem;
        padding: 0.6rem;
    }
    
    .btn {
        font-size: 0.8rem;
        padding: 0.7rem 1.2rem;
    }
    
    .btn i {
        font-size: 0.75rem;
    }
    
    .service-checkbox label {
        font-size: 0.8rem;
    }
    
    .sidebar {
        position: fixed;
        left: -100%;
        top: 60px;
        width: 100%;
        max-width: 100%;
        height: calc(100vh - 60px);
        height: calc((var(--vh, 1vh) * 100) - 60px);
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
        z-index: 800;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        order: 0; /* Reset order on mobile */
    }
    
    .sidebar.active {
        left: 0;
        z-index: 1200;
    }
    
    /* Lower Google Maps controls z-index when sidebar is active on mobile */
    body.sidebar-open .gm-style .gm-control-active,
    body.sidebar-open .gm-style .gm-fullscreen-control,
    body.sidebar-open .gm-style .gm-zoom-control,
    body.sidebar-open .gm-style .gm-style-cc {
        z-index: 100 !important;
    }
    
    .close-sidebar {
        display: block;
    }
    
    .sidebar-header {
        padding: 0.6rem 0.75rem;
    }
    
    .sidebar-header h3 {
        font-size: 0.9rem;
    }
    
    .results-count {
        font-size: 0.7rem;
        padding: 0.15rem 0.5rem;
    }
    
    .sidebar-content {
        padding: 0.5rem;
    }
    
    .business-card {
        padding: 0.65rem;
        margin-bottom: 0.5rem;
    }
    
    .business-name {
        font-size: 0.85rem;
        line-height: 1.25;
    }
    
    .business-rating {
        display: none; /* Temporarily hidden */
        font-size: 0.7rem;
    }
    
    .business-address {
        font-size: 0.75rem;
    }
    
    .business-distance {
        font-size: 0.65rem;
        padding: 0.15rem 0.5rem;
    }
    
    .service-tag {
        font-size: 0.65rem;
        padding: 0.15rem 0.5rem;
    }
    
    .contact-btn {
        font-size: 0.7rem;
        padding: 0.45rem 0.65rem;
    }
    
    .contact-btn i {
        font-size: 0.65rem;
    }
    
    .mobile-toggle,
    .filter-toggle {
        display: flex;
    }
    
    .content-area {
        width: 100%;
        height: 100%;
        order: 0; /* Reset order on mobile */
    }
    
    .map-container {
        height: 100%;
    }
    
    #map {
        height: 100%;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 13px; /* Even smaller for small screens */
    }
    
    .header-content {
        padding: 0.5rem 0.75rem;
        height: 55px;
    }
    
    .logo-image {
        height: 30px;
    }
    
    .main-container {
        padding-top: 55px;
    }
    
    .filters-panel,
    .sidebar {
        max-width: 100%;
        top: 55px;
        height: calc(100vh - 55px);
        height: calc((var(--vh, 1vh) * 100) - 55px);
    }
    
    .business-card {
        padding: 0.6rem;
        margin-bottom: 0.45rem;
    }
    
    .business-name {
        font-size: 0.8rem;
        line-height: 1.2;
    }
    
    .business-rating {
        display: none; /* Temporarily hidden */
        font-size: 0.65rem;
    }
    
    .business-address {
        font-size: 0.7rem;
        line-height: 1.25;
    }
    
    .business-address i {
        font-size: 0.65rem;
    }
    
    .service-tag {
        font-size: 0.6rem;
        padding: 0.15rem 0.45rem;
    }
    
    .business-distance {
        font-size: 0.6rem;
        padding: 0.15rem 0.45rem;
    }
    
    .contact-btn {
        font-size: 0.65rem;
        padding: 0.4rem 0.55rem;
    }
    
    .contact-btn i {
        font-size: 0.6rem;
    }
    
    .mobile-toggle {
        bottom: 4.5rem;
        right: 0.75rem;
        padding: 0.65rem 0.85rem;
        font-size: 0.75rem;
    }
    
    .mobile-toggle i {
        font-size: 0.7rem;
    }
    
    .filter-toggle {
        bottom: 7.5rem; /* Position just above the mobile-toggle button */
        right: 0.75rem; /* Align with mobile-toggle */
        top: auto; /* Override top positioning */
        padding: 0.65rem 0.85rem;
        font-size: 0.75rem;
    }
    
    .filter-toggle i {
        font-size: 0.7rem;
    }
    
    .sidebar-header h3 {
        font-size: 0.85rem;
    }
    
    .results-count {
        font-size: 0.65rem;
    }
}

/* Prevent pull-to-refresh and overscroll on mobile */
@media (max-width: 768px) {
    body {
        overscroll-behavior-y: none;
        -webkit-overflow-scrolling: auto;
    }
    
    .main-container {
        overscroll-behavior-y: none;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-lighter);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray);
}

