/* Style for recent purchases images in cart */
.recent-purchase-image img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
}
.UserCart-container {
  width: 80vw;
  margin: 0 auto;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.UserCart-checkout-flex {
  display: flex;
  width: 100%;
}

.content-container {
  width: 75%;
  margin: 20px auto;
  padding: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  background-color: #fff;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
}

.UserCart {
  flex: 0 0 75%;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 50px;
}

.Checkout-section {
  flex: 0 0 25%;
  margin-left: 20px;
  background-color: #f9f9f9;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 50px;
}

.UserCart h1 {
  font-size: 2.5em;
  color: #333;
  margin-top: 20px;
  text-align: left;
}

.UserCart-buttons {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.continue-shopping-btn,
.clear-cart-btn,
.go-back-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s;
}

.continue-shopping-btn {
  background-color: gray;
  color: white;
  transition:
    background-color 0.3s,
    transform 0.2s;
}

.continue-shopping-btn:hover {
  background-color: black;
  transform: scale(1.05);
}

.clear-cart-btn {
  background-color: #f44336;
  color: white;
  transition:
    background-color 0.3s,
    transform 0.2s;
}

.clear-cart-btn:hover {
  background-color: #d32f2f;
  transform: scale(1.05);
}

.go-back-btn {
  background-color: #007bff;
  color: white;
}

.go-back-btn:hover {
  background-color: #0056b3;
  transform: scale(1.05);
}

.UserCart hr {
  margin: 20px 0;
  border: none;
  height: 1px;
  background-color: #ddd;
}

.UserCart-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.CartItem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background-color: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 15px;
}

.CartItem img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
}

.CartItem-info {
  flex: 2;
  margin-left: 20px;
}

.CartItem-info h2 {
  font-size: 1.5em;
  color: #333;
  margin-bottom: 5px;
}

.CartItem-info p {
  color: #666;
  font-size: 0.9em;
  margin-bottom: 10px;
}

.CartItem-actions {
  display: flex;
  align-items: center;
}

.CartItem-quantity input {
  width: 50px;
  padding: 5px;
  text-align: center;
  border-radius: 4px;
}

.CartItem-delete button {
  background-color: #f44336;
  color: white;
  padding: 5px 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.CartItem-delete button:hover {
  background-color: #d32f2f;
}

.CartSummary {
  margin-top: 20px;
  text-align: right;
  padding: 20px;
  background-color: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.CartSummary h3 {
  font-size: 1.8em;
  color: #333;
  margin-bottom: 10px;
}

.CartSummary .total-price {
  font-size: 2em;
  font-weight: bold;
  color: #333;
}

.cart-icon-container {
  position: relative;
  display: inline-block;
  margin-left: 20px;
}

.cart-icon {
  font-size: 2em;
  color: #333;
}

.cart-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  background-color: #ff4d4f;
  color: white;
  border-radius: 50%;
  padding: 4px 7px;
  font-size: 0.8em;
  font-weight: bold;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

@media screen and (max-width: 768px) {
  .UserCart {
    padding: 10px;
  }

  .cart-header {
    flex-direction: column;
    align-items: center;
  }

  .cart-icon-container {
    margin-left: 0;
    margin-top: 10px;
  }

  .cart-actions {
    flex-direction: column;
    gap: 10px;
  }

  .cart-actions button,
  .CartSummary button {
    width: 100%;
    font-size: 0.9em;
    padding: 8px 16px;
  }

  .CartSummary {
    text-align: center;
  }

  .cart-badge {
    top: -5px;
    right: -15px;
    padding: 3px 6px;
    font-size: 0.75rem;
  }
}

.cart-badge-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
}

.cart-badge {
  position: absolute;
  top: -10px;
  right: -30px;
  background-color: #ff4d4f;
  color: white;
  border-radius: 50%;
  padding: 4px 8px;
  font-size: 0.85rem;
  font-weight: bold;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  min-width: 28px;
  text-align: center;
}

.Wishlist-section {
  padding: 20px;
  background-color: #f1f1f1;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.Wishlist-section h2 {
  font-size: 2em;
  color: #333;
  margin-bottom: 15px;
}

.Wishlist-items {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.Wishlist-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  transition: box-shadow 0.3s;
}

.Wishlist-item:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.Wishlist-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
}

.Wishlist-item-info {
  flex: 2;
  margin-left: 15px;
}

.Wishlist-item-info h3 {
  font-size: 1.5em;
  color: #333;
  margin-bottom: 5px;
}

.Wishlist-item-info p {
  color: #666;
  font-size: 0.85em;
}

.Wishlist-item-remove button {
  background-color: #f44336;
  color: white;
  padding: 5px 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.Wishlist-item-remove button:hover {
  background-color: #d32f2f;
}

.checkout-btn {
  background-color: #007bff;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition:
    background-color 0.3s,
    transform 0.2s;
}

.checkout-btn:hover {
  background-color: #0056b3;
  transform: scale(1.05);
}

.voucher-code-section {
  display: flex;
  align-items: center;
  margin-top: 20px;
}

.voucher-input {
  width: 200px;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-right: 15px;
}

.apply-voucher-button {
  padding: 8px 16px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition:
    background-color 0.3s,
    transform 0.2s;
  margin-left: 8px;
}

.voucher-error {
  color: red;
  margin-top: 10px;
}

.apply-voucher-button:hover {
  background-color: #0056b3;
  transform: scale(1.05);
}

.cart-header-title {
  margin-top: 20px;
  /* If the overlay is an actual <img> with matching src or alt */
  .Wishlist-items img[src*='out-of-stock' i],
  .Wishlist-items img[alt*='out of stock' i],
  .Wishlist-items .oos-overlay {
    display: none !important;
  }

  /* If the overlay is drawn via pseudo-elements (ribbons/badges) */
  .Wishlist-items *::before,
  .Wishlist-items *::after {
    /* suppress when OOS ribbon text/image is explicitly called*/
    background-image: none !important;
    content: normal;
  }
}


.move-all-to-cart-btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: auto; /* laisse le tooltip/title fonctionner */
}

