.cart {
  padding: 100px 0 140px;
}

.cart-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.cart-wrapper .title {
  margin-bottom: 12px;
}

.cart-wrapper .descr {
  max-width: 850px;
}

.cart-content {
  display: flex;
  flex-direction: column;
  align-items: start;
  background-color: var(--background-color);
  box-shadow: 0 10px 52px 0 rgba(0, 0, 0, 0.08);
  padding: 40px 30px;
  width: calc((100% - 90px) / 2);
  border-radius: var(--border-radius-primary);
  max-height: 730px;
}

.cart-content .subtitle {
  margin-bottom: 35px;
}

.cart-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
  overflow-y: auto;
  width: 100%;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 10px;
  gap: 10px;
  border: 2px var(--primary-color) dashed;
  border-radius: var(--border-radius-primary);
}

.cart-item-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.cart-item-info p {
  width: calc(100% - 30px);
}

.cart-item-info p.cart-item-number {
  font-size: 18px;
  width: auto;
}

.cart-item-total {
  color: var(--text-inverted);
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 5px;
}

.cart-item-counter {
  font-size: 20px;
  width: 30px;
  text-align: center;
  color: var(--text-inverted);
}

.cart-item-add,
.cart-item-remove {
  border: 0;
  background-color: transparent;
  font-size: 20px;
  color: var(--text-inverted);
  transition: all 0.3s ease;
}

.cart-item-add:hover,
.cart-item-remove:hover {
  color: var(--primary-color);
}

.cart-item-delete {
  border: 0;
  background-color: transparent;
}

.cart-item-delete svg {
  width: 30px;
  height: 30px;
  fill: var(--text-inverted);
  transition: all 0.3s ease;
}

.cart-item-delete:hover svg {
  fill: rgb(186, 0, 0);
}

.empty-cart-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.popup {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #fff;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.3s ease-in-out;
}

.popup p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  font-weight: 500;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media screen and (max-width: 768px) {
  .cart-content {
    width: 100%;
    padding: 25px;
  }
}

@media screen and (max-width: 500px) {
  .cart-item-controls {
    flex-direction: column;
  }
}
