/* ===================================
   Main Search Container
   =================================== */
.ais-SearchBox-form:before{
    display: none!important;
}
.ais-Hits-item, .ais-InfiniteHits-item{
    padding: 0px!important;
    box-shadow: none!important;
}
span.ais-RefinementList-labelText {
    color: #000;
    font-weight: 400;
}   
#algolia-search-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.algolia-search-layout {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.algolia-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.algolia-main {
    flex: 1;
    min-width: 0;
}

/* ===================================
   Search Box - Shared Styles
   =================================== */
.algolia-searchbox {
    margin-bottom: 30px;
}

.algolia-searchbox-form {
    position: relative;
    display: flex;
    gap: 10px;
}

.algolia-searchbox-input {
    flex: 1;
    padding: 15px 40px 15px 20px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s;
    background: white;
}

/* ===================================
   UPDATED: Header Search Input Width
   =================================== */
#algolia-header-search,
.algolia-header-search {
    position: relative !important;
    width: 200px; /* Adjustable width */
   /*  z-index: 999999 !important;*/
}

.algolia-header-searchbox-input {
    width: 100% !important;
    padding: 12px 40px 12px 20px !important;
    font-size: 14px !important;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s;
    background: white;
    box-sizing: border-box;
}

.algolia-searchbox-input:focus,
.algolia-header-searchbox-input:focus {
    border-color: #03a196;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.algolia-searchbox-submit,
.algolia-searchbox-reset {
    padding: 15px 25px;
    background: #03a196;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 14px;
}

.algolia-searchbox-submit:hover {
    background: #03a196;
}

/* Main Search Page - Better Reset/Clear Button */
.algolia-searchbox-reset {
    background: transparent;
    color: #999;
    border: 1px solid #ddd;
    padding: 15px 20px;
    font-size: 18px;
    line-height: 1;
    min-width: 50px;
}

.algolia-searchbox-reset:hover {
    background: #f0f0f0;
    color: #333;
    border-color: #999;
}

/* Hide button text, show only icon */
.ais-SearchBox-reset {
    background: transparent !important;
    border: none !important;
    color: #999;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 20px;
    line-height: 1;
}


/* ===================================
   Clear/Close Icon Inside Input
   =================================== */

/* Remove default search cancel button */
input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    display: none;
}

/* Header search wrapper for clear button */
.algolia-header-searchbox,
.algolia-header-searchbox-form {
    position: relative;
}

/* Custom clear button */
.algolia-search-clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #999;
    line-height: 1;
    padding: 0;
    z-index: 10;
}

.algolia-search-clear-btn:hover {
    color: #333;
}

.algolia-search-clear-btn.show {
    display: flex;
}

/* ===================================
   Stats
   =================================== */
.algolia-stats {
    font-size: 18px;
    color: #333;
    font-weight: 600;
    margin-bottom: 20px;
    display: block;
}

/* ===================================
   Sidebar Filters (Main Search Page) - Now Collapsible
   =================================== */
.algolia-clear-refinements {
    margin-bottom: 25px;
}

.algolia-clear-button {
    width: 100%;
    padding: 12px 20px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.algolia-clear-button:hover {
    background: #e0e0e0;
}

.algolia-clear-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Main filter collapsible section */
.main-filter-section {
    margin-bottom: 20px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.main-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 15px;
    background: #f9f9f9;
    border-bottom: 1px solid #e0e0e0;
    user-select: none;
    transition: background 0.2s;
}

.main-filter-header:hover {
    background: #f0f0f0;
}

.main-filter-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.main-filter-toggle {
    font-size: 12px;
    line-height: 1;
    transition: transform 0.3s ease;
    display: inline-block;
    width: 16px;
    height: 16px;
    text-align: center;
    color: #666;
}

.main-filter-section.collapsed .main-filter-toggle {
    transform: rotate(-90deg);
}

.main-filter-content {
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.main-filter-section.collapsed .main-filter-content {
    max-height: 0;
}

.main-filter-widget-container {
    padding: 15px;
}

/* Legacy support - keep old styles for non-wrapped filters */
.algolia-refinement {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
}

.algolia-refinement h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.algolia-refinement-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.algolia-refinement-item {
    margin-bottom: 10px;
}

.algolia-refinement-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 0px 0;
    transition: color 0.3s;
}

.algolia-refinement-label:hover {
    color: #03a196;
}

.algolia-refinement-checkbox {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.algolia-refinement-count {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    color: #666;
    margin-left: auto;
    display: none !important; /* Hide count numbers */
}

.algolia-show-more {
    display: block !important;
    margin-top: 10px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #03a196;
    color: #03a196;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    width: 100%;
    transition: all 0.3s;
}

.algolia-show-more:hover {
    background: #03a196;
    color: white;
}

.algolia-show-more:disabled {
    display: none !important; /* Hide instead of disable */
}

/* ===================================
   Product Hits Grid (Main Search Page)
   =================================== */
.algolia-hits-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.algolia-hit-item {
    list-style: none;
}

.hit-product {
    background: #F5F5F5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.hit-product:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.hit-image {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    overflow: hidden;
    background: #f5f5f5;
}

.hit-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.hit-product:hover .hit-image img {
    transform: scale(1.05);
}

.hit-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hit-name {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
}

.hit-name a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.hit-name a:hover {
    color: #03a196;
}

.hit-price {
    font-size: 15px;
    font-weight: 600;
    color: #03a196;
    margin-bottom: 10px;
    text-align: center;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.no-results p {
    font-size: 18px;
    color: #666;
    margin: 0;
}

/* ===================================
   Pagination (Main Search Page)
   =================================== */
.algolia-pagination {
    margin-top: 40px;
}

.algolia-pagination-list {
    display: flex;
    justify-content: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.algolia-pagination-item {
    list-style: none;
}

.algolia-pagination-link {
    display: block;
    padding: 5px 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.algolia-pagination-link:hover {
    background: #03a196;
    color: white;
    border-color: #03a196;
}

.algolia-pagination-item-selected .algolia-pagination-link {
    background: #03a196;
    color: white;
    border-color: #03a196;
}

.algolia-pagination-item-disabled .algolia-pagination-link {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===================================
   NEW: Header Search Dropdown - Fixed Width & Clean Design
   =================================== */
.algolia-search-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    right: 0; /* Align to right edge of search box */
    left: auto; /* Override any left positioning */
    width: 700px; /* Fixed width container */
    max-width: calc(100vw - 40px); /* Prevent extending beyond viewport */
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 999999 !important;
    max-height: 600px;
    overflow: hidden;
    display: none;
}

.algolia-search-dropdown.algolia-dropdown-show {
    display: block;
}

/* Mobile close icon */
.algolia-mobile-close {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: transparent !important;
    color: #000;
    text-align: center;
    line-height: 30px;
    cursor: pointer;
    font-size: 28px;
    font-weight: 300;
    z-index: 10;
}

/* Stats header */
.algolia-dropdown-stats {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    color: #666;
    background: #f9f9f9;
    font-weight: 500;
}

/* Main content area with sidebar and results */
.algolia-dropdown-content {
    display: flex;
    max-height: 500px;
}

/* ===================================
   NEW: Collapsible Filters Sidebar
   =================================== */
.algolia-dropdown-filters {
    width: 200px;
    background: #f9f9f9;
    border-right: 1px solid #eee;
    padding: 15px;
    overflow-y: auto;
}

.algolia-dropdown-filters h3 {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #333;
    font-weight: 600;
    display: none;
}

/* Collapsible filter section */
.dropdown-filter-section {
    margin-bottom: 5px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 5px;
}

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

.dropdown-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 8px 0;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    user-select: none;
}

.dropdown-filter-toggle {
    font-size: 12px;
    line-height: 1;
    transition: transform 0.3s ease;
    display: inline-block;
    width: 16px;
    height: 16px;
    text-align: center;
}

.dropdown-filter-section.collapsed .dropdown-filter-toggle {
    transform: rotate(-90deg);
}

/* Alternative: Use CSS arrows instead of Unicode
.dropdown-filter-toggle::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid #333;
    transition: transform 0.3s ease;
}

.dropdown-filter-section.collapsed .dropdown-filter-toggle::before {
    transform: rotate(-90deg);
}
*/

.dropdown-filter-content {
    max-height: max-content;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.dropdown-filter-section.collapsed .dropdown-filter-content {
    max-height: 0;
}

/* Filter list styling */
.ais-RefinementList-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ais-RefinementList-item {
    margin-bottom: 2px;
}

/* Note: We let InstantSearch handle showing/hiding items based on limit
   The limit: 3 in JavaScript configuration controls initial visibility */

.ais-RefinementList-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 12px;
    color: #555;
    transition: color 0.2s;
}

.ais-RefinementList-label:hover {
    color: #03a196;
}

.ais-RefinementList-checkbox {
    margin-right: 8px;
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.ais-RefinementList-labelText {
    flex: 1;
}

.ais-RefinementList-count {
    background: #e0e0e0;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 11px;
    color: #666;
    margin-left: 6px;
    display: none !important; /* Hide count numbers */
}

/* Show More/Less button for filters */
.dropdown-show-more,
.ais-RefinementList-showMore {
    display: block !important;
    margin-top: 8px;
    padding: 6px 10px;
    background: white;
    border: 1px solid #03a196;
    color: #03a196;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    width: 100%;
    transition: all 0.3s;
    text-align: center;
    height: 30px;
}

.dropdown-show-more:hover, .ais-RefinementList-showMore:hover {
    background: #03a196;
    color: white;
}

.dropdown-show-more:disabled,
.ais-RefinementList-showMore:disabled,
.ais-RefinementList-showMore[disabled],
.ais-RefinementList-showMore.ais-RefinementList-showMore--disabled {
    display: none !important; /* Hide instead of disable */
}

/* Hide button when there are no more items to show */
.ais-RefinementList:not(.ais-RefinementList--noRefinement) 
.ais-RefinementList-showMore:empty {
    display: none !important;
}

/* ===================================
   Results Area
   =================================== */
.algolia-dropdown-results-wrapper {
    flex: 1;
    padding: 15px 20px;
    overflow-y: auto;
}

.algolia-dropdown-loading {
    text-align: center;
    padding: 40px 20px;
    display: none;
}

.algolia-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #03a196;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* ===================================
   NEW: Product Results - Show 5 Items
   =================================== */
.algolia-dropdown-hits-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Hide items after 5th */
.algolia-dropdown-hit-item:nth-child(n+6) {
    display: none !important;
}

.algolia-dropdown-hit {
    display: flex;
    gap: 12px;
    padding: 5px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
    width:100%;
}

.algolia-dropdown-hit:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-color: #03a196;
}

.algolia-dropdown-hit-image {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 4px;
    background: #f5f5f5;
}

.algolia-dropdown-hit-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.algolia-dropdown-hit-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.algolia-dropdown-hit-name {
    width: 100%;
    font-size: 12px;
    font-weight: 400;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.algolia-dropdown-hit-price {
    font-size: 12px;
    font-weight: 500;
    color: #03a196;
}

.algolia-dropdown-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

/* ===================================
   NEW: Show All Results Button
   =================================== */
.algolia-dropdown-view-all {
    padding: 5px 5px;
    border-top: 1px solid #eee;
    text-align: center;
    display: none;
    background: #f9f9f9;
}

.algolia-dropdown-view-all .button {
    display: inline-block;
    padding: 10px 30px;
    background: transparent !important;
    color: #000 !important;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.3s;
}

.algolia-dropdown-view-all .button:hover {
    background: #03a196;
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 1024px) {
    .algolia-hits-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Main search page responsive */
    .algolia-search-layout {
        flex-direction: column;
    }
    
    .algolia-sidebar {
        width: 100%;
    }
    
    .algolia-hits-list {
        grid-template-columns: repeat(2,1fr);
        gap: 7px;
    }
    
    /* Header search mobile */
    #algolia-header-search,
    .algolia-header-search {
        width: 100%;
    }
    
    .algolia-search-dropdown {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
        z-index: 2147483647 !important;
    }
    
    .algolia-mobile-close {
        display: block;
    }
    
    .algolia-dropdown-content {
        flex-direction: column;
        height: calc(100vh - 100px);
        max-height: none;
    }
    
    .algolia-dropdown-filters {
        width: 100%;
        max-height: 40%;
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    
    .algolia-dropdown-results-wrapper {
        flex: 1;
        overflow-y: auto;
    }
}

/* ===================================
   Highlight Styling
   =================================== */
.ais-Highlight-highlighted {
    background-color: #fff59d;
    font-style: normal;
    font-weight: 600;
}

/* ===================================
   Error Messages
   =================================== */
.algolia-error {
    background: #ffebee;
    border: 1px solid #ef5350;
    color: #c62828;
    padding: 20px;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
}

/* ===================================
   Prevent clipping from theme sections
   =================================== */
section,
.container,
.content-wrapper,
.page-content,
.hero-section,
.slider,
.elementor-section {
    overflow: visible !important;
}

.ais-RefinementList-showMore:focus {
    border-color: unset !important;
    box-shadow: unset !important;
    color: #fff !important;
    background: #03a196;
}

/* =========================================
   ALGOLIA MOBILE FILTER ENHANCEMENTS
   Add this to search.css or enqueue separately
   Does NOT modify existing desktop styles
   ========================================= */

/* Mobile Filter Toggle Button - Hidden on desktop */
.algolia-mobile-filter-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.algolia-mobile-filter-toggle:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.algolia-mobile-filter-toggle .filter-icon {
    margin-right: 8px;
    font-size: 18px;
}

/* Sidebar Close Button - Hidden on desktop */
.algolia-sidebar-close {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    z-index: 10;
    padding: 0;
    width: 40px;
    height: 40px;
}

.algolia-sidebar-close:hover {
    color: #333;
}

/* Mobile Overlay - Hidden on desktop */
.algolia-mobile-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;
}

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

/* =========================================
   MOBILE STYLES (≤768px)
   ========================================= */

@media (max-width: 768px) {
    /* Show mobile toggle button */
    .algolia-mobile-filter-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Transform sidebar to off-canvas */
    .algolia-sidebar {
        position: fixed !important;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 400px;
        height: 100vh;
        z-index: 999;
        overflow-y: auto;
        transition: right 0.3s ease;
        background: #fff;
        box-shadow: -4px 0 12px rgba(0, 0, 0, 0.2);
        padding: 60px 20px 20px 20px !important;
    }

    /* Active state - slide in */
    .algolia-sidebar.mobile-active {
        right: 0;
    }

    /* Show close button */
    .algolia-sidebar-close {
        display: block;
    }

    /* Full width for main content */
    .algolia-search-layout {
        display: block !important;
        grid-template-columns: 1fr !important;
    }

    .algolia-main {
        width: 100% !important;
        padding: 0 !important;
    }

    /* Prevent body scroll when sidebar open */
    body:has(.algolia-sidebar.mobile-active) {
        overflow: hidden;
    }
}

/* =========================================
   DESKTOP (>768px) - No changes to existing
   ========================================= */

@media (min-width: 769px) {
    /* Ensure mobile elements stay hidden */
    .algolia-mobile-filter-toggle {
        display: none !important;
    }

    .algolia-sidebar-close {
        display: none !important;
    }

    .algolia-mobile-overlay {
        display: none !important;
    }
}

/* =========================================
   CATEGORY SEARCH STYLING
   ========================================= */

#algolia-category-container {
    width: 100%;
}

#algolia-category-container .algolia-search-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

#algolia-category-container .algolia-sidebar {
    position: sticky;
    top: 100px;
    align-self: flex-start;
}

#algolia-category-container .algolia-main {
    min-width: 0;
}

/* Category Search - Mobile */
@media (max-width: 768px) {
    #algolia-category-container .algolia-search-layout {
        display: block;
    }

    #algolia-category-container .algolia-sidebar {
        position: fixed !important;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 400px;
        height: 100vh;
        z-index: 999;
        overflow-y: auto;
        transition: right 0.3s ease;
        background: #fff;
        box-shadow: -4px 0 12px rgba(0, 0, 0, 0.2);
        padding: 60px 20px 20px 20px !important;
    }

    #algolia-category-container .algolia-sidebar.mobile-active {
        right: 0;
    }

    #algolia-category-container .algolia-main {
        width: 100%;
    }
}

/* =========================================
   MOBILE REFINEMENT IMPROVEMENTS
   ========================================= */

@media (max-width: 768px) {
    /* Better spacing in sidebar */
    .algolia-sidebar .ais-Panel {
        margin-bottom: 20px;
    }

    .algolia-sidebar .ais-RefinementList-list,
    .algolia-sidebar .ais-Menu-list {
        max-height: 300px;
        overflow-y: auto;
    }

    /* Clear refinements button styling */
    .algolia-sidebar .ais-ClearRefinements {
        margin-bottom: 20px;
    }

    .algolia-sidebar .ais-ClearRefinements-button {
        width: 100%;
        padding: 12px;
        background: #f5f5f5;
        border: 1px solid #ddd;
        border-radius: 4px;
        cursor: pointer;
        font-weight: 600;
    }

    .algolia-sidebar .ais-ClearRefinements-button:hover {
        background: #e5e5e5;
    }
}
