:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --ink: #142033;
  --muted: #667085;
  --line: #d8e2ee;
  --brand: #0f8b8d;
  --brand-dark: #0b6567;
  --accent: #f2a541;
  --green: #1f9d63;
  --night: #101828;
  --shadow: 0 18px 44px rgba(20, 32, 51, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.buy-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px clamp(18px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(244, 247, 251, 0.92);
  backdrop-filter: blur(14px);
}

.brand,
nav,
.product-top,
.cart-head,
.domain-head,
.mode-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 900;
}

.brand-logo {
  display: block;
  width: auto;
  height: 74px;
  object-fit: contain;
}

nav {
  gap: 16px;
  color: var(--muted);
}

.primary,
.ghost,
.filter,
.mode {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
}

.primary {
  color: white;
  background: var(--brand);
}

.primary:hover {
  background: var(--brand-dark);
}

.ghost,
.filter,
.mode {
  color: var(--ink);
  background: #e8eef6;
}

.wide {
  width: 100%;
}

.hidden {
  display: none !important;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(310px, 0.8fr);
  gap: 28px;
  align-items: end;
  min-height: 560px;
  padding: 66px clamp(18px, 5vw, 64px);
  background:
    linear-gradient(90deg, rgba(16, 24, 40, 0.82), rgba(16, 24, 40, 0.44)),
    url("https://images.unsplash.com/photo-1542744173-8e7e53415bb0?auto=format&fit=crop&w=1800&q=80") center/cover;
  color: white;
}

.hero-copy h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1;
  letter-spacing: 0;
}

.lead {
  max-width: 700px;
  color: #e5e7eb;
  font-size: 19px;
  line-height: 1.55;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.domain-search {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  max-width: 720px;
  margin: 24px 0 14px;
}

.domain-search input,
.domain-search button,
.checkout-form input {
  min-height: 52px;
  border-radius: 8px;
  padding: 0 14px;
}

.domain-search input,
.checkout-form input {
  width: 100%;
  border: 1px solid var(--line);
}

.domain-search button {
  border: 0;
  color: white;
  background: var(--brand);
}

.domain-result {
  display: none;
  max-width: 860px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(16, 24, 40, 0.72);
}

.domain-result.active {
  display: block;
}

.domain-head {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.domain-head div {
  display: grid;
  gap: 4px;
}

.domain-head span,
.muted,
.status,
.hero-panel p,
.product-card p,
.recommendation p,
.cart-item small {
  color: var(--muted);
}

.domain-head span,
.hero-panel p {
  color: #e5e7eb;
}

.domain-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.domain-option {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.domain-option h3 {
  margin: 0;
  overflow-wrap: anywhere;
}

.domain-option p {
  margin: 0;
  color: #e5e7eb;
}

.domain-option strong {
  font-size: 24px;
}

.hero-panel {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(16px);
}

.hero-panel h2 {
  margin: 10px 0;
  font-size: 30px;
}

.buy-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
  gap: 22px;
  align-items: start;
  padding: 34px clamp(18px, 5vw, 64px) 64px;
}

.catalog-area {
  display: grid;
  gap: 28px;
}

.section-head {
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.filter.active,
.mode.active {
  color: white;
  background: var(--night);
}

.product-grid,
.recommendation-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.product-card,
.recommendation,
.cart-panel,
.empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.product-card,
.recommendation,
.empty {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.product-card h3,
.recommendation h3,
.empty h3 {
  margin: 0;
}

.product-card p,
.recommendation p,
.empty p {
  margin: 0;
  line-height: 1.5;
}

.product-top {
  justify-content: space-between;
  gap: 8px;
}

.price-block {
  display: grid;
  justify-items: end;
  gap: 1px;
  min-width: 108px;
  text-align: right;
}

.price-block span,
.price-block small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.price-block strong {
  font-size: 22px;
  line-height: 1.05;
}

.spec-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.spec-grid span {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--ink);
  background: #f8fbff;
  font-size: 12px;
  font-weight: 750;
}

.badge,
.pill {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  background: #e8eef6;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.pill {
  color: white;
  background: var(--green);
}

.recommendation {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.cart-panel {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 16px;
  padding: 18px;
}

.cart-head {
  justify-content: space-between;
}

.cart-head h2 {
  margin: 0;
  font-size: 26px;
}

.cart-items {
  display: grid;
  gap: 10px;
}

.cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cart-item strong,
.cart-item small {
  display: block;
  overflow-wrap: anywhere;
}

.cart-price {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.cart-price button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: #eef2f7;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 18px;
}

.cart-total strong {
  font-size: 28px;
}

.checkout-form {
  display: grid;
  gap: 10px;
}

.mode-row {
  gap: 8px;
}

.mode {
  flex: 1;
}

.status {
  min-height: 22px;
  line-height: 1.45;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(16, 24, 40, 0.62);
}

.modal-panel {
  position: relative;
  width: min(100%, 480px);
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 28px 70px rgba(16, 24, 40, 0.22);
}

.email-domain-panel {
  width: min(100%, 760px);
}

.server-config-panel {
  width: min(100%, 820px);
}

.server-config-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  padding-right: 38px;
}

.server-config-head h2 {
  margin: 0;
  font-size: 28px;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.billing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.billing-card {
  display: grid;
  gap: 5px;
  min-height: 104px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  text-align: left;
  color: var(--ink);
  background: #f8fbff;
}

.billing-card.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 139, 141, 0.14);
  background: white;
}

.billing-card span,
.billing-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.billing-card strong {
  font-size: 26px;
}

.config-field {
  display: grid;
  gap: 7px;
}

.config-field span {
  font-weight: 850;
}

.config-field select,
.config-field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: white;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: #eef2f7;
  color: var(--ink);
}

.register-fields {
  display: grid;
  gap: 10px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.choice-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  align-items: start;
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  text-align: left;
  color: var(--ink);
  background: white;
}

.choice-card span {
  grid-row: span 2;
  width: 28px;
  height: 28px;
  border: 3px solid #7b8797;
  border-radius: 50%;
}

.choice-card.active {
  border-color: #7cc7ff;
  box-shadow: 0 0 0 3px rgba(14, 142, 229, 0.14);
}

.choice-card.active span {
  border: 8px solid #0e8ee5;
}

.choice-card strong {
  font-size: 20px;
}

.choice-card small {
  color: var(--muted);
  line-height: 1.45;
}

.email-domain-box {
  display: grid;
  gap: 8px;
}

.email-domain-box label {
  font-weight: 800;
}

.domain-search.compact {
  margin: 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.payment-page {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 0.7fr);
  gap: 28px;
  align-items: start;
  min-height: calc(100vh - 74px);
  padding: 54px clamp(18px, 5vw, 64px);
}

.payment-copy h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1;
  letter-spacing: 0;
}

.payment-copy .lead {
  color: var(--muted);
}

.payment-panel,
.summary-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.payment-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
}

#paymentForm {
  display: grid;
  gap: 18px;
}

.summary-panel {
  max-width: 720px;
  margin-top: 24px;
  padding: 18px;
}

.summary-list {
  display: grid;
  gap: 10px;
}

.summary-row,
.summary-total {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.summary-row {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.summary-row span {
  overflow-wrap: anywhere;
}

.summary-total {
  align-items: center;
  padding-top: 14px;
  font-size: 18px;
}

.summary-total strong {
  font-size: 30px;
}

.status.error {
  color: #b42318;
}

.payment-actions {
  margin-top: 16px;
}

@media (max-width: 1060px) {
  .hero,
  .buy-layout,
  .payment-page {
    grid-template-columns: 1fr;
  }

  .cart-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  nav {
    display: none;
  }

  .brand-logo {
    height: 56px;
  }

  .hero {
    min-height: auto;
    padding-top: 46px;
  }

  .domain-search,
  .domain-options,
  .product-grid,
  .recommendation-list,
  .choice-grid,
  .config-grid,
  .billing-grid {
    grid-template-columns: 1fr;
  }

  .server-config-head {
    display: grid;
    padding-right: 38px;
  }

  .server-config-head .price-block {
    justify-items: start;
    text-align: left;
  }

  .recommendation,
  .cart-item {
    grid-template-columns: 1fr;
  }

  .cart-price {
    justify-items: start;
  }
}
