.cscb-root,
.cscb-root * {
  box-sizing: border-box;
}

body.cscb-no-scroll {
  overflow: hidden;
}

.cscb-root .cscb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  z-index: 99998;
}

.cscb-root .cscb-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100vh;
  background: #fff;
  z-index: 99999;
  box-shadow: -4px 0 25px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transition: right 0.2s ease;
}

.cscb-root .cscb-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.cscb-root .cscb-drawer.is-open {
  right: 0;
}

.cscb-root .cscb-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding: 14px 16px;
  min-height: 58px;
}

.cscb-root .cscb-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.cscb-root #cscb-close {
  border: 1px solid #ddd;
  background: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.cscb-root .cscb-items {
  flex: 1;
  overflow: auto;
  padding: 12px;
}

.cscb-root .cscb-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid #f3f3f3;
  padding-bottom: 10px;
}

.cscb-root .cscb-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
}

.cscb-root .cscb-item-main {
  min-width: 0;
}

.cscb-root .cscb-item-title {
  font-size: 14px;
  margin-bottom: 4px;
  line-height: 1.35;
}

.cscb-root .cscb-item-price {
  color: #777;
  font-size: 12px;
  margin-bottom: 6px;
}

.cscb-root .cscb-qty-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.cscb-root .cscb-qty-row button {
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  height: 34px;
  min-width: 34px;
  padding: 0 10px;
  font-size: 14px;
}

.cscb-root .cscb-remove {
  min-width: auto;
}

.cscb-root .cscb-qty {
  min-width: 20px;
  text-align: center;
}

.cscb-root .cscb-line-total {
  grid-column: 2;
  justify-self: start;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.cscb-root .cscb-footer {
  border-top: 1px solid #eee;
  padding: 14px;
}

.cscb-root .cscb-subtotal-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cscb-root .cscb-note {
  margin: 0 0 10px;
  font-size: 12px;
  color: #666;
}

.cscb-root .cscb-error {
  margin: 0 0 10px;
  font-size: 12px;
  color: #a32626;
}

.cscb-root .cscb-error .cscb-error-msg {
  display: block;
  margin-bottom: 6px;
  line-height: 1.4;
}

.cscb-root .cscb-error .cscb-woo-cart-link {
  display: inline-block;
  font-weight: 600;
  color: #111;
  text-decoration: underline;
}

.cscb-root .cscb-checkout-btn {
  width: 100%;
  border: none;
  background: #111;
  color: #fff;
  border-radius: 8px;
  min-height: 46px;
  padding: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
}

.cscb-root .cscb-checkout-btn:disabled,
.cscb-root .cscb-btn-loading {
  opacity: 0.7;
  cursor: not-allowed;
}

.cscb-root .cscb-empty {
  color: #666;
  font-size: 14px;
  padding: 24px 4px;
}

.cscb-root .cscb-count-badge,
.cscb-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 10px;
  background: #111;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  padding: 0 6px;
  margin-left: 6px;
}

@media (min-width: 768px) {
  .cscb-root .cscb-drawer {
    right: -460px;
    width: 420px;
  }

  .cscb-root .cscb-item {
    grid-template-columns: 72px 1fr auto;
  }

  .cscb-root .cscb-line-total {
    grid-column: 3;
    justify-self: end;
  }
}

@media (min-width: 1024px) {
  .cscb-root .cscb-drawer {
    width: 440px;
    right: -480px;
  }

  .cscb-root .cscb-head {
    padding: 16px;
  }

  .cscb-root .cscb-items,
  .cscb-root .cscb-footer {
    padding: 16px;
  }
}
