/* Algolia Autocomplete Lite - Multi-panel Dropdown Styles */

.acl-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: hidden;
    background: #fff;
    border: 1px solid #d1d1d1;
    border-top: 2px solid #6848a7;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}

.acl-dropdown.acl-open {
    display: block;
}

/* Panel: sidebar + main */
.acl-panel {
    display: flex;
    min-height: 200px;
}

.acl-sidebar {
    flex: 0 0 240px;
    max-width: 240px;
    border-right: 1px solid #e0e0e0;
    background: #fff;
}

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

/* Sections */
.acl-section {
    padding: 0;
}

.acl-section__title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #666;
    padding: 10px 15px 6px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

/* Products grid: 2 columns */
.acl-products-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

/* Items (shared) */
.acl-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    gap: 10px;
    transition: background-color .1s;
}

.acl-item:last-child {
    border-bottom: none;
}

.acl-item:hover,
.acl-item--active {
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
}

/* Product items */
.acl-item--product {
    align-items: flex-start;
    border-bottom: 1px solid #f0f0f0;
    border-right: 1px solid #f0f0f0;
    padding: 12px 15px;
    min-width: 0;
    overflow: hidden;
}

.acl-products-grid .acl-item--product:nth-child(2n) {
    border-right: none;
}

.acl-item__img {
    flex-shrink: 0;
    width: 55px;
    height: 55px;
}

.acl-item__img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 2px;
}

.acl-item__body {
    flex: 1;
    min-width: 0;
}

.acl-item__name {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acl-item__name em {
    font-style: normal;
    font-weight: 700;
}

.acl-item__cats {
    font-size: 11px;
    color: #888;
    line-height: 1.3;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acl-price {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-top: 3px;
    color: #6848a7;
}

.acl-price__tax {
    font-size: 10px;
    font-weight: 400;
    color: #888;
}

.acl-price--old {
    text-decoration: line-through;
    color: #999;
    font-weight: 400;
    margin-right: 5px;
}

.acl-price--special {
    color: #c00;
    font-weight: 700;
}

/* Category items in sidebar */
.acl-item--category {
    font-size: 13px;
    padding: 8px 15px;
    display: block;
}

.acl-item--category em {
    font-style: normal;
    font-weight: 700;
}

/* Footer */
.acl-footer {
    padding: 10px 15px;
    text-align: center;
    background: #f5f5f5;
    border-top: 1px solid #d1d1d1;
}

.acl-footer__link {
    font-size: 14px;
    font-weight: 400;
    color: #6848a7;
    text-decoration: none;
}

.acl-footer__link strong {
    text-decoration: underline;
}

.acl-footer__link:hover {
    text-decoration: underline;
}

/* Scrollbar */
.acl-dropdown::-webkit-scrollbar {
    width: 6px;
}

.acl-dropdown::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

/* Mobile adjustments */
@media (max-width: 991px) {
    .acl-dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: auto;
        max-height: none;
        border-top: 2px solid #6848a7;
        border-radius: 0 0 4px 4px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
        transform: none;
    }

    .acl-panel {
        flex-direction: column;
    }

    .acl-sidebar {
        flex: none;
        max-width: none;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .acl-products-grid {
        grid-template-columns: 1fr;
    }

    .acl-item--product {
        border-right: none;
    }

    .acl-item__img {
        width: 50px;
        height: 50px;
    }
}
