/* ============================================================
   Search Suggest Popup — fantastic.md
   ============================================================ */

#ssp-popup {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    background: #fff;
    border: 1px solid #e0e4ea;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .14);
    z-index: 99999;
    max-height: 480px;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    /* Scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: #c8cdd5 transparent;
}

#ssp-popup::-webkit-scrollbar       { width: 6px; }
#ssp-popup::-webkit-scrollbar-track { background: transparent; }
#ssp-popup::-webkit-scrollbar-thumb { background: #c8cdd5; border-radius: 3px; }

#ssp-popup.ssp-open { display: block; }

/* ── Items ── */
.ssp-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f2f4f7;
    transition: background .15s;
}

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

.ssp-item:hover,
.ssp-item:focus {
    background: #f6f8fc;
    outline: none;
}

/* ── Image ── */
.ssp-img-wrap {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background: #f8f8f8;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ssp-img-wrap img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    display: block;
}

/* ── Text info ── */
.ssp-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.ssp-name {
    font-size: 13px;
    line-height: 1.4;
    color: #222;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ssp-price {
    font-size: 15px;
    font-weight: 700;
    color: #e63027;
    white-space: nowrap;
}

.ssp-price em {
    font-style: normal;
    font-weight: 400;
    font-size: 13px;
    color: #666;
}

/* ── Empty / no results ── */
.ssp-empty {
    padding: 20px 16px;
    text-align: center;
    font-size: 14px;
    color: #888;
}

/* ── Loader dots ── */
.ssp-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 22px 16px;
}

.ssp-loader span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c0c4cc;
    animation: ssp-bounce .9s infinite ease-in-out;
}

.ssp-loader span:nth-child(1) { animation-delay: 0s; }
.ssp-loader span:nth-child(2) { animation-delay: .15s; }
.ssp-loader span:nth-child(3) { animation-delay: .30s; }

@keyframes ssp-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: .4; }
    40%            { transform: scale(1);   opacity: 1;  }
}

/* ── Responsive ── */
@media (max-width: 600px) {
    #ssp-popup {
        border-radius: 0 0 8px 8px;
    }
    .ssp-img-wrap,
    .ssp-img-wrap img {
        width: 60px;
        height: 60px;
    }
}
