.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: rgba(47, 24, 10, 0.35);
  backdrop-filter: blur(2px);
}

.cart-drawer {
  position: absolute;
  inset-block: 0;
  left: 0;
  width: min(440px, 100%);
  background: #fffaf5;
  box-shadow: 20px 0 50px rgba(79, 35, 8, 0.18);
  display: flex;
  flex-direction: column;
  animation: cart-slide 0.25s ease;
}

@keyframes cart-slide {
  from {
    transform: translateX(-16px);
    opacity: 0.6;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.cart-drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 22px 12px;
}

.cart-drawer__eyebrow {
  margin: 0;
  color: rgba(143, 65, 12, 0.55);
  font-family: Cailyne, Georgia, serif;
  font-size: 13px;
}

.cart-drawer__title {
  margin: 4px 0 0;
  color: var(--color-primary);
  font-size: 24px;
}

.cart-drawer__close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: rgba(143, 65, 12, 0.06);
  color: var(--color-primary);
  display: grid;
  place-items: center;
}

.cart-drawer__steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0 22px 14px;
}

.cart-drawer__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--color-gray-300);
  font-size: 12px;
}

.cart-drawer__step span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(143, 65, 12, 0.2);
  font-weight: 700;
}

.cart-drawer__step em {
  font-style: normal;
}

.cart-drawer__step.is-active,
.cart-drawer__step.is-done {
  color: var(--color-primary);
}

.cart-drawer__step.is-active span,
.cart-drawer__step.is-done span {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.cart-drawer__body {
  flex: 1;
  overflow: auto;
  padding: 8px 22px 16px;
}

.cart-drawer__section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cart-drawer__error {
  background: #fde8e8;
  color: #9b2c2c;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 12px;
}

.cart-drawer__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--color-secondary);
  padding: 48px 12px;
  text-align: center;
}

.cart-drawer__muted {
  color: var(--color-gray-300);
  font-size: 13px;
  margin: 0;
}

.cart-lines {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cart-line {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(143, 65, 12, 0.08);
}

.cart-line__image {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
}

.cart-line__name {
  color: var(--color-gray-400);
  font-size: 14px;
  font-weight: 700;
}

.cart-line__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.cart-line__calc-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin-top: 6px;
  font-size: 12px;
}

.cart-line__calc-row--option {
  padding-inline-start: 4px;
}

.cart-line__option-name {
  width: 100%;
  color: var(--color-secondary);
  font-size: 12px;
}

.cart-line__calc {
  color: var(--color-secondary);
  font-variant-numeric: tabular-nums;
}

.cart-line__result {
  color: var(--color-primary);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.cart-line__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.cart-line__line-total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  color: var(--color-secondary);
  font-size: 11px;
}

.cart-line__line-total strong {
  color: var(--color-primary);
  font-size: 13px;
}

.cart-line__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.cart-line__actions strong {
  margin-inline-start: auto;
  color: var(--color-primary);
  font-size: 13px;
}

.cart-line__remove {
  border: none;
  background: transparent;
  color: #9b2c2c;
  padding: 4px;
  flex-shrink: 0;
}

.qty-stepper--sm {
  border-radius: 10px;
}

.qty-stepper--sm .qty-stepper__btn {
  width: 30px;
  height: 30px;
}

.qty-stepper__value {
  min-width: 36px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
}

.cart-delivery-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cart-delivery-toggle button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(143, 65, 12, 0.15);
  background: #fff;
  border-radius: 12px;
  padding: 12px 8px;
  font-family: inherit;
  color: var(--color-secondary);
  font-size: 13px;
}

.cart-delivery-toggle button.is-active {
  background: rgba(143, 65, 12, 0.08);
  border-color: var(--color-primary);
  color: var(--color-primary);
  font-weight: 700;
}

.cart-choice-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(143, 65, 12, 0.12);
  background: #fff;
  cursor: pointer;
}

.cart-choice.is-active {
  border-color: var(--color-primary);
  background: rgba(143, 65, 12, 0.05);
}

.cart-choice input {
  margin-top: 3px;
}

.cart-choice strong {
  display: block;
  color: var(--color-primary);
  font-size: 14px;
}

.cart-choice em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  color: var(--color-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.cart-drawer__link-btn {
  border: none;
  background: none;
  color: var(--color-primary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: start;
  padding: 0;
}

.cart-address-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-address-form input,
.cart-address-form select,
.cart-address-form textarea,
.cart-field input,
.cart-field textarea {
  border: 1px solid rgba(143, 65, 12, 0.15);
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
}

.cart-pay-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(143, 65, 12, 0.05);
}

.cart-pay-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--color-secondary);
  font-size: 13px;
}

.cart-pay-summary__total {
  padding-top: 8px;
  border-top: 1px solid rgba(143, 65, 12, 0.12);
  color: var(--color-primary) !important;
  font-size: 15px !important;
  font-weight: 700;
}

.cart-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--color-secondary);
}

.cart-discount-row {
  display: flex;
  gap: 8px;
}

.cart-discount-input {
  text-transform: uppercase;
}

.cart-discount-row button {
  border: none;
  border-radius: 12px;
  background: rgba(143, 65, 12, 0.1);
  color: var(--color-primary);
  padding: 0 14px;
  font-family: inherit;
  font-weight: 700;
}

.cart-discount-row button:disabled,
.cart-discount-input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.cart-discount-active {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(34, 140, 78, 0.12);
  border: 1px solid rgba(34, 140, 78, 0.28);
  color: #1b6b3a;
  font-size: 13px;
  font-weight: 600;
}

.cart-discount-active__cancel {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: rgba(27, 107, 58, 0.12);
  color: #1b6b3a;
  cursor: pointer;
  padding: 0;
}

.cart-discount-active__cancel:hover {
  background: rgba(27, 107, 58, 0.22);
}

.cart-pay-method {
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed rgba(143, 65, 12, 0.25);
  color: var(--color-secondary);
}

.cart-pay-method strong {
  display: block;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.cart-pay-method p,
.cart-pay-method em {
  margin: 0;
  font-size: 13px;
  font-style: normal;
}

.cart-pay-method em {
  display: block;
  margin-top: 8px;
  color: var(--color-gray-300);
}

.cart-drawer__footer {
  display: flex;
  gap: 10px;
  padding: 16px 22px 22px;
  border-top: 1px solid rgba(143, 65, 12, 0.08);
}

.cart-drawer__ghost {
  border: 1px solid rgba(143, 65, 12, 0.15);
  background: transparent;
  color: var(--color-secondary);
  border-radius: 12px;
  padding: 10px 16px;
  font-family: inherit;
}

.cart-drawer__primary {
  flex: 1;
  justify-content: center;
}

@media (max-width: 480px) {
  .cart-drawer {
    width: 100%;
  }

  .cart-drawer__header,
  .cart-drawer__steps,
  .cart-drawer__body {
    padding-inline: 16px;
  }

  .cart-drawer__header {
    padding-top: 16px;
  }

  .cart-drawer__title {
    font-size: 20px;
  }

  .cart-drawer__step em {
    font-size: 11px;
  }

  .cart-line {
    grid-template-columns: 64px 1fr;
    padding: 10px;
    gap: 10px;
  }

  .cart-line__image {
    width: 64px;
    height: 64px;
  }

  .cart-line__footer {
    flex-wrap: wrap;
  }

  .cart-drawer__footer {
    flex-wrap: wrap;
    padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .cart-drawer__ghost {
    min-height: 44px;
  }

  .cart-drawer__primary {
    flex: 1 1 100%;
    min-height: 48px;
  }

  .cart-discount-row {
    flex-direction: column;
  }

  .cart-discount-row button {
    min-height: 44px;
  }
}
