/* =========================================================
   Warenkorb (cart) – German shop layout
   Products list (left) + sticky order summary (right)
   ========================================================= */
:root {
  --xb-cart-border: #e3e8ef;
  --xb-cart-bg: #ffffff;
  --xb-cart-muted: #6b7280;
  --xb-cart-ink: #1f2937;
  --xb-cart-accent: #111827;
  --xb-cart-gold: #d4a017;
  --xb-cart-radius: 14px;
}

#checkout-cart { margin-bottom: 40px; }

.xb-cart__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.xb-cart__title {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 800;
  color: var(--xb-cart-ink);
  margin: 0;
}

.xb-cart__count {
  font-size: .92rem;
  color: var(--xb-cart-muted);
  font-weight: 600;
}

/* --- Two-column layout --- */
.xb-cart__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

/* --- Product items --- */
.xb-cart__items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.xb-cart__item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--xb-cart-bg);
  border: 1px solid var(--xb-cart-border);
  border-radius: 0;
}

.xb-cart__thumb {
  flex: 0 0 auto;
  width: 92px;
  height: 92px;
  border: 1px solid var(--xb-cart-border);
  border-radius: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafbfc;
}

.xb-cart__thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.xb-cart__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.xb-cart__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.xb-cart__titles { min-width: 0; }

.xb-cart__name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--xb-cart-ink);
  text-decoration: none;
  line-height: 1.35;
}

.xb-cart__name:hover { color: var(--xb-cart-gold); }

.xb-cart__badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fef2f2;
  color: #dc2626;
  font-size: .72rem;
  font-weight: 700;
  vertical-align: middle;
}

.xb-cart__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 6px;
  font-size: .82rem;
  color: var(--xb-cart-muted);
}

.xb-cart__line-total {
  flex: 0 0 auto;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--xb-cart-ink);
  white-space: nowrap;
}

.xb-cart__bottom {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

/* Quantity control */
.xb-cart__qty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.xb-cart__qty-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--xb-cart-muted);
}

.xb-cart__stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--xb-cart-border);
  border-radius: 0;
  overflow: hidden;
  background: #fff;
}

.xb-cart__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  border: none;
  background: #f5f7fa;
  color: var(--xb-cart-ink);
  font-size: .8rem;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.xb-cart__step:hover {
  background: var(--xb-cart-accent);
  color: #fff;
}

.xb-cart__step:active { transform: scale(.96); }

.xb-cart__qty-input {
  width: 52px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--xb-cart-border);
  border-right: 1px solid var(--xb-cart-border);
  padding: 8px 4px;
  font-size: .95rem;
  font-weight: 700;
  color: var(--xb-cart-ink);
  background: #fff;
  -moz-appearance: textfield;
}

.xb-cart__qty-input:focus {
  outline: none;
  box-shadow: none;
}

.xb-cart__qty-input::-webkit-outer-spin-button,
.xb-cart__qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Unit price */
.xb-cart__unit {
  font-size: .95rem;
  font-weight: 700;
  color: var(--xb-cart-ink);
}

.xb-cart__unit span {
  display: block;
  font-size: .74rem;
  font-weight: 600;
  color: var(--xb-cart-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Remove (overrides Bootstrap .btn-danger which the JS hooks into) */
.xb-cart__remove.btn-danger,
.xb-cart__remove {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--xb-cart-border);
  background: #fff;
  color: var(--xb-cart-muted);
  border-radius: 0;
  font-size: .84rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}

.xb-cart__remove.btn-danger:hover,
.xb-cart__remove:hover {
  color: #dc2626;
  border-color: #fecaca;
  background: #fef2f2;
}

.xb-cart__minimum {
  display: block;
  color: #dc2626;
  font-size: .82rem;
  font-weight: 600;
}

/* Continue shopping */
.xb-cart__continue { margin-top: 16px; }

.xb-cart__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--xb-cart-ink);
  font-weight: 600;
  font-size: .92rem;
  text-decoration: none;
}

.xb-cart__link:hover { color: var(--xb-cart-gold); }

/* Extras (coupon / reward / shipping estimate modules) */
.xb-cart__extras {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--xb-cart-border);
}

.xb-cart__extras-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--xb-cart-ink);
  margin: 0 0 4px;
}

.xb-cart__extras-note {
  font-size: .88rem;
  color: var(--xb-cart-muted);
  margin: 0 0 16px;
}

/* Modules (Gutschein / Bonuspunkte / Versand schätzen) styled as clean cards */
.xb-cart__extras .accordion {
  display: grid;
  gap: 12px;
}

.xb-cart__extras .accordion-item {
  border: 1px solid var(--xb-cart-border);
  border-radius: 0;
  overflow: hidden;
  background: #fff;
}

.xb-cart__extras .accordion-header { margin: 0; }

.xb-cart__extras .accordion-button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  font-size: .95rem;
  font-weight: 700;
  color: var(--xb-cart-ink);
  background: #fbfcfe;
  box-shadow: none;
}

.xb-cart__extras .accordion-button:not(.collapsed) {
  color: var(--xb-cart-accent);
  background: #fff;
}

.xb-cart__extras .accordion-button:focus {
  outline: none;
  box-shadow: none;
  border-color: transparent;
}

/* Leading icon per module type */
.xb-cart__extras .accordion-button::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: .95rem;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  background: #eef1f6;
  color: var(--xb-cart-accent);
  content: "\f0d0";
}

.xb-cart__extras .accordion-button[data-bs-target="#collapse-coupon"]::before,
.xb-cart__extras .accordion-button[data-bs-target="#collapse-voucher"]::before { content: "\f145"; }
.xb-cart__extras .accordion-button[data-bs-target="#collapse-reward"]::before { content: "\f005"; }
.xb-cart__extras .accordion-button[data-bs-target="#collapse-shipping"]::before { content: "\f0d1"; }
.xb-cart__extras .accordion-button[data-bs-target="#collapse-credit"]::before { content: "\f555"; }

.xb-cart__extras .accordion-button:not(.collapsed)::before {
  background: var(--xb-cart-accent);
  color: #fff;
}

.xb-cart__extras .accordion-button::after {
  margin-left: auto;
  width: 16px;
  height: 16px;
  background-size: 16px;
}

.xb-cart__extras .accordion-body {
  padding: 18px;
  border-top: 1px solid var(--xb-cart-border);
}

.xb-cart__extras .accordion-body .col-form-label,
.xb-cart__extras .accordion-body .form-label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--xb-cart-ink);
  padding-top: 0;
  margin-bottom: 6px;
}

.xb-cart__extras .accordion-body .form-control,
.xb-cart__extras .accordion-body .form-select {
  border: 1px solid var(--xb-cart-border);
  border-radius: 0;
  padding: 10px 12px;
  font-size: .92rem;
}

.xb-cart__extras .accordion-body .form-control:focus,
.xb-cart__extras .accordion-body .form-select:focus {
  border-color: var(--xb-cart-accent);
  box-shadow: 0 0 0 3px rgba(17, 24, 39, .08);
}

.xb-cart__extras .accordion-body .btn {
  border-radius: 0;
  padding: 9px 18px;
  font-size: .9rem;
  font-weight: 600;
}

.xb-cart__extras .accordion-body .btn-primary {
  background: var(--xb-cart-accent);
  border-color: var(--xb-cart-accent);
  color: #fff;
}

.xb-cart__extras .accordion-body .btn-primary:hover { opacity: .9; }

.xb-cart__extras .accordion-body .btn-danger {
  background: #fff;
  border: 1px solid #dc3545;
  color: #dc3545;
}

.xb-cart__extras .accordion-body .btn-danger:hover {
  background: #dc3545;
  color: #fff;
}

/* --- Order summary (sticky aside) --- */
.xb-cart__aside { position: sticky; top: 20px; }

.xb-cart__summary {
  background: var(--xb-cart-bg);
  border: 1px solid var(--xb-cart-border);
  border-radius: 0;
  overflow: hidden;
}

.xb-cart__summary-head {
  background: var(--xb-cart-accent);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 18px;
}

.xb-cart__totals { padding: 16px 18px 4px; }

.xb-cart__total-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: .92rem;
  color: var(--xb-cart-muted);
  padding: 7px 0;
}

.xb-cart__total-row span:last-child {
  color: var(--xb-cart-ink);
  font-weight: 600;
  white-space: nowrap;
}

.xb-cart__total-row--grand {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--xb-cart-border);
  font-size: 1.15rem;
}

.xb-cart__total-row--grand span {
  color: var(--xb-cart-ink) !important;
  font-weight: 800 !important;
}

.xb-cart__summary-note {
  padding: 0 18px;
  margin: 4px 0 0;
  font-size: .78rem;
  color: var(--xb-cart-muted);
}

.xb-cart__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 16px 18px 0;
  padding: 14px 18px;
  background: var(--xb-cart-accent);
  color: #fff;
  border-radius: 0;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: opacity .15s;
}

.xb-cart__cta:hover { opacity: .9; color: #fff; }

.xb-cart__ship-hint {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 12px 18px 0;
  margin: 0;
  font-size: .8rem;
  color: var(--xb-cart-muted);
}

.xb-cart__trust {
  list-style: none;
  margin: 14px 0 0;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--xb-cart-border);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.xb-cart__trust li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .84rem;
  color: var(--xb-cart-ink);
}

.xb-cart__trust i { color: #16a34a; width: 18px; text-align: center; }

/* --- Empty state --- */
.xb-cart--empty {
  text-align: center;
  padding: 56px 20px;
  max-width: 520px;
  margin: 0 auto;
}

.xb-cart__empty-icon {
  font-size: 3rem;
  color: #cbd2dc;
  margin-bottom: 14px;
}

.xb-cart__empty-text {
  color: var(--xb-cart-muted);
  font-size: 1rem;
  margin-bottom: 22px;
}

.xb-cart__cta--inline {
  display: inline-flex;
  margin: 0;
}

/* --- Responsive --- */
@media (max-width: 991px) {
  .xb-cart__layout { grid-template-columns: 1fr; }
  .xb-cart__aside { position: static; }
}

@media (max-width: 575px) {
  .xb-cart__item { flex-direction: column; }
  .xb-cart__thumb { width: 100%; height: 160px; }
  .xb-cart__top { flex-direction: column; }
  .xb-cart__line-total { font-size: 1.15rem; }
  .xb-cart__bottom { gap: 12px; }
  .xb-cart__remove { margin-left: 0; }
}
