/* ── TCS Live Search  v1.0.0 ──────────────────────────────── */

#tcs-ls-box {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    z-index: 99999;
    background: #fff;
    border: 1px solid #ddd;
    border-top: 3px solid #f0a500;   /* yellow accent matches TCS theme */
    border-radius: 0 0 6px 6px;
    box-shadow: 0 6px 20px rgba(0,0,0,.13);
    max-height: 500px;
    overflow-y: auto;
    font-family: inherit;
}

/* ── Result list ──────────────────────────────────────────── */
#tcs-ls-box .tcs-ls-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

#tcs-ls-box .tcs-ls-item { border-bottom: 1px solid #f2f2f2; }
#tcs-ls-box .tcs-ls-item:last-child { border-bottom: none; }

#tcs-ls-box .tcs-ls-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    color: #222;
    text-decoration: none;
    transition: background .12s;
}

#tcs-ls-box .tcs-ls-link:hover,
#tcs-ls-box .tcs-ls-link.tcs-active {
    background: #fff8e6;
    text-decoration: none;
    color: #111;
}

/* ── Thumbnail ────────────────────────────────────────────── */
#tcs-ls-box .tcs-ls-thumb {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    background: #f6f6f6;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#tcs-ls-box .tcs-ls-thumb img {
    max-width: 52px;
    max-height: 52px;
    object-fit: contain;
    display: block;
}

#tcs-ls-box .tcs-ls-noimg {
    width: 52px;
    height: 52px;
    background: #ececec;
}

/* ── Text block ───────────────────────────────────────────── */
#tcs-ls-box .tcs-ls-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

#tcs-ls-box .tcs-ls-name {
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

#tcs-ls-box .tcs-ls-name mark {
    background: #fff3cd;
    color: #1a1a1a;
    font-weight: 700;
    border-radius: 2px;
    padding: 0 1px;
}

#tcs-ls-box .tcs-ls-model {
    font-size: 11px;
    color: #999;
}

/* ── Price / stock ────────────────────────────────────────── */
#tcs-ls-box .tcs-ls-right {
    flex: 0 0 auto;
    text-align: right;
    min-width: 72px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

#tcs-ls-box .tcs-ls-price {
    font-size: 13px;
    font-weight: 700;
    color: #c0392b;
    white-space: nowrap;
}

#tcs-ls-box .tcs-ls-oos {
    font-size: 10px;
    color: #aaa;
    font-weight: 400;
}

/* ── Footer "See all results" ─────────────────────────────── */
#tcs-ls-box .tcs-ls-footer {
    padding: 9px 14px;
    background: #fafafa;
    border-top: 1px solid #eee;
    border-radius: 0 0 6px 6px;
}

#tcs-ls-box .tcs-ls-footer a {
    font-size: 13px;
    color: #2c6fad;
    text-decoration: none;
}

#tcs-ls-box .tcs-ls-footer a:hover { text-decoration: underline; }

/* ── No results ───────────────────────────────────────────── */
#tcs-ls-box .tcs-ls-empty {
    padding: 20px 16px;
    font-size: 13px;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ── Loading dots ─────────────────────────────────────────── */
#tcs-ls-box .tcs-ls-loading {
    padding: 18px;
    display: flex;
    justify-content: center;
    gap: 5px;
}

#tcs-ls-box .tcs-ls-loading span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #f0a500;
    display: inline-block;
    animation: tcsls-pulse .65s infinite alternate;
}

#tcs-ls-box .tcs-ls-loading span:nth-child(2) { animation-delay: .22s; }
#tcs-ls-box .tcs-ls-loading span:nth-child(3) { animation-delay: .44s; }

@keyframes tcsls-pulse {
    from { transform: translateY(0);    opacity: .35; }
    to   { transform: translateY(-7px); opacity: 1;   }
}

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 600px) {
    #tcs-ls-box .tcs-ls-name  { font-size: 12px; }
    #tcs-ls-box .tcs-ls-price { font-size: 12px; }
    #tcs-ls-box .tcs-ls-thumb { flex: 0 0 40px; width: 40px; height: 40px; }
}
