.checkout-page {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  max-width: 1200px;
  margin: 40px auto;
  padding: 20px;
  background: #f9fbfe;
  border-radius: 12px;
  font-family: 'Segoe UI', sans-serif;
  color: #111;
}

.checkout-form-wrapper {
  flex: 2;
}

.checkout-summary {
  flex: 1;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 0 8px rgba(0,0,0,0.06);
}

.checkout-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 30px;
  text-align: center;
}

.step-tabs {
  display: flex;
  gap: 20px;
  border-bottom: 2px solid #eee;
  margin-bottom: 20px;
}

.step-tab {
  font-weight: 600;
  cursor: pointer;
  padding-bottom: 8px;
  color: #888;
  border-bottom: 2px solid transparent;
}

.step-tab.active {
  color: #111;
  border-bottom: 2px solid #5e2ced;
}

.checkout-tab-content {
  display: none;
}

.checkout-tab-content.active {
  display: block;
}

.form-step {
  margin-bottom: 30px;
}

.section-title {
  font-size: 20px;
  margin-bottom: 15px;
  color: #2a2a2a;
  font-weight: 600;
}

.form-row {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
select {
  padding: 10px 14px;
  width: 100%;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fff;
  transition: border-color 0.2s;
}

input:focus,
select:focus {
  outline: none;
  border-color: #5e2ced;
}

label {
  display: block;
  margin: 10px 0;
  font-size: 14px;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin: 8px 0;
}

.checkout-btn {
  display: block;
  width: 100%;
  background: #111;
  color: #fff;
  border: none;
  padding: 14px 20px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.checkout-btn:hover {
  background: #333;
}

.checkout-summary h2 {
  font-size: 18px;
  margin-bottom: 15px;
  font-weight: 600;
}

.summary-item {
  margin-bottom: 15px;
  font-size: 14px;
  line-height: 1.5;
}

.summary-price,
.summary-total {
  font-weight: 600;
  margin-top: 5px;
}

.info-text {
  font-size: 14px;
  margin-bottom: 15px;
  color: #666;
}


.tab-button {
  border: none;
  background: none;
  font-size: 16px;
  font-weight: 600;
  padding: 10px 20px;
  cursor: pointer;
  color: #666;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease-in-out;
}

.tab-button:hover {
  color: #000;
}

.tab-button.active {
  color: #000;
  border-bottom: 2px solid #4c40f7;
}

.suggestions-list {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  background: #fff;
  width: 100%;
  border: 1px solid #ccc;
  border-top: none;
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
  max-height: 200px;
  overflow-y: auto;
}

.suggestion-item {
  padding: 8px 12px;
  cursor: pointer;
}

.suggestion-item:hover {
  background-color: #f0f0f0;
}


.checkout-summary {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.summary-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
}

.summary-items {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.summary-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.summary-item-img img {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #eee;
}

.summary-item-details {
  font-size: 14px;
  line-height: 1.4;
}

.product-name {
  font-weight: 600;
  margin-bottom: 5px;
}

.product-meta {
  color: #555;
  margin-bottom: 3px;
}

.product-total {
  font-weight: bold;
}

.summary-total {
  margin-top: 20px;
  font-size: 16px;
  font-weight: bold;
  text-align: right;
}

/* Мобильная раскладка: сводка заказа сверху, форма ниже */
@media (max-width: 900px) {
  .checkout-page {
    flex-direction: column;
    gap: 20px;
    margin: 20px auto;
    padding: 16px;
  }
  .checkout-summary {
    order: -1;
    width: 100%;
  }
  .checkout-form-wrapper {
    width: 100%;
  }
}


.quantity-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}

.quantity-controls button {
  width: 30px;
  height: 30px;
  border: 1px solid #ccc;
  background: #fff;
  font-size: 18px;
  cursor: pointer;
  border-radius: 4px;
}

.quantity-value {
  min-width: 20px;
  text-align: center;
  font-weight: bold;
}

.remove-btn {
  margin-left: auto;
}

.remove-btn button {
  background: none;
  border: none;
  font-size: 20px;
  color: #888;
  cursor: pointer;
}
