/*! ********** Configuration Générale des Actions ********** */
.product-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/*! ********** Style des Boutons ********** */
/* Style de base des boutons */
.product-actions .woo-add-to-cart-button,
.product-actions .woo-favorites-button,
.product-actions .woo-add-range-to-cart-button,
.product-actions .woo-quote-button {
  background-color: transparent !important;
  border-radius: 0 !important;
}

/* Style des icônes SVG */
.product-actions .woo-add-to-cart-button svg,
.product-actions .woo-add-to-cart-button svg path,
.product-actions .woo-add-range-to-cart-button svg,
.product-actions .woo-add-range-to-cart-button svg path,
.product-actions .woo-quote-button svg,
.product-actions .woo-quote-button svg path {
  color: #666 !important;
  fill: #666 !important;
}

/* Hover des icônes */
.product-actions .woo-add-to-cart-button:hover svg,
.product-actions .woo-add-to-cart-button:hover svg path,
.product-actions .woo-add-range-to-cart-button:hover svg,
.product-actions .woo-add-range-to-cart-button:hover svg path,
.product-actions .woo-quote-button:hover svg,
.product-actions .woo-quote-button:hover svg path {
  color: black !important;
  fill: black !important;
}

/*! ********** Bouton Favoris ********** */
.woo-favorites-button:not(.is-favorite):hover svg {
  color: red;
}

.woo-favorites-button.is-favorite:hover svg {
  opacity: 0.5;
}

/*! ********** Éléments Communs ********** */
.product-actions .button-text {
  margin-right: 8px !important;
}

.product-actions .button-icon {
  display: flex !important;
  justify-content: center !important;
  align-items: center;
}

/*! ********** Bouton Ajout au Panier ********** */
.product-actions .woo-add-to-cart-button a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  text-decoration: none !important;
}

.product-actions .woo-add-to-cart-button:hover,
.product-actions .woo-add-range-to-cart-button:hover {
  background-color: var(--background-tertiary) !important;
}

.product-actions .woo-add-to-cart-button:hover svg path,
.product-actions .woo-add-range-to-cart-button:hover svg path {
  color: var(--color-primary) !important;
  fill: var(--color-primary) !important;
}

.product-actions .woo-add-to-cart-button .added_to_cart {
  display: none !important;
}

/*! ********** Sélecteur de quantité ********** */
.quantity-selector {
  display: inline-flex !important;
  align-items: stretch !important;
  height: 40px !important;
  border: 1px solid #e2e2e2 !important;
  border-radius: 4px !important;
  overflow: hidden !important;
  margin-right: 10px;
}

.quantity-selector button {
  width: 32px !important;
  border: none !important;
  background: #f5f5f5 !important;
  color: #333 !important;
  font-size: 18px !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background-color 0.2s !important;
}

.quantity-selector button:hover {
  background: #e0e0e0 !important;
}

.quantity-selector input[type="number"] {
  width: 50px !important;
  height: 100% !important;
  border: none !important;
  border-left: 1px solid #e2e2e2 !important;
  border-right: 1px solid #e2e2e2 !important;
  text-align: center !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #333 !important;
  padding: 0 4px !important;
  margin: 0 !important;
  -moz-appearance: textfield !important;
}

.quantity-selector input[type="number"]::-webkit-outer-spin-button,
.quantity-selector input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

.quantity-selector input[type="number"]:focus {
  outline: none !important;
  background-color: #f8f8f8 !important;
}

/*! ********** États de Chargement ********** */
/* Bouton Ajout au Panier */
.woo-add-to-cart-button {
  position: relative !important;
}

/* Cache le contenu du bouton pendant le chargement */
.woo-add-to-cart-button a.loading {
  opacity: 0.25 !important;
}

/* Affiche le spinner */
.woo-add-to-cart-button a.loading ~ .icon-loading {
  display: block !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 5 !important;
}

/* Style du spinner */
.woo-add-to-cart-button .icon-loading {
  display: none;
  width: 20px !important;
  height: 20px !important;
}

/* Animation du spinner */
.woo-add-to-cart-button .icon-loading svg {
  animation: spin 1s linear infinite !important;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
