/**
 * Sen Computer — floating cart drawer, triggered by the header's cart icon.
 */

.sc-cart-overlay {
  position: fixed;
  inset: 0;
  background: hsla(0, 0%, 0%, 0.45);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease-out;
}

.sc-cart-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.sc-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(400px, 100vw);
  background: var(--white);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: -20px 0 50px -20px hsla(0, 0%, 0%, 0.3);
}

.sc-cart-overlay.is-open .sc-cart-drawer {
  transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
  .sc-cart-overlay, .sc-cart-drawer { transition-duration: 1ms; }
}

.sc-cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--cultured);
  flex-shrink: 0;
}

.sc-cart-header h2 { font-size: var(--fs-4); font-weight: var(--weight-600); color: var(--eerie-black); }

.sc-cart-close {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background 150ms ease-out;
}
.sc-cart-close:hover { background: var(--cultured); }
.sc-cart-close .sc-icon { font-size: 20px; }

.sc-cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.sc-cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--sonic-silver-aa);
  gap: 10px;
}
.sc-cart-empty .sc-icon { font-size: 48px; opacity: 0.4; }
.sc-cart-empty p { font-size: var(--fs-7); }

.sc-cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--cultured);
}

.sc-cart-item-thumb {
  width: 56px; height: 56px; border-radius: 12px;
  background: var(--cultured);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sc-cart-item-thumb .sc-icon { font-size: 26px; color: var(--sonic-silver-aa); }

.sc-cart-item-info { flex: 1; min-width: 0; }
.sc-cart-item-name { font-size: var(--fs-8); font-weight: var(--weight-600); color: var(--eerie-black); }
.sc-cart-item-sku { font-size: var(--fs-10); color: var(--sonic-silver-aa); margin: 2px 0; }
.sc-cart-item-price { font-size: var(--fs-8); font-weight: var(--weight-600); color: var(--salmon-pink); }

.sc-cart-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.sc-cart-qty-btn {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--cultured);
  font-weight: var(--weight-700);
  display: flex; align-items: center; justify-content: center;
  transition: background 150ms ease-out;
}
.sc-cart-qty-btn:hover { background: var(--eerie-black); color: var(--white); }
.sc-cart-qty span { min-width: 16px; text-align: center; font-size: var(--fs-8); }

.sc-cart-remove {
  flex-shrink: 0;
  color: var(--sonic-silver-aa);
  transition: color 150ms ease-out;
}
.sc-cart-remove:hover { color: #c0392b; }
.sc-cart-remove .sc-icon { font-size: 18px; }

.sc-cart-footer {
  padding: 20px;
  border-top: 1px solid var(--cultured);
  flex-shrink: 0;
}

.sc-cart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  font-size: var(--fs-7);
  color: var(--eerie-black);
}
.sc-cart-subtotal strong { font-size: var(--fs-4); }

.sc-cart-checkout-btn {
  display: block;
  text-align: center;
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  background: var(--eerie-black);
  color: var(--white);
  font-size: var(--fs-7);
  font-weight: var(--weight-600);
  transition: transform 100ms ease-out;
}
.sc-cart-checkout-btn:active { transform: scale(0.98); }
