/* =========================================================
   Artikel 64 – Shop / Bestellungen
   ========================================================= */

/* ---------- Produktübersicht (unverändert) ---------- */
.produktuebersicht {
  display: inline-flex;
  justify-content: center;
  flex-wrap: wrap;
  width: 74%;
}
.produktuebersicht > a {
  width: 44%;
  position: relative;
  display: inline-block;
  padding-bottom: 100px;
  margin-left: 2%;
  margin-right: 2%;
}

/* ---------- Variablen ---------- */
#article64 {
  --bl-rot: #a5251c;
  --bl-rot-hell: #f7ebe9;
  --bl-linie: #e8e2d8;
  --bl-zebra: #faf8f4;
  --bl-text-hell: #7a746c;
}

/* ---------- Gutter links/rechts ---------- */
#article64 .inhalt > article {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 56px) 60px;
  box-sizing: border-box;
}

/* ---------- Filter oben ---------- */
.vorauswahl {
  text-align: center;
  margin: 10px 0 36px;
}
.vorauswahl br { display: none; }

/* einfache Formulare (z. B. Login) */
.vorauswahl form {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 16px;
  padding: 16px 22px;
  background: #fff;
  border: 1px solid var(--bl-linie);
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .05);
}

.vorauswahl label {
  margin: 0;
  color: var(--bl-text-hell);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.vorauswahl select,
.vorauswahl .form-control {
  height: 44px;
  padding: 0 14px;
  font: inherit;
  font-size: 16px;
  color: #333;
  background-color: var(--bl-zebra);
  border: 1px solid var(--bl-linie);
  border-radius: 6px;
  box-shadow: none;
  outline: none;
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}

.vorauswahl select {
  min-width: 110px;
  padding-right: 36px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a5251c' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.form-control,
.vorauswahl .form-control {
  width: 260px;
  max-width: 100%;
}

.vorauswahl select:focus,
.vorauswahl .form-control:focus {
  background-color: #fff;
  border-color: var(--bl-rot);
  box-shadow: 0 0 0 3px var(--bl-rot-hell);
}

.vorauswahl .button {
  height: 44px;
  padding: 0 26px;
  margin: 0;
  color: #fff;
  background: var(--bl-rot);
  border: 1px solid var(--bl-rot);
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s;
}
.vorauswahl .button:hover {
  background: #861c15;
  border-color: #861c15;
}

/* ---------- Toolbar: Filter + Export ---------- */
.vorauswahl.bl-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 24px;
  padding: 20px 24px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--bl-linie);
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .05);
}

.bl-toolbar form.bl-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
}

.bl-feld {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bl-feld-suche .form-control { width: 300px; }
.bl-toolbar select,
.bl-toolbar .form-control,
.bl-toolbar .button {
  margin: 0 !important;
  vertical-align: bottom;
}

.bl-reset {
  align-self: center;
  font-size: 14px;
  color: var(--bl-text-hell);
  text-decoration: none;
}
.bl-reset:hover { color: var(--bl-rot); }

.bl-export {
  display: flex;
  gap: 10px;
}
.bl-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  font-size: 15px;
  color: var(--bl-rot);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--bl-rot);
  border-radius: 6px;
  transition: background .15s, color .15s;
}
.bl-export-btn:hover {
  color: #fff;
  background: var(--bl-rot);
}

.bl-info {
  flex-basis: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 14px;
  font-size: 14px;
  color: var(--bl-text-hell);
  border-top: 1px solid var(--bl-linie);
}
.bl-info strong { color: #333; }
.bl-logout {
  margin-left: auto;
  color: var(--bl-text-hell);
}
.bl-logout:hover { color: var(--bl-rot); }

/* ---------- Tabelle ---------- */
table { width: 100%; }

table.bestellliste {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid var(--bl-linie);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .05);
  font-size: 16px;
}

table.bestellliste th {
  padding: 14px 16px;
  text-align: left;
  font-weight: normal;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--bl-text-hell);
  background: #fff;
  border-bottom: 2px solid var(--bl-rot);
  white-space: nowrap;
}
/* Kopfzeile hat eine Zelle weniger (Aktionen) – Linie trotzdem durchziehen */
table.bestellliste tr:first-child {
  background: #fff;
  box-shadow: inset 0 -2px 0 var(--bl-rot);
}

table.bestellliste td {
  padding: 16px;
  vertical-align: top;
  line-height: 1.5;
  border-bottom: 1px solid var(--bl-linie);
}

table.bestellliste tr { border-bottom: 1px solid #eee; }
table.bestellliste tr:last-child td { border-bottom: 0; }
table.bestellliste tr:nth-child(odd) td { background: var(--bl-zebra); }
table.bestellliste tr:hover td { background: var(--bl-rot-hell); }

/* Zeit */
table.bestellliste td:nth-child(1) {
  white-space: nowrap;
  color: var(--bl-text-hell);
  font-size: 15px;
}
/* RE-Nr. */
table.bestellliste td:nth-child(2) {
  white-space: nowrap;
  font-weight: bold;
  color: var(--bl-rot);
}
/* Versandart / Zahlart */
table.bestellliste td:nth-child(4),
table.bestellliste td:nth-child(5) {
  font-size: 15px;
}

/* Aktionen */
table.bestellliste td:last-child {
  width: 1%;
  min-width: 250px;
}
table.bestellliste td:last-child br { display: none; }
table.bestellliste td:last-child form {
  display: inline;
  margin: 0;
}
table.bestellliste td:last-child .button {
  display: inline-block;
  margin: 0 4px 6px 0;
  padding: 4px 10px;
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
  border-radius: 4px;
  background: #fff;
  transition: background .15s, color .15s;
}
table.bestellliste td:last-child .button:hover {
  background: var(--bl-rot);
  color: #fff;
}
table.bestellliste .loeschbtn.button {
  color: #888;
  border-color: #ccc;
  cursor: pointer;
}
table.bestellliste .loeschbtn.button:hover {
  color: #fff;
  background: #c0392b;
  border-color: #c0392b;
}

/* ---------- Mobil: Zeilen als Karten ---------- */
@media (max-width: 900px) {
  table.bestellliste,
  table.bestellliste tbody,
  table.bestellliste tr,
  table.bestellliste td {
    display: block;
    width: auto;
  }
  table.bestellliste {
    border: 0;
    box-shadow: none;
    background: none;
  }
  table.bestellliste tr:first-child { display: none; } /* Kopfzeile */
  table.bestellliste tr {
    margin-bottom: 14px;
    border: 1px solid var(--bl-linie);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
  }
  table.bestellliste tr td,
  table.bestellliste tr:nth-child(odd) td,
  table.bestellliste tr:hover td { background: #fff; }
  table.bestellliste td {
    padding: 6px 16px;
    border: 0;
  }
  table.bestellliste td:nth-child(1) { padding-top: 14px; }
  table.bestellliste td:last-child {
    min-width: 0;
    padding: 12px 16px 10px;
    border-top: 1px solid var(--bl-linie);
    background: var(--bl-zebra) !important;
  }
  .vorauswahl form { display: flex; }
  .vorauswahl .form-control,
  .bl-feld-suche .form-control { width: 100%; }
  .bl-toolbar form.bl-filter,
  .bl-feld-suche { flex: 1 1 100%; }
  .bl-export { flex: 1 1 100%; }
  .bl-export-btn { flex: 1; justify-content: center; }
}