:root {
  --wcls-bg: #ffffff;
  --wcls-bg-hover: #f3f4f6;
  --wcls-border: #e5e7eb;
  --wcls-text-main: #1f2937;
  --wcls-text-muted: #6b7280;
  --wcls-primary: #2e8722; /* Couleur d'accentuation */
  --wcls-radius: 0px;
  --wcls-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* --- Bouton Trigger --- */
.wcls-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: var(--wcls-primary); /* Ou une couleur légère si tu préfères */
  cursor: pointer;
  padding: 8px;
  color: inherit;
  border-radius: 50%;
  transition: background 0.2s;
}
.wcls-icon:hover {
  background: #3aaa2b;
}

/* --- Modal Overlay (Fond flouté) --- */
.wcls-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-start; /* Aligné un peu plus haut, pas centré parfait */
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px); /* Effet verre dépoli */
  z-index: 99999;
  padding-top: 10vh;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}
.wcls-modal.is-open {
  display: flex;
  opacity: 1;
}

/* --- Modal Inner Box --- */
.wcls-modal__inner {
  width: min(92vw, 600px);
  background: var(--wcls-bg);
  border-radius: var(--wcls-radius);
  box-shadow: var(--wcls-shadow);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform 0.2s ease-out;
}
.wcls-modal.is-open .wcls-modal__inner {
  transform: scale(1);
}

/* --- Header / Input Area --- */
.wcls-header {
  position: relative;
  border-bottom: 1px solid var(--wcls-border);
  display: flex;
  align-items: center;
  padding: 8px 16px;
}
input.wcls-input{
  color:black !important;
}

/* Icône de recherche décorative */
.wcls-search-icon {
  color: var(--wcls-text-muted);
  margin-right: 12px;
}

.wcls-input {
  width: 100%;
  padding: 20px 0;
  font-size: 18px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--wcls-text-main);
  font-family: inherit;
}
.wcls-input::placeholder {
  color: #9ca3af;
}

.wcls-close {
  border: 0;
  background: #f3f4f6;
  color: var(--wcls-text-muted);
  font-size: 20px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  transition: all 0.2s;
}
.wcls-close:hover {
  background: #e5e7eb;
  color: var(--wcls-text-main);
}

/* --- Results List --- */
.wcls-results {
  max-height: 400px;
  overflow-y: auto;
  
  /* Scrollbar custom fine */
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}
.wcls-results::-webkit-scrollbar {
  width: 6px;
}
.wcls-results::-webkit-scrollbar-thumb {
  background-color: #d1d5db;
  border-radius: 3px;
}

/* --- Result Item --- */
.wcls-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  padding: 10px;
  text-decoration: none;
  color: var(--wcls-text-main);
  border-radius: 8px;
  transition: background 0.15s;
  align-items: center;
}
.wcls-item:hover {
  background: var(--wcls-bg-hover);
}

.wcls-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--wcls-border);
  background: #fff;
}
.wcls-thumb--ph {
  background: var(--wcls-bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wcls-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.wcls-title {
  font-weight: 500;
  font-size: 15px;
  line-height: 1.4;
}

.wcls-price {
  margin-top: 4px;
  font-size: 13px;
  color: var(--wcls-primary);
  font-weight: 600;
}
.wcls-price del {
  color: var(--wcls-text-muted);
  font-weight: 400;
  margin-right: 4px;
}
.wcls-price .woocommerce-Price-amount{
color:var(--wcls-text-muted) !important;
}

/* --- States (Empty, Loading) --- */
.wcls-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--wcls-text-muted);
  font-size: 14px;
}

/* Spinner CSS */
.wcls-loading {
  display: flex;
  justify-content: center;
  padding: 40px;
}
.wcls-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--wcls-bg-hover);
  border-top-color: var(--wcls-primary);
  border-radius: 50%;
  animation: wcls-spin 0.8s linear infinite;
}

@keyframes wcls-spin {
  to { transform: rotate(360deg); }
}