/* Modal container */
.cart-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 100%;
  display: flex;
  background-color: rgba(0, 0, 0, 0.5); /* Overlay */
  justify-content: flex-end; /* Align drawer to the right */
  z-index: 1000;
}

/* Modal content (drawer) */
.cart-modal__content {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}
.cart-modal-content {
  background-color: white;
  width: 550px; /* Drawer width */
  max-width: 100%;
  height: 100%;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transform: translateX(100%); /* Start off-screen */
  transition: transform 0.3s ease;
}

/* Header */
.cart-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #e0e0e0;
}

.cart-modal__title {
  font-size: 20px;
  font-weight: bold;
}

.cart-modal__close {
  cursor: pointer;
  width: auto;
  height: auto;
}

/* Body */
.cart-modal__body {
  padding: 16px;
  flex-grow: 1;
  overflow-y: auto; /* Scrollable if content overflows */
  display: flex;
  flex-direction: column;
}

.cart-modal__items-count {
  font-size: 16px;
  margin-bottom: 8px;
  text-align: left;
}

/* Open state */
.cart-modal.open {
  left: 0;
}

.cart-modal-content.open {
  transform: translateX(0); /* Slide drawer into view */
}

.cart-modal__products {
  flex-grow: 1;
  max-height: 100%;
  overflow: auto;
}

.cart-summary__total {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 50px;
}

.cart-summary__total-label {
  font-size: 18px;
  font-weight: 500;
  color: #878787;
}

.cart-summary__total-value {
  font-size: 24px;
  font-weight: 600;
  color: #ee575c;
}

.cart-summary__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: 'continue-buy checkout-button';
  place-items: center;
}

.product-order-item {
  padding: 20px 5px;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.unathorization-alert {
  display: flex;
  gap: 10px;

  padding: 11px 24px;
  background-color: #ca1a1a;

  border-radius: 76px;
}

.unathorization-alert span {
  color: white;
  font-weight: 600;
}

.product-cart-item-image-and-info {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
}

.product-order-item.active {
  padding: 20px 5px;
  background-color: #8787872c;
}

.cart-summary__continue-shopping {
  font-weight: 500;
  color: #2f2f2f;
  text-decoration: underline;
  cursor: pointer;
  grid-area: continue-buy;
}

.cart-summary__continue-shopping:hover {
  color: #ee575c;
}

.cart-summary__checkout-button {
  background: #ee575c;
  color: #fff;
  font-weight: 600;
  border-radius: 100px;
  border: 1px solid #ee575c;
  padding: 18px 55px;
  cursor: pointer;
  grid-area: checkout-button;
}

.cart-summary__checkout-button:hover {
  background: none;
  border: 1px solid #ee575c;
  color: #ee575c;
}

.cart-summary {
  display: grid;
  gap: 30px;

  padding-bottom: 2rem;
}

.product-order-item-delete {
  cursor: pointer;
  color: #acacac;
  fill: #acacac;
  stroke: #acacac;
}

.product-order-item-delete:hover {
  color: #ee575c;
  fill: #ee575c;
  stroke: #ee575c;
}

.product-order-item-delete svg {
  fill: inherit;
}
.product-order-item-delete path {
  stroke: inherit;
}

.product-order-item-delete img {
  width: auto;
  height: auto;
}
.order-confirmation__image {
  width: 70%;
  aspect-ratio: 1/1;
}

.order-confirmation__title {
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  color: #2f2f2f;
}

.order-confirmation__message {
  color: #a0a0a0;
  max-width: 346px;
  text-align: center;
}

.order-confirmation__button {
  border-radius: 100px;
  color: #2f2f2f;
  font-weight: 600;
  padding: 12px 105px;
  border: 0;
  cursor: pointer;
}

@media (max-width: 600px) {
  .cart-summary__actions {
    grid-template-columns: 1fr;
    grid-template-areas: 'checkout-button' 'continue-buy';
    gap: 1rem;
  }

  .cart-summary__checkout-button {
    width: 100%;
  }

  .cart-modal__content {
    width: 100%;
  }

  .delete-order-item {
    display: none;
  }

  .product-order-item {
    grid-template-columns: 2fr 1fr;
  }
}
