:root {
  --main-color: rgb(136,40,41);
  --font-size-big: 1.5rem;
  --font-size-small: 1.3rem;
}

#cart {
  width: 100%;
  margin-top: 100px;
  padding: 0 5%;
  box-sizing: border-box;
  font-size: var(--font-size-big);
  min-height: 40vh;
}

#empty-cart {
  text-align: center;
}

#cart-content {
  display:flex;
}

#cart-products {
  width: 70%;
}

#cart-info-table {
  width: 30%;
  height: 500px;
  margin-left: 10px;
  font-size: var(--font-size-small);
  box-sizing: border-box;
  position: sticky;
  top: 150px; /* Расположение от верхней границы */
  right: 20px; /* Прикрепляем к правой стороне */
}

#cart-info {
  width: 100%;
  height: 300px;
  background-color: #fff3f3;
  padding: 20px;
  box-sizing: border-box;
}

#cart-info-table button {
  width: 100%;
  height: 50px;
  margin-top: 20px;
  border-radius: 8px;
  font-size: var(--font-size-big);
  border: none;
  cursor: pointer;
}

#to_checkout {
  background-color: var(--main-color);
  color: white;
}

#clear {
  color: black;
}

#emptyCart {
  font-size: var(--font-size-big);
}

#cart-info table {
  width: 100%;
}

#cart-info td {
  height: 30px;
}

.product {
  display:flex;
}

.product a{
  text-decoration:none;
  color: black;
  display:flex;
  width: 75%;
  justify-content: center;
  align-items: center;
}

.product-image {
  width: 300px;
  height: 350px;
  padding: 20px;
  box-sizing: border-box;
  justify-content: center;
  align-items: center;
}

.product-image img {
  height: 100%;
}

.product-name {
  width: 300px;
}

.product-name h2{
  font-size: var(--font-size-big);
}

.product-quantities {
  width: 25%;
  box-sizing: border-box;
  padding: 150px 0;
  position: relative;
  justify-content: center;
  align-items: center;
}

.delete-position {
  position: absolute;
  top: 155px;
  right: 20px;
  height: 30px;
  width: 30px;
  border: none;
  padding: 0;
  background-color: white;
}

.delete-position img{
  height: 100%;
  width: 100%;
}

.quantity-change {
  width: 40px;
  height: 40px;
  background-color: white;
  color: black;
  font-size: 2rem;
  border-radius: 8px;
  align-items: center; /* Центрируем по вертикали */
  justify-content: center; 
}

.quantity {
  width: 40px;
  height: 40px;
  background-color: white;
  font-size: var(--font-size-big);
  margin: 0 20px;
  align-items: center; /* Центрируем по вертикали */
  justify-content: center; 
}

hr {
  border: none;
  height: 2px;
  background-color: var(--main-color);
  margin: 30px 0; 
}

@media (max-width:1100px) {
  #cart-products {
    width: 100%;
  }
  #cart-info-table {
    width: 100%;
    margin-left: 0;
    position:inherit; 
    font-size: var(--font-size-small);
  }
  #cart-content {
    display:block;
  }
  .product {
    display:block;
  }
  .product a{
    display:block;
    width: 100%;
  }
  .product-quantities {
    width: 100%;
    box-sizing: border-box;
    padding: 0 0;
  }
  .delete-position {
    top: 5px;
  }
}

/**************************** POP-UP ПОДТВЕРЖДЕНИЯ ОЧИСТКИ *************************/
#popupClear {
  display: none; /* Скрыть по умолчанию */
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8); /* Полупрозрачный фон */
  z-index: 20;
}

#popupClear-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  width: 300px;
  height: 225px;
  align-items: center;
  display: flex; /* Используем Flexbox для размещения кнопок рядом */
  flex-direction: column; /* Заголовок сверху */
}

#popupClear-content div{
  display: flex; /* Используем Flexbox для размещения кнопок рядом */
}

#popupClear-content button{
  border: none;
  border-radius: 8px;
  width: 120px;
  height: 50px;
  margin: 10px;
  font-size: var(--font-size-big);
  cursor: pointer;
}

#clearNo {
  background-color: var(--main-color);
  color: white;
}

#clearYes {
  color: black;
}

/********* ОШИБКИ *********/
#error {
  display: none;
  color: var(--main-color);
  font-size: var(--font-size-big);
  text-align: center;
}