/* Dark Mode Styles */
body {
  background-color: #121212;
  color: #e0e0e0;
}

.container {
  background-color: #1e1e1e;
  padding: 20px;
  border-radius: 10px;
}

.product {
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.3s ease, background-color 0.3s ease;
  background-color: #2e2e2e;
  color: #e0e0e0;
  border-radius: 10px;
  text-align: center;
  width: 100%;
  max-width: 400px;
  height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  position: relative;
}

.product.selected {
  border-color: #4caf50;
  background-color: #2c3e50;
}

.product img {
  border-radius: 10px;
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
}

.product h4 {
  margin-top: 10px;
  font-size: 18px;
}

.product p {
  margin-top: 10px;
  font-size: 16px;
}

.product .old-price {
  text-decoration: line-through;
  color: #ff6f61;
  margin-right: 10px;
}

.product .new-price {
  color: #4caf50;
}

.product .badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 14px;
  padding: 5px 10px;
  border-radius: 20px;
}

/* Badge für das Achtungssymbol bei doppelten Produkten */
.duplicate-warning {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.2em;
  color: #ff9800; /* Warnfarbe für das Icon */
  background: none;
}

/* Animation für das Blinken des Achtungssymbols */
.blinking-icon {
  animation: blink 1s infinite;
}

@keyframes blink {
  0% { opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 1; }
}

h1, h3 {
  text-align: center;
}

h3 span {
  color: #4caf50;
}

button {
  background-color: #4caf50;
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 18px;
}

button:hover {
  background-color: #388e3c;
}

button:focus {
  outline: none;
}

#bestellen-btn {
  width: 100%;
  margin-top: 20px;
}

/* Fixierter Warenkorb mit maximaler Höhe */
.cart-container-fixed {
  background-color: #2e2e2e;
  padding: 20px;
  border-radius: 10px;
  position: fixed;
  top: 20px;
  right: 20px;
  width: 300px;
  max-height: 80%;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.5);
}

/* Begrenze die Höhe des Warenkorbs für maximal 5 Produkte */
#cart-items {
  max-height: 400px; /* Höhe für 5 Produkte */
  overflow-y: auto;  /* Scrollbar, falls mehr als 5 Produkte */
  padding: 10px;
}

/* Styling der Scrollbar für den Warenkorb */
#cart-items::-webkit-scrollbar {
  width: 8px;
}

#cart-items::-webkit-scrollbar-track {
  background: #3e3e3e;
}

#cart-items::-webkit-scrollbar-thumb {
  background-color: #4caf50;
  border-radius: 10px;
  border: 2px solid #3e3e3e;
}

/* Styling für die Listengruppe der Warenkorb-Produkte */
.list-group-item {
  background-color: #3e3e3e; /* Dark Mode Hintergrund für Warenkorb-Elemente */
  border: none;
  color: #e0e0e0;  /* Textfarbe für Dark Mode */
  border-radius: 8px;
  margin-bottom: 10px;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Abgerundete Ecken für Bilder im Warenkorb */
.list-group-item img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 8px;
  margin-right: 10px;
}

.list-group-item .item-info {
  flex-grow: 1;
  text-align: left;
}

.list-group-item .item-price {
  font-weight: bold;
  white-space: nowrap;
}

/* Generelle Scrollbar für die gesamte Seite */
body::-webkit-scrollbar {
  width: 12px;
}

body::-webkit-scrollbar-track {
  background: #1e1e1e;
  border-radius: 10px;
}

body::-webkit-scrollbar-thumb {
  background-color: #4caf50;
  border-radius: 10px;
  border: 3px solid #1e1e1e;
}
