:root {
  --bg: #eef1fa;
  --ink: #090f3f;
  --ink-soft: #555d86;
  --line: #d6dcf2;
  --line-soft: #e5e9f7;
  --tile: #fff;
  --selected: #dfe5f6;
  --blue: #001489;
  --orange: #ff4f05;
  --orange-disabled: #f7aa9e;
  --tint-orange: #fff1eb;
  --radius: 3px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
[hidden] { display: none !important; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

button, input, select {
  font: inherit;
}

button {
  color: inherit;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.brand-link {
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  height: 36px;
  width: auto;
  display: block;
  border-radius: 2px;
}

.brand-fallback {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  border-radius: 2px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-soft);
}

.lang-switch {
  display: flex;
  gap: 3px;
}

.lang-btn {
  font-size: 11px;
  letter-spacing: .03em;
  padding: 5px 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink-soft);
  border-radius: var(--radius);
  text-decoration: none;
}

.lang-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.topbar-divider {
  width: 1px;
  height: 16px;
  background: var(--line);
}

.lock-icon {
  width: 13px;
  height: 13px;
  flex: none;
}

.checkout-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 44px 24px 90px;
}

.checkout-alert {
  max-width: 900px;
  margin: 0 auto 22px;
  padding: 14px 18px;
  border: 1px solid #cc3f04;
  background: var(--tint-orange);
}

.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 42px 20px 80px;
}

.picker-view {
  max-width: 760px;
  margin: 0 auto;
}

.picker-view h1 {
  font-size: 26px;
  line-height: 1.1;
  font-weight: 600;
  margin: 0 0 10px;
}

.lead-copy {
  color: var(--ink-soft);
  max-width: 52ch;
  font-size: 14px;
  line-height: 1.45;
  margin: 0 0 28px;
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.model-tile {
  height: 92px;
  border: 1px solid var(--line);
  background: var(--tile);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
}

.model-tile img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.model-tile strong {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
}

.model-tile.selected,
.qty-tile.selected {
  background: var(--selected);
  border-color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink);
}

.qty-area {
  margin-top: 26px;
}

.section-label {
  color: var(--blue);
  font-size: 11px;
  letter-spacing: .075em;
  font-weight: 500;
  margin-bottom: 10px;
}

.qty-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.qty-tile {
  min-height: 102px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--tile);
  text-align: left;
  cursor: pointer;
  display: grid;
  grid-template-rows: auto auto 1fr;
}

.qty-title {
  display: block;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 4px;
}

.qty-sub {
  display: block;
  color: var(--ink-soft);
  font-size: 13px;
}

.qty-price {
  align-self: end;
  justify-self: end;
  font-size: 20px;
  font-weight: 500;
}

.qty-single {
  width: 100%;
  min-height: 70px;
  margin-top: 8px;
  grid-template-columns: 1fr auto;
  grid-template-rows: 1fr;
  align-items: center;
}

.qty-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0 14px;
  color: var(--ink-soft);
  letter-spacing: .055em;
  font-size: 12px;
}

.qty-divider::before,
.qty-divider::after {
  content: "";
  flex: 1;
  border-top: 2px dashed var(--line);
}

.custom-qty-row {
  height: 60px;
  background: var(--tile);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
}

.stepper {
  display: grid;
  grid-template-columns: 38px 42px 38px;
  height: 38px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
}

.stepper button,
.stepper span {
  border: 0;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 18px;
}

.stepper button + span,
.stepper span + button {
  border-left: 1px solid var(--line);
}

.custom-qty-row strong {
  font-size: 18px;
  font-weight: 500;
}

.continue-btn {
  width: 100%;
  height: 52px;
  margin-top: 28px;
  border: 0;
  border-radius: var(--radius);
  background: var(--orange);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.continue-btn:disabled {
  background: var(--orange-disabled);
  cursor: default;
}

.checkout-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 56px;
  align-items: start;
}

.checkout-main {
  position: relative;
}

.order-line {
  margin-left: 34px;
  height: 70px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
}

.order-line img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.order-line strong {
  font-size: 14px;
}

.order-line button {
  border: 0;
  background: transparent;
  color: var(--blue);
  text-decoration: underline;
  cursor: pointer;
  font-size: 12px;
}

.rail {
  position: relative;
  padding: 44px 0 0 34px;
}

.rail::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.rail-section {
  position: relative;
  padding-bottom: 42px;
}

.rail-section h2 {
  font-size: 20px;
  line-height: 1.1;
  margin: 0 0 12px;
  font-weight: 700;
}

.rail-tick {
  position: absolute;
  left: -47px;
  top: 0;
  width: 21px;
  height: 21px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  background: var(--bg);
}

.rail-tick.active {
  color: #fff;
  background: var(--ink);
}

.section-subcopy {
  color: var(--ink-soft);
  font-size: 13px;
  max-width: 610px;
  margin: 0 0 20px;
}

.guest-note {
  border: 1px solid var(--line-soft);
  color: var(--ink-soft);
  padding: 13px 14px;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 13px;
}

.info-dot {
  width: 18px;
  height: 18px;
  border: 2px solid var(--ink-soft);
  border-radius: 50%;
  font-size: 12px;
  display: grid;
  place-items: center;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.field-grid label,
.card-detail label {
  color: var(--ink-soft);
  font-size: 12px;
  text-transform: uppercase;
  display: grid;
  gap: 10px;
}

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

.field-grid input,
.field-grid select,
.card-detail input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  height: 42px;
  padding: 0 12px;
  color: var(--ink);
  font-size: 15px;
  text-transform: none;
}

.address-search-field small {
  color: var(--ink-soft);
  font-size: 12px;
  text-transform: none;
}

.address-search-wrap {
  position: relative;
  display: block;
}

.places-suggestions {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 24px rgba(8, 18, 64, 0.12);
}

.places-suggestion {
  display: block;
  width: 100%;
  min-height: 42px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
}

.places-suggestion:last-child {
  border-bottom: 0;
}

.places-suggestion:hover,
.places-suggestion:focus {
  background: var(--tile);
}

.address-validation-message {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
  padding: 12px 14px;
  text-transform: none;
}

.address-validation-message.ok {
  border-color: #bfd8ca;
  background: #f3faf6;
  color: #27583d;
}

.address-validation-message.warn {
  border-color: #ead5a9;
  background: #fff9ec;
  color: #72551d;
}

.address-validation-message.error {
  border-color: #edb8b0;
  background: #fff4f2;
  color: #88352d;
}

.newsletter {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 13px;
  margin-top: 20px;
}

.newsletter input {
  width: 18px;
  height: 18px;
}

.dim-divider {
  display: grid;
  grid-template-columns: 1fr 70px 1fr;
  gap: 10px;
  align-items: center;
  margin: 34px 0;
}

.dim-divider span {
  border-top: 2px solid var(--line);
}

.dim-divider b {
  border-top: 2px dashed var(--line);
}

.payment-panel {
  border: 2px solid var(--ink);
  background: #fff;
  border-radius: var(--radius);
  padding: 28px;
}

.paymethods {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.paymethods button {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: var(--radius);
  height: 78px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.paymethods button.selected {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink);
}

.paymethods strong {
  font-size: 14px;
}

.paymethods span {
  color: var(--ink-soft);
  font-size: 12px;
}

.card-detail {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.card-note {
  color: var(--blue);
  border-bottom: 2px dashed var(--line);
  padding-bottom: 18px;
  margin: 0 0 22px;
  font-size: 15px;
}

.order-summary {
  position: sticky;
  top: 24px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 28px;
}

.summary-product {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.summary-product img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.summary-product strong {
  font-size: 14px;
}

.summary-product span {
  color: var(--ink-soft);
}

.summary-rule {
  border-top: 1px solid var(--line);
  margin: 8px 0 22px;
}

.sum-row {
  display: flex;
  justify-content: space-between;
  color: var(--ink-soft);
  margin: 10px 0;
  font-size: 14px;
}

.sum-row strong {
  color: var(--ink);
  font-weight: 500;
}

.sum-row.total {
  border-top: 2px solid var(--ink);
  padding-top: 14px;
  color: var(--ink);
  font-weight: 700;
  font-size: 18px;
}

.guarantee {
  background: var(--tint-orange);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 22px 0;
  font-size: 14px;
}

.pay-btn {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: var(--radius);
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  cursor: pointer;
}

.microcopy,
.fineprint {
  color: var(--ink-soft);
  text-align: center;
  font-size: 12px;
}

.fineprint {
  text-align: left;
  margin-top: 26px;
}

.fineprint a {
  color: inherit;
}

.admin-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-nav {
  background: var(--ink);
  color: #fff;
  padding: 24px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  display: inline-grid;
  place-items: center;
  font-weight: 700;
}

.admin-nav a {
  color: rgba(255, 255, 255, .8);
  display: block;
  padding: 9px 0;
  text-decoration: none;
}

.admin-main {
  padding: 28px;
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .checkout-shell {
    padding: 38px 18px;
  }

  .model-grid,
  .qty-feature-grid,
  .checkout-view,
  .field-grid,
  .paymethods,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .picker-view h1 {
    font-size: 26px;
  }

  .order-summary {
    position: static;
  }
}
