body.ambis-cart-drawer-open {
  overflow: hidden;
}

.ambis-cart-system-modal {
  display: none !important;
}

.ambis-cart-drawer__overlay {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(12, 12, 11, 0.78);
  opacity: 0;
  visibility: hidden;
  cursor: default;
  transition: opacity 220ms ease, visibility 0s linear 220ms;
}

.ambis-cart-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 10021;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(560px, 100vw);
  min-width: 320px;
  height: 100vh;
  height: 100dvh;
  color: #0c0c0b;
  background: #fff;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 280ms;
}

.ambis-cart-drawer-open .ambis-cart-drawer__overlay {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.ambis-cart-drawer-open .ambis-cart-drawer {
  transform: translateX(0);
  visibility: visible;
  transition-delay: 0s;
}

.ambis-cart-drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 94px;
  padding: 22px 24px 18px;
}

.ambis-cart-drawer__head h2 {
  margin: 0;
  font-size: clamp(36px, 3.2vw, 46px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.94;
}

.ambis-cart-drawer__close {
  position: relative;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  margin: -8px -8px 0 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.ambis-cart-drawer__close span {
  position: absolute;
  top: 20px;
  left: 7px;
  width: 28px;
  height: 2px;
  background: currentColor;
}

.ambis-cart-drawer__close span:first-child { transform: rotate(45deg); }
.ambis-cart-drawer__close span:last-child { transform: rotate(-45deg); }

.ambis-cart-drawer__content,
.ambis-cart-drawer__content > form {
  min-height: 0;
  height: 100%;
}

.ambis-cart-drawer__content > form {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

.ambis-cart-drawer__items {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.ambis-cart-drawer-item {
  padding: 20px 24px 24px;
  border-top: 1px solid #0c0c0b;
}

.ambis-cart-drawer-item__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 20px;
  margin-bottom: 16px;
}

.ambis-cart-drawer-item__title {
  color: inherit;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.98;
  text-decoration: none;
}

.ambis-cart-drawer-item__remove {
  padding: 3px 0 1px;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
}

.ambis-cart-drawer-item__body {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 20px;
}

.ambis-cart-drawer-item__image {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #f3f3f1;
}

.ambis-cart-drawer-item__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ambis-cart-drawer-item__details {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px 18px;
  min-width: 0;
  padding-top: 2px;
}

.ambis-cart-drawer-item__details p {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.15;
  text-transform: uppercase;
}

.ambis-cart-drawer-item__details p span {
  font-weight: 700;
}

.ambis-cart-drawer__footer {
  padding: 18px 24px max(20px, env(safe-area-inset-bottom));
  border-top: 1px solid #0c0c0b;
  background: #fff;
}

.ambis-cart-drawer__subtotal {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  font-size: 15px;
  font-weight: 500;
  text-transform: uppercase;
}

.ambis-cart-drawer__subtotal strong {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
  white-space: nowrap;
}

.ambis-cart-drawer__payment-note {
  margin: 12px 0 18px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.ambis-cart-drawer__checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 60px;
  margin: 0;
  padding: 14px 20px;
  border: 1px solid #0c0c0b;
  border-radius: 0;
  background: #0c0c0b;
  color: #fff;
  font: inherit;
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.ambis-cart-drawer__checkout:hover {
  background: #fff;
  color: #0c0c0b;
}

.ambis-cart-drawer__continue {
  display: block;
  min-height: 44px;
  margin: 8px auto -8px;
  padding: 10px 8px;
  border: 0;
  background: transparent;
  color: #0c0c0b;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-transform: uppercase;
  cursor: pointer;
}

.ambis-cart-drawer__continue:hover {
  text-decoration-thickness: 2px;
}

.ambis-cart-drawer__empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 100%;
  padding: 28px;
  border-top: 1px solid #0c0c0b;
}

.ambis-cart-drawer__empty p {
  max-width: 420px;
  margin: 0;
  font-size: 42px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.ambis-cart-drawer__empty a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 72px;
  padding: 14px 20px;
  border: 1px solid #0c0c0b;
  background: #0c0c0b;
  color: #fff;
  font-size: 26px;
  font-weight: 500;
  text-decoration: none;
}

.ambis-cart-drawer :focus-visible {
  outline: 2px solid #d20021;
  outline-offset: 3px;
}

@media (max-width: 720px) {
  .ambis-cart-drawer { width: 100vw; }

  .ambis-cart-drawer__head {
    min-height: 86px;
    padding: 20px 18px 16px;
  }

  .ambis-cart-drawer__head h2 { font-size: 36px; }

  .ambis-cart-drawer__close {
    width: 42px;
    height: 42px;
    margin: -6px -6px 0 14px;
  }

  .ambis-cart-drawer__close span {
    top: 20px;
    left: 7px;
    width: 28px;
  }

  .ambis-cart-drawer-item {
    padding: 18px 18px 22px;
  }

  .ambis-cart-drawer-item__head {
    gap: 14px;
    margin-bottom: 14px;
  }

  .ambis-cart-drawer-item__title { font-size: 20px; }
  .ambis-cart-drawer-item__remove { font-size: 11px; }

  .ambis-cart-drawer-item__body {
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 16px;
  }

  .ambis-cart-drawer-item__details {
    display: block;
  }

  .ambis-cart-drawer-item__details p {
    margin-bottom: 8px;
    font-size: 15px;
  }

  .ambis-cart-drawer__footer {
    padding: 18px 18px max(18px, env(safe-area-inset-bottom));
  }

  .ambis-cart-drawer__subtotal strong { font-size: 27px; }
  .ambis-cart-drawer__payment-note { margin: 12px 0 16px; font-size: 11px; }

  .ambis-cart-drawer__checkout,
  .ambis-cart-drawer__empty a {
    min-height: 58px;
    font-size: 19px;
  }

  .ambis-cart-drawer__empty { padding: 22px 18px max(18px, env(safe-area-inset-bottom)); }
  .ambis-cart-drawer__empty p { font-size: 34px; }
  .ambis-cart-drawer__continue { font-size: 12px; }
}

@media (max-height: 740px) and (min-width: 721px) {
  .ambis-cart-drawer__head { min-height: 92px; padding-top: 20px; }
  .ambis-cart-drawer__head h2 { font-size: 40px; }
  .ambis-cart-drawer-item__body { grid-template-columns: 150px minmax(0, 1fr); }
  .ambis-cart-drawer__footer { padding-top: 16px; }
  .ambis-cart-drawer__payment-note { margin: 10px 0 14px; }
  .ambis-cart-drawer__checkout { min-height: 54px; font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .ambis-cart-drawer,
  .ambis-cart-drawer__overlay {
    transition: none;
  }
}
