.sc-cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(15, 23, 42, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

body.sc-cart-open {
  overflow: hidden;
}

body.sc-cart-open .sc-cart-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.sc-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 50;
  width: min(520px, 100vw);
  height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.12), transparent 34%),
    #ffffff;
  box-shadow: -30px 0 90px rgba(15, 23, 42, 0.24);
  transform: translateX(100%);
  transition: transform 220ms ease;
}

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

.sc-cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(16px);
}

.sc-cart-title-block {
  display: grid;
  gap: 3px;
}

.sc-cart-title {
  margin: 0;
  color: #0f172a;
  font-size: 1.45rem;
  line-height: 1;
  letter-spacing: -0.045em;
}

.sc-cart-subtitle {
  margin: 0;
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.4;
}

.sc-cart-close {
  width: 44px;
  height: 44px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #ffffff;
  color: #0f172a;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.sc-cart-content {
  overflow: auto;
  padding: 18px 22px 22px;
}

.sc-cart-status {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.94rem;
  line-height: 1.45;
}

.sc-cart-status[data-tone="success"] {
  border-color: rgba(16, 185, 129, 0.32);
  background: #ecfdf5;
  color: #047857;
}

.sc-cart-status[data-tone="error"] {
  border-color: rgba(185, 28, 28, 0.24);
  background: #fef2f2;
  color: #b91c1c;
}

.sc-cart-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.sc-cart-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 13px;
  padding: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.055);
}

.sc-cart-thumb {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #10b981);
  font-weight: 950;
  font-size: 1.2rem;
  letter-spacing: -0.04em;
}

.sc-cart-line {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.sc-cart-line-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.sc-cart-name {
  margin: 0;
  color: #0f172a;
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: -0.025em;
}

.sc-cart-meta {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 0.88rem;
}

.sc-cart-line-total {
  color: #0f172a;
  font-weight: 950;
  white-space: nowrap;
}

.sc-cart-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sc-cart-qty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
}

.sc-cart-qty button,
.sc-cart-remove {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.sc-cart-qty button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #ffffff;
  color: #0f172a;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.sc-cart-qty strong {
  min-width: 24px;
  text-align: center;
  color: #0f172a;
}

.sc-cart-remove {
  padding: 8px 10px;
  border-radius: 999px;
  background: transparent;
  color: #b91c1c;
  font-weight: 850;
}

.sc-cart-remove:hover,
.sc-cart-qty button:hover,
.sc-cart-close:hover {
  transform: translateY(-1px);
}

.sc-cart-empty {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 280px;
  padding: 30px 20px;
  border: 1px dashed #cbd5e1;
  border-radius: 26px;
  background: #f8fafc;
  text-align: center;
}

.sc-cart-empty-icon {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 24px;
  background: #eef2ff;
  font-size: 2rem;
}

.sc-cart-empty h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1.25rem;
  letter-spacing: -0.035em;
}

.sc-cart-empty p {
  max-width: 320px;
  margin: 0;
  color: #64748b;
  line-height: 1.55;
}

.sc-cart-footer {
  display: grid;
  gap: 14px;
  padding: 18px 22px 22px;
  border-top: 1px solid #e2e8f0;
  background: rgba(248, 250, 252, 0.94);
  backdrop-filter: blur(16px);
}

.sc-cart-summary {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}

.sc-cart-summary span {
  color: #64748b;
  font-weight: 850;
}

.sc-cart-summary strong {
  color: #0f172a;
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: -0.055em;
}

.sc-payment {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: #ffffff;
}

.sc-payment-title {
  margin: 0 0 2px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sc-payment label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #334155;
  font-weight: 850;
}

.sc-payment input {
  width: auto;
  accent-color: #10b981;
}

.sc-cart-primary,
.sc-cart-secondary {
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 950;
}

.sc-cart-primary {
  color: #ffffff;
  background: #111827;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
}

.sc-cart-primary:hover {
  transform: translateY(-1px);
}

.sc-cart-primary:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none;
}

.sc-cart-secondary {
  color: #312e81;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
}

.sc-cart-note {
  margin: 0;
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.45;
}

@media (max-width: 560px) {
  .sc-cart-header,
  .sc-cart-content,
  .sc-cart-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .sc-cart-item {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .sc-cart-thumb {
    width: 50px;
    height: 50px;
  }

  .sc-cart-line-top {
    display: grid;
    gap: 6px;
  }

  .sc-cart-controls {
    align-items: start;
    flex-direction: column;
  }

  .sc-cart-summary strong {
    font-size: 1.45rem;
  }
}