/* ===============================
   ALGOLIA – SEARCH INPUT
================================ */

.algolia-search-input {
    width: 90% !important;
    padding: 10px 16px 10px 42px !important;
    font-size: 14px !important;
    color: #1d2327 !important;
    background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: 14px center !important;
    background-size: 16px 16px !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 8px !important;
    outline: none !important;
    box-sizing: border-box !important;
    transition: border-color .2s, box-shadow .2s;
    -webkit-appearance: none;
    appearance: none;
}

.algolia-search-input::placeholder {
    color: #aaa;
}

.algolia-search-input:focus {
    border-color: #146eb4 !important;
    box-shadow: 0 0 0 3px rgba(20, 110, 180, .12) !important;
}

.algolia-search-input::-webkit-search-cancel-button {
    display: none;
}

.algolia-search-input::-ms-clear {
    display: none;
}

/* ===============================
   ALGOLIA – AUTOCOMPLETE DROPDOWN
================================ */

.aa-dropdown-menu {
    width: 100% !important;
    max-height: 420px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .12);
    z-index: 999999 !important;
    margin-top: 6px;
    padding: 6px 0;
}

.suggestion-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: #1d2327;
    transition: background .15s;
}

.suggestion-link:hover,
.aa-suggestion.aa-cursor .suggestion-link {
    background: #f0f7ff;
    color: #1d2327;
}

.suggestion-link .thumb-wrap {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 6px;
    border: 1px solid #f0f0f0;
    background: #fafafa;
    padding: 2px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.suggestion-link .thumb-wrap .thumb {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    border-radius: 0;
    border: none;
    display: block;
}

.suggestion-link .content {
    flex: 1;
    min-width: 0;
}

.suggestion-link .title {
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.45;
    color: #1d2327;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Bỏ highlight vàng trong autocomplete */
.suggestion-link .title em {
    background: none;
    color: #146eb4;
    font-style: normal;
    font-weight: 600;
}

.suggestion-link .price {
    font-size: 13px;
    font-weight: 700;
    color: #146eb4;
    margin-top: 3px;
}

.suggestion-link .price.is-contact {
    color: #146eb4;
    font-weight: 600;
}

.autocomplete-empty {
    padding: 16px 18px;
    font-size: 13px;
    color: #888;
    text-align: center;
}

/* Footer "Xem tất cả" */
.algolia-footer {
    border-top: 1px solid #f0f0f0;
    padding: 8px 14px;
}

.algolia-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 9px 16px;
    background: #146eb4;
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: background .18s, transform .1s;
    box-sizing: border-box;
}

.algolia-view-all:hover {
    background: #0f5a96;
    transform: translateY(-1px);
}

.algolia-view-all svg {
    flex-shrink: 0;
}

.aa-suggestion+.aa-suggestion .suggestion-link {
    border-top: 1px solid #f5f5f5;
}

/* ===============================
   ALGOLIA – KẾT QUẢ TÌM KIẾM
   Layout: Sidebar (1 cột) + Grid (4 cột)
================================ */

#algolia-results {
    margin-top: 8px;
}

.algolia-search-layout {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    position: relative;
}

/* ===== SIDEBAR ===== */
.algolia-sidebar {
    width: 288px;
    flex-shrink: 0;
    position: sticky;
    top: 64px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    padding: 17px 17px 0;
    overflow: hidden;
}

/* Filter block */
.algolia-filter-block {
    padding: 0;
}

.algolia-filter-block+.algolia-filter-block {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Price block – không có border-top, chỉ có gap dưới */
.algolia-filter-block--price {
    padding-bottom: 16px;
}


/* Tiêu đề "LỌC THEO GIÁ" kiểu heading */
.algolia-filter-title--heading {
    font-size: 14px;
    font-weight: 600;
    color: #0a0a0a;
    letter-spacing: 0;
    padding: 0 0 0 0;
    margin-bottom: 12px;
    border: none;
    cursor: default;
    justify-content: flex-start;
}

.algolia-filter-title--heading:hover {
    background: none;
}

/* Tiêu đề filter section (toggler) */
.algolia-filter-title {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
    color: #364153;
    padding: 13px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.algolia-filter-content {
    padding: 0 0 13px;
}

/* Toggler */
.algolia-filter-toggler {
    cursor: pointer;
    user-select: none;
}

.algolia-toggle-arrow {
    transition: transform .2s;
    flex-shrink: 0;
    color: #364153;
    width: 16px;
    height: 16px;
}

/* Collapsed: icon `>` (chevron-right), content ẩn */
.algolia-filter-collapsed .algolia-filter-content {
    display: none;
}


/* Checkbox list */
.algolia-filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.algolia-filter-item {
    display: flex;
    align-items: center;
}

.algolia-filter-label {
    display: block;
    cursor: pointer;
    width: 100%;
    position: relative;
    padding-left: 26px;
    /* 16px checkbox width + 10px spacing */
    min-height: 20px;
}

.algolia-filter-cb {
    width: 16px;
    height: 16px;
    accent-color: #030213;
    cursor: pointer;
    border-radius: 4px;
    background: #f3f3f5;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    position: absolute;
    left: 0;
    top: 2px;
}

.algolia-filter-label-text {
    display: inline;
    color: #0c0a09;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    word-wrap: break-word;
}

.algolia-filter-item--active .algolia-filter-label-text {
    color: #0a0a0a;
    font-weight: 500;
}

.algolia-filter-count {
    display: inline;
    font-size: 14px;
    color: #99a1af;
    font-weight: 400;
    margin-left: 2px;
}

.algolia-filter-count::before {
    content: "(";
}

.algolia-filter-count::after {
    content: ")";
}

.algolia-filter-item--active .algolia-filter-count {
    color: #99a1af;
}

.algolia-show-more {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #155dfc;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: inline-block;
    transition: color .15s;
    text-transform: uppercase;
    letter-spacing: .01em;
}

.algolia-show-more:hover {
    color: #0f4fd4;
}

.algolia-show-more--disabled {
    display: none !important;
}

.algolia-filter-empty {
    font-size: 13px;
    color: #bbb;
    padding: 4px 0;
}

/* ===== HIERARCHICAL MENU (Danh mục hình cây) ===== */
.algolia-hierarchical-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.algolia-hierarchical-list .algolia-hierarchical-list {
    margin-left: 14px;
    margin-top: 2px;
    border-left: 1px dashed #cbd5e1;
    padding-left: 8px;
}

.algolia-hierarchical-item {
    display: flex;
    flex-direction: column;
}

.algolia-hierarchical-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    width: 100%;
    padding: 6px 8px;
    border-radius: 7px;
    transition: background .15s;
    text-decoration: none;
}

.algolia-hierarchical-link::before {
    content: "•";
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1;
    display: none;
    /* Ẩn mặc định, chỉ hiện ở cấp con nếu muốn */
}

.algolia-hierarchical-list .algolia-hierarchical-list .algolia-hierarchical-link::before {
    display: inline-block;
}

.algolia-hierarchical-link:hover {
    background: #f8fafc;
}

.algolia-hierarchical-item--active>.algolia-hierarchical-link {
    background: #eff6ff;
}

.algolia-hierarchical-item--active>.algolia-hierarchical-link .algolia-filter-label-text {
    color: #146eb4;
    font-weight: 700;
}

.algolia-hierarchical-item--active>.algolia-hierarchical-link .algolia-filter-count {
    background: #dbeafe;
    color: #2563eb;
}

/* Active refinements (filter tags) */
.algolia-cur-root {
    margin-bottom: 14px;
}

.algolia-cur-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.algolia-cur-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: 4px 6px 4px 10px;
    font-size: 12px;
    color: #1e40af;
    font-weight: 500;
    line-height: 1;
}

.algolia-cur-label {
    font-weight: 400;
    color: #64748b;
    font-size: 12px;
    margin-right: 2px;
}

.algolia-cur-cat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.algolia-cur-cat-label {
    font-weight: 600;
    color: #3b82f6;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-right: 1px;
}

.algolia-cur-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #bfdbfe;
    border: none;
    border-radius: 50%;
    color: #1e40af;
    cursor: pointer;
    padding: 0;
    font-size: 12px;
    line-height: 1;
    transition: background .15s, color .15s;
    flex-shrink: 0;
}

.algolia-cur-delete:hover {
    background: #ef4444;
    color: #fff;
}

/* ===== PRICE RANGE DISPLAY (text phía trên slider) ===== */
.algolia-price-range-display {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

.algolia-price-range-display #algolia-price-min,
.algolia-price-range-display #algolia-price-max {
    color: #4a5565;
}

.algolia-price-range-sep {
    color: #99a1af;
}

/* ===== PRICE SLIDER (Rheostat overrides) ===== */

#algolia-price-slider {
    padding: 0 2px 4px;
}


/* ===== TRACK ===== */
#algolia-price-slider .rheostat {
    height: 20px;
    position: relative;
}

#algolia-price-slider .rheostat-background {
    position: absolute;
    background: #ececf0;
    height: 6px;
    top: 7px;
    left: 0;
    right: 0;
    border-radius: 9999px;
}

/* ===== PROGRESS BAR (Đoạn được chọn) ===== */
#algolia-price-slider .rheostat-progress {
    position: absolute;
    background: #146eb4;
    height: 6px;
    top: 7px;
    border-radius: 9999px;
}

/* ===== HANDLE ===== */
#algolia-price-slider .rheostat-handle {
    position: absolute;
    width: 20px !important;
    height: 20px !important;
    top: 0 !important;
    margin-left: -10px !important;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #146eb4;
    box-shadow: 0 1px 4px rgba(20, 110, 180, 0.3);
    cursor: grab;
    outline: none;
    transition: box-shadow 0.15s, transform 0.1s;
    z-index: 2;
}

#algolia-price-slider .rheostat-handle:hover,
#algolia-price-slider .rheostat-handle:focus,
#algolia-price-slider .rheostat-handle:active {
    border-color: #0f5a96;
    box-shadow: 0 0 0 5px rgba(20, 110, 180, 0.15);
    transform: scale(1.15);
    cursor: grabbing;
}

/* Ẩn tooltip */
#algolia-price-slider .rheostat-tooltip {
    display: none !important;
}

/* ===== MAIN CONTENT ===== */
.algolia-main {
    flex: 1;
    min-width: 0;
}

/* Toolbar row */
.algolia-toolbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: 1px solid #e8edf2;
}

.algolia-results-keyword {
    font-size: 14px;
    color: #64748b;
    line-height: 1.4;
}

.algolia-results-keyword strong {
    color: #1e293b;
    font-weight: 700;
}

.algolia-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 35%;
}

.algolia-results-stats {
    font-size: 12.5px;
    color: #64748b;
    background: #f0f7ff;
    border: 1px solid #bfdbfe;
    padding: 5px 13px;
    border-radius: 999px;
    white-space: nowrap;
}

.algolia-results-stats strong {
    color: #146eb4;
    font-weight: 700;
}

/* Nút mở filter (chỉ hiện mobile) */
.algolia-filter-btn {
    display: none;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    background: #fff;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    padding: 7px 14px;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: border-color .15s, box-shadow .15s;
}

.algolia-filter-btn:hover {
    border-color: #146eb4;
    color: #146eb4;
}

.algolia-filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #146eb4;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    margin-left: 2px;
}

/* Overlay mobile */
.algolia-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 9998;
    opacity: 0;
    transition: opacity .25s;
}

.algolia-overlay.is-visible {
    display: block;
    opacity: 1;
}

/* ===== PRODUCT GRID – 4 cột ===== */
#algolia-hits .ais-Hits-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    list-style: none;
    padding: 0;
    margin: 0;
}

#algolia-hits .ais-Hits-item {
    margin: 0;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

/* PRODUCT CARD */
.algolia-product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    min-width: 0;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none !important;
    color: #333;
    background: #fff;
    transition: box-shadow .2s, border-color .2s;
}

.algolia-product-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
    border-color: #d1d5db;
    color: #333;
}

/* Image area */
.algolia-product-img {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    aspect-ratio: auto;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.algolia-product-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
    transition: transform .3s;
}

.algolia-product-card:hover .algolia-product-img img {
    transform: scale(1.04);
}

.algolia-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d1d5db;
    font-size: 36px;
}

/* Info area */
.algolia-product-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 12px 16px 16px;
    min-width: 0;
}

/* Category label */
.algolia-product-cat {
    font-size: 11px;
    font-weight: 400;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .025em;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Title */
.algolia-product-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    color: #333;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
    flex: 1;
}

.algolia-product-title em {
    background: none;
    color: #146eb4;
    font-style: normal;
    font-weight: 700;
}

/* Footer: sku + price */
.algolia-product-footer {
    margin-top: 8px;
}

/* SKU */
.algolia-product-sku {
    font-size: 13px;
    color: #6b7280;
    font-weight: 400;
    line-height: 1.5;
}

.algolia-product-sku strong {
    color: #1f2937;
    font-weight: 600;
}

/* Price */
.algolia-price {
    font-size: 14.4px;
    font-weight: 600;
    color: #146eb4;
    line-height: 1.5;
}

.algolia-price ins {
    text-decoration: none;
    color: #146eb4;
}

.algolia-price del {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 400;
    margin-right: 4px;
    display: block;
}

.algolia-price .woocommerce-Price-amount {
    font-weight: 600;
}

.algolia-price .woocommerce-Price-currencySymbol {
    font-size: 10px;
}

/* Liên hệ link */
.algolia-btn-contact {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: #146eb4 !important;
    font-size: 14.4px;
    font-weight: 600;
    background: none;
    text-decoration: none;
    transition: color .15s;
}

.algolia-btn-contact:hover {
    color: #0f5a96 !important;
}

.algolia-btn-contact svg {
    flex-shrink: 0;
}

/* Empty state */
.algolia-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 64px 20px;
}

.algolia-no-results-icon {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}

.algolia-no-results p {
    font-size: 16px;
    font-weight: 700;
    color: #334155;
    margin: 0 0 8px;
}

.algolia-no-results span {
    font-size: 13px;
    color: #94a3b8;
}

/* ===== PAGINATION ===== */
#algolia-pagination {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

#algolia-pagination .ais-Pagination-list {
    display: flex;
    align-items: center;
    gap: 5px;
    list-style: none;
    padding: 0;
    margin: 0;
}

#algolia-pagination .ais-Pagination-item a,
#algolia-pagination .ais-Pagination-item span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 500;
    color: #444;
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-radius: 7px;
    text-decoration: none;
    transition: all .15s;
}

#algolia-pagination .ais-Pagination-item a:hover {
    border-color: #146eb4;
    color: #146eb4;
    background: #f0f7ff;
}

#algolia-pagination .ais-Pagination-item--selected a,
#algolia-pagination .ais-Pagination-item--selected span {
    background: #146eb4;
    border-color: #146eb4;
    color: #fff;
    font-weight: 700;
}

#algolia-pagination .ais-Pagination-item--disabled a,
#algolia-pagination .ais-Pagination-item--disabled span {
    opacity: .35;
    pointer-events: none;
}

.algolia-autocomplete {
    z-index: 999999 !important;
}

/* ===============================
   ALGOLIA – WOOCOMMERCE PRICE HTML
   (ins/del tags từ wc price_html)
================================ */

.algolia-price ins {
    text-decoration: none;
    font-weight: 700;
    color: #e53e3e;
}

.algolia-price del {
    font-size: 11px;
    color: #aaa;
    font-weight: 400;
    margin-right: 4px;
}

.algolia-price .woocommerce-Price-amount {
    font-weight: 700;
}

.algolia-price .woocommerce-Price-currencySymbol {
    font-size: 11px;
    vertical-align: super;
    font-weight: 600;
}

/* ===============================
   ALGOLIA – SORT / TOOLBAR (tuỳ chọn mở rộng)
================================ */

.algolia-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 14px;
}

.algolia-sort-select {
    font-size: 13px;
    padding: 6px 12px;
    border: 1.5px solid #d1d5db;
    border-radius: 7px;
    background: #fff;
    color: #334155;
    cursor: pointer;
    outline: none;
    transition: border-color .2s;
}

.algolia-sort-select:focus {
    border-color: #146eb4;
}

/* ===============================
   ALGOLIA – PRODUCT CARD badge (tuỳ chọn)
================================ */

.algolia-product-img {
    position: relative;
}

.algolia-product-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 3px 8px;
    border-radius: 4px;
    line-height: 1.4;
    pointer-events: none;
}

.algolia-product-badge--sale {
    background: #e53e3e;
    color: #fff;
}

.algolia-product-badge--new {
    background: #38a169;
    color: #fff;
}

/* ===============================
   ALGOLIA – SKELETON LOADING
================================ */

@keyframes algolia-shimmer {
    0% {
        background-position: -600px 0;
    }

    100% {
        background-position: 600px 0;
    }
}

.algolia-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 600px 100%;
    animation: algolia-shimmer 1.4s infinite;
    border-radius: 6px;
}

/* ===============================
   ALGOLIA – SIDEBAR ĐÓNG (MOBILE)
================================ */

.algolia-sidebar-close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    position: absolute;
    top: 10px;
    right: 0px;
    background: #f1f5f9;
    color: #475569;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    z-index: 10;
    transition: background-color 0.2s;
}

.algolia-sidebar-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Nút sắp xếp */

.arrange-btn {
    width: 30%;
    font-size: 14px;
    font-weight: 500;
    color: #364153;
}

/* ===============================
   RESPONSIVE
================================ */

@media (max-width: 1200px) {
    #algolia-hits .ais-Hits-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .algolia-main {
        padding-bottom: 80px;
    }

    /* Sidebar chuyển thành drawer từ trái */
    .algolia-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 300px;
        z-index: 9999;
        border-radius: 0;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform .28s cubic-bezier(.4, 0, .2, 1);
        border: none;
        box-shadow: none;
        padding-bottom: 24px;
    }

    .algolia-sidebar.is-open {
        transform: translateX(0);
        box-shadow: 4px 0 32px rgba(0, 0, 0, .18);
    }

    .algolia-sidebar-close {
        display: flex;
    }

    .algolia-filter-btn {
        display: inline-flex;
        position: fixed;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 9990;
        background: #146eb4;
        color: #fff;
        border: none;
        box-shadow: 0 4px 16px rgba(20, 110, 180, 0.4);
        border-radius: 999px;
        padding: 4px 28px;
        font-size: 14px;
        font-weight: 600;
        transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
    }

    .algolia-filter-btn:hover {
        transform: translateX(-50%) translateY(-2px);
        box-shadow: 0 6px 20px rgba(20, 110, 180, 0.5);
        background: #0f5a96;
        color: #fff;
        border-color: transparent;
    }

    #algolia-hits .ais-Hits-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .aa-dropdown-menu {
        width: 400px !important;
    }
}

@media (max-width: 768px) {
    #algolia-hits .ais-Hits-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .aa-dropdown-menu {
        width: 320px !important;
    }

    .algolia-results-keyword {
        font-size: 13px;
    }

    .algolia-search-input {
        font-size: 16px !important;
    }

    .arrange-btn {
        width: 64%;
    }
    .algolia-toolbar-right{
        width: 50%;
    }
}

@media (max-width: 576px) {
    #algolia-hits .ais-Hits-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}

@media (max-width: 480px) {
    #algolia-hits .ais-Hits-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .algolia-product-img {
        height: 120px;
    }

    .aa-dropdown-menu {
        width: 280px !important;
    }
}