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

/* --------------------------------------------------------------------------
   📦 Allgemeine Widget-Container
-------------------------------------------------------------------------- */
.cart-products-widget, .cart-summary-widget {
  border: none;
  box-shadow: none;
  padding-top: 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-name a {
  font-size: 1rem !important;
  font-weight: 600 !important;
  color: #000 !important;
  margin-bottom: 0.5rem;
}

.product-name a:hover {
  color: #000 !important;
}

.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;
}

.cart-thumb {
  flex: 0 0 20% !important;
  margin-right: 5% !important;
}

.cart-info {
  flex: 0 0 64% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  margin-right: 1% !important;
}

.cart-qty-wrapper {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-end !important;
  width: 100% !important;
  margin-top: 0.5rem !important;
  gap: 1rem !important;
}

.cart-qty-dropdown {
  flex: 1 1 auto !important;
}

.cart-price-group {
  font-size: 1rem !important;
  flex: 0 0 auto !important;
  margin-top: auto !important;
  text-align: right !important;
}

.cart-remove {
  flex: 0 0 10% !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: flex-start !important;
}

.remove-item {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 1.5rem !important;
  height: 1.5rem !important;
  border-radius: 50% !important;
  color: #000 !important;
  transition: background 0.2s ease, color 0.2s ease !important;
  font-size: 1rem !important;
}

.remove-item:hover {
  color: #c0392b;
  background-color: rgba(0,0,0,0.05);
}

.remove-item i {
  pointer-events: none;
}

.cart-item {
  color: #000;
}

.cart-products-widget .cart-item:last-child {
    border-bottom: none;
}

/* --------------------------------------------------------------------------
   ⏳ 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)
-------------------------------------------------------------------------- */
.dropbtn {
  background: none !important;
  border-bottom: 1px solid #000 !important;
  border-radius: 0 !important;
  color: #000 !important;
  cursor: pointer !important;
}

.dropbtn:hover, .dropbtn:focus {
  background: none !important;
  color: #000 !important; 
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #fff;
  min-width: 100px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  z-index: 100;
}

.dropdown-content a {
  color: #000 !important; 
  padding: 6px 10px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: #eee;
}

.dropdown.show .dropdown-content {
  display: block;
}

/* --------------------------------------------------------------------------
   💶 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;
}