<style>
#search-box{
border-radius: 50rem 0 0 50rem !important;
}
</style>
<div class="col-1 col-sm-1 col-md-1 col-lg-7 d-none d-lg-block align-self-center">
<form class="form minisearch search-inline px-5" id="header-search1" action="javascript:void(0)" method="get">
<label class="label d-none"><span>{{ "Search" | trans }}</span></label>
<div class="control">
<div class="searchField d-flex">
<div class="input-box d-flex w-100">
<input autocomplete="off" type="text" id="search-box" data-idiom="{{ app.request.locale }}" name="q" value="" placeholder="" class="input-text rounded-0 border-start-0 border-end-0">
<button type="button" title="{{ "Search" | trans }}" class="action search search-btn rounded-pill-end"><i class="icon an an-search-l"></i></button>
</div>
</div>
<ul id="search-suggestions" class="search-suggestions d-none">
</ul>
</div>
</form>
</div>
<style>
/* Estilo para la barra de desplazamiento */
::-webkit-scrollbar {
width: 6px;
}
::-webkit-scrollbar-track {
background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
background: #888;
border-radius: 3px;
}
/* Estilo para search-suggestions */
.search-suggestions {
position: absolute;
z-index: 1;
width: 100%;
min-width: 536px; /* ancho mínimo de 600px */
max-width: 577px;/* ajustar el ancho máximo permitido según sea necesario */
background-color: #fff;
border: 1px solid #ccc;
max-height: 355px;
overflow-y: auto;
padding: 0;
}
.search-suggestions li {
max-width: 100%;
list-style: none;
padding: 10px;
border-bottom: 1px solid #ccc;
font-size: 14px;
color: #444;
cursor: pointer;
transition: background-color 0.3s ease;
}
.search-suggestions li:hover{
background-color: #f8f8f8;
}
/* Estilo para product-item */
.product-item {
display: flex;
align-items: center;
padding: 10px;
cursor: pointer;
width: 100%;
border-bottom: 1px solid #f1f1f1;
transition: background-color 0.3s ease;
}
.product-item:hover{
background-color: #f8f8f8;
}
.search-suggestions li:hover .product-name {
color: #106eea;
}
.product-info {
display: flex;
align-items: center;
width: 100%;
}
.product-image {
margin-right: 15px;
}
.product-image img {
width: 50px;
height: 50px;
object-fit: cover;
}
.product-name {
font-size: 16px;
font-weight: 500;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 400px;
color: #444;
}
</style>