body {
  font-family: Arial, sans-serif;
  background: #f7f7f7;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

h1 {
  text-align: center;
  margin: 30px 0 10px 0;
}

.search-container {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
  position: relative;
}

#searchInput {
  width: 350px;
  padding: 12px;
  font-size: 16px;
  border: 1px solid #bbb;
  border-radius: 8px;
  outline: none;
  transition: border 0.2s;
}

#searchInput:focus {
  border: 1.5px solid #222;
}

.autocomplete-items {
  position: absolute;
  top: 44px;
  left: 0;
  right: 0;
  z-index: 99;
  border: 1px solid #d4d4d4;
  border-top: none;
  background: #fff;
  max-height: 220px;
  overflow-y: auto;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.autocomplete-items div {
  padding: 10px;
  cursor: pointer;
  color: #222;
  border-bottom: 1px solid #eee;
  background: #fff;
}

.autocomplete-items div:last-child {
  border-bottom: none;
}

.autocomplete-items div:hover, .autocomplete-active {
  background-color: #f2f2f2;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 auto;
}

th, td {
  padding: 10px 12px;
  text-align: left;
}

th {
  background: #222;
  color: #fff;
  cursor: pointer;
  user-select: none;
}

th.sort-asc::after {
  content: " ▲";
  font-size: 0.9em;
}

th.sort-desc::after {
  content: " ▼";
  font-size: 0.9em;
}

tr:nth-child(even) {
  background: #f2f2f2;
}

tr:hover {
  background: #e0e0e0;
}

.shop-container {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  margin-top: 40px;
  position: relative;
}

.catalog {
  flex: 1 1 0;
}

.cart {
  width: 320px;
  min-width: 240px;
  max-width: 99vw;
  background: #f9f9f9;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  position: fixed;
  top: 40px;
  right: 40px;
  height: auto;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  z-index: 100;
}

.cart h2 {
  margin-top: 0;
  font-weight: 700;
  color: #2c3e50;
  border-bottom: 2px solid #2ecc71;
  padding-bottom: 8px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #ddd;
  font-size: 1rem;
  color: #333;
}

.cart-item button {
  background: #e74c3c;
  border: none;
  color: white;
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
}
.cart-item button:hover {
  background: #c0392b;
}

.cart-summary {
  margin-top: 15px;
  font-weight: 600;
  font-size: 1.15rem;
  color: #2c3e50;
  border-top: 2px solid #2ecc71;
  padding-top: 12px;
}

.cart-summary span {
  float: right;
  font-weight: 700;
  color: #27ae60;
}

.checkout-btn {
  width: 100%;
  padding: 14px;
  background: #27ae60;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.2em;
  cursor: pointer;
  margin-top: 25px;
  transition: background 0.3s;
}
.checkout-btn:hover {
  background: #219150;
}

.buy-btn {
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(37, 117, 252, 0.4);
  transition: background 0.3s ease, transform 0.2s ease;
  outline: none;
  user-select: none;
}
.buy-btn:hover {
  background: linear-gradient(135deg, #2575fc 0%, #6a11cb 100%);
  transform: scale(1.05);
}
.buy-btn:active {
  transform: scale(0.95);
}

/* MODALES FORMULAR FÜR RECHNUNGSDATEN */
#customerModal {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
  z-index: 2000;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#customerModal .modal-content {
  background: #fff;
  padding: 40px 30px;
  border-radius: 16px;
  width: 90%;
  max-width: 480px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  animation: fadeInScale 0.3s ease forwards;
  position: relative;
}

@keyframes fadeInScale {
  0% {opacity: 0; transform: scale(0.9);}
  100% {opacity: 1; transform: scale(1);}
}

#customerForm label {
  display: block;
  margin: 20px 0 8px 0;
  font-weight: 600;
  color: #333;
  font-size: 1rem;
}

#customerForm input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1.5px solid #ccc;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

#customerForm input:focus {
  border-color: #2575fc;
  outline: none;
  box-shadow: 0 0 8px rgba(37,117,252,0.4);
}

#submitCustomerData {
  background: #2575fc;
  color: white;
  border: none;
  padding: 14px 0;
  font-size: 1.2rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 30px;
  width: 100%;
  transition: background 0.3s ease;
}

#submitCustomerData:hover {
  background: #1a52c0;
}

#customerModal .close-btn {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 1.8rem;
  font-weight: 700;
  color: #999;
  cursor: pointer;
  transition: color 0.2s ease;
}

#customerModal .close-btn:hover {
  color: #555;
}

@media (max-width: 1100px) {
  .cart {
    right: 10px;
    top: 10px;
  }
}

@media (max-width: 900px) {
  .shop-container {
    flex-direction: column;
  }
  .cart {
    position: static;
    width: 100%;
    margin-top: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
}

@media (max-width: 600px) {
  .container {
    padding: 10px;
  }
  #searchInput {
    width: 98%;
  }
  table, th, td {
    font-size: 14px;
  }
  .shop-container {
    grid-template-columns: 1fr;
  }
}
