.npn-search-wrapper {
    position: relative;
    max-width: 550px;
    width: 700px;
    margin: 30px auto;
}

#npn-product-search {
    width: 100%;
    padding: 12px;
    font-size: 18px;
    border-radius: 6px;
    border: 1px solid #ccc;
    z-index: 10000;
    position: relative;
}

#npn-search-results {
    position: absolute;
    top: 110%;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    max-height: 250px;
    height: 300px;
    overflow-y: scroll;
    display: none;
    z-index: 99999;
}

.result-item {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.result-item img {
    border-radius: 4px;
    margin-left: 10px;
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.result-item:hover {
    background-color: #f0f0f0;
}

.npn-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: none;
    z-index: 9998;
}

.npn-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.npn-modal-content {
    background: white;
    width: 90%;
    max-width: 600px;
    border-radius: 10px;
    padding: 20px;
    position: relative;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.npn-modal-close {
    position: absolute;
    top: 24px;
    left: 25px;
    font-size: 28px;
    background: none;
    border: none;
    cursor: pointer;
}

#npn-modal-search-input {
    width: 100%;
    padding: 12px 12px 12px 40px; /* جا برای لودر سمت راست */
    font-size: 18px;
    margin-bottom: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    z-index: 10000;
}

#npn-modal-search-results {
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
}

.result-item {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.result-item:hover {
    background-color: #f5f5f5;
}

.result-item img {
    width: 40px;
    height: 40px;
    margin-left: 12px;
    border-radius: 5px;
    object-fit: cover;
}

.npn-loader-modal {
    position: absolute;
    top: 33px;
    left: 30px;
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-top: 2px solid #333;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    pointer-events: none;
    z-index: 10001;
    background-color: white;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
