body {
    font-family: Arial, sans-serif;
    color: #333;
    padding: 0;
    margin: 0;
    background-color: #f9f9f9;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
h1 {
    font-size: 16px;
    margin-bottom: 20px;
    color: #333;
}
.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.browse-links a {
    color: #0066cc;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: bold;
}
.ais-SearchBox {
    max-width: 500px;
}
.ais-SearchBox-form {
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}
.ais-SearchBox-input {
    padding: 10px;
}
.ais-SearchBox-submit {
    margin-right: 10px;
}
.search-container {
    display: flex;
    margin-top: 20px;
}
.left-panel {
    width: 280px;
    padding-right: 20px;
}
.right-panel {
    flex-grow: 1;
}
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 13px;
}
.view-options {
    display: flex;
    gap: 5px;
}
.view-option {
    border: 1px solid #ddd;
    padding: 5px 10px;
    background: white;
    cursor: pointer;
}
.view-option.active {
    background: #f0f0f0;
}

.pagination-container {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}
.ais-Pagination-list {
    display: flex;
    list-style-type: none;
    padding: 0;
    margin: 0;
}
.ais-Pagination-item {
    margin: 0 5px;
}
.ais-Pagination-link {
    padding: 5px 10px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    text-decoration: none;
}
.ais-Pagination-item--selected .ais-Pagination-link {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

/* Filter Panel Styles - KEEPING THESE */
.filter-section {
    margin-bottom: 20px;
    border: 1px solid #ddd;
    background: white;
}
.filter-header {
    padding: 10px 15px;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    cursor: pointer;
}
.filter-content {
    padding: 10px 15px;
    font-size: 13px;
}
.ais-RefinementList-item {
    margin-bottom: 5px;
}
.ais-RefinementList-label {
    display: flex;
    align-items: center;
}
.ais-RefinementList-checkbox {
    margin-right: 8px;
}
.ais-RefinementList-count {
    margin-left: 5px;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    color: #666;
}
     /* Specification filters styling */
 .specs-filters {
     margin-top: 20px;
     border-top: 1px solid #eee;
     padding-top: 15px;
 }

.secondary-filters-notice {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.secondary-filters-notice i {
    margin-right: 5px;
}

/* Filter header styling */
.filter-header {
    cursor: pointer;
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-content {
    margin-bottom: 15px;
}

/* Searchable refinement styling */
.search-box {
    margin-bottom: 10px;
}

.searchable-input {
    width: 100%;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Show more button */
.ais-RefinementList-showMore {
    background-color: transparent;
    border: none;
    color: #0366d6;
    padding: 0;
    margin-top: 5px;
    cursor: pointer;
    font-size: 0.9rem;
}

.ais-RefinementList-showMore:hover {
    text-decoration: underline;
}

/* Refinement list items */
.listing-filter-element {
    margin-bottom: 5px;
}
.listing-filter-element [type="checkbox"] {
    margin-bottom: 0;
}
.active-filters-container {
    background: #f8f9fa;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* Current refinements styling */
.current-refinements-root {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
}

.refinement-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.refinement-label {
    font-weight: 600;
    color: #666;
    font-size: 0.9em;
}

.refinement-pill {
    display: inline-flex;
    align-items: center;
    background: white;
    padding: 4px 8px;
    border-radius: 16px;
    font-size: 0.9em;
    border: 1px solid #ddd;
    color: #333;
    gap: 6px;
}

.refinement-remove {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0;
    font-size: 1.2em;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.refinement-remove:hover {
    color: #666;
}

/* Clear all button styling */
.clear-all-button {
    background: #e9ecef;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.clear-all-button:hover {
    background: #dee2e6;
    color: #333;
}

.clear-all-button[disabled] {
    display: none;
}

/* Responsive adjustments */
@media screen and (max-width: 640px) {
    .active-filters-container {
        flex-direction: column;
        align-items: stretch;
    }

    .refinement-group {
        flex-direction: column;
        align-items: flex-start;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-section{
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.ais-SearchBox{
    max-width: 100% !important;
}

.ais-SearchBox-form{
    border: none !important;
}

/* Fix for duplicate search icons */
.ais-SearchBox-submit:not(:first-of-type) {
    display: none !important;
}

/* Ensure only one icon is visible within the first submit button */
.ais-SearchBox-form::before,
.ais-SearchBox-form::after {
    content: none !important;
    display: none !important;
}

/* Mobile Filter Panel */
.filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.filter-panel {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background-color: white;
    z-index: 1000;
    overflow-y: auto;
    transition: right 0.3s ease;
    padding: 1rem;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
}

.filter-panel.open {
    right: 0;
}

.filter-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.filter-panel-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Filter toggle button styles */
.filter-toggle-button {
    display: flex;
    align-items: center;
    margin-left: 0.5rem;
}

#mobile-filter-toggle {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

#mobile-filter-toggle i {
    font-size: 1rem;
}

/* Responsive adjustments */
@media screen and (max-width: 640px) {
    /* Hide filters in main layout on mobile */

    /* Adjust grid for mobile */
    .main-container .cell.small-8 {
        width: 60%;
    }

    .main-container .cell.small-4 {
        width: 40%;
    }

    /* Make search input full width */
    #searchbox {
        width: 100%;
    }

    /* Adjust result area for full width */
    .grid-x .cell.small-12.medium-9.large-9 {
        width: 100%;
    }

    /* Adjust filter button position */
    .custom-search-container {
        display: flex;
        align-items: center;
    }
}

/* When filters panel is open on mobile */
body.filters-open {
    overflow: hidden;
}

/* Active filter count badge */
.filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #1779ba;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    margin-left: 5px;
}

/* Secondary filter notice in mobile panel */
.mobile-section-header {
    font-weight: bold;
    margin: 1rem 0 0.5rem 0;
    padding-top: 0.5rem;
    border-top: 1px solid #eee;
}

.mobile-filter-section {
    margin-bottom: 1rem;
}

.mobile-filter-section .filter-content {
    padding-left: 0.5rem;
}

/* Make checkboxes easier to tap on mobile */
.mobile-filter-section .listing-filter-element label {
    padding: 8px 0;
    display: inline-block;
    width: 80%;
}

/* Filter styling */
.filter-section {
    margin-bottom: 15px;
    background: white;
}

.filter-header {
    cursor: pointer;
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-content {
    margin-bottom: 15px;
}

/* Mobile filter panel */
.filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.filter-panel {
    position: fixed;
    top: 0;
    right: -85%;
    width: 85%;
    height: 100%;
    background-color: white;
    z-index: 1000;
    overflow-y: auto;
    transition: right 0.3s ease;
    padding: 1rem;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
}

.filter-panel.open {
    right: 0;
}

.filter-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.filter-panel-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Filter toggle button */
.filter-toggle-button {
    display: none;
}

@media (max-width: 640px) {
    .filter-toggle-button {
        display: flex;
        width: 100%;
        margin: 10px 0;
    }

    #mobile-filter-toggle {
        width: 100%;
        padding: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border: 1px solid #ddd;
        border-radius: 4px;
        background: #f5f5f5;
        font-weight: 500;
    }

    /* Hide desktop filters container on mobile */
    .cell.small-12.medium-3.large-3.filter-container {
        display: none;
    }

    /* Full width results on mobile */
    .cell.small-12.medium-9.large-9 {
        width: 100%;
    }
}

/* Filter badge for active filters count */
.filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #1779ba;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    margin-left: 5px;
}

/* Specification filters */
.specs-filters {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.secondary-filters-notice {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.secondary-filters-notice i {
    margin-right: 5px;
}

/* Refinement list items */
.listing-filter-element {
    margin-bottom: 5px;
}

.listing-filter-element [type="checkbox"] {
    margin-bottom: 0;
}

/* Active filters styling */
.active-filters-container {
    background: #f8f9fa;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.current-refinements-root {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
}

.current-refinements-item {
    display: inline-flex;
    align-items: center;
    background: white;
    padding: 4px 8px;
    border-radius: 16px;
    font-size: 0.9em;
    border: 1px solid #ddd;
    color: #333;
    gap: 6px;
}

.current-refinements-delete {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0;
    font-size: 1.2em;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.current-refinements-delete:hover {
    color: #666;
}

/* Clear all button */
.clear-all-button {
    background: #e9ecef;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.clear-all-button:hover {
    background: #dee2e6;
    color: #333;
}

.clear-all-button[disabled] {
    display: none;
}

/* Animation for filters */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fix for search box */
.ais-SearchBox {
    max-width: 100% !important;
}

.ais-SearchBox-form {
    border: none !important;
}

/* Fix for duplicate search icons */
.ais-SearchBox-submit:not(:first-of-type) {
    display: none !important;
}

.ais-SearchBox-form::before,
.ais-SearchBox-form::after {
    content: none !important;
    display: none !important;
}


/* Pagination styling */
.pagination-container {
    margin-top: 20px;
}

.filters-count {
    font-size: 0.9em;
    color: #666;
    margin-right: 10px;
}

/* Browse links */
.browse-links {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.browse-links a {
    color: #1779ba;
    text-decoration: none;
}

.browse-links a:hover {
    text-decoration: underline;
}
/* Add these new styles for mobile responsiveness */
@media screen and (max-width: 640px) {
    .browse-links {
        display: flex;
        flex-direction: column;
        margin-bottom: 1rem;
    }

    .browse-links a {
        margin-bottom: 0.5rem;
    }

    .custom-search-container {
        margin-bottom: 1rem;
        width: 100%;
    }

    /* Force the search box to take full width */
    #searchbox,
    #searchbox .ais-SearchBox,
    #searchbox .ais-SearchBox-form {
        width: 100% !important;
    }

    #searchbox .ais-SearchBox-input {
        width: 100% !important;
        box-sizing: border-box;
        padding-right: 40px; /* Make room for the search button */
    }
}

/* Add these styles for all screen sizes */
.custom-search-container,
#searchbox,
#searchbox .ais-SearchBox,
#searchbox .ais-SearchBox-form {
    width: 100%;
}
/* Add these new styles for mobile responsiveness */
@media screen and (max-width: 640px) {
    .browse-links {
        display: flex;
        flex-direction: column;
        margin-bottom: 1rem;
    }

    .browse-links a {
        margin-bottom: 0.5rem;
    }

    .custom-search-container {
        margin-bottom: 1rem;
        width: 100%;
    }

    /* Force the search box to take full width */
    #searchbox,
    #searchbox .ais-SearchBox,
    #searchbox .ais-SearchBox-form {
        width: 100% !important;
    }

    #searchbox .ais-SearchBox-input {
        width: 100% !important;
        box-sizing: border-box;
        padding-right: 40px;
    }

    /* Make refinement bubbles wrap nicely on mobile */
    .current-refinements-root .current-refinements-list {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 8px;
    }

    .current-refinements-item {
        margin-right: 0;
        margin-bottom: 0;
        flex-grow: 0;
        flex-shrink: 0;
        max-width: 100%;
        overflow: hidden;
    }

    .current-refinements-category {
        white-space: normal;
        word-break: break-word;
        max-width: 100%;
        padding: 4px 8px;
        display: flex;
        align-items: center;
    }

    .current-refinements-delete {
        margin-left: 4px;
    }
}

/* Add these styles for all screen sizes */
.custom-search-container,
#searchbox,
#searchbox .ais-SearchBox,
#searchbox .ais-SearchBox-form {
    width: 100%;
}

/* Make refinement bubbles display nicely on all screens */
.current-refinements-root .current-refinements-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    list-style: none;
}

.current-refinements-item {
    margin: 0;
    background-color: #f5f5f5;
    border-radius: 16px;
    overflow: hidden;
}

.current-refinements-category {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 0.875rem;
}

.current-refinements-label {
    margin-right: 4px;
}

.current-refinements-delete {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0;
    margin-left: 6px;
    font-size: 1rem;
}

/* Adds animation to filter bubbles */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.ais-RefinementList-showMore {
    color: unset !important;
}

/* Make the filters sidebar full height with scrolling */
.cell.small-12.medium-3.large-3.filter-container {
    position: sticky;
    top: 20px; /* Add some space from the top */
    height: calc(100vh - 40px); /* Subtract a bit of space for margins */
    overflow-y: auto;
    padding-right: 10px; /* Add space for the scrollbar */
}

/* Ensure filter sections don't have their own scrollbars */
.filter-section {
    /* Remove the existing max-height to prevent double scrollbars */
    max-height: none;
    overflow-y: visible;
}

.equipment-header{
    margin-top: 20px;
}

/* For mobile view, disable sticky behavior */
@media screen and (max-width: 640px) {
    .cell.small-12.medium-3.large-3.filter-container {
        position: static;
        height: auto;
        overflow-y: visible;
    }
    .equipment-header{
        margin-top: 15px;
    }
}
.ais-SearchBox-input{
    margin-bottom: 0 !important;
}

.ais-Hits-item{
    margin-bottom: 15px;
}



