@keyframes slideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(100%);
  }
}

.cart-modal:has(.hide) {
  pointer-events: none;
}

.cart-modal {
  display: block !important;
  transition: opacity 0.3s ease-in-out;
}

.cart-modal:has(.cart-drawer.show) {
  opacity: 1;
}

.cart-modal:not(:has(.cart-drawer.show)) {
  opacity: 0;
}

cart-drawer {
  position: relative;
  z-index: 11;
}

.cart-drawer {
  width: 100%;
  max-width: 480px;
  background-color: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  position: fixed;
  right: 0;
  top: 0;
  height: 100%;
  overflow-y: auto;
  z-index: 11;
}

.cart-drawer form {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.show {
  animation: slideIn 0.3s forwards;
}

.hide {
  animation: slideOut 0.3s forwards;
}

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

.cart-drawer__title {
  font-size: 18px;
  font-weight: 600;
  font-family: initial;
}

.cart-drawer__close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

.cart-drawer__items {
  padding: 10px 20px;
  flex: 1;
  overflow: auto;
}

.cart-drawer__footer {
  padding: 20px;
}

.cart-drawer__item {
  display: flex;
  margin-bottom: 15px;
  width: 100%;
}

.cart-drawer__item-image {
  width: 90px;
  margin-right: 15px;
}

.cart-drawer__item img {
  width: 100%;
  height: auto;
  aspect-ratio: auto 90 / 119;
}

.cart-drawer__item-details {
  flex-grow: 1;
  flex: 1 1 0%;
  display: flex;
  flex-direction: column;
}

.cart-drawer__item-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 5px;
  font-family: initial;
  color: #111;
}

.cart-drawer__item-price {
  font-size: 15px;
  color: #888;
}

.cart-drawer__item-price strong {
  font-weight: 600;
  color: #111;
  font-family: initial;
}

.cart-drawer__subtotal {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: bold;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.cart-drawer__actions {
  margin-top: 20px;
}

.cart-drawer__button {
  width: 100%;
  padding: 10px;
  background-color: #000;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 14px;
  margin-bottom: 10px;
}

.cart-drawer__button:last-child {
  margin-bottom: 0;
}

.cart-drawer__button--secondary {
  background-color: white;
  color: #000;
  border: 1px solid #000;
}

.cart-drawer .quantity-input {
  width: 100px;
  height: 35px;
}

.cart-drawer .quantity__button {
  width: 30px;
}

.cart-item__quantity {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-item__quantity .icon-remove {
  width: 14px;
  height: 14px;
  color: #666;
}

.cart-drawer .remove_button {
  cursor: pointer;
  background: none;
  border: none;
}

.cart-item__quantity .icon-remove:hover {
  color: #111;
}

.cart-drawer .cart-drawer__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  font-size: 16px;
  margin-top: 100px;
  font-weight: 600;
}
