/* ==========================================================================
   🛒 WILD YOURSELF Warenkorb Widget Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   📦 Allgemeine Widget-Container
-------------------------------------------------------------------------- */
.cart-products-widget, .cart-summary-widget {
  border: 1px solid #ccc;
  padding: 1rem;
  margin-bottom: 2rem;
  background: #fff;
}

/* --------------------------------------------------------------------------
   🚫 Hinweis bei leerem Warenkorb
-------------------------------------------------------------------------- */
.cart-empty-notice {
  padding: 1rem;
  text-align: center;
  font-weight: 500;
  color: #555;
  background-color: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
}

/* --------------------------------------------------------------------------
   🧱 Warenkorb-Item Layout & Struktur
-------------------------------------------------------------------------- */
.product-subline {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.cart-item {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
  gap: 1rem;
}

.cart-thumb {
  flex: 0 0 30%;
}

.cart-info {
  flex: 0 0 60%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cart-price-group {
  margin-top: auto;
  text-align: right;
}

.cart-remove {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start; /* optional, wenn Button oben bleiben soll */
}

.cart-item .remove-item:hover {
  color: #000;
}

/* --------------------------------------------------------------------------
   ⏳ AJAX-Ladespinner und visuelles Feedback
-------------------------------------------------------------------------- */
.cart-item.loading {
  opacity: 0.6;
  pointer-events: none;
}

.cart-item.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border: 2px solid #ccc;
  border-top-color: #333;
  border-radius: 50%;
  animation: spinner 0.6s linear infinite;
  z-index: 10;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   🎯 Mengen-Dropdown Styling (unter Bild, mit „Anzahl“ im Text)
-------------------------------------------------------------------------- */
.cart-qty-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #fff;
  border: 1px solid #ccc;
  padding: 0.4rem 1.8rem 0.4rem 0.5rem;
  font-size: 1rem;
  border-radius: 4px;
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2210%22%20height%3D%226%22%20viewBox%3D%220%200%2010%206%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cpath%20d%3D%22M0%200l5%206%205-6z%22%20fill%3D%22%23666%22/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 10px 6px;
  cursor: pointer;
  min-width: 100px;
}

.cart-qty-select:focus {
  outline: none;
  border-color: #999;
}

/* --------------------------------------------------------------------------
   💶 Preis-Markierung bei AJAX-Aktualisierung
-------------------------------------------------------------------------- */
.product-total-price.highlight {
  color: #2e7d32; /* DINZLER-Grün */
  font-weight: bold;
  transition: color 0.6s ease;
}

/* --------------------------------------------------------------------------
   ✨ Preis-Flashing (optional animiert)
-------------------------------------------------------------------------- */
@keyframes price-flash {
  0%   { background-color: #e0ffe0; }
  100% { background-color: transparent; }
}

.product-total-price.flash {
  animation: price-flash 1s ease-in-out;
}

/* --------------------------------------------------------------------------
   ✅ Checkout-Button Styles
-------------------------------------------------------------------------- */
.checkout-button {
  background: #2e7d32;
  color: white;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease;
}

.checkout-button:hover {
  background: #1b5e20;
}