.smart-search {
    position: relative;
}

.smart-search-panel[hidden] {
    display: none !important;
}

.smart-search-panel {
    position: absolute;
    z-index: 10050;

    top: calc(100% + 10px);
    left: 0;
    right: 0;

    width: min(620px, 92vw);
    max-height: min(72vh, 680px);

    overflow: auto;
    overscroll-behavior: contain;

    margin: 0;
    padding: 10px;

    border: 1px solid rgba(64, 28, 46, .10);
    border-radius: 18px;

    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,.99),
            rgba(255,249,252,.99)
        );

    box-shadow:
        0 24px 60px rgba(67,31,50,.16),
        0 4px 16px rgba(67,31,50,.08);

    color: #2d1f27;
    text-align: left;

    scrollbar-width: thin;
}

.header-search-desktop .smart-search-panel {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}

.smart-search-intelligence {
    display: none;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin: 2px 2px 8px;
    padding: 8px 10px;
    border-radius: 12px;
    background: #fbf3f7;
    color: #765565;
    font-size: 11px;
}

.smart-search-intelligence strong {
    color: #5f2544;
    font-size: 11px;
}

.smart-search-intelligence-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;
    background: #8f3d67;

    box-shadow:
        0 0 0 4px rgba(143,61,103,.10);
}

.smart-search-section + .smart-search-section {
    margin-top: 8px;
    padding-top: 9px;

    border-top:
        1px solid rgba(64,28,46,.08);
}

.smart-search-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;

    padding: 4px 6px 7px;
}

.smart-search-section-head > span {
    color: #5f2544;

    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.smart-search-section-head small {
    color: #9a7d8b;
    font-size: 10px;
}

.smart-search-categories {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 6px;
}

.smart-search-category,
.smart-search-product,
.smart-search-view-all {
    color: inherit;
    text-decoration: none;
}

.smart-search-category {
    display: grid;

    grid-template-columns:
        42px minmax(0, 1fr) 18px;

    align-items: center;
    gap: 9px;

    min-width: 0;
    padding: 7px;

    border: 1px solid transparent;
    border-radius: 12px;

    transition:
        background .16s ease,
        border-color .16s ease,
        transform .16s ease;
}

.smart-search-category:hover,
.smart-search-category.is-keyboard-active {
    background: #fbf3f7;
    border-color: rgba(123,51,85,.12);
    transform: translateY(-1px);
}

.smart-search-category-image,
.smart-search-product-image {
    display: block;
    overflow: hidden;

    background: #f7f1f4;
}

.smart-search-category-image {
    width: 42px;
    height: 42px;

    border-radius: 10px;
}

.smart-search-category-image img,
.smart-search-product-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.smart-search-category-copy,
.smart-search-product-copy {
    min-width: 0;
}

.smart-search-category-copy strong,
.smart-search-category-copy small {
    display: block;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.smart-search-category-copy strong {
    font-size: 12px;
    line-height: 1.3;
}

.smart-search-category-copy small {
    margin-top: 2px;

    color: #8a6d7b;
    font-size: 10px;
}

.smart-search-products {
    display: grid;
    gap: 3px;
}

.smart-search-product {
    display: grid;

    grid-template-columns:
        62px minmax(0, 1fr) 20px;

    align-items: center;
    gap: 11px;

    min-width: 0;
    padding: 7px;

    border: 1px solid transparent;
    border-radius: 13px;

    transition:
        background .16s ease,
        border-color .16s ease,
        transform .16s ease;
}

.smart-search-product:hover,
.smart-search-product.is-keyboard-active {
    background: #fff7fa;
    border-color: rgba(123,51,85,.12);
    transform: translateY(-1px);
}

.smart-search-product-image {
    width: 62px;
    height: 62px;

    border-radius: 12px;
}

.smart-search-product-topline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 5px;
    min-width: 0;
}

.smart-search-product-topline > strong {
    max-width: 100%;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: #2b1e25;

    font-family:
        var(--font-product, serif);

    font-size: 14px;
    line-height: 1.2;
}

.smart-search-product-copy > small {
    display: block;

    margin-top: 4px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: #8c7180;
    font-size: 10px;
}

.smart-search-product-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;

    gap: 6px;
    margin-top: 5px;
}

.smart-search-price {
    color: #7b3355;

    font-size: 12px;
    font-weight: 800;
}

.smart-search-price del {
    margin-left: 5px;

    color: #aa96a0;

    font-size: 10px;
    font-weight: 500;
}

.smart-search-stock {
    color: #66815f;
    font-size: 9px;
}

.smart-search-stock.is-out {
    color: #a75c68;
}

.smart-search-badge {
    display: inline-flex;
    align-items: center;

    padding: 2px 6px;

    border-radius: 999px;

    background: #f7e8ef;
    color: #7b3355;

    font-size: 8px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.smart-search-arrow {
    color: #a48292;
    font-size: 16px;

    transition:
        transform .16s ease,
        color .16s ease;
}

.smart-search-category:hover .smart-search-arrow,
.smart-search-product:hover .smart-search-arrow,
.is-keyboard-active .smart-search-arrow {
    color: #7b3355;
    transform: translateX(2px);
}

.smart-search-panel mark {
    padding: 0;

    border-radius: 2px;

    background: #f1d9e5;
    color: inherit;
}

.smart-search-view-all {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    margin-top: 8px;
    padding: 11px 12px;

    border-radius: 12px;

    background: #6f2e50;
    color: #fff;

    font-size: 11px;
    font-weight: 700;
}

.smart-search-view-all:hover,
.smart-search-view-all.is-keyboard-active {
    background: #5e2543;
}

.smart-search-state,
.smart-search-empty {
    display: grid;
    justify-items: center;

    gap: 6px;

    padding: 24px 16px;

    text-align: center;
}

.smart-search-state,
.smart-search-empty span {
    color: #8f7582;
    font-size: 11px;
}

.smart-search-empty strong {
    color: #4e3240;
    font-size: 13px;
}

.smart-search-spinner {
    width: 20px;
    height: 20px;

    border:
        2px solid #ead6df;

    border-top-color: #7b3355;
    border-radius: 50%;

    animation:
        phoolify-smart-spin
        .7s linear infinite;
}

@keyframes phoolify-smart-spin {
    to {
        transform: rotate(360deg);
    }
}

.header-search-mobile .smart-search-panel {
    position: relative;

    top: auto;
    left: auto;
    right: auto;

    width: 100%;
    max-height: min(62vh, 580px);

    margin-top: 9px;

    transform: none;
}

.search-suggestions.smart-search-panel {
    min-width: 0;
}

@media (max-width: 760px) {
    .smart-search-panel {
        padding: 8px;
        border-radius: 15px;
    }

    .smart-search-categories {
        grid-template-columns: 1fr;
    }

    .smart-search-product {
        grid-template-columns:
            54px minmax(0, 1fr) 18px;

        gap: 9px;
    }

    .smart-search-product-image {
        width: 54px;
        height: 54px;
    }

    .smart-search-product-topline > strong {
        font-size: 13px;
    }

    .smart-search-section-head small {
        display: none;
    }
}


/* Product/variant-only search additions */
.smart-search-variant .smart-search-product-image {
    position: relative;
}

.smart-search-variant-tag {
    position: absolute;
    left: 5px;
    bottom: 5px;
    display: inline-flex;
    align-items: center;
    padding: 3px 6px;
    border-radius: 999px;
    background: rgba(80, 30, 56, .86);
    color: #fff;
    font-size: 7px;
    font-style: normal;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.smart-search-variant-name {
    color: #7b3355 !important;
    font-weight: 700;
}

.smart-search-variant:hover {
    background: #fff4f9;
}