.buyer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 355px;
  align-items: start;
  gap: 30px;
  max-width: 1348px;
  margin: 0 auto;
  padding: 28px 44px 64px;
}

.buyer-panel {
  min-width: 0;
  padding: 32px;
  background: #fff;
}

.buyer-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.buyer-panel-heading h2 {
  margin: 0;
  font: 700 27px/1.25 Gazpacho, Georgia, serif;
  letter-spacing: -.02em;
}

.buyer-panel-heading .preview-badge {
  flex: 0 0 auto;
}

.buyer-fields-note {
  margin: 0 0 26px;
  color: #6b5559;
  font-size: 14px;
  line-height: 1.5;
}

.buyer-fieldset {
  min-width: 0;
  margin: 0 0 28px;
  padding: 0;
  border: 0;
}

.buyer-fieldset legend {
  width: 100%;
  margin: 0 0 18px;
  padding: 0 0 12px;
  border-bottom: 1px solid #e8deda;
  color: #3f000b;
  font: 700 20px/1.35 Gazpacho, Georgia, serif;
}

.buyer-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 19px 20px;
}

.buyer-field {
  min-width: 0;
}

.buyer-field-wide {
  grid-column: 1 / -1;
}

.buyer-field label {
  display: block;
  margin: 0 0 8px;
  color: #3f000b;
  font: 700 16px/1.4 TTNorms, Arial, sans-serif;
}

.buyer-optional {
  color: #6b5559;
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
}

.buyer-field input,
.buyer-field textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  margin: 0;
  padding: 11px 13px;
  border: 1px solid #cfc9c8;
  border-radius: 4px;
  background: #fff;
  color: #3f000b;
  font: 400 16px/1.4 TTNorms, Arial, sans-serif;
  appearance: none;
  -webkit-appearance: none;
}

.buyer-field textarea {
  min-height: 116px;
  resize: vertical;
}

.buyer-field input:focus-visible,
.buyer-field textarea:focus-visible {
  outline: 3px solid #007bbd;
  outline-offset: 2px;
  border-color: #007bbd;
}

.buyer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #e8deda;
}

.buyer-actions .buyer-back-button {
  min-height: 52px;
}

.buyer-actions .primary-button.buyer-pay-button,
.buyer-actions .primary-button.buyer-pay-button:disabled,
.buyer-actions .primary-button.buyer-pay-button:disabled:hover {
  min-width: 182px;
  min-height: 52px;
  padding: 12px 30px;
  border: 1px solid #007bbd;
  border-radius: 40px;
  background: #007bbd;
  color: #fff;
  font: 700 20px/1.3 TTNorms, Arial, sans-serif;
  opacity: 1;
  cursor: default;
}

.buyer-payment-preview {
  max-width: 510px;
  margin: 15px 0 0 auto;
  color: #6b5559;
  font-size: 14px;
  line-height: 1.5;
  text-align: right;
}

.buyer-summary {
  min-width: 0;
  position: sticky;
  top: 24px;
}

.buyer-summary .summary-inner {
  padding: 28px;
}

.buyer-summary-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.buyer-summary-item {
  padding: 18px 0;
  border-bottom: 1px solid #e8deda;
}

.buyer-summary-item:first-child {
  padding-top: 0;
}

.buyer-item-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.buyer-summary .buyer-summary-item h3 {
  min-width: 0;
  margin: 0 0 7px;
  font: 700 17px/1.35 TTNorms, Arial, sans-serif;
}

.buyer-item-price {
  flex: 0 0 auto;
  font-size: 16px;
  white-space: nowrap;
}

.buyer-summary-item p {
  margin: 3px 0 0;
  color: #6b5559;
  font-size: 14px;
  line-height: 1.5;
}

.buyer-summary-item .buyer-item-date {
  color: #3f000b;
}

.buyer-summary-item .buyer-item-note {
  margin-top: 7px;
  font-size: 13px;
}

.buyer-summary-totals {
  margin: 18px 0 0;
}

.buyer-summary-totals > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  font-size: 15px;
}

.buyer-summary-totals dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
}

.buyer-summary-totals .buyer-summary-subtotal {
  margin-top: 10px;
  padding-top: 19px;
  border-top: 2px solid #3f000b;
  font-size: 17px;
  font-weight: 700;
}

.buyer-summary-subtotal dd {
  font-size: 23px;
  line-height: 1.3;
}

.buyer-summary .buyer-summary-note {
  margin: 17px 0 0;
  color: #6b5559;
  font-size: 14px;
  line-height: 1.5;
}

.buyer-summary .buyer-reservation-note {
  padding-top: 16px;
  border-top: 1px solid #e8deda;
}

.buyer-empty-summary {
  color: #6b5559;
  font-size: 15px;
}

@media (max-width: 1100px) {
  .buyer-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 22px;
    padding: 26px 28px 50px;
  }

  .buyer-panel,
  .buyer-summary .summary-inner {
    padding: 25px;
  }

  .buyer-panel-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .buyer-item-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 8px;
  }
}

@media (max-width: 800px) {
  .buyer-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .buyer-summary {
    position: static;
  }

  .buyer-item-top {
    flex-direction: row;
    align-items: baseline;
    gap: 18px;
  }
}

@media (max-width: 580px) {
  .buyer-layout {
    gap: 22px;
    padding: 20px 14px 40px;
  }

  .buyer-panel {
    padding: 25px 20px;
  }

  .buyer-panel-heading h2 {
    font-size: 25px;
  }

  .buyer-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .buyer-fieldset {
    margin-bottom: 25px;
  }

  .buyer-actions {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 12px;
  }

  .buyer-actions > button {
    width: 100%;
  }

  .buyer-payment-preview {
    margin-left: 0;
    text-align: left;
  }
}
