/* sbx- prefix used to avoid conflicts */
.sbx-hidden {
    display: none !important;
}


button#sbx-reset-all-btn {
    background: #FDC4C4;
    color: #8A0000;
}
button#sbx-main-search-btn {
    justify-content: center;
}
button#sbx-reset-btn {
    background: #FDC4C4;
    color: #8A0000;
}
.sbx-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px !important;
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 50;
    font-family: inherit;
}

.sbx-filtre-item,
.sbx-location-container {
    flex: 1;
    min-width: 150px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sbx-filtre-item label,
.sbx-location-container label {
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin: 0;
}

.sbx-custom-select,
.sbx-location-input {
    width: 100%;
    height: 45px;
    padding: 0 15px !important;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    color: #333;
    background-color: #fff !important;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.sbx-custom-select:focus,
.sbx-location-input:focus {
    border-color: #247a34;
    box-shadow: 0 0 0 3px rgba(36, 122, 52, 0.1);
    outline: none;
}

.sbx-prix-range-flex {
    display: flex;
    gap: 8px;
}

.sbx-prix-range-flex input {
    flex: 1;
    min-width: 0;
}

/* Location Container */
.sbx-location-container {
    position: relative;
}

.sbx-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

#sbx-remove-location {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 14px;
    padding: 5px;
}

#sbx-remove-location:hover {
    color: #247a34;
}

/* Dropdown Filtre */
.sbx-dropdown-filtre {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
    padding: 15px;
    z-index: 100;
}

.sbx-dropdown-section {
    margin-bottom: 15px;
}

.sbx-suggestions-title {
    font-size: 11px;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.sbx-dropdown-item {
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
}

.sbx-dropdown-item:hover {
    background: #f5f5f5;
    color: #247a34;
}

/* Around Me Panel */
#sbx-around-me-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sbx-around-tag {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
}

#sbx-close-around-panel {
    background: none;
    border: none;
    color: #2e7d32;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    padding: 0 5px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

#sbx-close-around-panel:hover {
    opacity: 1;
}

.sbx-slider-value {
    font-size: 13px;
    color: #666;
}

.sbx-slider {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 5px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.sbx-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #247a34;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.sbx-map-preview {
    height: 150px;
    background: #eee;
    border-radius: 8px;
    overflow: hidden;
}

.sbx-dropdown-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.sbx-clear-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 13px;
    cursor: pointer;
}

.sbx-validate-btn {
    background: #247a34;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* Selected Location Tag */
#sbx-selection-result {
    width: 100%;
}

.sbx-selected-tag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #EFFAF1;
    color: #247A34;
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    margin-top: 0;
    height: 45px;
    box-sizing: border-box;
    width: 100%;
}

#sbx-remove-tag {
    background: none;
    border: none;
    color: #247A34;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    line-height: 1;
}

/* Advanced Filters */
.sbx-advanced-filter-section {
    display: flex;
    padding: 0 !important;
    flex: 0 0 auto !important;
    min-width: unset !important;
}

.sbx-advanced-filter-header {
    background: #247a34;
    border-radius: 8px;
    padding: 11px 13px;
    cursor: pointer;
    color: #fff;
    margin-top: 0 !important;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.sbx-advanced-filter-header:hover {
    background: #1e632a;
}

.sbx-advanced-filter-header i {
    font-size: 20px;
    color: #fff;
    transition: transform 0.3s;
}

.sbx-rotate-180 {
    transform: rotate(180deg);
}

.sbx-advanced-filter-content {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background-color: white;
    z-index: 99999;
    padding: 30px;
    width: 800px;
    max-width: calc(100vw - 40px);
    border-radius: 18px;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.15);
}

.sbx-filtre-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 15px !important;
    margin-bottom: 20px !important;
}

@media (max-width: 992px) {
    .sbx-advanced-filter-content {
        width: 600px;
    }

    .sbx-filtre-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .sbx-advanced-filter-content {
        width: 80vw;
        padding: 20px;
        left: 0px;
    }

    .sbx-filtre-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

.sbx-button-group {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.sbx-btn-reset {
    background: #f5f5f5;
    color: #666;
    border: none;
    padding: 10px 25px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.sbx-btn-reset:hover {
    background: #e0e0e0;
}

.sbx-btn-search,
.sbx-btn-search-main {
    background: #247a34;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s, transform 0.2s;
    height: 45px;
    box-sizing: border-box;
}

.sbx-btn-search:hover,
.sbx-btn-search-main:hover {
    background: #1e632a;
    transform: translateY(-2px);
}

/* Helpers */
.sbx-hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .sbx-bar {
        padding: 15px;
        flex-direction: column;
        align-items: stretch;
    }

    .sbx-filtre-item,
    .sbx-location-container,
    .sbx-btn-search-main {
        width: 100%;
    }

    .sbx-advanced-filter-header {
        width: 100%;
        height: 45px;
    }

    .sbx-filtre-grid {
        grid-template-columns: 1fr;
    }
}

/* Results Header Styles */
.sbx-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    margin-bottom: 20px;
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    flex-wrap: nowrap;
    gap: 15px;
}

.sbx-results-left {
    flex: 0 1 auto;
    min-width: 150px;
}

.sbx-results-left h3 {
    margin: 0 0 5px 0;
    font-size: 20px;
    color: #1a1a1a;
    font-weight: 700;
}

.sbx-count-results {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.sbx-count-total {
    font-weight: 700;
    color: #247a34;
}

.sbx-header-app-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.sbx-app-download-text {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.sbx-app-buttons {
    display: flex;
    gap: 12px;
    width: 260px;
}

.sbx-store-badge {
    height: 48px;
    width: auto;
    display: block;
    transition: transform 0.2s;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.sbx-store-badge:hover {
    transform: translateY(-2px);
}

.sbx-form-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sbx-form-row .sbx-custom-select {
    min-width: 180px;
    height: 45px;
    padding: 0 15px !important;
}

.sbx-reset-icon-btn {
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 10px;
    width: 45px;
    height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    transition: all 0.3s ease;
}

.sbx-reset-icon-btn:hover {
    background: #f9f9f9;
    color: #247a34;
    border-color: #247a34;
    transform: rotate(-30deg);
}

@media (max-width: 992px) {
    .sbx-results-header {
        justify-content: center;
        text-align: center;
    }

    .sbx-header-app-links {
        align-items: center;
    }
}

@media (max-width: 768px) {
    .sbx-results-header {
        flex-direction: column;
        padding: 20px 15px;
        text-align: center;
        align-items: center;
    }

    .sbx-results-left,
    .sbx-header-app-links {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .sbx-form-row {
        width: 100%;
        justify-content: center;
    }
}

/* Base Normalize for ALL fields (Inputs, Buttons, Dropdowns) */
.sbx-custom-select,
.sbx-location-input,
.sbx-btn-search-main,
.sbx-advanced-filter-header,
.nice-select {
    height: 45px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
}

/* Specific for Flex-based Dropdowns (Nice Select) */
.nice-select {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 15px !important;
    position: relative !important;
    float: none !important;
}

/* Hide native select to prevent duplication */
select.sbx-custom-select {
    display: none !important;
}

/* Nice Select Vertical alignment */
.nice-select {
    line-height: 43px !important;
}

.nice-select .current {
    flex: 1 !important;
    min-width: 0 !important;
    line-height: 45px !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    text-align: left !important;
}

/* Arrow Flex Item Fix */
.nice-select::after {
    display: block !important;
    position: static !important;
    content: '' !important;
    border-bottom: 2px solid #999 !important;
    border-right: 2px solid #999 !important;
    height: 8px !important;
    width: 8px !important;
    transform: rotate(45deg) !important;
    margin-left: 10px !important;
    margin-top: -4px !important;
    flex-shrink: 0 !important;
    /* Never shrink the arrow */
}

/* Remove redundant icon from library/theme */
.nice-select .current::after {
    content: none !important;
}

@media (max-width: 768px) {
    .nice-select .current {
        top: 0 !important;
    }
}

@media (max-width: 480px) {
    .sbx-bar {
        width: 100%;
    }

    .sbx-advanced-filter-content {
        width: 374px;
        padding: 8px;
        left: 0px;
    }
        .sbx-results-header {
        width: 100%;
    }
}

@media only screen 
  and (device-width: 430px) 
  and (device-height: 932px) 
  and (-webkit-device-pixel-ratio: 3) {

  .sbx-bar,
  .sbx-results-header,
  .sl-filter-container {

    margin-right: auto;
    
  }

 .sbx-app-buttons {
   
    width: 320px !important;
}
}