.dogs-for-sale {
    width: 100%;
    margin: 0 auto;
    padding: 50px 0;
}

.filters-bar {
    background: var(--form-fields-background-grey);
    display: flex;
    justify-content: space-between;
    border-radius: 5px;
    max-height: 59px;
    padding: 7px;
    margin-bottom: 20px;
}

.filters-bar-one {
    display: flex;
    flex-direction: row;
    gap: 7px;
    justify-content: center;
    align-items: center;
    height: 45px;
    min-width: 515px;
}

.filters-bar-two {
    display: flex;
    flex-direction: row;
    gap: 4px;
    justify-content: end;
    align-items: center;
    height: 48px;
    min-width: 453px;
    margin-right: 22px;
}

#filterToggleBtn,
#countySelectorBtn,
#mapToggleBtn {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 40px;
    background-color: var(--white);
    border: none;
    border-radius: 4px;
    padding: 13px 25px;
    cursor: pointer;
    height: 48px;
}

#filterToggleBtn span,
#countySelectorBtn #selectedCountyText,
#mapToggleBtn span {
    display: flex;
    white-space: nowrap;
    font-family: "Inter", sans-serif;
    font-weight: 300;
    font-size: 16px;
    letter-spacing: 0;
    text-align: center;
    vertical-align: middle;
    color: var(--text-green);
}

.county-selector,
.sort-selector {
    position: relative;
}

/* Results Count */
.filters-bar-two .results-count {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--white);
    border: none;
    border-radius: 4px;
    padding: 13px 25px;
    cursor: pointer;
    height: 48px;
}

.filters-bar-two .results-count span {
    font-family: "Inter", sans-serif;
    white-space: nowrap;
    font-weight: 300;
    font-size: 16px;
    letter-spacing: 0;
    text-align: center;
    vertical-align: middle;
}

.filters-bar-two .results-count span b {
    font-weight: 700;
}

#sortForm {
    display: flex;
    flex-direction: row;
    margin-bottom: 0;
    justify-content: space-between;
    height: 48px;
}

#filterForm .filter-section h4,
#filterForm .category-title {
    color: var(--text-green);
    font-family: "Inter", sans-serif;
}

#filterForm .subcategory-list a {
    text-decoration: none;
    color: var(--text-black);
    font-family: "Inter", sans-serif;
    font-size: 14px;
}

#filterForm .subcategory-list.show a.active {
    color: var(--text-green);
}

#filterForm .subcategory-list.show a:hover {
    color: var(--green-hover);
}

#sortForm .sort-selector {
    position: relative;
    display: flex;
    min-width: 180px;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    background-color: var(--white);
    padding: 0px 15px;
    border: none;
    border-radius: 4px;
    height: auto;
    cursor: pointer;
    width: max-content;
    gap: 10px;
}

#sortForm .select-field {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='9' height='7' viewBox='0 0 9 7'><path d='M5.36438 5.86373C5.25088 5.97726 5.11613 6.06733 4.96782 6.12877C4.8195 6.19022 4.66054 6.22185 4.5 6.22185C4.33946 6.22185 4.1805 6.19022 4.03218 6.12877C3.88387 6.06733 3.74911 5.97726 3.63561 5.86373L0.376347 2.60446C0.258901 2.49185 0.165121 2.35693 0.100505 2.2076C0.0358912 2.05827 0.00174389 1.89754 6.44576e-05 1.73484C-0.00161498 1.57214 0.0292087 1.41075 0.0907274 1.26012C0.152247 1.10949 0.243224 0.972654 0.358321 0.857647C0.473418 0.74264 0.61032 0.651772 0.760998 0.590371C0.911677 0.528971 1.0731 0.498274 1.2358 0.500081C1.3985 0.501888 1.5592 0.536163 1.70847 0.600894C1.85775 0.665626 1.9926 0.759512 2.10512 0.877047L4.50068 3.27125L6.89488 0.877046C7.0074 0.759511 7.14225 0.665626 7.29152 0.600894C7.4408 0.536162 7.6015 0.501887 7.7642 0.500081C7.9269 0.498273 8.08832 0.52897 8.239 0.590371C8.38968 0.651772 8.52658 0.74264 8.64168 0.857646C8.75678 0.972653 8.84775 1.10949 8.90927 1.26012C8.97079 1.41075 9.00161 1.57214 8.99993 1.73484C8.99826 1.89754 8.96411 2.05827 8.89949 2.2076C8.83488 2.35693 8.7411 2.49185 8.62365 2.60446L5.36438 5.86373Z' fill='%230A5B35'/></svg>") !important;
    background-position: right;
    background-size: 9px 7px;
    background-repeat: no-repeat;
    border: none;
    color: var(--text-green);
    line-height: 1;
    font-size: 16px;
    font-weight: 300;
    font-family: "Inter", sans-serif !important;
    padding: 13px 0px;
    line-height: normal;
}

#sortForm .select-field:focus {
    border-color: transparent !important;
    box-shadow: none !important;
}

#sortForm .select-field option {
    padding: 10px !important;
    background-color: var(--white);
    color: var(--text-black);
    cursor: pointer;
    font-size: 14px;
    font-weight: 300;
    font-family: "Inter", sans-serif;
}

#sortForm .select-field option:hover {
    background-color: var(--green-hover);
    color: var(--text-white);
    cursor: pointer;
}

#sortForm .select-field option:disabled {
    cursor: not-allowed;
    color: var(--inactive-grey);
}

#sortForm .select-field option:checked:not(:disabled) {
    background-color: var(--green-hover);
    color: var(--text-white);
}

/* =====================
   4. Filter Modal
===================== */
.filter-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9993;
    padding: 0;
}

.filter-modal.show {
    display: flex;
}

.filter-modal-content {
    background: #fff;
    width: 90%;
    max-width: 450px;
    border-radius: 10px;
    padding: 1.25rem 0;
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    left: 0;
    right: 0;
    top: 5vh;
    transform: translateY(0);
    z-index: 9990;
}

.filter-modal-header {
    display: flex;
    justify-content: end;
    align-items: center;
    padding: 0 10px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
}

.filter-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 10px;
}

.filter-section {
    margin-bottom: 1.25rem;
}

.filter-section h4 {
    /* font-size: 1rem; */
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 600;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.filter-categories .category-item {
    margin-bottom: 0.75rem;
}

/* Category toggles / subcategory lists */
.category-title {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.category-title .arrow {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
    font-size: 0.8em;
}

.category-title.open .arrow {
    transform: rotate(180deg);
}

.subcategory-list {
    list-style: none;
    padding-left: 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.subcategory-list.show {
    max-height: 300px;
}

.subcategory-list li {
    margin-bottom: 0.25rem;
    /* font-size: 0.875rem; */
}

.no-results {
    font-size: 0.875rem;
    color: #999;
}

/* Modal container */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    /* Higher than filters and other elements */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border-radius: 6px;
    width: 90%;
    max-width: 600px;
    position: relative;
}

.close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 40px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.modal-title {
    text-align: center;
    margin-bottom: 1rem;
}

/* Filter modal bottom actions */
.filter-actions {
    display: flex;
    margin-top: 1rem;
    gap: 1rem;
}

/* COUNTY MODAL */
.county-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    /* Higher than other modals */
}

.county-modal.show {
    display: flex;
    z-index: 9993;
}

.county-modal-content {
    background: #fff;
    width: 450px;
    max-width: 90%;
    max-height: 90vh;
    border-radius: 12px;
    padding: 20px;
    overflow-y: auto;
    position: relative;
    margin: 0 auto;
    left: 0;
    right: 0;
    top: 5vh;
    transform: translateY(0);
    display: flex;
    flex-direction: column;
}

.county-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.close-county-modal {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

.country-header {
    font-weight: bold;
    margin-top: 12px;
}

.county-item {
    list-style: none;
    padding: 6px 0;
}

.county-option {
    text-decoration: none;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.county-option.selected {
    font-weight: bold;
    color: #C9A137;
}

/* =====================
   6. Main Layout - Map & Listings
===================== */
/* Since only one view is shown at a time, we use a simple block layout */
.content-wrapper {
    margin-top: 1.25rem;
}

/* MAP SECTION */
.map-col {
    overflow: hidden;
    width: 100%;
    position: relative;
    top: 0;
    height: 700px;
    margin-bottom: 1rem;
    z-index: 50;
}

#map {
    width: 100%;
    height: 100%;
    border-radius: 1.25rem;
}

.map-loading-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    border: 1px solid #ccc;
    border-radius: 8px;
    text-align: center;
}

.map-loading-overlay .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ccc;
    border-top: 4px solid #2f8f3d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
    /* Space between spinner and text */
}

/* Optional: styling for the text */
.map-loading-overlay .loading-text {
    font-size: 14px;
    color: #333;
}

/* .leaflet-marker-icon.custom-marker.leaflet-zoom-animated.leaflet-interactive {
    height: 14px !important;
    width: 14px !important;
} */

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.map-loading-overlay.hidden {
    display: none;
}



/* Elements hidden via the 'hidden' class */
#mapCol.hidden {
    display: none;
}

.adverts-col.hidden {
    display: none;
}

.two-col-grid.map-hidden {
    grid-template-columns: 1fr;
}

/* Custom Popup Styles (Centered on Page) */
.custom-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 11000;
    background: transparent;
    /* border: 1px solid #CCC; */
    /* border-radius: 8px; */
    /* box-shadow: 0 3px 15px rgba(0, 0, 0, 0.3); */
    width: 320px;
    transition: opacity 0.3s ease;
}

div#customPopupInner {
    width: -webkit-fill-available;
}

.custom-popup.boosted {
    background-color: #C9A137 !important;
}

.custom-popup.hidden {
    opacity: 0;
    pointer-events: none;
}

.custom-popup.visible {
    opacity: 1;
    pointer-events: auto;
}

.custom-popup-content {
    position: relative;
    padding: 10px;
}

.custom-popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    cursor: pointer;
    font-size: 40px;
    z-index: 9997;
    background-color: red;
    color: #CCC;
    border-radius: 5px;
    padding: 3px;
    border-radius: 50% 50%;
}

.custom-popup-close span {
    height: 30px;
    width: 30px;
    align-self: center;
    display: flex;
    justify-content: center;
    justify-self: center;
    align-items: center;
    vertical-align: middle;
    padding-bottom: 8px;
    color: var(--text-white);
}

.custom-popup-close:hover {
    background-color: darkred;
    color: #FFF;
}

/* Popup Card Styles */
.popup-card .listing-image {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.popup-card .dog-sold {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 50px;
    z-index: 2;
}

.popup-card .listing-content {
    padding: 0.75rem 1rem;
}

.popup-card h3 {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: bold;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.popup-card .listing-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: #666;
}

.leaflet-marker-icon {
    font-family: 'Inter', sans-serif !important;
}

.marker-cluster-small {
    background: linear-gradient(135deg, #2f8f3d 0%, #C9A137 100%);
    color: #fff;
    font-family: 'Inter', sans-serif !important;
}

.marker-cluster-medium {
    background: linear-gradient(135deg, #2f8f3d 0%, #C9A137 100%);
    color: #fff;
    font-family: 'Inter', sans-serif !important;
}



/* Base styles for the popup */
.leaflet-popup {
    z-index: 1000;
}

/* Remove the popup tip/arrow since we're customizing position */
.leaflet-popup-tip-container {
    display: none !important;
}

/* Style the popup content container */
.leaflet-popup-content-wrapper {
    border-radius: 8px !important;
    box-shadow: 0 3px 20px rgba(0, 0, 0, 0.3) !important;
    padding: 0 !important;
}

/* Popup positioning for markers in bottom half - moves popup above marker */
.popup-position-top {
    margin-top: -10px !important;
    transform: translateY(-100%) !important;
}

/* Popup positioning for markers in top half - moves popup below marker */
.popup-position-bottom {
    margin-top: 10px !important;
}

/* Style the close button */
.leaflet-popup-close-button {
    top: 5px !important;
    right: 5px !important;
    padding: 4px !important;
    width: 22px !important;
    height: 22px !important;
    background-color: white !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    text-align: center;
    line-height: 14px;
    z-index: 1001;
}

/* Smooth animation */
.leaflet-fade-anim .leaflet-popup {
    animation: popupFadeIn 0.2s ease;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-popup-content {
    display: flex;
    justify-content: center;
}

.popup-card {
    display: block;
    width: 100%;
    max-width: 300px;
    background: #FFF;
    border-radius: 8px;
    text-decoration: none;
    overflow: hidden;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.15);
}

.popup-card .listing-image {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.popup-card .listing-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.popup-card .dog-sold {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 50px;
    height: auto;
    z-index: 2;
}

/* Content area */
.popup-card .listing-content {
    padding: 0.75rem 1rem;
}

/* Title, Price, etc. */
.popup-card .listing-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    flex-direction: column;
    justify-content: center;
    align-items: start;
}

.popup-card .listing-meta .meta-item.separator {
    display: none;
}

.popup-card .listing-content {
    gap: 10px;
}

/* ADVERTS SECTION */
.adverts-col {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Listings Grid */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, auto);
    gap: 1.25rem;
}


/* Listing Card */
.listing-card {
    background: var(--card-light-grey);
    border: none;
    border-radius: 12.63px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.listing-card.boosted {
    border: 1px solid var(--card-border-yellow);
    box-shadow: 0 1px 3px rgba(201, 160, 55, 1);
}

.listing-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.432);
    transform: translateY(-3px);
}

.listing-card.boosted:hover {
    box-shadow: 0 10px 20px rgba(201, 160, 55, 0.432);
}

/* Listing Image */
.listing-image {
    position: relative;
    width: 100%;
    padding-top: 300px;
    overflow: hidden;
    border-radius: 5px;
}

.listing-image .image-count {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    vertical-align: middle;
    gap: 5px;
    position: absolute;
    bottom: 5px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px;
    border-radius: 8px 8px;
}

.listing-image .image-count span {
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 500;
    padding-left: 5px;
    color: var(--text-white);
    line-height: 14px;
    margin-top: 2px;
}

.listing-image .image-count svg {
    width: 20px;
    height: 20px;
}

.listing-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 5px;
    background-color: var(--accordion-light-grey);
}

/* Sold Badge & Advert Badges */
.dog-sold {
    position: absolute;
    top: 0px;
    left: 0px;
    right: 0;
    margin: 0px auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    background: rgb(0 0 0 / 70%);
    font-size: 30px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 10px;
}

.dog-sold img {
    object-fit: contain;
    object-position: 50% 50%;
    background-color: transparent;
}

.badges {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 8.37px;
    color: var(--text-white);
}

.badge-boosted,
.badge-verified {
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Inter", sans-serif;
    font-weight: 400;
    font-size: 13px;
    letter-spacing: 0;
    vertical-align: middle;
    height: 23.736474990844727px;
    border-radius: 2.16px;
    gap: 21.58px;
    padding: 10.79px;
}

.badge-boosted {
    background-color: var(--yellow);
}

.badge-verified {
    background-color: var(--green);
}

.listing-content {
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: start;
    gap: 22.73px;
    padding: 30px;
}

.listing-content .listing-title {
    font-family: "Inter", sans-serif;
    font-weight: 500;
    font-size: 22px;
    line-height: 35px;
    letter-spacing: 0;
    vertical-align: middle;
    color: var(--text-green);
    margin-bottom: 0;
    white-space: normal;
}

.listing-price b,
.listing-price {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 25.26px;
    margin-bottom: 0;
    font-family: "Inter", sans-serif;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--text-green);
}

.listing-meta {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 25.26px;
    margin-bottom: 0;
    font-family: "Inter", sans-serif;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--text-green);
}

.meta-item {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 7.58px;
    margin-bottom: 0;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--text-green);
}

.meta-item.separator {
    font-size: 8.6px;
    font-weight: 200;
}

.meta-item svg {
    width: 20.20571517944336px;
    height: 20.20571517944336px;
}

/* =====================
   7. Sponsored Section
===================== */
.sponsored-footer {
    /* max-width: 85%; */
    height: 330px;
    padding-top: 20px !important;
    padding-bottom: 20px !important;
}

.sponsored-footer .card {
    display: block;
    background: #fff;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
    width: 290px;
    height: 290px;
}

.sponsored-footer .card img {
    width: 290px;
    height: 290px;
}

.sponsored-footer .swiper {
    padding: 20px 0;
}

.sponsored-footer .swiper-slide {
    display: flex;
    justify-content: center;
}

.sponsored-footer .swiper-button-next,
.sponsored-footer .swiper-button-prev {
    color: #0C5B34;
}

.sponsored-footer .swiper-button-next:after,
.sponsored-footer .swiper-button-prev:after {
    font-weight: 900;
}

.sponsored-footer .card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.432);
    transform: translateY(-3px);
}

/* =====================
   8. Pagination
===================== */
.pagination-container {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 26px;
}

.page-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--text-green);
    padding: 0px;
    padding-bottom: 5px;
    min-width: 8px;
    text-decoration: none;
    font-size: 16px;
    font-family: "Inter", sans-serif;
    font-weight: 400;
    letter-spacing: 0;
    vertical-align: middle;
    cursor: pointer;
    line-height: 1;
}

.page-btn:hover:not(.disabled) {
    opacity: 0.9;
}

.page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-btn.active {
    border-bottom: 1px solid var(--text-green);
}

.page-dots {
    align-self: center;
    color: #000;
    padding: 0 0.25rem;
}

/* =====================
   9. Responsive Breakpoints
===================== */
/* Large devices (desktops, < 1200px) */
@media (max-width: 1199.98px) {
    .sponsored-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1025px) {
    .listings-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .filters-bar {
        flex-direction: column;
    }

    .filters-bar,
    .filters-bar-one,
    .filters-bar-two {
        align-items: center;
        justify-content: center;
        max-height: none;
        height: auto;
        gap: 10px;
        margin-right: 0;
    }

    #filterToggleBtn,
    #countySelectorBtn,
    #mapToggleBtn,
    .results-count {
        width: 270px !important;
        min-height: 40px !important;
        height: auto !important;
        justify-content: space-between;
    }

    #filterToggleBtn span,
    #countySelectorBtn span,
    #mapToggleBtn span {
        white-space: normal;
    }

    #sortForm .sort-selector {
        width: 270px !important;
        justify-content: space-between;
        padding: 0px 26px;
    }

    #sortForm .sort-selector .select-field {
        padding: 0;
    }
}

/* Medium devices (tablets, < 992px) */
@media (max-width: 991.98px) {
    .map-col {
        height: 100vh;
        max-height: 600px;
        position: relative;
    }

    .sponsored-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Small devices (landscape phones, < 768px) */
@media (max-width: 768px) {
    .filters-bar-one {
        justify-content: center;
    }

    .filters-bar-two {
        min-width: auto;
    }

    .filters-bar,
    .filters-bar-one {
        flex-direction: column;
    }

    .filters-bar-two {
        flex-direction: column-reverse;
    }

    .page-title {
        font-size: 1.75rem;
        padding: 1.5rem 1rem;
    }

    .listings-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-modal-content,
    .county-dropdown-list {
        max-width: 100%;
    }

    .sponsored-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .filters-bar {
        z-index: 100;
    }

    .map-col {
        margin-top: 15px;
        height: calc(100vh - 60px);
        max-height: 500px;
        position: relative !important;
        z-index: 50;
    }

    #map {
        height: 100% !important;
    }

    /* Mobile menu styles */
    .mobile-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #165636;
        z-index: 1500;
        /* Higher than filters but lower than modals */
        overflow-y: auto;
    }

    .mobile-menu-content {
        padding: 1rem;
    }

    #filterToggleBtn,
    #countySelectorBtn,
    #mapToggleBtn,
    .results-count,
    .filters-bar-two,
    #sortForm,
    #sortForm .sort-selector {
        width: 100% !important;
    }

    .filters-bar-one {
        min-width: auto;
        width: 100%;
    }
}

/* Extra small devices (portrait phones, < 576px) */
@media (max-width: 575.98px) {
    html {
        font-size: 14px;
    }

    .dogs-for-sale {
        padding: 0 0.5rem;
    }

    .listings-grid {
        grid-template-columns: 1fr;
    }

    .map-col {
        height: 80vh;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .page-title {
        font-size: 1.5rem;
        padding: 1rem;
    }

    .filter-modal-content {
        padding: 1rem 0;
        top: 0;
    }

    .county-modal-content {
        top: 0;
    }

    .county-list-wrapper {
        padding-left: 0;
    }

    .filter-modal-header,
    .filter-modal-body {
        padding: 0 10px;
    }
}

@media only screen and (max-width: 500px) {
    .listings-grid {
        grid-template-columns: 1fr;
    }

    .meta-item.separator {
        display: none;
    }

    .listing-content {
        padding: 15px;
        gap: 10px;
    }

    .listing-price,
    .listing-meta {
        flex-direction: column;
        align-items: start;
        gap: 5px;
    }

    .listing-price b,
    .listing-price {
        font-size: 16px;
    }

    .meta-item {
        font-size: 14px;
    }

    .meta-item svg {
        width: 15px;
        height: 15px;
    }

    #sortForm .sort-selector {
        padding: 0px 10px;
    }

    #filterToggleBtn,
    #countySelectorBtn,
    #mapToggleBtn {
        padding: 13px 10px;
    }

    #filterToggleBtn span,
    #countySelectorBtn #selectedCountyText,
    #mapToggleBtn span,
    #sortForm .select-field,
    .filters-bar-two .results-count span {
        font-size: 14px;
    }
}

/* =====================
   Custom Marker
===================== */
.custom-marker .marker-content {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    width: 50px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* =====================
   Typography Overrides for Custom Fonts
===================== */
.custom-marker,
.listing-content {
    font-family: 'Inter', sans-serif;
}
