.cart-window {
  background: url(https://freelancerothe.ucoz.ru/DonatSection/img/cart.jpg);
  border-radius: 10px;
  padding: 20px 25px 20px 25px;
  width: min(650px, 100%);
  max-height: 80vh;
  /* убираем общий скролл */
  overflow: hidden;

  /* сетка: шапка | список | итог | кнопка */
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  row-gap: 20px;

  scrollbar-color: #959595 #141414;
  scroll-behavior: smooth;
  color: #fff;
  border: 1px solid #282A2B;
  position: relative;
}

#cart-content {
  overflow-y: auto;
  min-height: 0;   /* чтобы грид не выталкивал */
  max-height: 100%;
  scrollbar-color: #959595 #141414;
  padding-right: 2px;
}

.cartHeaderText {
  color: #00C8FF;
  margin: 0;
  text-align: center;
}

.cart-close-outer {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgb(30, 60, 114) 0%, rgb(42, 82, 152) 100%);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  box-shadow: 0 0 8px rgba(0, 200, 255, 0.8);
  z-index: 1001;
}

.cart-modal {
  position: fixed;
  inset: 0;
  background: rgba(24, 24, 27, 0.98);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 16px; 
}

.cartCategoryName {
  color: #00C8FF;
  font-weight: bold;
  font-size: 1.2em;
  margin-bottom: 10px;
  border-bottom: 1px solid #00C8FF;
  padding-bottom: 5px;
}

.cartItemDescription {
  display: grid;
  grid-template-columns: 1fr auto auto;
  grid-template-rows: 35px;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  position: relative;
  padding-left: 12px;
}

.cartSubItem {
  display: grid;
  grid-template-columns: 1fr 57px 24px;
  grid-template-rows: 40px;
  align-items: center;
  padding-left: 10px;
  padding-right: 10px;
  gap: 10px;
  margin-left: 20px;
  margin-bottom: 5px;
  padding: 5px;
  background: rgba(0, 200, 255, 0.1);
  border-left: 3px solid #00C8FF;
  border-radius: 0 5px 5px 0;
  position: relative;
}

.cartItemName {
  color: #FFF;
}

.cartItemTotalPrice {
  color: #00FF88;
  float: right;
  font-weight: bold;
}

.cartSubItemName {
  color: #E0E0E0;
  font-size: 1em;
  padding-left: 5px;
}

.cartSubItemPrice {
  color: #00FF88;
  float: right;
}

.rmFromCart {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FF4444;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 12px;
  line-height: 21px;
  box-shadow: 0 0 12px rgba(255, 68, 68, 0.6);
}

.rmSubFromCart {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FF4444;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 10px;
  line-height: 18px;
  box-shadow: 0 0 10px rgba(255, 68, 68, 0.6);
}

.cart-total {
  text-align: center;
  font-size: 1.3em;
  font-weight: bold;
  color: #FFA500;
  border-top: 2px solid #00C8FF;
  padding-top: 15px;
}

@media(max-width: 592px){
  .cartItemDescription{
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
  }
  
  .cartItemName{
    text-align: center;
  }

}

@media(max-width: 482px){
  .cartItemDescription, .cartSubItem{
    display: flex;
    flex-direction: column;
  }

  .cartItemName{
    text-align: center;
  }

  .cartSubItem{
    margin-left: 10px;
  }

.cartSubItemName {
  padding-left: 0;
  text-align: center;
  }

  .reset-btn{
    margin-left: 20px;
  }
}