.checkout-page {
  min-height: calc(100vh - 4rem);
  background: #f9fafb;
  padding: 6rem 0 4rem;
}

.checkout-page__back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
  color: #6b7280;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}

.checkout-page__back-link:hover {
  color: var(--color-accent);
}

.checkout-page .go-back-link-icon {
  width: 10px;
  height: 10px;
}

.checkout-page h1 {
  margin: 0 0 3rem;
  font-size: 2rem;
  font-weight: 700;
  color: #020617;
}

.checkout-page__layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 2rem;
  align-items: start;
}

.checkout-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.checkout-card,
.checkout-summary {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.checkout-card h2,
.checkout-summary h2 {
  margin: 0 0 1.25rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #020617;
}

.checkout-customer-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.checkout-customer-box p {
  color: #111827;
}

.checkout-customer-box small {
  color: #6b7280;
}

.checkout-customer-type {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.checkout-customer-type span {
  font-weight: 400;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.checkout-field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: #111827;
}

.checkout-field input,
.checkout-field select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  height: 42px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0 0.75rem;
  font: inherit;
  font-weight: 400;
  background: #fff;
}

.checkout-field select {
  padding-right: 2.5rem;
  cursor: pointer;
}

.checkout-field .select-arrow {
  position: absolute;
  right: 0.85rem;
  top: 2.9rem;
  width: 9px;
  height: 9px;
  pointer-events: none;
  color: var(--color-text);
  fill: currentColor;
}

.checkout-field input:focus,
.checkout-field select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(255, 0, 152, 0.12);
}

.checkout-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
}

.checkout-payment-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
}

.checkout-payment-option strong {
  display: block;
  margin-bottom: 0.25rem;
}

.checkout-payment-option small {
  display: block;
  color: #6b7280;
}

.checkout-radio {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.checkout-radio input[type="radio"] {
  margin: 0;
  transform: translateY(-1px);
  flex-shrink: 0;
}

.checkout-summary {
  position: sticky;
  top: 6rem;
}

.checkout-summary__items {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.checkout-summary__placeholder {
  margin: 0;
  color: #6b7280;
  font-size: 0.9rem;
}

.checkout-summary__totals {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.checkout-summary__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.checkout-summary__total {
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
  font-weight: 700;
}

.checkout-summary__total strong {
  color: var(--color-accent);
  font-size: 1.5rem;
}

.checkout-summary-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 0.75rem;
  padding: 1rem 0;
}

.checkout-summary-item + .checkout-summary-item {
  border-top: 1px solid #e5e7eb;
}

.checkout-summary-item__image {
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: #f3f4f6;
  border-radius: 6px;
}

.checkout-summary-item__line,
.checkout-summary-service,
.checkout-summary-item__group-total {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.checkout-summary-item__title {
  display: block;
  font-size: 0.9rem;
}

.checkout-summary-item__variant,
.checkout-summary-item__quantity,
.checkout-summary-service__quantity {
  display: block;
  margin-top: 0.15rem;
  color: #6b7280;
  font-size: 0.8rem;
}

.checkout-summary-service {
  margin-top: 0.6rem;
  padding-left: 0.75rem;
  border-left: 2px solid #bbf7d0;
  color: #166534;
  font-size: 0.85rem;
}

.checkout-summary-item__price,
.checkout-summary-service__price {
  white-space: nowrap;
  font-size: 0.85rem;
}

.checkout-summary-item__group-total {
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px dashed #e5e7eb;
  font-size: 0.85rem;
  font-weight: 700;
}

.checkout-submit {
  width: 100%;
  justify-content: center;
  margin-top: 1.5rem;
}

@media (max-width: 900px) {
  .checkout-page__layout {
    grid-template-columns: 1fr;
  }

  .checkout-summary {
    position: static;
  }

  .checkout-grid {
    grid-template-columns: 1fr;
  }

  .checkout-customer-box {
    align-items: flex-start;
    flex-direction: column;
  }
}