* {
  box-sizing: border-box;
}

.cart-body {
  margin: 0;
  min-height: 100svh;
  background: #0f1014;
  color: #fff;
  font-family: var(--font_family);
}

.cart-screen {
  position: relative;
  width: min(100vw, 430px);
  min-height: 100svh;
  margin: 0 auto;
  padding: 0 28px 190px;
  overflow: hidden;
  background: #101115;
  box-shadow: 0 0 40px rgba(0, 0, 0, .55);
}

.cart-topbar {
  position: relative;
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  align-items: center;
  height: 56px;
}

.cart-topbar h1 {
  margin: 0;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 0 7px rgba(63, 161, 255, .45);
}

.cart-back,
.cart-close {
  position: relative;
  display: block;
  width: 32px;
  height: 32px;
}

.cart-back::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 9px;
  width: 11px;
  height: 11px;
  border-left: 2px solid rgba(255, 255, 255, .5);
  border-bottom: 2px solid rgba(255, 255, 255, .5);
  transform: rotate(45deg);
}

.cart-close::before,
.cart-close::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 15px;
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .48);
}

.cart-close::before {
  transform: rotate(45deg);
}

.cart-close::after {
  transform: rotate(-45deg);
}

.cart-id-box {
  display: grid;
  place-items: center;
  min-height: 78px;
  border-radius: 8px;
  background: #000;
  border: 1px solid transparent;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.cart-id-box.is-error {
  border-color: #e23b2f;
  box-shadow: 0 0 0 2px rgba(226, 59, 47, .18);
}

.cart-id-input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: none;
  padding: 0 18px;
  background: transparent;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .02em;
  text-align: center;
}

.cart-id-input::placeholder {
  color: #fff;
  opacity: 1;
}

.cart-id-input:focus::placeholder {
  color: rgba(255, 255, 255, .48);
}

.cart-id-error {
  display: none;
  margin: 8px 0 0;
  color: #ff5b4f;
  font: 800 13px/1.2 Arial, sans-serif;
  text-align: center;
}

.cart-id-error.is-visible {
  display: block;
}

.cart-items {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.cart-item {
  display: grid;
  grid-template-columns: 98px 1fr 110px;
  grid-template-rows: 1fr 34px;
  min-height: 166px;
  padding: 14px 12px 12px;
  border-radius: 16px;
  background: #1a1b20;
}

.cart-item-image {
  grid-row: 1 / 3;
  align-self: start;
  width: 98px;
  height: 98px;
  object-fit: contain;
  border-radius: 16px;
  filter: drop-shadow(0 0 12px rgba(255, 202, 72, .42));
}

.cart-item-info {
  min-width: 0;
  padding: 0 10px;
}

.cart-item-price {
  margin: 0 0 4px;
  color: #ffac31;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.cart-item-title {
  margin: 0;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.1;
}

.cart-item-actions {
  grid-column: 1 / 3;
  display: flex;
  gap: 6px;
  align-self: end;
}

.cart-remove-button {
  height: 34px;
  border: 0;
  border-radius: 7px;
  background: #24252b;
  color: #fff;
}

.cart-remove-button {
  display: grid;
  place-items: center;
  width: 36px;
}

.cart-remove-button svg {
  width: 12px;
  height: 16px;
  fill: currentColor;
}

.cart-quantity {
  grid-column: 3;
  grid-row: 2;
  align-self: end;
  justify-self: end;
  display: grid;
  grid-template-columns: 36px 42px 36px;
  align-items: center;
  height: 34px;
  overflow: hidden;
  border-radius: 8px;
  background: #24252b;
}

.cart-quantity button {
  position: relative;
  width: 36px;
  height: 34px;
  border: 0;
  background: transparent;
}

.cart-quantity button:disabled {
  opacity: .32;
}

.cart-quantity button::before,
.cart-quantity button[data-action="increase"]::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 13px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transform: translate(-50%, -50%);
}

.cart-quantity button[data-action="increase"]::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.cart-quantity span {
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  line-height: 34px;
  text-align: center;
}

.cart-empty {
  display: none;
  margin-top: 140px;
  text-align: center;
}

.cart-empty.is-visible {
  display: block;
}

.cart-empty h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.cart-empty p {
  margin: 0;
  color: rgba(255, 255, 255, .48);
  font: 500 16px/1.22 Arial, sans-serif;
}

.cart-bottom {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 30;
  width: min(100vw, 430px);
  padding: 16px 28px calc(29px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  background: #1a1a1a;
  transform: translateX(-50%);
}

.cart-summary,
.cart-empty-actions {
  display: none;
}

.cart-summary.is-visible,
.cart-empty-actions.is-visible {
  display: grid;
  gap: 10px;
}

.cart-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cart-total-row span {
  color: rgba(255, 255, 255, .8);
  font: 400 16px/1 Arial, sans-serif;
}

.cart-total-row strong {
  color: #fff;
  font: 900 30px/1 var(--font_family);
}

.cart-checkout-button,
.cart-start-button {
  display: flex;
  align-items: center;
  justify-content: center;
  place-items: center;
  min-height: 49px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  font: 900 16px/1 var(--font_family);
  text-decoration: none;
  text-transform: uppercase;
}

.cart-checkout-button,
.cart-start-button {
  background: linear-gradient(180deg, #ffa631, #ff9028);
}


@media (max-width: 370px) {
  .cart-screen {
    padding-inline: 20px;
  }

  .cart-bottom {
    padding-inline: 20px;
  }

  .cart-item {
    grid-template-columns: 86px 1fr 106px;
  }

  .cart-item-image {
    width: 86px;
    height: 86px;
  }
}
