/* ==============================
   Formulaire de recherche (existant)
   ============================== */

#search_block_top {
  float: right;
  clear: both;
  padding-top: 0px;
  margin: 30px 0 0 0; }
  @media (max-width: 767px) {
    #search_block_top {
      float: none;
      padding-top: 30px;
      margin: 0; } }

#blocksearch_container,
#searchblock_container {
  position: relative; }

#search_block_top #searchbox {
  float: left;
  width: 100%;
  position: relative;
  background: #fbfbfb;
  padding-right: 100px;
  border-width: 8px 7px 8px 8px !important;
  border: solid #000; }

#search_block_top .btn.button-search {
  background: #ff0000;
  display: block;
  position: absolute;
  top: 0px;
  right: 0px;
  border: none;
  color: white;
  padding: 9px 19px 7px 20px;
  transition: 0.3s;
  height: 35px; }
  #search_block_top .btn.button-search span {
    padding: 0;
    font: 700 16px/18px "Roboto", sans-serif;
    height: 18px;
    text-transform: uppercase; }
  #search_block_top .btn.button-search:hover {
    background: #000;
    transition: 0.3s;
    color: red; }

#search_block_top .btn-close-search {
  position: absolute;
  top: 0;
  right: 0;
  border: none;
  background: #333;
  color: #fff;
  height: 35px;
  width: 35px;
  padding: 0;
  z-index: 3;
  transition: 0.3s; }
  #search_block_top .btn-close-search:hover {
    background: #ff0000; }

#search_block_top #search_query_top {
  display: inline-block;
  padding: 4px 10px 4px 13px;
  height: 35px;
  border: none;
  background: #fff; }

.lang_fr #search_block_top #searchbox {
  padding-right: 140px;
  border-radius: 5px; }

.lang_de #search_block_top #searchbox {
  padding-right: 90px; }

.lang_ru #search_block_top #searchbox {
  padding-right: 93px; }

.lang_es #search_block_top #searchbox {
  padding-right: 102px; }

form#searchbox {
  position: relative; }
  form#searchbox label {
    color: #333333; }
  form#searchbox input#search_query_block {
    margin-right: 10px;
    max-width: 222px;
    margin-bottom: 10px;
    display: inline-block;
    float: left; }
  form#searchbox .button.button-small {
    float: left; }
    form#searchbox .button.button-small i {
      margin-right: 0; }

/* Bouton fermer dans le formulaire cekomesearch */
#searchblock .btn-close-search {
  position: absolute;
  top: 50%;
  right: 50px;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #333;
  font-size: 16px;
  padding: 5px 10px;
  z-index: 3;
  cursor: pointer;
  transition: color 0.2s; }
  #searchblock .btn-close-search:hover {
    color: #ff0000; }

/* Masquer l'autocomplete jQuery si elle apparaît */
#searchblock .ac_results,
#searchblock_container .ac_results {
  display: none !important; }

/* ==============================
   Résultats Ajax - Pleine largeur
   ============================== */

.blocksearch-results {
  display: none;
  position: absolute;
  left: 50%;
  transform: translateX(-48%);
  top: 100%;
  width: 100vw;
  background-color: #fff;
  z-index: 9999;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  border-bottom: 3px solid #FFAC06;
  max-height: 80vh;
  overflow-y: auto;
  margin-top: 16px; }

/* Conteneur interne pour alignment */
.ajax-search-results {
  padding: 25px 0 30px; }

/* Row principale : produits + actions */
.ajax-search-row {
  display: flex;
  align-items: flex-start; }

/* Colonne produits (3/4) */
.ajax-search-products .product_list {
  display: flex;
  flex-wrap: nowrap;
  margin: 0;
  padding: 0;
  list-style: none; }

.ajax-search-products .product_list > li.ajax_block_product {
  width: 33.333% !important;
  flex: 0 0 33.333%;
  max-width: 33.333%;
  padding: 0 10px;
  margin-bottom: 0; }

.blocksearch-results .product-container {
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 15px;
  background: #fff;
  transition: box-shadow 0.2s;
  overflow: hidden; }
  .blocksearch-results .product-container:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); }

/* Réduire le logo fabricant dans le contexte Ajax */
.blocksearch-results .product_img_manufacturer {
  max-width: 60px;
  height: auto; }

.blocksearch-results .product-image-container {
  position: relative;
  overflow: hidden; }

/* Colonne actions (1/4) */
.ajax-search-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  gap: 25px; }

/* Bouton FERMER */
.ajax-search-results .close-search {
  font: 700 14px/1.4 "Roboto", sans-serif;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: color 0.2s;
  border: none;
  background: none;
  padding: 5px 10px; }
  .ajax-search-results .close-search:hover {
    color: #FFAC06; }

/* Bouton Tout voir */
.btn-see-all {
  display: inline-block;
  background: #FFAC06;
  color: #fff !important;
  border: none;
  border-radius: 30px;
  padding: 14px 40px;
  font: 700 16px/1.2 "Roboto", sans-serif;
  text-transform: none;
  cursor: pointer;
  transition: 0.3s;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(255, 172, 6, 0.3); }
  .btn-see-all:hover {
    background: #e69a00;
    color: #fff !important;
    box-shadow: 0 5px 15px rgba(255, 172, 6, 0.4);
    transform: translateY(-1px); }

/* Aucun résultat */
.ajax-search-empty {
  padding: 40px 15px;
  color: #666;
  font-size: 15px;
  text-align: center; }

/* Loader */
.ajax-search-loading {
  padding: 40px 15px;
  text-align: center; }
  .ajax-search-loading i {
    color: #FFAC06;
    font-size: 28px; }

/* ==============================
   Responsive
   ============================== */

@media (max-width: 991px) {
  .ajax-search-products .product_list > li.ajax_block_product {
    width: 33.333% !important;
    flex: 0 0 33.333%;
    max-width: 33.333%; }
}

@media (max-width: 767px) {
  .blocksearch-results {
    position: fixed;
    top: auto;
    max-height: 85vh; }

  .ajax-search-row {
    flex-direction: column; }

  .ajax-search-actions {
    flex-direction: row;
    justify-content: center;
    padding: 15px 0 0;
    gap: 20px;
    width: 100%; }

  .ajax-search-products .product_list {
    flex-wrap: wrap;
    justify-content: center; }

  .ajax-search-products .product_list > li.ajax_block_product {
    width: 100% !important;
    flex: 0 0 100%;
    max-width: 280px;
    margin: 8px auto; }
}
