.mp-cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  visibility: hidden;
}

.mp-cart-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}

.mp-cart-drawer__overlay {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(20, 16, 18, 0.42);
  opacity: 0;
  transition: opacity 180ms ease;
}

.mp-cart-drawer.is-open .mp-cart-drawer__overlay {
  opacity: 1;
}

.mp-cart-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(440px, calc(100vw - 28px));
  height: 100%;
  background: #fff;
  box-shadow: -24px 0 70px rgba(40, 25, 30, 0.24);
  transform: translateX(104%);
  transition: transform 220ms ease;
  display: flex;
  flex-direction: column;
  border-radius: 24px 0 0 24px;
  overflow: hidden;
}

.mp-cart-drawer.is-open .mp-cart-drawer__panel {
  transform: translateX(0);
}

.mp-cart-drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid rgba(98, 58, 68, 0.14);
  background: linear-gradient(135deg, #fff7f1 0%, #fff 55%, #f7eef0 100%);
}

.mp-cart-drawer__eyebrow {
  margin: 0 0 4px;
  color: #7c2638;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mp-cart-drawer__header h2 {
  margin: 0;
  color: #23191c;
  font-size: 1.55rem;
  line-height: 1.1;
}

.mp-cart-drawer__code {
  margin: 8px 0 0;
  color: #7b6d71;
  font-size: 0.82rem;
}

.mp-cart-drawer__close {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(98, 58, 68, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #3a2328;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.mp-cart-drawer__summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 18px 24px 0;
  padding: 16px;
  border-radius: 18px;
  background: #f6f2f3;
  color: #33272b;
}

.mp-cart-drawer__items {
  flex: 1;
  overflow: auto;
  padding: 18px 24px;
}

.mp-cart-drawer-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(98, 58, 68, 0.12);
}

.mp-cart-drawer-item__title {
  margin: 0 0 6px;
  color: #23191c;
  font-size: 1rem;
  line-height: 1.25;
}

.mp-cart-drawer-item__meta,
.mp-cart-drawer-item__qty {
  margin: 2px 0;
  color: #7b6d71;
  font-size: 0.9rem;
}

.mp-cart-drawer-item__price {
  color: #6f1629;
  white-space: nowrap;
}

.mp-cart-drawer__footer {
  display: grid;
  gap: 10px;
  padding: 18px 24px 24px;
  border-top: 1px solid rgba(98, 58, 68, 0.14);
  background: #fff;
}

.mp-cart-drawer__checkout,
.mp-cart-drawer__continue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.mp-cart-drawer__checkout {
  border: 0;
  background: #6f1629;
  color: #fff;
  box-shadow: 0 16px 34px rgba(111, 22, 41, 0.22);
}

.mp-cart-drawer__checkout.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.mp-cart-drawer__continue {
  border: 1px solid rgba(98, 58, 68, 0.18);
  background: #fff;
  color: #6f1629;
}

.mp-cart-drawer-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .mp-cart-drawer__panel {
    width: 100vw;
    border-radius: 0;
  }
}

/* M4R — multi-pastelería */
.mp-cart-drawer__intro {
  display: grid;
  gap: 4px;
  margin: 14px 24px 0;
  padding: 14px 16px;
  border: 1px solid rgba(111, 22, 41, 0.12);
  border-radius: 18px;
  background: linear-gradient(135deg, #fff 0%, #fbf7f4 100%);
  color: #4a3b40;
  font-size: 0.88rem;
}

.mp-cart-drawer__intro strong {
  color: #6f1629;
  font-size: 0.9rem;
}

.mp-cart-drawer-group {
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid rgba(98, 58, 68, 0.14);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(51, 39, 43, 0.08);
}

.mp-cart-drawer-group__header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(98, 58, 68, 0.1);
}

.mp-cart-drawer-group__eyebrow {
  margin: 0 0 3px;
  color: #9b7b83;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.mp-cart-drawer-group__title {
  margin: 0;
  color: #23191c;
  font-size: 1.02rem;
  line-height: 1.2;
}

.mp-cart-drawer-group__total {
  color: #6f1629;
  white-space: nowrap;
}

.mp-cart-drawer-group__items .mp-cart-drawer-item:last-child {
  border-bottom: 0;
}

.mp-cart-drawer-group__ops {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.mp-cart-drawer-group-field {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid rgba(111, 22, 41, 0.12);
  border-radius: 14px;
  background: #fbf8f6;
}

.mp-cart-drawer-group-field__label {
  color: #9b7b83;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mp-cart-drawer-group-field__value {
  color: #34272b;
  font-size: 0.86rem;
  font-weight: 800;
}

.mp-cart-drawer-group__hint {
  margin: 10px 0 0;
  color: #85777b;
  font-size: 0.78rem;
  line-height: 1.35;
}

@media (max-width: 480px) {
  .mp-cart-drawer-group__ops {
    grid-template-columns: 1fr;
  }
}

/* M4S — controles operativos por pastelería */
.mp-cart-drawer-group__ops {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.mp-cart-drawer-group-control {
  display: grid;
  gap: 5px;
  font-size: 12px;
  color: #475569;
  font-weight: 700;
}

.mp-cart-drawer-group-control--wide {
  grid-column: 1 / -1;
}

.mp-cart-drawer-group-control input,
.mp-cart-drawer-group-control select {
  min-height: 38px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 12px;
  background: #fff;
  padding: 8px 10px;
  font: inherit;
  color: #0f172a;
}

.mp-cart-drawer-group__save {
  min-height: 38px;
  border: 0;
  border-radius: 12px;
  background: #5a0008;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.mp-cart-drawer-group__save:hover {
  filter: brightness(1.08);
}

.mp-cart-drawer-group__save.is-loading,
.mp-cart-drawer-group__save:disabled {
  opacity: 0.65;
  cursor: wait;
}

.mp-cart-drawer-group__hint.is-success {
  color: #047857;
}

.mp-cart-drawer-group__hint.is-error {
  color: #b91c1c;
}

.mp-cart-drawer-group__hint.is-loading {
  color: #475569;
}
