.cart-added-modal[hidden] {
  display: none;
}

.cart-added-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 20px;
}

.cart-added-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 25, 22, 0.58);
  backdrop-filter: blur(4px);
}

.cart-added-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
  animation: cartAddedModalIn 0.22s ease-out;
}


/*.cart-added-modal__dialog::before {
  content: '';
  display: block;
  height: 6px;
  background: #2fbd16;
}
*/

.cart-added-modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #222;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.cart-added-modal__close:hover {
  background: #f1f1f1;
  color: #2fbd16;
}

.cart-added-modal__icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 30px auto 14px;
  border-radius: 50%;
  background: #2fbd16;
  color: #fff;
  font-size: 32px;
  font-weight: 700;
}

.cart-added-modal__dialog h2 {
  margin: 0;
  padding: 0 58px;
  color: #202020;
  font-size: 24px;
  text-align: center;
}

.cart-added-modal__product {
  display: flex;
  gap: 18px;
  align-items: center;
  margin: 24px 28px 18px;
  padding: 16px;
  border: 1px solid #eeeeee;
  border-radius: 16px;
  background: #fafafa;
}

.cart-added-modal__product-image-wrap {
  display: grid;
  flex: 0 0 86px;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 12px;
  background: #fff;
}

.cart-added-modal__product-image {
  max-width: 76px;
  max-height: 76px;
  object-fit: contain;
}

.cart-added-modal__product-name {
  margin: 0 0 8px;
  color: #272727;
  font-size: 15px;
  line-height: 1.4;
}

.cart-added-modal__product-info p {
  margin: 4px 0;
}

.cart-added-modal__product-name {
  margin: 0 0 8px;
  color: #191919;
  font-size: 13px;
  line-height: 1.35;
}

.cart-added-modal__product-article {
  margin: 4px 0;
  color: #191919;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.cart-added-modal__product-description {
  margin: 4px 0 10px;
  color: #777;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}


.cart-added-modal__product-price {
  color: #222 !important;
  font-size: 18px !important;
  font-weight: 700;
}

.cart-added-modal__summary {
  display: flex;
  justify-content: space-between;
  margin: 0 28px 22px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff8dc;
  color: #191919;
}

.cart-added-modal__summary strong {
  color: #222;
}

.cart-added-modal__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 28px 28px;
}

.cart-added-modal__continue,
.cart-added-modal__cart {
  min-height: 50px;
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.cart-added-modal__continue {
  border: 1px solid #e3e3e3;
  background: #f7f7f7;
  color: #191919;
}

.cart-added-modal__cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  background: #2fbd16;
  color: #fff;
  text-decoration: none;
}

.cart-added-modal__continue:hover,
.cart-added-modal__cart:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

@keyframes cartAddedModalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

body.cart-modal-open {
  overflow: hidden;
}

@media (max-width: 560px) {
  .cart-added-modal__dialog h2 {
    font-size: 20px;
  }

  .cart-added-modal__product {
    margin-right: 18px;
    margin-left: 18px;
  }

  .cart-added-modal__summary {
    margin-right: 18px;
    margin-left: 18px;
  }

  .cart-added-modal__actions {
    grid-template-columns: 1fr;
    padding-right: 18px;
    padding-left: 18px;
  }
  .cart-added-modal__product-article {
  margin: 4px 0 10px;
  color: #777;
  font-size: 13px;
  }

  .cart-added-modal__quantity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    color: #191919;
    font-size: 13px;
  }

  .cart-added-modal__quantity-controls {
    display: inline-flex;
    align-items: center;
    gap: 12px;
  }

  .cart-added-modal__quantity-controls strong {
    min-width: 24px;
    text-align: center;
    color: #191919;
  }

  .cart-added-modal__quantity-button {
    width: 70px;
    height: 70px;
    border: 1px solid #dcdcdc;
    border-radius: 7px;
    background: #fff;
    color: #191919;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
  }

  .cart-added-modal__quantity-button:hover {
    background: #ffde59;
    border-color: #ffde59;
  }
  .cart-added-modal__dialog {
    width: min(92vw, 560px);
    max-width: 560px;
    box-sizing: border-box;
    overflow: hidden;
  }

  .cart-added-modal__product {
    display: flex;
    align-items: center;
    gap: 18px;
    box-sizing: border-box;
  }

  .cart-added-modal__product-image-wrap {
    flex: 0 0 76px;
    width: 76px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .cart-added-modal__product-image {
    display: block;
    max-width: 100%;
  
    object-fit: contain;
  }

  .cart-added-modal__product-info {
    flex: 1 1 auto;
    min-width: 0;
  }

  .cart-added-modal__product-name,
  .cart-added-modal__product-article,
  .cart-added-modal__product-price,
  .cart-added-modal__product-quantity {
    display: block;
    width: 100%;
    margin: 6px 0;
    overflow-wrap: anywhere;
  }

  .cart-added-modal__quantity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin: 8px 0;
  }

  .cart-added-modal__quantity-controls {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 8px;
  }

  .cart-added-modal__quantity-button {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    padding: 0;
    border: 1px solid #d8d8d8;
    border-radius: 7px;
    background: #fff;
    color: #222;
    cursor: pointer;
    font-size: 20px;
    line-height: 30px;
    text-align: center;
  }

  .cart-added-modal__quantity-button:hover {
    background: #ffde59;
    border-color: #ffde59;
  }

  .cart-added-modal__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
  }

  .cart-added-modal__actions {
    display: flex;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
  }

  .cart-added-modal__actions > * {
    flex: 1 1 0;
    min-width: 0;
    box-sizing: border-box;
    text-align: center;
  }

  @media (max-width: 560px) {
    .cart-added-modal__dialog {
      width: calc(100vw - 24px);
      max-width: none;
      padding: 20px 16px;
    }

    .cart-added-modal__product {
      align-items: flex-start;
      gap: 12px;
    }

    .cart-added-modal__product-image-wrap {
      flex-basis: 64px;
      width: 64px;
      height: 64px;
    }

    .cart-added-modal__actions {
      flex-direction: column;
    }

    .cart-added-modal__actions > * {
      width: 100%;
    }
  }
  .cart-added-modal__product-article {
    margin: 4px 0;
    color: #191919;
    font-size: 13px;
  }

  .cart-added-modal__product-description {
    margin: 6px 0;
    color: #666;
    font-size: 13px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .cart-added-modal__product-price {
    margin-top: 8px;
    color: #191919;
    font-size: 17px;
    font-weight: 700;
  }
  .cart-added-modal__quantity-controls {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  }

  .cart-added-modal__quantity-button {
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid #d5d5d5;
    border-radius: 50%;
    background: #ffffff;
    color: #202020;
    cursor: pointer;
    font-size: 28px;
    font-weight: 500;
    line-height: 38px;
    text-align: center;
    transition:
      background-color 0.2s ease,
      border-color 0.2s ease,
      transform 0.1s ease;
  }

  .cart-added-modal__quantity-button:hover {
    background: #ffde59;
    border-color: #d5ab00;
  }

  .cart-added-modal__quantity-button:active {
    transform: scale(0.94);
  }

  .cart-added-modal__quantity-controls strong {
    min-width: 32px;
    color: #191919;
    font-size: 15px;
    text-align: center;
  }

  button.cart-added-modal__quantity-button {
    width: 25px !important;
    height: 25px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 25px !important;
    max-height: 25px !important;
    padding: 0 !important;
    border: 1px solid #d5d5d5 !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    color: #191919 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 28px !important;
    font-family: inherit !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
  }

  button.cart-added-modal__quantity-button:hover {
    background: #ffde59 !important;
    border-color: #d5ab00 !important;
  }

}

@media (min-width: 769px) {
  button.cart-added-modal__quantity-button {
    all: unset !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    border: 1px solid #d5d5d5 !important;
    border-radius: 50% !important;
    background: #fff !important;
    color: #191919 !important;
    cursor: pointer !important;
    font-family: inherit !important;
    font-size: 28px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    text-align: center !important;
  }

  button.cart-added-modal__quantity-button:hover {
    background: #ffde59 !important;
    border-color: #d5ab00 !important;
  }

  .cart-added-modal__quantity-controls {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
  }

  .cart-added-modal__quantity-controls strong {
    min-width: 32px !important;
    font-size: 16px !important;
    text-align: center !important;
  }
}
  