/* ------------------------------
   OVERLAY A SCHERMO INTERO
------------------------------ */
#language-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.4);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    display: flex; /* CENTRATURA */
}

/* ------------------------------
   BOX CENTRALE DELLA MODALE
------------------------------ */
.language-search-box {
    position: relative;
    background: #fff;
    border-radius: 25px;
    padding: 50px 20px 30px 20px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 6px 16px rgba(0,0,0,.2)
}

/* ------------------------------
   CAMPO INPUT DI RICERCA
------------------------------ */
#custom-language-product-search {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 30px;
    outline: none;
    margin-bottom: 15px;
}

/* ------------------------------
   PULSANTE CHIUSURA "X"
------------------------------ */
#close-search-field {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
}

/* ------------------------------
   CONTENITORE RISULTATI
------------------------------ */
#language-search-results {
    max-height: 300px;
    overflow-y: auto;
    border-top: 1px solid #eee;
    padding: 5px 0;
}

/* ------------------------------
   RISULTATO SINGOLO
------------------------------ */
.search-result-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background 0.2s;
}

.search-result-item:hover {
    background-color: #f5f5f5;
}

.search-result-item a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

/* ------------------------------
   IMMAGINE RISULTATO (piccola)
------------------------------ */
.search-result-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    margin-right: 10px;
    border-radius: 4px;
    flex-shrink: 0;
}

/* ------------------------------
   INFORMAZIONI TESTUALI
------------------------------ */
.product-info-searchbar {
    display: flex;
    flex-direction: row; /* cambia da column a row */
    justify-content: space-between;
    align-items: center;
    flex-grow: 1;
    gap: 10px;
}

.product-title-searchbar {
    font-size: 14px;
    font-weight: 600;
    color: #002E5F;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1; /* occupa spazio disponibile */
}

.product-price-searchbar {
    font-size: 13px;
    color: #888;
    white-space: nowrap;
    flex-shrink: 0; /* non si riduce */
}

/* ------------------------------
   RESPONSIVE (MOBILE)
------------------------------ */
@media (max-width: 480px) {
    .language-search-box {
        padding: 50px 20px 30px 20px;
    }

    #custom-language-product-search {
        font-size: 15px;
    }

   .product-title-searchbar {
    font-size: 14px;
    font-weight: 400;
    color: #002E5F;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 0 1 auto;
    max-width: 19ch;
}

    .product-price-searchbar {
        font-size: 12px;
    }

    .search-result-item img {
        width: 36px;
        height: 36px;
    }
}