
/* Основные стили конструктора */
.builder-container {
    display: flex;
    gap: 30px;
    margin-top: 30px;
  }
  
  .builder-content {
    flex: 3;
  }
  
  .builder-sidebar {
    flex: 1;
    position: sticky;
    top: 100px;
    align-self: flex-start;
  }
  
  .builder-section {
    margin-bottom: 40px;
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  }
  
  .builder-section h2 {
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 20px;
    color: #4361ee;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .builder-section h2 i {
    font-size: 1.2em;
  }
  
  .items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }
  
  .item-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
  }
  
  .item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  }
  
  .item-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-size: 1.2em;
  }
  
  .item-description {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
    min-height: 40px;
  }
  
  .item-price {
    font-weight: bold;
    color: #4361ee;
    font-size: 1.2em;
    margin-bottom: 15px;
  }
  
  .item-option {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
  }
  
  .add-btn {
    width: 100%;
    padding: 10px;
    background: #4361ee;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
  }
  
  .add-btn:hover {
    background: #3a56d4;
  }
  
  .quantity-control {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
  }
  
  .quantity-btn {
    width: 30px;
    height: 30px;
    background: #ddd;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
  }
  
  .quantity-input {
    width: 50px;
    height: 30px;
    text-align: center;
    margin: 0 5px;
    border: 1px solid #ddd;
  }
  
  /* Стили корзины */
  .cart-container {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  }
  
  .cart-container h2 {
    margin-top: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4361ee;
  }
  
  .cart-items {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
  }
  
  .empty-cart {
    color: #666;
    text-align: center;
    padding: 20px 0;
  }
  
  .cart-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
  }
  
  .cart-item-name {
    flex: 2;
  }
  
  .cart-item-price {
    flex: 1;
    text-align: right;
    font-weight: bold;
  }
  
  .cart-item-remove {
    color: #f72585;
    margin-left: 10px;
    cursor: pointer;
  }
  
  .cart-summary {
    border-top: 1px solid #eee;
    padding-top: 15px;
  }
  
  .summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
  }
  
  .summary-row.total {
    font-weight: bold;
    font-size: 1.2em;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
  }
  
  .checkout-btn {
    width: 100%;
    padding: 12px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.3s;
  }
  
  .checkout-btn:hover {
    background: #218838;
  }
  
  /* Адаптация для мобильных */
  @media (max-width: 768px) {
    .builder-container {
      flex-direction: column;
    }
    
    .builder-sidebar {
      position: static;
      margin-top: 30px;
    }
  }

  /* Стили для кнопки "Добавлено" */
.add-btn.added {
  background-color: #4CAF50;
  cursor: default;
}

.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
  justify-content: center;
  align-items: center;
}

.builder-sidebar {
  background: white;
  border-radius: 10px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 20px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  transform: translateY(-50px);
  opacity: 0;
  transition: all 0.3s ease;
}

.builder-sidebar.open {
  transform: translateY(0);
  opacity: 1;
}

.cart-overlay.open {
  display: flex;
}

/* Обновлённые стили для значка корзины */
.cart-floating {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  cursor: pointer;
  transition: all 0.3s;
}

.cart-floating .cart-icon {
  position: relative;
  background-color: #4361ee;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
  transition: all 0.3s;
}

.cart-floating .cart-icon:hover {
  background-color: #3a56d4;
  transform: scale(1.1);
}

.cart-floating .cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: #f72585;
  color: white;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

/* Анимация */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
  40% {transform: translateY(-15px);}
  60% {transform: translateY(-7px);}
}

.bounce {
  animation: bounce 0.8s;
}

/* Кнопка закрытия */
.cart-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  color: #666;
}

.cart-close:hover {
  color: #f72585;
}

.cart-item-remove {
  color: #f72585;
  margin-left: 10px;
  cursor: pointer;
  transition: color 0.3s; 
}

.cart-item-remove:hover {
  color: #d3165e;
}

/* Стили для управления количеством в корзине */
.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 5px;
}

.cart-item-quantity button {
  width: 25px;
  height: 25px;
  background: #f0f0f0;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.cart-item-quantity button:hover {
  background: #e0e0e0;
}

.cart-item-quantity span {
  min-width: 20px;
  text-align: center;
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  gap: 10px;
}

.cart-item-name {
  flex: 1;
}

.cart-item-price {
  min-width: 80px;
  text-align: right;
  font-weight: bold;
}



