.lego-cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  justify-content: flex-end;
  background: rgba(26, 26, 26, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.lego-cart-overlay.is-active {
  display: flex;
}

.lego-cart-drawer {
  width: min(460px, 96vw);
  height: 100%;
  background: var(--lego-cart-surface, #fdfbf8);
  color: var(--lego-cart-on-surface, #2c2622);
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.15);
  animation: legoCartSlideIn 0.25s ease;
}

.lego-cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--lego-cart-border, #e4ddd5);
}

.lego-cart-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lego-cart-header h3 {
  margin: 0;
  font-size: 20px;
}

.lego-cart-count {
  font-size: 13px;
  color: var(--lego-cart-muted, #7f756e);
}

.lego-cart-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  background: var(--lego-cart-close-bg, #f3ede8);
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lego-cart-close svg {
  width: 16px;
  height: 16px;
}

.lego-cart-notice {
  margin: 12px 24px 0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  background: var(--lego-cart-notice-bg, #e8f5e9);
  color: var(--lego-cart-notice-color, #2e7d32);
}

.lego-cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lego-cart-empty {
  text-align: center;
  padding: 32px 12px;
  color: var(--lego-cart-muted, #7f756e);
}

.lego-cart-item {
  display: flex;
  gap: 12px;
}

.lego-cart-item-image {
  width: 78px;
  height: 98px;
  min-width: 78px;
  max-width: 78px;
  border-radius: 10px;
  overflow: hidden;
  background: #f3ede8;
  flex-shrink: 0;
  box-sizing: border-box;
}

.lego-cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Kostenloser Versand: breites PNG darf die Flex-Spalte nicht aufblasen (min-width: auto) */
.lego-cart-item-image--shipping-icon {
  display: block;
  padding: 0;
}

.lego-cart-item-image--shipping-icon > .lego-cart-shipping-thumb-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 14px 12px;
  box-sizing: border-box;
  min-width: 0;
}

.lego-cart-item-image--shipping-icon > .lego-cart-shipping-thumb-inner img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 38px;
  min-width: 0;
  object-fit: contain;
  object-position: center;
  flex-shrink: 1;
}

.lego-cart-item-main {
  flex: 1;
}

.lego-cart-item-title {
  font-size: 14px;
  font-weight: 700;
}

.lego-cart-item-subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: var(--lego-cart-muted, #7f756e);
}

.lego-cart-item-qty {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lego-cart-item-qty-btn {
  width: 24px;
  height: 24px;
  border: 1px solid var(--lego-cart-border, #e4ddd5);
  border-radius: 6px;
  background: #fff;
  color: var(--lego-cart-on-surface, #2c2622);
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
}

.lego-cart-item-qty-btn:hover,
.lego-cart-item-qty-btn:focus-visible {
  border-color: var(--lego-cart-muted, #7f756e);
  outline: none;
}

.lego-cart-item-qty-value {
  min-width: 20px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.lego-cart-item-price {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 700;
}

.lego-cart-item-old-price {
  margin-right: 6px;
  text-decoration: line-through;
  color: var(--lego-cart-muted, #7f756e);
  font-size: 12px;
  font-weight: 500;
}

.lego-cart-tags {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lego-cart-tag {
  font-size: 11px;
  border-radius: 999px;
  padding: 4px 8px;
  background: #f3ede8;
}

.lego-cart-footer {
  border-top: 1px solid var(--lego-cart-border, #e4ddd5);
  padding: 16px 24px 124px;
  position: relative;
  z-index: 10;
}

.lego-cart-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
}

.lego-cart-row-grand {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--lego-cart-border, #e4ddd5);
  font-size: 16px;
  font-weight: 700;
}

.lego-cart-checkout {
  margin-top: 10px;
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  background: var(--lego-cart-cta-bg, #2c2622);
  color: var(--lego-cart-cta-color, #fdfbf8);
}

.lego-cart-checkout:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

@keyframes legoCartSlideIn {
  from {
    transform: translateX(24px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
