.ts-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0.58);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.ts-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 9999;
  width: min(480px, 100vw);
  height: 100vh;
  background: #fff;
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.18);
  transform: translateX(100%);
  transition: transform 220ms ease;
  overflow-y: auto;
}

.ts-cart-open {
  overflow: hidden;
}

.ts-cart-open .ts-drawer-overlay {
  opacity: 1;
  pointer-events: auto;
}

.ts-cart-open .ts-drawer {
  transform: translateX(0);
}

.ts-drawer__header,
.ts-drawer-items,
.ts-drawer .ts-free-shipping,
.ts-drawer-cross-sell,
.ts-drawer-coupon,
.ts-drawer-totals,
.ts-drawer-actions,
.ts-drawer-payments,
.ts-drawer-empty {
  margin: 0 28px;
}

.ts-drawer__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 0 20px;
}

.ts-drawer__header h2 {
  margin: 0;
  color: #080808;
  font-size: 28px;
  font-weight: 900;
}

.ts-drawer__header span {
  color: #777;
  font-weight: 500;
}

.ts-drawer__header button {
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: #050505;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.ts-drawer-item {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid #ececec;
}

.ts-drawer-item__image img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  border-radius: 8px;
  background: #f7f5f1;
}

.ts-drawer-item h3 {
  margin: 0 0 5px;
  color: #050505;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.25;
}

.ts-drawer-item h3 a {
  color: inherit;
}

.ts-drawer-item__meta {
  color: #555;
  font-size: 12px;
  line-height: 1.45;
}

.ts-drawer-item__meta p {
  margin: 0;
  padding: 0;
}

.ts-drawer-item strong {
  display: block;
  margin-top: 8px;
  color: #050505;
}

.ts-drawer-item__controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 14px;
}

.ts-qty-control {
  display: grid;
  grid-template-columns: 28px 32px 28px;
  align-items: center;
  height: 38px;
  border: 1px solid #dedede;
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.ts-qty-control button,
.ts-drawer-remove {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.ts-drawer-remove {
  color: #111;
  font-size: 12px;
  text-decoration: underline;
}

.ts-free-shipping {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid #e8e1d3;
  border-radius: 8px;
  background: #fffaf0;
}

.ts-free-shipping__title {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #111;
}

.ts-free-shipping__bar {
  height: 9px;
  margin: 16px 0 10px;
  overflow: hidden;
  border-radius: 99px;
  background: #e9e9e9;
}

.ts-free-shipping__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #ffc400;
}

.ts-free-shipping__values {
  display: flex;
  justify-content: space-between;
  color: #111;
  font-size: 12px;
}

.ts-drawer-cross-sell {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #ececec;
  border-radius: 8px;
}

.ts-drawer-cross-sell h3 {
  margin: 0 0 14px;
  text-transform: uppercase;
  font-size: 13px;
}

.ts-drawer-cross-sell article {
  display: grid;
  grid-template-columns: 82px 1fr auto;
  gap: 14px;
  align-items: center;
}

.ts-drawer-cross-sell img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  border-radius: 8px;
  background: #f7f5f1;
}

.ts-drawer-cross-sell .button {
  padding: 10px 16px;
  border-radius: 8px;
  background: #ffc400;
  color: #050505;
  font-weight: 900;
}

.ts-drawer-coupon {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 18px;
}

.ts-drawer-coupon input,
.ts-drawer-coupon button {
  height: 46px;
  border: 1px solid #dedede;
  border-radius: 8px;
}

.ts-drawer-coupon input {
  padding: 0 14px;
}

.ts-drawer-coupon button {
  padding: 0 18px;
  background: #f7f7f7;
  font-weight: 800;
}

.ts-drawer-totals {
  margin-top: 20px;
}

.ts-drawer-totals div {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  color: #222;
}

.ts-drawer-totals .ts-drawer-total {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid #e7e7e7;
  font-size: 22px;
  font-weight: 900;
}

.ts-drawer-actions {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.ts-drawer-actions .button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 8px;
  font-weight: 900;
  text-transform: none;
}

.ts-drawer-actions .checkout {
  background: #ffc400;
  color: #050505;
}

.ts-drawer-actions .view-cart {
  border: 2px solid #050505;
  background: #fff;
  color: #050505;
}

.ts-drawer-payments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 22px 0 30px;
}

.ts-drawer-payments span {
  padding: 8px 12px;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-size: 12px;
  font-weight: 900;
}

.ts-drawer-empty {
  padding: 40px 0;
}

@media (max-width: 520px) {
  .ts-drawer__header,
  .ts-drawer-items,
  .ts-drawer .ts-free-shipping,
  .ts-drawer-cross-sell,
  .ts-drawer-coupon,
  .ts-drawer-totals,
  .ts-drawer-actions,
  .ts-drawer-payments,
  .ts-drawer-empty {
    margin-right: 18px;
    margin-left: 18px;
  }

  .ts-drawer-item {
    grid-template-columns: 78px 1fr;
  }

  .ts-drawer-item__controls {
    grid-column: 2;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}
