/* ── Cart Icon in Navbar ─────────────────────────────────────────────────────── */
.cart-nav-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  color: #1a2744;
  font-size: 1.4rem;
  line-height: 1;
  transition: color 0.2s;
}
.cart-nav-btn:hover { color: #c9a84c; }
.cart-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: #c9a84c;
  color: #1a2744;
  font-size: 0.65rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0 3px;
}

/* ── Cart Panel Overlay ──────────────────────────────────────────────────────── */
#cartOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 8000;
  transition: opacity 0.25s;
}
#cartOverlay.active { display: block; }

/* ── Cart Panel ──────────────────────────────────────────────────────────────── */
#cartPanel {
  position: fixed;
  top: 0;
  right: -420px;
  width: 100%;
  max-width: 420px;
  height: 100%;
  background: #fff;
  z-index: 8001;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
  transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
}
#cartPanel.open { right: 0; }

.cart-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #e8e4dc;
  background: #1a2744;
  color: #fff;
}
.cart-panel__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.cart-panel__close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.cart-panel__close:hover { opacity: 1; }

/* ── Items List ──────────────────────────────────────────────────────────────── */
.cart-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

#cartEmpty {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: #888;
  font-size: 0.95rem;
  gap: 12px;
}
#cartEmpty svg { opacity: 0.3; }

.cart-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #f0ede6;
}
.cart-item__img {
  width: 72px;
  height: 90px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  background: #f8f7f4;
}
.cart-item__info {
  flex: 1;
  min-width: 0;
}
.cart-item__name {
  font-weight: 700;
  font-size: 0.88rem;
  color: #1a2744;
  line-height: 1.3;
  margin-bottom: 3px;
}
.cart-item__size {
  font-size: 0.78rem;
  color: #888;
  margin-bottom: 6px;
}
.cart-item__price {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a2744;
}
.cart-item__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.cart-qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #ddd;
  background: #f8f7f4;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  color: #1a2744;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.cart-qty-btn:hover { background: #e8e4dc; }
.cart-qty-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1a2744;
  min-width: 20px;
  text-align: center;
}
.cart-remove-btn {
  background: none;
  border: none;
  color: #bbb;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 2px 4px;
  margin-top: 4px;
  transition: color 0.15s;
}
.cart-remove-btn:hover { color: #c0392b; }

/* ── Promo Code in Panel ─────────────────────────────────────────────────────── */
.cart-promo-wrap {
  margin: 16px 0 0;
  padding: 12px 14px;
  background: rgba(201,168,76,0.07);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 8px;
}
.cart-promo-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.cart-promo-input {
  flex: 1;
  padding: 8px 11px;
  border-radius: 6px;
  border: 1px solid rgba(201,168,76,0.35);
  background: #fff;
  color: #1a2744;
  font-size: 0.85rem;
  outline: none;
  font-family: inherit;
  text-transform: uppercase;
}
.cart-promo-input:disabled { background: #f8f7f4; color: #888; }
.cart-promo-apply-btn {
  padding: 8px 13px;
  background: #c9a84c;
  color: #1a2744;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.8rem;
  white-space: nowrap;
  font-family: inherit;
  transition: background 0.15s;
}
.cart-promo-apply-btn:hover { background: #b8973b; }
#cartPromoMsg {
  margin-top: 5px;
  font-size: 0.8rem;
  display: none;
}
.cart-promo-remove {
  background: none;
  border: none;
  color: #c0392b;
  font-size: 0.75rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  margin-top: 4px;
  display: block;
  font-family: inherit;
}

/* ── Footer / Summary ────────────────────────────────────────────────────────── */
#cartFooter {
  display: none;
  padding: 16px 20px 20px;
  border-top: 1px solid #e8e4dc;
  background: #fafaf8;
}
.cart-summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 6px;
}
#cartDiscountRow {
  display: none;
  color: #1a7a4a;
  font-weight: 600;
}
.cart-summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.05rem;
  font-weight: 800;
  color: #1a2744;
  margin: 10px 0 14px;
  padding-top: 10px;
  border-top: 2px solid #e8e4dc;
}
.cart-checkout-btn {
  width: 100%;
  padding: 15px;
  background: #1a2744;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.05em;
  transition: background 0.2s;
}
.cart-checkout-btn:hover { background: #243460; }
.cart-shipping-note {
  text-align: center;
  font-size: 0.75rem;
  color: #888;
  margin-top: 8px;
}

/* ── "In den Warenkorb" Button ───────────────────────────────────────────────── */
.add-to-cart-btn {
  width: 100%;
  padding: 14px;
  background: transparent;
  color: #1a2744;
  border: 2px solid #1a2744;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.04em;
  transition: background 0.2s, color 0.2s;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.add-to-cart-btn:hover {
  background: #1a2744;
  color: #fff;
}
.add-to-cart-btn.added {
  background: #1a7a4a;
  border-color: #1a7a4a;
  color: #fff;
}

/* ── Mobile ──────────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  #cartPanel { max-width: 100%; }
}
