/* ==========================================================================
   ABIMEDIA - Recherche instantanée : panneau de suggestions
   ========================================================================== */

/* On masque l'ancien menu de suggestions natif de PrestaShop pour ne garder
   que le nôtre (sinon deux listes s'affichent en même temps). */
.ps-searchbar__dropdown,
#ps_searchbar_results,
.js-search-dropdown {
  display: none !important;
}

.abisearch-panel {
  position: fixed;
  z-index: 100000;
  background: #fff;
  border: 1px solid #e7eaee;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(17, 24, 39, 0.18);
  overflow: hidden auto;
  max-height: 74vh;
  font-family: inherit;
  padding: 6px 0;
  -webkit-overflow-scrolling: touch;
}

.abisearch-panel::-webkit-scrollbar { width: 8px; }
.abisearch-panel::-webkit-scrollbar-thumb { background: #d7dce2; border-radius: 10px; }

.abisearch-section {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #98a2b3;
  padding: 10px 16px 4px;
}

.abisearch-note {
  font-size: 0.75rem;
  color: #b45309;
  background: #fff8ed;
  padding: 8px 16px;
  margin-bottom: 4px;
}

.abisearch-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  text-decoration: none !important;
  color: #1f2937;
  cursor: pointer;
  transition: background 0.12s ease;
}

.abisearch-item:hover,
.abisearch-item.abisearch-active {
  background: #f2f7ff;
}

.abisearch-thumb {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #eef0f3;
  background: #fff;
  flex-shrink: 0;
}

.abisearch-thumb--empty {
  background: #f2f4f7;
}

.abisearch-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.abisearch-title {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.abisearch-title strong { color: #0b69f6; font-weight: 800; }

.abisearch-meta {
  font-size: 0.72rem;
  color: #98a2b3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.abisearch-price {
  text-align: right;
  font-weight: 800;
  color: #e11d48;
  font-size: 0.9rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.abisearch-old {
  color: #98a2b3;
  font-weight: 500;
  text-decoration: line-through;
  font-size: 0.75rem;
  display: block;
}

.abisearch-sec {
  font-size: 0.85rem;
  font-weight: 600;
}

.abisearch-ico {
  color: #0b69f6;
  font-size: 0.8rem;
  width: 18px;
  text-align: center;
}

.abisearch-empty {
  padding: 18px 16px;
  color: #98a2b3;
  font-style: italic;
  text-align: center;
}

.abisearch-all {
  display: block;
  text-align: center;
  padding: 12px 16px;
  margin-top: 4px;
  border-top: 1px solid #eef0f3;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0b69f6 !important;
  text-decoration: none !important;
  background: #fbfcfe;
}

.abisearch-all:hover { background: #f2f7ff; }

.abisearch-count {
  background: #0b69f6;
  color: #fff;
  border-radius: 20px;
  padding: 1px 8px;
  font-size: 0.72rem;
  margin-left: 4px;
}

/* --------- Mobile : panneau plein écran --------- */
@media (max-width: 560px) {
  .abisearch-panel {
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: calc(100vw - 16px);
    max-height: 80vh;
  }
}

/* ==========================================================================
   Page de résultats plein écran (façon Doofinder)
   ========================================================================== */

.abisearch-fs {
  position: fixed;
  inset: 0;
  z-index: 100001;
  background: #fff;
  display: flex;
  flex-direction: column;
  font-family: inherit;
}

.abisearch-fs__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  border-bottom: 1px solid #eef0f3;
  flex-shrink: 0;
}

.abisearch-fs__searchform {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f2f4f7;
  border-radius: 999px;
  padding: 8px 16px;
  max-width: 620px;
}

.abisearch-fs__logo { opacity: 0.6; }

.abisearch-fs__input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 1rem;
  color: #111827;
}

.abisearch-fs__count {
  font-size: 0.85rem;
  color: #667085;
  font-weight: 600;
  white-space: nowrap;
}

.abisearch-fs__close {
  border: none;
  background: #f2f4f7;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  color: #374151;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.abisearch-fs__close:hover { background: #e4e7ec; }

.abisearch-fs__body {
  flex: 1;
  display: flex;
  min-height: 0;
}

.abisearch-fs__filtersbtn {
  display: none;
}

.abisearch-fs__side {
  width: 260px;
  flex-shrink: 0;
  border-right: 1px solid #eef0f3;
  overflow-y: auto;
  padding: 18px 18px 40px;
}

.abisearch-fs__facet { margin-bottom: 22px; }

.abisearch-fs__facet h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #98a2b3;
  margin: 0 0 10px;
  font-weight: 800;
}

.abisearch-fs__opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 0.86rem;
  color: #374151;
  cursor: pointer;
  font-weight: 400;
}

.abisearch-fs__opt span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.abisearch-fs__opt em {
  font-style: normal;
  font-size: 0.72rem;
  color: #98a2b3;
  background: #f2f4f7;
  border-radius: 20px;
  padding: 1px 8px;
}

.abisearch-fs__opt input { accent-color: #0b69f6; }

.abisearch-fs__price {
  display: flex;
  align-items: center;
  gap: 6px;
}

.abisearch-fs__price input {
  width: 100%;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 0.82rem;
  outline: none;
}

.abisearch-fs__price button {
  border: none;
  background: #0b69f6;
  color: #fff;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-weight: 700;
}

.abisearch-fs__clear {
  border: 1.5px solid #e4e7ec;
  background: #fff;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #c0392b;
  cursor: pointer;
  margin-bottom: 18px;
  width: 100%;
}

.abisearch-fs__clear:hover { background: #fdeaea; }

.abisearch-fs__main {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px 60px;
  min-width: 0;
}

.abisearch-fs__toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 16px;
}

.abisearch-fs__sortwrap {
  font-size: 0.82rem;
  color: #667085;
  font-weight: 600;
}

.abisearch-fs__sortwrap select {
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.82rem;
  outline: none;
  background: #fff;
  cursor: pointer;
}

.abisearch-fs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.abisearch-fs__card {
  display: flex;
  flex-direction: column;
  border: 1px solid #eef0f3;
  border-radius: 12px;
  padding: 12px;
  text-decoration: none !important;
  color: #1f2937;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.abisearch-fs__card:hover {
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.1);
  transform: translateY(-2px);
}

.abisearch-fs__cardimg {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  overflow: hidden;
}

.abisearch-fs__cardimg img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.abisearch-fs__noimg {
  width: 100%;
  height: 100%;
  background: #f2f4f7;
  border-radius: 8px;
}

.abisearch-fs__cardbrand {
  font-size: 0.72rem;
  color: #98a2b3;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 700;
}

.abisearch-fs__cardname {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 3px 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.abisearch-fs__cardprice {
  margin-top: auto;
  font-weight: 800;
  color: #e11d48;
  font-size: 1rem;
}

.abisearch-fs__loading,
.abisearch-fs__empty {
  grid-column: 1 / -1;
  padding: 40px;
  text-align: center;
  color: #98a2b3;
  font-style: italic;
}

.abisearch-fs__pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
}

.abisearch-fs__pager button {
  border: 1.5px solid #e4e7ec;
  background: #fff;
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 600;
  cursor: pointer;
  color: #374151;
}

.abisearch-fs__pager button:disabled { opacity: 0.4; cursor: default; }
.abisearch-fs__pager button:not(:disabled):hover { border-color: #0b69f6; color: #0b69f6; }
.abisearch-fs__pager span { font-size: 0.85rem; color: #667085; }

/* --------- Mobile : filtres en tiroir --------- */
@media (max-width: 780px) {
  .abisearch-fs__filtersbtn {
    display: block;
    position: absolute;
    top: 70px;
    left: 12px;
    z-index: 3;
    border: 1.5px solid #e4e7ec;
    background: #fff;
    border-radius: 999px;
    padding: 8px 16px;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
  }

  .abisearch-fs__side {
    position: absolute;
    top: 61px;
    bottom: 0;
    left: 0;
    width: 82%;
    max-width: 320px;
    background: #fff;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    z-index: 4;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
  }

  .abisearch-fs__side--open { transform: translateX(0); }

  .abisearch-fs__main { padding-top: 56px; }

  .abisearch-fs__grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
}
