/* =========================
   CHECKOUT LAYOUT ONLY ✅
   ========================= */
.checkout-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 40px;
  margin-top: 25px;
}

/* =========================
   FORM
   ========================= */
.checkout-form {
  width: 100%;
}

.checkout-form h3 {
  font-size: 20px;
  margin-bottom: 10px;
  border-left: 4px solid var(--brand-blue);
  padding-left: 10px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group input, 
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #bbb;
  border-radius: 10px;
  font-size: 16px;
  background:#fff;
}

/* =========================
   SUMMARY
   ========================= */
.checkout-summary {
  background: #fff;
  border-radius: 14px;
  padding: 22px;
  border: 1px solid #e6e6e6;
}

.checkout-summary h3 {
  margin-bottom: 15px;
}

.checkout-items {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

/* ======================================================
   FIXED checkout-item layout (фото → текст → цена)
   ====================================================== */
.checkout-item {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
  align-items: center;
}

/* Фото */
.checkout-item img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  background: #f0f0f0;
}

/* Текст */
.checkout-item .info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.checkout-item .info span {
  display: block;
  overflow-wrap: break-word;
  white-space: normal;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.checkout-item .info small {
  margin-top: 4px;
  font-size: 13px;
  color: #777;
}

/* Цена */
.checkout-item strong {
  white-space: nowrap;
  font-size: 16px;
  font-weight: 700;
  text-align: right;
  padding-left: 4px;
}

/* =========================
   TOTALS
   ========================= */
.checkout-total {
  display: block !important;
  padding-top: 15px;
}

.checkout-total .line-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 15px;
}

.checkout-total .line-item.delivery {
  background: #eaf4ff;
  color: #0057b8;
  border-radius: 6px;
  padding: 8px 10px;
  font-weight: 600;
}

.checkout-total .line-item.total {
  background: #f8f9fa;
  margin-top: 10px;
  padding: 10px;
  font-size: 16px;
  font-weight: 700;
  border-top: 2px solid #ccc;
}

/* Если корзина пуста */
.checkout-empty {
  text-align: center;
  font-size: 22px;
  padding: 40px 0;
}

/* =========================
   RESPONSIVE
   ========================= */
@media(max-width: 900px){
  .checkout-layout {
    grid-template-columns: 1fr 300px;
  }
}

@media(max-width: 600px){
  .checkout-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  /* форма сверху, итог — ниже */
  .checkout-summary {
    order: 1;
  }

  /* уменьшение фото */
  .checkout-item img {
    width: 60px;
    height: 60px;
  }

  .checkout-item {
    grid-template-columns: 60px 1fr auto;
    gap: 8px;
  }

  .checkout-item .info span {
    font-size: 14px;
  }

  .checkout-item strong {
    font-size: 15px;
  }

  .checkout-summary {
    padding: 16px;
  }
}
