/* cart.css — Полный код, оформленный в стиле "clip & go" */

/* Сброс */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Montserrat', sans-serif;
  background: #f4f7f6;
  color: #333;
  overflow-x: hidden;
}

/* Шапка корзины */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: 15px 30px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}
.header-left .logo {
  text-decoration: none;
  font-size: 1.6em;
  font-weight: 600;
  color: #007BFF;
  transition: color 0.3s;
}
header nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}
header nav li a {
  text-decoration: none;
  color: #007BFF;
  font-size: 1em;
  transition: color 0.3s;
}
header nav li a:hover {
  color: #005bb5;
}

/* Основная часть */
main {
  max-width: 1200px;
  margin: 40px auto;
  padding: 80px 20px 0; /* padding-top под фиксированный header */
}
main h1 {
  font-size: 2em;
  text-align: center;
  margin-bottom: 30px;
  color: #007BFF;
}

/* Блок с товаром */
.cart-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  margin-bottom: 20px;
}
.cart-item img {
  width: 120px;
  border-radius: 12px;
}
.item-info {
  flex: 1;
  min-width: 200px;
}
.item-info h2 {
  font-size: 1.4em;
  margin-bottom: 5px;
  color: #007BFF;
}
.item-info p {
  font-size: 1em;
  margin-bottom: 5px;
  color: #555;
}

/* Селектор количества */
.quantity-selector {
  display: flex;
  align-items: center;
  gap: 10px;
}
.quantity-selector button {
  font-size: 1.3em;
  padding: 8px 14px;
  border: none;
  background: #007BFF;
  color: #fff;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.3s;
}
.quantity-selector button:hover {
  background: #005bb5;
}
.quantity-selector span {
  font-size: 1.2em;
  color: #333;
  min-width: 30px;
  text-align: center;
}

/* Кнопка удаления */
.remove-item-btn {
  font-size: 0.9em;
  padding: 8px 14px;
  border: none;
  background: #ff4d4d;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}
.remove-item-btn:hover {
  background: #d60000;
}

/* Окно промокода */
.promo-section {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.promo-section label {
  font-size: 1em;
  color: #007BFF;
}
.promo-section input {
  padding: 8px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 6px;
  flex: 1;
}
.promo-section button {
  padding: 8px 16px;
  border: none;
  background: #007BFF;
  color: #fff;
  cursor: pointer;
  font-size: 1em;
  border-radius: 6px;
  transition: background 0.3s;
}
.promo-section button:hover {
  background: #005bb5;
}

/* Итоговая сумма */
.cart-summary {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  text-align: center;
}
.cart-summary h2 {
  font-size: 1.6em;
  margin-bottom: 20px;
  color: #333;
}
.cart-summary #checkoutBtn {
  padding: 12px 40px;
  font-size: 1em;
  border: none;
  border-radius: 50px;
  background: #007BFF;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}
.cart-summary #checkoutBtn:hover {
  background: #005bb5;
  transform: scale(1.05);
}

/* Футер */
footer {
  text-align: center;
  padding: 15px 10px;
  margin-top: 40px;
  background: #fff;
  font-size: 0.9em;
  color: #555;
  border-top: 1px solid #ddd;
}

/* Адаптив */
@media (max-width: 768px) {
  .cart-item {
    flex-direction: column;
    text-align: center;
  }
  .quantity-selector {
    margin-top: 10px;
  }
}