/* =========================
   SEARCH OVERLAY
========================= */
.customSearchOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.customSearchOverlay.active {
    display: flex;
    opacity: 1;
}

/* =========================
   SEARCH MODAL
========================= */
.customSearchModal {
    position: relative;
    background: #fff;
    width: 90%;
    max-width: 600px;
    padding: 20px;
    border-radius: 16px;
    transform: translateY(-30px);
    opacity: 0;
    transition: all 0.3s ease;
}

.customSearchOverlay.active .customSearchModal {
    transform: translateY(0);
    opacity: 1;
}

/* =========================
   HEADER
========================= */
.searchModalHeader {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fafafa;
}

.searchModalInput {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    color: #333;
}

.closeSearchModal {
    font-size: 22px;
    color: #21452C;
    cursor: pointer;
}

/* =========================
   SUGGESTIONS
========================= */
.searchSuggestions {
    margin-top: 20px;
}

.searchSuggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 300px;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

/* Scrollbar */
.searchSuggestions ul::-webkit-scrollbar {
    width: 6px;
}
.searchSuggestions ul::-webkit-scrollbar-thumb {
    background: #0ca74a;
    border-radius: 10px;
}
.searchSuggestions ul::-webkit-scrollbar-track {
    background: transparent;
}

/* =========================
   INVENTORY ITEM
========================= */
.inventory-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.inventory-item:hover {
    background: #f6fdf9;
}

/* Text only hover (NO transform bug) */
.inventory-item .productName {
    font-weight: 600;
    color: #000;
    transition: color 0.2s ease;
}

.inventory-item:hover .productName {
    color: #0ca74a;
}

.inventory-item .stockText {
    font-size: 12px;
    color: #777;
}

/* Image */
.inventory-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

/* =========================
   STATES
========================= */
.no-results {
    text-align: center;
    padding: 12px;
    color: #999;
}

/* =========================
   LOADER (SAFE)
========================= */
.loader-bar {
    position: absolute;
    inset: auto 0 0 0;
    height: 3px;
    background: transparent;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 576px) {
    .customSearchModal {
        width: 95%;
        padding: 16px;
    }

    .searchModalInput {
        font-size: 14px;
    }
}
