:root {
  --ssc-primary: var(--shield-color-primary, #2a2c82);
  --ssc-secondary: var(--shield-color-secondary, #fec73b);
  --ssc-text: #1f2937;
  --ssc-muted: #6b7280;
  --ssc-border: #e5e7eb;
}

.ssc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ssc-open .ssc-overlay {
  opacity: 1;
  visibility: visible;
  display: block !important;
}

.ssc-side-cart {
  position: fixed;
  top: 0;
  right: -460px;
  width: 420px;
  max-width: 100%;
  height: 100vh;
  background: #fff;
  z-index: 9999;
  box-shadow: -12px 0 40px rgba(2, 6, 23, 0.16);
  transition: right 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
}

.ssc-open .ssc-side-cart {
  right: 0 !important;
}

.ssc-header {
  padding: 18px 18px;
  border-bottom: 1px solid var(--ssc-border);
  background: linear-gradient(90deg, var(--ssc-primary) 0%, #23256e 100%);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ssc-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.ssc-close-btn {
  background: rgba(255, 255, 255, 0.14);
  border: 0;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  font-size: 20px;
  color: #fff !important;
  cursor: pointer;
  line-height: 1;
}

.ssc-cart-wrapper {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.ssc-items-list {
  padding: 18px;
  flex: 1;
}

.ssc-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--ssc-border);
  padding-bottom: 16px;
  position: relative;
  gap: 12px;
}

.ssc-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.ssc-item-img {
  width: 74px;
  height: 74px;
  flex-shrink: 0;
}

.ssc-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--ssc-border);
}

.ssc-item-details {
  flex: 1;
  min-width: 0;
}

.ssc-item-title {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.35;
}

.ssc-item-title a {
  text-decoration: none;
  color: var(--ssc-text);
  font-weight: 600;
}

.ssc-item-price {
  display: inline-block;
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--ssc-primary);
}

.ssc-qty-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--ssc-border);
  border-radius: 999px;
  background-color: #f8fafc;
  overflow: hidden;
  width: max-content;
}

.ssc-qty-btn {
  background: transparent;
  border: 0;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #334155;
  transition: background 0.2s ease, color 0.2s ease;
  font-weight: 700;
}

.ssc-qty-btn:hover {
  background: #eef2ff;
  color: var(--ssc-primary) !important;
}

.ssc-qty-input {
  width: 40px;
  text-align: center;
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ssc-text);
  -moz-appearance: textfield;
}

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

.ssc-remove-btn {
  position: absolute;
  top: -4px;
  right: 0;
  background: transparent;
  border: 0;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

.ssc-remove-btn:hover {
  color: #ef4444;
}

.ssc-footer {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--ssc-border);
  background: #fff;
}

.ssc-subtotal {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--ssc-text);
}

.ssc-checkout-btn,
.ssc-continue-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 12px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  border: 0;
  transition: all 0.2s ease;
}

.ssc-checkout-btn {
  background: var(--ssc-primary);
  color: #fff;
  margin-bottom: 8px;
}

.ssc-checkout-btn:hover {
  background: #1f2269;
  color: #fff;
}

.ssc-continue-btn {
  background: #fff;
  color: var(--ssc-text);
  border: 1px solid var(--ssc-border);
}

.ssc-continue-btn:hover {
  background: #f8fafc;
}

.ssc-empty-state {
  text-align: center;
  padding: 40px 0;
  color: var(--ssc-muted);
}

.ssc-empty-state .button {
  margin-top: 10px;
  border-radius: 10px;
  background: var(--ssc-primary);
  color: #fff;
  border: 0;
  padding: 10px 16px;
}

@media (max-width: 480px) {
  .ssc-side-cart {
    width: 100%;
    right: -100% !important;
  }
}
