:root {
  --blue: #3b7dc1;
  --blue-dark: #2f6aa8;
  --blue-soft: #e8f1fb;
  --green-selected: #e2efda;
  --text: #222;
  --muted: #666;
  --border: #c8c8c8;
  --panel-border: #b7b7b7;
  --bg-top: #d7e8f7;
  --bg-mid: #f4f8fc;
  --footer: #1f2a33;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  --font: "Open Sans", "Roboto", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background:
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 180px, #ffffff 420px, #ffffff 70%, var(--bg-top) 100%);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.site-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.brand img {
  display: block;
  height: 54px;
  width: auto;
}

.steps {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8a8a8a;
  font-size: 15px;
  padding-bottom: 6px;
}

.step.active {
  color: var(--blue);
  font-weight: 700;
}

.step-sep {
  color: #b0b0b0;
  font-size: 13px;
}

.page-title {
  margin: 8px 0 16px;
  font-size: 28px;
  font-weight: 700;
}

.flash-list {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.flash {
  padding: 12px 14px;
  border-radius: 4px;
  border: 1px solid transparent;
}

.flash-error {
  background: #fdecea;
  border-color: #f5c2c0;
  color: #8a1f11;
}

.flash-warning {
  background: #fff8e6;
  border-color: #f0d58a;
  color: #7a5b00;
}

.panel {
  position: relative;
  border: 1px solid var(--panel-border);
  background: #fff;
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--blue);
  color: #fff;
  padding: 10px 14px;
}

.panel-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.panel-icon {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.panel-body {
  padding: 18px 18px 16px;
}

.summary-card {
  position: absolute;
  top: 48px;
  right: 18px;
  width: 220px;
  background: #fff;
  border: 1px solid #d0d0d0;
  box-shadow: var(--shadow);
  padding: 12px 14px;
  z-index: 2;
}

.summary-card ul {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}

.summary-card li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  margin-bottom: 6px;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 15px;
  border-top: 1px solid #e2e2e2;
  padding-top: 8px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 16px;
  padding-right: 240px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #333;
}

.field-wide {
  grid-column: span 4;
}

.field-span-2 {
  grid-column: span 2;
}

.field-full {
  grid-column: span 4;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 8px 10px;
  font: inherit;
  color: var(--text);
  background: #fff;
}

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

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(59, 125, 193, 0.25);
  border-color: var(--blue);
}

.captcha-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 22px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 3px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: var(--blue);
  transition: background 0.15s ease, transform 0.05s ease;
}

.btn:hover {
  background: var(--blue-dark);
}

.btn:active {
  transform: translateY(1px);
}

.btn-secondary,
.btn-primary {
  min-height: 42px;
}

.products {
  display: grid;
  gap: 10px;
}

.product-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 16px;
  align-items: center;
  border: 1px solid #d5d5d5;
  background: #fff;
  padding: 12px 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.product-row.is-selected {
  background: var(--green-selected);
  border-color: #c5d6b5;
}

.product-price {
  font-size: 22px;
  font-weight: 700;
  color: #1f1f1f;
  white-space: nowrap;
}

.product-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
}

.product-desc {
  font-size: 13px;
  color: var(--muted);
}

.btn-product {
  min-width: 96px;
  padding: 8px 14px;
}

.site-footer {
  background: var(--footer);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 8vw;
  margin-top: 40px;
}

.footer-logo {
  height: 34px;
  width: auto;
  opacity: 0.95;
}

.site-footer p {
  margin: 0;
  font-size: 14px;
  opacity: 0.9;
}

.success-card {
  background: #fff;
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  padding: 28px;
}

.success-lead {
  font-size: 18px;
  margin-top: 0;
}

.success-summary {
  margin: 22px 0;
  padding: 16px 18px;
  background: var(--blue-soft);
  border: 1px solid #cfe0f2;
}

.success-summary h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

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

.success-summary li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(59, 125, 193, 0.15);
}

.vat-note {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.success-actions {
  margin-bottom: 0;
}

@media (max-width: 860px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-right: 0;
  }

  .field-wide,
  .field-span-2,
  .field-full {
    grid-column: span 2;
  }

  .summary-card {
    position: static;
    width: 100%;
    margin: 0 18px 12px;
  }

  .panel-body {
    padding-top: 12px;
  }

  .captcha-row {
    justify-content: flex-start;
  }

  .product-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .btn-product {
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .page {
    width: calc(100% - 20px);
    padding-top: 18px;
  }

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

  .field-wide,
  .field-span-2,
  .field-full {
    grid-column: span 1;
  }

  .actions,
  .success-actions,
  .site-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .page-title {
    font-size: 24px;
  }
}
