.ccmc-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99998;
  border: 0;
  background: rgba(17, 17, 17, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.ccmc-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.ccmc-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 99999;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 16px;
  width: min(420px, calc(100vw - 28px));
  max-height: 100vh;
  padding: 22px;
  overflow: auto;
  background: #fff;
  border-left: 1px solid #ddd;
  box-shadow: -18px 0 48px rgba(0, 0, 0, 0.18);
  transform: translateX(105%);
  transition: transform 220ms ease;
}

.ccmc-panel.is-open {
  transform: translateX(0);
}

.ccmc-handle {
  display: none;
}

.ccmc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ccmc-title {
  margin: 0;
  color: #151515;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: 0;
}

.ccmc-eyebrow {
  margin: 0 0 4px;
  color: #6b5b52;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ccmc-close {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: #111;
  font-size: 24px;
  line-height: 1;
  background: #f4f4f4;
  border: 1px solid #e0e0e0;
  cursor: pointer;
}

.ccmc-added-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.ccmc-added-item__image,
.ccmc-rec__image img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #f5f5f5;
}

.ccmc-added-item__title,
.ccmc-rec__title {
  color: #151515;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.ccmc-added-item__price,
.ccmc-trust,
.ccmc-muted,
.ccmc-shipping-copy {
  margin: 5px 0 0;
  color: #5f5f5f;
  font-size: 13px;
  line-height: 1.45;
}

.ccmc-summary {
  display: grid;
  gap: 8px;
  padding: 14px;
  background: #faf7f4;
  border: 1px solid #eadfd8;
}

.ccmc-summary__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ccmc-progress {
  height: 8px;
  overflow: hidden;
  background: #e6ddd7;
  border-radius: 999px;
}

.ccmc-progress span {
  display: block;
  height: 100%;
  background: #151515;
  border-radius: inherit;
  transition: width 220ms ease;
}

.ccmc-recommendations {
  display: grid;
  gap: 10px;
}

.ccmc-rec {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #e5e5e5;
}

.ccmc-rec__body {
  display: grid;
  gap: 5px;
}

.ccmc-rec__price {
  color: #555;
  font-size: 13px;
}

.ccmc-rec__add,
.ccmc-checkout,
.ccmc-continue {
  min-height: 42px;
  padding: 10px 14px;
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  background: #151515;
  border: 1px solid #151515;
  cursor: pointer;
}

.ccmc-rec__add {
  width: fit-content;
  min-height: 34px;
  padding: 7px 12px;
  font-size: 13px;
}

.ccmc-actions {
  display: grid;
  gap: 8px;
}

.ccmc-continue {
  color: #151515;
  background: #fff;
}

.ccmc-product-trust-note {
  margin: 10px 0 0;
  color: #555;
  font-size: 13px;
}

.ccmc-is-loading {
  opacity: 0.68;
  pointer-events: none;
}

.ccmc-added {
  color: #151515 !important;
  background: #f4f1ee !important;
  border-color: #d8cec7 !important;
}

.ccmc-live-region {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 767px) {
  .ccmc-panel.ccmc-bottom-sheet {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    grid-template-rows: auto auto auto auto auto;
    width: 100%;
    max-height: 82vh;
    padding: 10px 16px 16px;
    border-top: 1px solid #ddd;
    border-left: 0;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.2);
    transform: translateY(105%);
  }

  .ccmc-panel.ccmc-bottom-sheet.is-open {
    transform: translateY(0);
  }

  .ccmc-handle {
    display: block;
    width: 44px;
    height: 4px;
    margin: 0 auto 2px;
    background: #ccc;
    border-radius: 999px;
  }

  .ccmc-title {
    font-size: 18px;
  }

  .ccmc-added-item {
    grid-template-columns: 58px minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ccmc-backdrop,
  .ccmc-panel,
  .ccmc-progress span {
    transition: none;
  }
}
