/* Container principal des filtres */
.fpp-filters {
  /* background: #ffffff;
  border: 1px solid #e0e0e0; */
  border-radius: 8px;
  padding: 10px;
  /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Container interne des filtres */
.fpp-filters__inner {
  display: flex;
  flex-direction: row;
  gap: 20px;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* Wrapper pour chaque taxonomie (label + filter) */
.fpp-filter-wrapper {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Label du filtre */
.fpp-filter__label {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}

/* Compteur de termes sélectionnés */
.fpp-filter__count {
    display: none;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    background: #ce006e;
    padding: 3px 8px;
    border-radius: 12px;
    line-height: 1.4;
}

.fpp-filter__count.has-selection {
  display: inline-block;
}

/* Bloc de filtre individuel */
.fpp-filter {
    margin-bottom: 0;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 6px;
    max-height: 150px;
    overflow-y: auto;
}

/* Container des checkboxes */
.fpp-filter__checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

/* Label de checkbox */
.fpp-filter__checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 1px 0px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fafafa;
    border: 1px solid transparent;
    user-select: none;
}

.fpp-filter__checkbox-label:hover {
  background: #f5f5f5;
  border-color: #e0e0e0;
}

/* Checkbox personnalisée */
.fpp-filter__checkbox-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin: 0;
}

.fpp-filter__checkbox-label input[type="checkbox"]:hover {
  border-color: #9ca3af;
}

.fpp-filter__checkbox-label input[type="checkbox"]:checked {
    background: #ce006e;
    border-color: #ce006e;
}

.fpp-filter__checkbox-label input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Texte du label */
.fpp-term-name {
  font-size: 14px;
  color: #374151;
  line-height: 1.4;
  flex: 1;
}

/* Compteur de produits */
.fpp-term-count {
  font-size: 12px;
  color: #9ca3af;
  margin-left: auto;
  white-space: nowrap;
}

/* Select multiple */
.fpp-filter__select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  color: #374151;
  background: #ffffff;
  transition: all 0.2s ease;
  min-height: 120px;
}

.fpp-filter__select:hover {
  border-color: #9ca3af;
}

.fpp-filter__select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Actions (boutons) */
.fpp-filters__actions {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
}

/* Bouton Appliquer */
.fpp-apply {
  flex: 1;
  padding: 12px 24px;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}





/* Bouton Réinitialiser */
.fpp-reset {
    padding: 12px 24px;
    color: white !important;
    border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fpp-reset:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #374151;
}

.fpp-reset:active {
  background: #f3f4f6;
}

/* État de chargement */
.fpp-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

.fpp-spinner {
  border: 3px solid #f3f4f6;
  border-top: 3px solid #ce006e;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: fpp-spin 0.8s linear infinite;
}

@keyframes fpp-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Filtre de couleurs - Pastilles de couleur sur les labels */
.fpp-filter-wrapper[data-color-filter="true"] .fpp-filter__checkbox-label::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-right: 8px;
  border: 2px solid #e5e7eb;
  flex-shrink: 0;
}

.fpp-filter__checkbox-label[data-base-color="rouge"]::before {
  background: #dc2626;
}

.fpp-filter__checkbox-label[data-base-color="bleu"]::before {
  background: #2563eb;
}

.fpp-filter__checkbox-label[data-base-color="vert"]::before {
  background: #16a34a;
}

.fpp-filter__checkbox-label[data-base-color="jaune"]::before {
  background: #eab308;
}

.fpp-filter__checkbox-label[data-base-color="orange"]::before {
  background: #ea580c;
}

.fpp-filter__checkbox-label[data-base-color="rose"]::before {
  background: #ec4899;
}

.fpp-filter__checkbox-label[data-base-color="violet"]::before {
  background: #9333ea;
}

.fpp-filter__checkbox-label[data-base-color="brun"]::before {
  background: #92400e;
}

.fpp-filter__checkbox-label[data-base-color="beige"]::before {
  background: #d4b896;
}

.fpp-filter__checkbox-label[data-base-color="gris"]::before {
  background: #6b7280;
}

.fpp-filter__checkbox-label[data-base-color="blanc"]::before {
  background: #ffffff;
  border-color: #9ca3af;
}

.fpp-filter__checkbox-label[data-base-color="noir"]::before {
  background: #000000;
}

.fpp-filter__checkbox-label[data-base-color="autre"]::before {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Load More Spinner */
.e-loop__load-more .e-load-more-spinner {
  margin-left: 10px;
}

.e-loop__load-more .e-load-more-spinner svg {
  display: block;
  width: 16px;
  height: 16px;
  animation: eicon-animation-spin 1s linear infinite;
}

@keyframes eicon-animation-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
  .fpp-filters {
    padding: 16px;
  }
  
  .fpp-filters__inner {
    flex-direction: column;
  }
  
  .fpp-filter-wrapper {
    flex: 1 1 100%;
    min-width: 100%;
  }
  
  .fpp-filters__actions {
    flex-direction: column;
  }
  
  .fpp-apply,
  .fpp-reset {
    width: 100%;
  }
}
