/* Aqualan - Suggestions instantanees (autocomplete) de la boutique.
   Injecte par le plugin d'affiliation (hook head_extra) uniquement quand le
   plugin est actif. Se greffe sur les <form role="search"> du theme. */

.aff-suggest-anchor { position: relative; }

/* Menu en position fixe, rattache au <body> par le JS : il echappe ainsi a
   tout rognage (overflow) ou empilement (z-index) des sections de la page,
   qui masquaient les suggestions du hero. Position/largeur posees en JS. */
.aff-suggest {
  position: fixed;
  z-index: 2147483000;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 18px 45px -12px rgba(15, 23, 42, .28), 0 4px 12px -4px rgba(15, 23, 42, .12);
  overflow: hidden;
  max-height: min(70vh, 460px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-size: .92rem;
  color: #0f172a;
}

.aff-suggest[hidden] { display: none; }

.aff-suggest-item {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .55rem .8rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
}
.aff-suggest-item:last-of-type { border-bottom: 0; }

.aff-suggest-item:hover,
.aff-suggest-item.is-active {
  background: #eff6ff;
}

.aff-suggest-thumb {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}
.aff-suggest-thumb--ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #94a3b8;
}

.aff-suggest-txt { min-width: 0; display: flex; flex-direction: column; gap: .1rem; }

.aff-suggest-title {
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aff-suggest-title mark {
  background: #fde68a;
  color: inherit;
  padding: 0 1px;
  border-radius: 3px;
}

.aff-suggest-cat {
  font-size: .76rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aff-suggest-all {
  display: block;
  width: 100%;
  text-align: left;
  padding: .6rem .8rem;
  background: #f8fafc;
  border: 0;
  border-top: 1px solid #e2e8f0;
  font: inherit;
  font-weight: 600;
  color: #1d4ed8;
  cursor: pointer;
}
.aff-suggest-all:hover,
.aff-suggest-all.is-active { background: #eff6ff; }

.aff-suggest-empty {
  padding: .8rem .9rem;
  color: #64748b;
}

@media (max-width: 640px) {
  .aff-suggest { font-size: .88rem; }
  .aff-suggest-thumb { flex-basis: 38px; width: 38px; height: 38px; }
}
