
.live-search {
    width: 100%;
    max-width: 640px;
    position: absolute;
    z-index: 1000;
    background-color: #FFF;
    border: 1px solid #E4E4E4;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(20, 20, 30, 0.12);
    left: 0;
    top: 100%;
    margin-top: 8px;
    display: none;
    box-sizing: border-box;
    overflow: hidden;
}

/* Kutu açılırken hafif bir giriş animasyonu */
.live-search.open-search {
    animation: liveSearchIn .16s ease-out;
}
@keyframes liveSearchIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .live-search.open-search { animation: none; }
}

/* ---------- Yükleniyor / Boş durum ---------- */

.live-search .search-loading,
.live-search .search-empty {
    padding: 28px 16px;
    text-align: center;
    font-size: 14px;
    color: #888;
    font-weight: 500;
}

.live-search .search-loading i {
    margin-right: 8px;
    color: #23a1d1;
}

.live-search .search-empty i {
    display: block;
    font-size: 22px;
    color: #CCC;
    margin-bottom: 8px;
}

/* ---------- Genel iki kolon yerleşimi ---------- */

.km-search {
    display: flex;
    align-items: stretch;
}

.search-products {
    flex: 1;
    min-width: 0;
    padding: 14px;
    max-height: 470px;
    overflow-y: auto;
}

/* ince, sade scrollbar */
.search-products::-webkit-scrollbar { width: 6px; }
.search-products::-webkit-scrollbar-thumb { background: #E0E0E0; border-radius: 3px; }
.search-products { scrollbar-width: thin; scrollbar-color: #E0E0E0 transparent; }

.search-sidebar {
    width: 190px;
    flex-shrink: 0;
    background-color: #FAFBFC;
    border-left: 1px solid #EEE;
    padding: 14px;
    max-height: 420px;
    overflow-y: auto;
}

.live-search h3 {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: #999;
    margin: 0 0 10px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #F0F0F0;
    letter-spacing: 0.6px;
}

.search-sidebar-section + .search-sidebar-section {
    margin-top: 16px;
}

/* ---------- Ürün satırı ---------- */

.search-products-box {
    border-radius: 8px;
    transition: background-color .15s ease;
}

.search-products-box + .search-products-box {
    margin-top: 2px;
}

.search-products-box:hover {
    background-color: #F6F8FA;
}

.search-products-box .border-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
}

.product-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.product-thumb {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 7px;
    background-color: #F5F6F7;
    border: 1px solid #EEE;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-info {
    min-width: 0;
}

.prd-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13.5px;
    font-weight: 600;
    color: #2A2A2A;
    line-height: 1.35;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 3px;
}

.price-original {
    font-size: 12px;
    color: #A7A7A7;
    text-decoration: line-through;
}

.price-sales {
    font-size: 13.5px;
    font-weight: 700;
    color: #333;
}

.search-products-box .price-original ~ .price-sales {
    color: #F2183D;
}

/* ---------- Sepete ekle butonu ---------- */

.action-button {
    flex-shrink: 0;
}

.action-button .btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #E0E0E0;
    background-color: #FFF;
    color: #444;
    font-size: 13px;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}

.action-button .btn:hover {
    background-color: #23a1d1;
    border-color: #23a1d1;
    color: #FFF;
    transform: scale(1.06);
}

/* ---------- Sidebar (Yazarlar / Konular) ---------- */

.search-sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.search-sidebar ul li {
    margin-bottom: 7px;
}

.search-sidebar ul li a {
    text-decoration: none;
    color: #555;
    font-size: 13px;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-bottom: 1px solid transparent;
    transition: color .15s ease, border-color .15s ease;
}

.search-sidebar ul li a:hover {
    color: #23a1d1;
    border-color: currentColor;
}

/* ---------- Mobil ---------- */

@media (max-width: 480px) {
    .live-search {
        max-width: none;
        border-radius: 0;
        left: 0;
        right: 0;
    }

    .km-search {
        flex-direction: column;
    }

    .search-products {
        max-height: 55vh;
    }

    .search-sidebar {
        width: 100%;
        border-left: none;
        border-top: 1px solid #EEE;
        max-height: 30vh;
    }
}
