/* ===========================
   Conteneur suggestions
   =========================== */
.ccx-suggest,
.cmx-suggest {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  width: 100%;
  max-height: 420px;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,.25);
  padding: 4px 0;
  z-index: 9999;
  display: none;
  box-sizing: border-box;
}

.ccx-suggest.is-open,
.cmx-suggest.is-open {
  display: block;
}

/* ===========================
   Lignes de produit
   =========================== */
#ccxSuggest .ccx-sg-item,
#cmxSuggest .ccx-sg-item {
  display: flex !important;
  align-items: center !important;
  gap: 10px;
  padding: 6px 10px;
  text-decoration: none;
  color: #111827;
  font-size: 13px;
  line-height: 1.25;
  box-sizing: border-box;

  min-height: 56px;
  max-height: 70px;
  overflow: hidden;
}

#ccxSuggest .ccx-sg-item:hover,
#cmxSuggest .ccx-sg-item:hover {
  background: #f3f4f6;
}

/* vignette image : taille fixe */
#ccxSuggest .ccx-sg-thumb,
#cmxSuggest .ccx-sg-thumb {
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f4f6;
}

#ccxSuggest .ccx-sg-thumb img,
#cmxSuggest .ccx-sg-thumb img,
#ccxSuggest img,
#cmxSuggest img {
  display: block;
  width: 50px !important;
  height: 50px !important;
  max-width: 50px !important;
  max-height: 50px !important;
  object-fit: contain !important;
  border-radius: 8px;
  background: #f3f4f6;
}

/* zone texte */
#ccxSuggest .ccx-sg-meta,
#cmxSuggest .ccx-sg-meta {
  flex: 1 1 auto;
  min-width: 0;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* titre sur 2 lignes max */
#ccxSuggest .ccx-sg-title,
#cmxSuggest .ccx-sg-title {
  font-weight: 600;
  margin-bottom: 2px;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* prix en VERT (et reset Woo) */
#ccxSuggest .ccx-sg-price,
#cmxSuggest .ccx-sg-price {
  font-size: 12px;
  color: #16a34a;
  font-weight: 700;
  line-height: 1.2;
}

#ccxSuggest .ccx-sg-price *,
#cmxSuggest .ccx-sg-price *,
#ccxSuggest .ccx-sg-price p,
#cmxSuggest .ccx-sg-price p,
#ccxSuggest .ccx-sg-price span,
#cmxSuggest .ccx-sg-price span,
#ccxSuggest .ccx-sg-price del,
#cmxSuggest .ccx-sg-price del,
#ccxSuggest .ccx-sg-price ins,
#cmxSuggest .ccx-sg-price ins {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.2 !important;
  font-size: 12px !important;
  color: #16a34a !important;
}

/* séparateur entre lignes produit */
#ccxSuggest .ccx-sg-item + .ccx-sg-item,
#cmxSuggest .ccx-sg-item + .ccx-sg-item {
  border-top: 1px solid #e5e7eb;
}

/* ===========================
   Lignes texte simples
   (ex : "Voir tous les résultats")
   =========================== */
#ccxSuggest a:not(.ccx-sg-item),
#cmxSuggest a:not(.ccx-sg-item) {
  display: block;
  padding: 6px 10px;
  font-size: 12px;
  color: #4b5563;
  text-decoration: none;
}

#ccxSuggest a:not(.ccx-sg-item):hover,
#cmxSuggest a:not(.ccx-sg-item):hover {
  background: #f3f4f6;
}

#ccxSuggest a:not(.ccx-sg-item) + a:not(.ccx-sg-item),
#cmxSuggest a:not(.ccx-sg-item) + a:not(.ccx-sg-item) {
  border-top: 1px solid #e5e7eb;
}

/* message vide */
.ccx-sg-empty {
  padding: 8px 10px;
  font-size: 12px;
  color: #6b7280;
}
