/* Search Filters Sidebar */
.search-page-wrapper {
    max-width: 1425px;
    padding: 0 15px;
    margin: 100px auto 0 auto;
    position: relative;
}

/* Mobile Filter Toggle Button */
.mobile-filter-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    background: #82B92E;
    color: #FFFFFF;
    border: none;
    border-radius: 50px;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(130, 185, 46, 0.4);
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.mobile-filter-toggle:hover {
    background: #6B9B23;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(130, 185, 46, 0.5);
}

.mobile-filter-toggle i {
    font-size: 16px;
}

/* Mobile Filter Drawer Overlay */
.mobile-filter-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-filter-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile Filter Drawer */
.mobile-filter-drawer {
    display: none;
    position: fixed;
    top: 0;
    right: -85%;
    width: 85%;
    max-width: 360px;
    height: 100%;
    max-height: 100vh;
    background: #FFFFFF;
    z-index: 999;
    transition: right 0.3s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    flex-direction: column;
}

.mobile-filter-drawer.active {
    right: 0;
    display: flex;
}

@media (max-width: 991px) {
    .mobile-filter-drawer {
        display: flex;
    }
}

.mobile-filter-drawer .filter-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    margin-top: 20%;
}

.mobile-filter-drawer .filter-drawer-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    margin: 0;
}

.filter-drawer-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6B7280;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.filter-drawer-close:hover {
    color: #000000;
}

.mobile-filter-drawer .filter-drawer-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 24px;
    -webkit-overflow-scrolling: touch;
    display: block;
    visibility: visible;
    background: #FFFFFF;
    min-height: 0;
}

.mobile-filter-drawer .filter-drawer-content .search-filters-sidebar {
    box-shadow: none;
    padding: 0;
    margin: 0;
    position: static;
    display: block;
    background: #FFFFFF;
    color: #000000;
}

.mobile-filter-drawer .filter-drawer-content .filter-group {
    display: block;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #E5E7EB;
}

.mobile-filter-drawer .filter-drawer-content .search-filters-sidebar .filter-title {
    display: block;
    color: #000000;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 12px 0;
}

.mobile-filter-drawer .filter-drawer-content .search-filters-sidebar .filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-filter-drawer .filter-drawer-content .search-filters-sidebar .filter-radio {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-filter-drawer .filter-drawer-content .search-filters-sidebar .radio-label {
    color: #374151;
    font-size: 14px;
}

.mobile-filter-drawer .filter-drawer-content .search-filters-sidebar .filters-header {
    display: none;
}

.mobile-filter-drawer .filter-drawer-content .search-filters-sidebar .price-range-slider,
.mobile-filter-drawer .filter-drawer-content .search-filters-sidebar .year-range-slider {
    display: block;
}

.mobile-filter-drawer .filter-drawer-content .filter-actions {
    display: none;
}

.mobile-filter-drawer .filter-drawer-content .sidebar-reviews {
    display: none;
}

.mobile-filter-drawer .filter-drawer-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #E5E7EB;
    background: #FFFFFF;
}

.mobile-filter-drawer .filter-drawer-footer .btn-clear-filters,
.mobile-filter-drawer .filter-drawer-footer .btn-apply-filters {
    flex: 1;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-filter-drawer .filter-drawer-footer .btn-clear-filters {
    background: #FFFFFF;
    border: 2px solid #E5E7EB;
    color: #374151;
}

.mobile-filter-drawer .filter-drawer-footer .btn-clear-filters:hover {
    border-color: #9CA3AF;
    background: #F9FAFB;
}

.mobile-filter-drawer .filter-drawer-footer .btn-apply-filters {
    background: #82B92E;
    border: none;
    color: #FFFFFF;
}

.mobile-filter-drawer .filter-drawer-footer .btn-apply-filters:hover {
    background: #6B9B23;
}

/* Body scroll lock when drawer is open */
body.drawer-open {
    overflow: hidden;
}

.search-filters-sidebar {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 20px;
    margin-bottom: 20px;
}

/* Filters Header */
.filters-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.filters-header i {
    color: #82B92E;
    font-size: 20px;
}

.filters-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #000000;
    margin: 0;
}

/* Filter Groups */
.filter-group {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #E5E7EB;
}

.filter-group:last-of-type {
    border-bottom: none;
}

.filter-title {
    font-size: 16px;
    font-weight: 700;
    color: #000000;
    margin: 0 0 16px 0;
}

/* Range Sliders */
.price-range-slider {
    padding: 10px 14px;
    position: relative;
}

.price-range-slider input[type="range"],
.price-range-input {
    width: 100%;
    height: 6px;
    background: #E5E7EB;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    display: block;
    margin: 8px 0;
    position: relative;
    cursor: pointer;
}

/* Add tick marks for price range */
.price-range-slider {
    position: relative;
}

/* Price tick styling - hide default datalist */
datalist {
    display: none;
}

.price-range-slider input[type="range"]::-webkit-slider-thumb,
.price-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #FFD100;
    border: 3px solid #FFFFFF;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    margin-top: -10px;
}

.price-range-slider input[type="range"]::-moz-range-thumb,
.price-range-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #FFD100;
    border: 3px solid #FFFFFF;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.price-range-slider input[type="range"]::-webkit-slider-runnable-track,
.price-range-input::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: transparent;
    border-radius: 3px;
}

.price-range-slider input[type="range"]::-moz-range-track,
.price-range-input::-moz-range-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: transparent;
    border-radius: 3px;
}

.range-values {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #6B7280;
    padding: 10px 0 0 0;
    margin-top: 5px;
}

/* Year Range Slider */
.year-range-slider {
    padding: 10px 14px;
    position: relative;
}

.year-range-slider input[type="range"],
.year-range-input {
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, #E5E7EB 0%, #E5E7EB 100%);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    display: block;
    margin: 8px 0;
    position: relative;
    cursor: pointer;
}

.year-range-slider input[type="range"]::-webkit-slider-thumb,
.year-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #FFD100;
    border: 3px solid #FFFFFF;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    margin-top: -7px;
}

.year-range-slider input[type="range"]::-moz-range-thumb,
.year-range-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #FFD100;
    border: 3px solid #FFFFFF;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.year-range-slider input[type="range"]::-webkit-slider-runnable-track,
.year-range-input::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: transparent;
    border-radius: 3px;
}

.year-range-slider input[type="range"]::-moz-range-track,
.year-range-input::-moz-range-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: transparent;
    border-radius: 3px;
}

.year-range-slider .range-values {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #6B7280;
    padding: 10px 0 0 0;
    margin-top: 5px;
}

.year-range-slider .max-value {
    font-weight: 600;
    color: #000000;
    text-align: right;
    max-width: 70%;
    white-space: normal;
    word-break: break-word;
    line-height: 1.3;
}

/* Custom Dropdown */
.custom-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-selected {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #FFFFFF;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.dropdown-selected:hover {
    border-color: #D1D5DB;
    background-color: #FAFAFA;
}

.dropdown-selected.active {
    border-color: #FFD100;
    box-shadow: 0 0 0 4px rgba(255, 209, 0, 0.15);
}

.dropdown-selected i {
    color: #6B7280;
    font-size: 14px;
    transition: transform 0.2s ease;
}

.dropdown-selected.active i {
    transform: rotate(180deg);
}

.dropdown-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #FFFFFF;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

.dropdown-options.show {
    display: block;
}

.dropdown-option {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    transition: all 0.15s ease;
    border-bottom: 1px solid #F3F4F6;
}

.dropdown-option:last-child {
    border-bottom: none;
}

.dropdown-option:hover {
    background-color: #FEF9E7;
    color: #000000;
}

.dropdown-option.selected {
    background-color: #FFD100;
    color: #000000;
    font-weight: 600;
}

/* Scrollbar styling for dropdown */
.dropdown-options::-webkit-scrollbar {
    width: 8px;
}

.dropdown-options::-webkit-scrollbar-track {
    background: #F3F4F6;
    border-radius: 0 10px 10px 0;
}

.dropdown-options::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 4px;
}

.dropdown-options::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

/* Radio Button Filters */
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

.filter-radio input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #FFD100;
}

.filter-radio .radio-label {
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    user-select: none;
}

.filter-radio input[type="radio"]:checked + .radio-label {
    font-weight: 600;
    color: #000000;
}

/* Action Buttons */
.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.btn-apply-filters {
    background: #82B92E;
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.btn-apply-filters:hover {
    background: #6fa025;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(130, 185, 46, 0.3);
}

.btn-clear-filters {
    background: #FFFFFF;
    color: #6B7280;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.btn-clear-filters:hover {
    border-color: #D1D5DB;
    color: #374151;
}

/* Sidebar Reviews Section */
.sidebar-reviews {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #E5E7EB;
}

.sidebar-reviews h4 {
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    margin: 0 0 4px 0;
}

.reviews-subtitle {
    font-size: 14px;
    color: #6B7280;
    margin: 0 0 20px 0;
}

/* Review Cards */
.review-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
}

.review-card {
    background: #FFFFFF;
    padding: 0 0 16px 0;
    border-bottom: 1px solid #F3F4F6;
}

.review-card:last-child {
    border-bottom: none;
}

.review-quote {
    font-size: 24px;
    color: #9CA3AF;
    margin-bottom: 8px;
    line-height: 1;
}

.review-stars {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}

.review-stars i {
    color: #FFD100;
    font-size: 14px;
}

.review-text {
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
    margin: 0 0 16px 0;
}

.review-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-author-info {
    flex-direction: column;
    gap: 2px;
}

.review-author {
    font-size: 14px;
    font-weight: 700;
    color: #000000;
}

.review-date {
    font-size: 12px;
    color: #9CA3AF;
}

.review-badge {
    font-size: 11px;
    font-weight: 500;
    color: #6B7280;
    background: #F3F4F6;
    padding: 4px 10px;
    border-radius: 4px;
}

/* View All Reviews Link */
.view-all-reviews {
    display: block;
    text-align: center;
    padding: 12px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
}

.view-all-reviews:hover {
    background: #F3F4F6;
    color: #000000;
    text-decoration: none;
}

/* Mobile Responsive */
@media (max-width: 991px) {
    .search-filters-sidebar {
        position: relative;
        top: 0;
        margin-bottom: 30px;
    }
}

@media (max-width: 767px) {
    .search-page-wrapper {
        padding: 0 10px;
    }
    
    .search-filters-sidebar {
        padding: 20px;
        border-radius: 8px;
    }
    
    .filters-header h3 {
        font-size: 18px;
    }
    
    .filter-title {
        font-size: 15px;
    }
    
    .filter-radio .radio-label {
        font-size: 13px;
    }
}

/* Results Area Adjustments */
.search-results {
    width: 100%;
}

.search-results .content {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

/* Remove old dropdown styles from results page */
.search-results .results-type .pull-right select {
    display: none;
}

/* Badge for result count */
.results-badge {
    background: #FFD100;
    color: #000000;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    margin-left: 12px;
    display: inline-block;
    vertical-align: middle;
}

.exact-matches-section .results-type h1,
.close-matches-section .results-type h1 {
    display: inline-block;
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

/* Results Type Header */
.results-type {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #E5E7EB;
}

.lowest-prices {
    max-height: 40px;
    width: auto;
}

/* Mobile Responsive - Below 992px */
@media (max-width: 991px) {
    /* Hide desktop sidebar */
    .sidebar-filters-desktop {
        display: none !important;
    }
    
    /* Show mobile filter toggle */
    .mobile-filter-toggle {
        display: flex;
    }
    
    /* Show mobile drawer */
    .mobile-filter-drawer {
        display: flex;
    }
    
    /* Adjust search page wrapper */
    .search-page-wrapper {
        margin-top: 60px;
        padding: 0 10px;
    }
    
    /* Full width results on mobile */
    .search-results .content {
        padding: 15px;
    }
}

/* Tablet adjustments - 768px to 991px */
@media (min-width: 768px) and (max-width: 991px) {
    .mobile-filter-drawer {
        max-width: 400px;
    }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
    .mobile-filter-toggle {
        padding: 12px 20px;
        font-size: 13px;
    }

    
    .filter-drawer-header {
        padding: 16px 20px;
    }
    
    .filter-drawer-content {
        padding: 16px 20px;
    }
    
    .filter-drawer-footer {
        padding: 12px 20px;
    }
}
