.fresh-locations {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-family: "Nunito Sans", sans-serif;
    font-weight: 400;
}

.fresh-locations-content {
    display: flex;
    gap: 20px;
}

.fresh-locations .leaflet-attribution-flag {
   display: none !important;
}

/* Mobile Controls */
.fresh-locations .controls {
   display: flex;
   justify-content: space-between;
   align-items: center;
   justify-content: flex-end;
   flex-wrap: wrap;
   gap: 10px;
}

.filter-toggle {
   display: none; /* Hidden by default, shown on mobile */
   background: #0073aa;
   color: white;
   border: none;
   padding: 8px 15px;
   border-radius: 4px;
   cursor: pointer;
   align-items: center;
   gap: 5px;
}

.filter-count {
   background: white;
   color: #0073aa;
   border-radius: 50%;
   width: 20px;
   height: 20px;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   font-size: 12px;
   font-weight: bold;
}

/* View Toggle */
.view-toggle {
   display: flex;
}

.view-button {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    margin-right: 5px;
    cursor: pointer;
    color: #000000 !important;
    border: 1px solid #000000;
    border-radius: 0px;
    background: #ffffff !important;
    transition: all 0.2s;
    outline: none;
}

.view-button:focus {
    outline: none;
    background-color: #46AF74 !important;
    color: white !important;
    border-color: #46AF74;
}

.view-button.active {
    background-color: #46AF74 !important;
    color: white !important;
    border-color: #46AF74;
}

.view-button:hover:not(.active) {
    background-color: #e9e9e9;
}

/* List View */
#fresh-locations-list {
    display: none;
    width: 100%;
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px 0;
}

#fresh-locations-list .locations-list-content {
    max-height: 600px;
    overflow-y: auto;
    padding: 0 20px;
}

/* Hide old list headers */
#fresh-locations-list .locations-list-header,
#fresh-locations-list .fresh-locations .locations-list-header {
    display: none !important;
}

/* Location Item */
#fresh-locations-list .location-item,
#fresh-locations-list .fresh-locations .location-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #eaeaea;
    display: block !important; /* Override any flex/grid */
}

#fresh-locations-list .location-item:hover,
#fresh-locations-list .fresh-locations .location-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background-color: #fff;
}

/* Location Header */
#fresh-locations-list .location-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

#fresh-locations-list .location-name,
#fresh-locations-list .fresh-locations .location-item .location-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #000000;
    font-family: "Sunday Masthead", sans-serif;
    text-transform: uppercase;
    margin: 0;
    padding: 0;
    flex-grow: 1;
}

#fresh-locations-list .location-distance,
#fresh-locations-list .fresh-locations .location-item .location-distance {
    background: #46AF74;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 12px;
    text-align: center;
    display: inline-block;
}

/* Description */
#fresh-locations-list .location-description {
    color: #4a4a4a;
    margin-bottom: 12px;
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Price */
#fresh-locations-list .location-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 12px;
}

/* Contact Info */
#fresh-locations-list .location-contact {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
    color: #000000;
    font-size: 18px;
}

#fresh-locations-list .contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

#fresh-locations-list .contact-item a,
#fresh-locations-list .fresh-locations .location-item a {
    color: black !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

#fresh-locations-list .contact-item a:hover,
#fresh-locations-list .fresh-locations .location-item a:hover {
    color: #7420FF !important;
    text-decoration: underline;
}

/* Categories */
#fresh-locations-list .location-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    overflow: hidden;
}

#fresh-locations-list .category-pill {
    background: #FD7A2C;
    color: #333;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .location-header {
        flex-direction: column;
        gap: 8px;
    }
    
    .location-distance,
    .fresh-locations .location-item .location-distance {
        align-self: flex-start;
        margin-left: 0;
    }
    
    .location-item,
    .fresh-locations .location-item {
        padding: 16px;
    }
    
    .location-name,
    .fresh-locations .location-item .location-name {
        font-size: 1.1rem;
    }
}

/* No results message */
.no-results {
    padding: 30px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
    background: #fff;
    border-radius: 8px;
    margin: 20px;
}

#fresh-locations-list.hidden {
    display: none;
}

#fresh-locations-list.active-view {
    display: block;
}



/* Map view */
#fresh-locations-map {
    height: 500px;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

#fresh-locations-map.hidden {
    display: none;
}

#fresh-locations-map.active-view {
    display: block;
}


/** Map **/
.fresh-locations #fresh-locations-map {
    height: 700px;
    width: 100%;
}
/** End Map **/

/** Sidebar **/
.fresh-locations .sidebar {
    width: 300px;
    background: #fff;
    border-radius: 8px;
}

.fresh-locations .close-sidebar {
    display: none;
}

.fresh-locations .fresh-locations-filters {
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.fresh-locations .filter-group {
    margin-bottom: 10px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.fresh-locations .filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.fresh-locations .filter-group h4 {
    margin: 0 0 12px 0;
    color: #000000;
    font-size: 16px;
    font-weight: bold;
}

.fresh-locations .filter-options {
    display: flex;
    flex-direction: column;
}

.fresh-locations .filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px 0;
    transition: all 0.2s ease;
    font-size: 16px;
}

.fresh-locations .filter-option:hover {
    color: #0073aa;
}

.fresh-locations .filter-option input[type="checkbox"] {
    margin: 0;
    width: 20px;
    min-width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #46AF74;
}

.fresh-locations input[type="text"], .fresh-locations select {
    padding: 5px 10px;
}

.fresh-locations .location-filter-controls {
    display: flex;
    gap: 10px;
}

/** End Sidebar **/


/** Popup **/

.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 10px 60px 0 rgba(0,0,0,.1)!important;
    padding: 0;
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 0;
    width: 340px !important;
    line-height: 1.5;
}

.location-popup .location-header {
    margin-bottom: 10px;
    padding-bottom: 8px;
}

.location-popup h3 {
    margin: 0;
    font-size: 20px;
    text-transform: uppercase;
    font-family: "Sunday Masthead", sans-serif;
    color: #000000;
    line-height: 1.3;
}

.leaflet-popup p {
    margin: 0 !important;
}

.location-popup .location-description {
    color: #000000;
    margin: 10px 0;
    font-size: 16px;
    line-height: 1.5;
}

.location-popup .location-price {
    font-weight: 600;
    color: #000000;
    margin: 8px 0;
    font-size: 1.1em;
}

.location-popup .location-contact {
    margin: 12px 0;
    font-size: 16px;
    color: #000000;
}

.location-popup .contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    color: #000000;
}

.location-popup .contact-item i {
    width: 16px;
    text-align: center;
    color: #000000;
}

.location-popup .location-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    padding-top: 8px;
}

.location-popup .category-pill {
   max-width: 100%;
    background: #FD7A2C;
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
    text-wrap: wrap;
}

.leaflet-popup-content a {
    color: #0073aa;
    text-decoration: none;
    transition: color 0.2s ease;
}

.leaflet-popup-content a:hover {
    color: #005177;
    text-decoration: underline;
}

.leaflet-popup-tip-container {
    width: 20px;
    height: 10px;
    position: absolute;
    left: 50%;
    margin-left: -10px;
    overflow: hidden;
    pointer-events: none;
}

.leaflet-popup-tip {
    width: 15px;
    height: 15px;
    padding: 1px;
    margin: -8px auto 0;
    -webkit-transform: rotate(45deg);
    -moz-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
    background: white;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.15);
}

.fresh-locations .leaflet-popup-content .services {
    min-width: 200px;
}

.fresh-locations .location-website a {
   color: black;
}
/** End Popup **/

/** Filters **/
.fresh-locations-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.fresh-locations-filters .fresh-locations-filter-select {
   flex-shrink: 0;
}

.fresh-locations-filters .select2 .selection .select2-selection {
    background-color: #F9F9F9;
    border: 0px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    height: 40px;
}

.fresh-locations .select2 .selection .select2-selection__arrow {
    top: 8px;
}
/** End Filters **/

.fresh-locations .location-title {
    width: 100%;
    color: #1B1E42;
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .fresh-locations .locations-list-header,
    .fresh-locations .location-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .fresh-locations .location-distance {
        text-align: left;
        color: #495057;
    }
    
    .fresh-locations .location-item {
        padding: 12px;
        border-bottom: 1px solid #e9ecef;
    }
    
    /** Map **/
    .fresh-locations #fresh-locations-map {
        height: 500px;
    }
    /** End Map **/
    
    /* Mobile sidebar styles */
    .fresh-locations .sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 90%;
        max-width: 400px;
        height: 100vh;
        overflow-y: auto;
        background: white;
        z-index: 9999;
        padding: 30px 20px 20px;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
    }
    
    .fresh-locations .sidebar.active {
        right: 0;
    }
    
    .fresh-locations .close-sidebar {
      display: flex;
      position: absolute;
      right: 0;
      top: 10px;
      z-index: 10;
      border: none;
      color: black;
      font-size: 32px;
      background-color: transparent;
    }
    
    .fresh-locations .filter-toggle {
        display: flex;
        align-items: center;
        width: 100%;
      justify-content: center;
        gap: 8px;
        background: #0073aa;
        color: white;
        border: none;
        padding: 8px 16px;
        border-radius: 4px;
        cursor: pointer;
    }
    
    .fresh-locations .filter-toggle .filter-icon::before {
        content: '\f0b0';
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        margin-right: 5px;
    }
    
    .fresh-locations .filter-count {
        background: white;
        color: #0073aa;
        border-radius: 50%;
        width: 20px;
        height: 20px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        font-weight: bold;
    }
    
    .fresh-locations .filter-toggle.has-filters {
        background: #005177;
    }
    
    .fresh-locations .controls {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 15px;
        background: #f8f9fa;
        border-bottom: 1px solid #e9ecef;
    }
    
    .fresh-locations .view-toggle {
        flex: 1;
        margin: 0;
        padding: 0;
        border: none;
    }
    
    .fresh-locations .view-button {
        flex: 1;
        text-align: center;
        padding: 10px;
        color: #000000;
        border: 1px solid #000000;
        background: #ffffff;
    }
    
    .fresh-locations .view-button.active {
        background: #46AF74;
        color: white;
        border-color: #46AF74;
    }
    
    .fresh-locations-content {
        flex-direction: column;
    }
    
    #fresh-locations-map,
    #fresh-locations-list {
        width: 100% !important;
        margin-left: 0 !important;
    }
    .fresh-locations .sidebar {
        max-height: none;
    }
    .fresh-locations .leaflet-popup-content {
        width: 250px !important;
        max-height: 400px !important;
        overflow: scroll;
    }

    .fresh-locations .location-contact {
        width: 100%;
    }
    .fresh-locations .location-services {
        width: 100%;
    }

    .locations-list-header {
        display: none;
    }
    
    .location-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .location-name,
    .location-address,
    .location-distance {
        width: 100%;
        padding: 5px 0;
        text-align: left;
    }
    
    .location-distance {
        color: #666;
        font-size: 0.9em;
    }

}