body {
  font-family: Inter, sans-serif;
  background: #f5f6fa;
}

.checkout-wrapper {
  max-width: 1300px;
  margin: 40px auto;
  display: flex;
  flex-wrap: wrap-reverse;
  gap: 40px;
}

.checkout-left {
  flex: 2;
}
.checkout-right {
  flex: 1;
}

.card,
.summary-card {
  background: white;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  margin-bottom: 25px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

input,
select {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #ddd;
  margin-top: 6px;
}

.btn-primary {
  background: #111;
  color: white;
  padding: 14px 20px;
  border-radius: 12px;
  border: none;
  width: 100%;
  font-weight: 600;
  cursor: pointer;
}

.btn-secondary {
  background: #f0f0f0;
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  margin-bottom: 15px;
  cursor: pointer;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 20px;
  font-weight: 700;
  margin-top: 15px;
}

.edit-link {
  display: block;
  margin-top: 20px;
  color: #555;
  text-decoration: none;
}
/* --- АДАПТИВНОСТЬ ПОД МОБИЛКИ --- */
/* Основной контейнер */
.checkout-wrapper {
  display: flex;
  flex-wrap: wrap; /* Позволяет правой колонке падать вниз */
  gap: 30px;
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 15px;
  align-items: flex-start;
}

/* Левая часть (Форма) */
.checkout-left {
  flex: 1 1 650px; /* Растет, но не меньше 650px (если влезет) */
  min-width: 300px;
}

/* Правая часть (Итого) */
.checkout-right {
  flex: 1 1 350px;
  position: sticky;
  top: 100px; /* Чтобы липла при скролле (если есть место) */
}

/* Сетка инпутов */
.input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 15px;
}

/* Карточки */
.card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.input-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: 500;
}

.input-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.main-submit-btn {
  width: 100%;
  padding: 16px;
  font-size: 18px;
}

/* --- АДАПТИВНОСТЬ ПОД МОБИЛКИ --- */
@media (max-width: 768px) {
  .checkout-wrapper {
    flex-direction: column; /* Сайдбар строго вниз */
  }

  .checkout-right {
    order: -1; /* ПОДНИМАЕМ "Ваш заказ" наверх на мобилках, чтобы человек видел цену */
    position: static;
    width: 100%;
  }

  .input-grid {
    grid-template-columns: 1fr; /* Инпуты в один столбец */
  }

  #map {
    height: 300px; /* На мобилках карту чуть меньше */
  }

  h1 {
    font-size: 24px;
    text-align: center;
  }
}
