.smart-search-host {
    position: relative;
}

.smart-search-panel {
    position: absolute;
    inset-inline: 0;
    top: calc(100% + 10px);
    z-index: 1075;
    display: none;
    max-height: min(72vh, 560px);
    overflow: auto;
    padding: 12px;
    border: 1px solid rgba(24, 24, 24, 0.08);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.16);
}

.smart-search-panel.is-open {
    display: block;
}

.smart-search-loading,
.smart-search-empty {
    padding: 14px 10px;
    color: #777;
    font-size: 14px;
    text-align: center;
}

.smart-search-section + .smart-search-section {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.smart-search-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #777;
    font-size: 12px;
    font-weight: 700;
}

.smart-search-list {
    display: grid;
    gap: 8px;
}

.smart-search-product {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 8px;
    border-radius: 14px;
    color: #181818;
    transition: background 0.18s ease, transform 0.18s ease;
}

.smart-search-product:hover,
.smart-search-chip:hover {
    background: #f6f6f6;
}

.smart-search-product:active,
.smart-search-chip:active {
    transform: translateY(1px);
}

.smart-search-image {
    width: 58px;
    height: 58px;
    overflow: hidden;
    border-radius: 12px;
    background: #f3f3f3;
}

.smart-search-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.smart-search-image-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: #aaa;
    font-size: 11px;
}

.smart-search-name {
    display: -webkit-box;
    overflow: hidden;
    color: #181818;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.7;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.smart-search-meta,
.smart-search-price {
    color: #777;
    font-size: 12px;
}

.smart-search-price {
    margin-top: 2px;
    color: #111;
    font-weight: 800;
}

.smart-search-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.smart-search-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid #ececec;
    border-radius: 999px;
    color: #181818;
    font-size: 12px;
    font-weight: 700;
    background: #fff;
}

.smart-search-chip small {
    color: #888;
    font-weight: 600;
}

.smart-search-all {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}

.smart-search-all a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    background: #181818;
}

.canvas-mb .smart-search-panel {
    position: static;
    max-height: 46vh;
    margin-top: 10px;
    box-shadow: none;
}

.modal-search .modal-dialog {
    align-items: flex-start;
    margin-top: clamp(14px, 5vh, 56px);
}

.modal-search .modal-content {
    max-height: calc(100vh - 32px);
    overflow: visible;
}

.modal-search .modal-body,
.modal-search .form-search {
    overflow: visible;
}

.modal-search .smart-search-panel {
    max-height: min(68vh, 520px);
}

@media (max-width: 575.98px) {
    .modal-search .modal-dialog {
        align-items: flex-start;
        margin-top: 18px;
    }

    .smart-search-panel {
        max-height: 62vh;
        border-radius: 16px;
    }
}
