:root {
  --bg: #f4f2ed;
  --paper: #ffffff;
  --ink: #11130f;
  --muted: #74766f;
  --line: #e2dfd7;
  --green: #173c2a;
  --soft: #eef4ef;
  --shadow: 0 14px 34px rgba(24, 29, 24, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

/* HEADER */

.topbar {
  height: 72px;
  background: #101612;
  color: white;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 4vw;

  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;

  color: white;
  text-decoration: none;
}

.mark {
  width: 40px;
  height: 40px;

  border: 1px solid #657069;
  border-radius: 50%;

  display: grid;
  place-items: center;

  font-size: 10px;
  letter-spacing: 0.08em;
}

.brand-copy strong {
  display: block;
  font-size: 14px;
}

.brand-copy span {
  display: block;

  margin-top: 2px;

  color: #aab3ad;
  font-size: 11px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.secure-note {
  color: #c5ccc7;
  font-size: 11px;
}

.step-pill {
  padding: 7px 11px;

  border: 1px solid #465049;
  border-radius: 999px;

  color: #d7ddd9;
  font-size: 10px;
}

/* PAGE */

.shell {
  width: min(1420px, calc(100% - 40px));
  margin: 0 auto;

  padding: 42px 0 90px;
}

/* INTRO */

.intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  gap: 40px;

  margin-bottom: 28px;
}

.eyebrow {
  margin: 0;

  color: #66736a;

  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.intro h1 {
  margin: 8px 0 12px;

  font-family: Georgia, "Times New Roman", serif;
  font-size: 46px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
}

.intro-copy {
  max-width: 650px;

  margin: 0;

  color: var(--muted);

  font-size: 15px;
  line-height: 1.55;
}

.trust-strip {
  display: flex;
  gap: 18px;

  color: #4f5c53;
  font-size: 11px;

  white-space: nowrap;
}

/* MAIN GRID */

.app-layout {
  display: grid;

  grid-template-columns:
    minmax(0, 1.55fr)
    minmax(350px, 0.75fr);

  gap: 22px;

  align-items: start;
}

.builder {
  display: grid;
  gap: 14px;
}

/* CARDS */

.step-card,
.preview-card,
.summary-card {
  background: var(--paper);

  border: 1px solid var(--line);
  border-radius: 18px;

  box-shadow: var(--shadow);
}

.step-card {
  padding: 22px;
}

.step-head {
  display: flex;
  align-items: center;
  gap: 12px;

  margin-bottom: 20px;
}

.step-num {
  width: 30px;
  height: 30px;

  flex: 0 0 auto;

  display: grid;
  place-items: center;

  background: var(--green);
  color: white;

  border-radius: 9px;

  font-size: 12px;
  font-weight: 800;
}

.step-head h2 {
  margin: 0;

  font-size: 16px;
}

.step-head p {
  margin: 3px 0 0;

  color: var(--muted);
  font-size: 12px;
}

/* PRODUCT */

.product-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  gap: 24px;
}

.mini-product {
  min-width: 260px;

  display: flex;
  align-items: center;
  gap: 12px;

  padding: 12px 14px;

  border: 1px solid var(--line);
  border-radius: 12px;
}

.mini-product strong {
  display: block;
  font-size: 13px;
}

.mini-product span {
  display: block;

  margin-top: 3px;

  color: var(--muted);
  font-size: 11px;
}

.mini-shirt {
  width: 38px;
  height: 42px;

  background: #171717;

  clip-path: polygon(
    25% 0,
    39% 7%,
    61% 7%,
    75% 0,
    100% 18%,
    84% 39%,
    76% 32%,
    79% 100%,
    21% 100%,
    24% 32%,
    16% 39%,
    0 18%
  );
}

/* FORM LABELS */

.field-block label {
  display: block;

  margin-bottom: 7px;

  font-size: 11px;
  font-weight: 800;
}

/* COLORS */

.color-field {
  min-width: 350px;
}

.swatches {
  display: flex;
  flex-wrap: wrap;

  gap: 8px;
}

.swatch {
  display: flex;
  align-items: center;
  gap: 7px;

  padding: 9px 12px;

  background: white;

  border: 1px solid var(--line);
  border-radius: 10px;

  font-size: 12px;
}

.swatch span {
  width: 11px;
  height: 11px;

  display: block;

  background: var(--swatch);

  border: 1px solid #bdbdb8;
  border-radius: 50%;
}

.swatch.active {
  border-color: var(--ink);

  box-shadow: 0 0 0 1px var(--ink);
}

/* SIZE GRID */

.size-grid {
  width: 100%;

  display: grid;

  grid-template-columns: repeat(5, minmax(0, 1fr));

  gap: 10px;
}

.size-box {
  min-width: 0;

  padding: 12px;

  background: #fbfaf7;

  border: 1px solid var(--line);
  border-radius: 12px;
}

.size-box label {
  display: block;

  margin-bottom: 6px;

  font-size: 11px;
  font-weight: 800;
}

.size-box input {
  width: 100%;
  min-width: 0;

  padding: 10px 6px;

  background: white;

  border: 0;
  border-radius: 8px;

  outline: none;

  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.size-box input:focus {
  box-shadow: 0 0 0 2px #cfd9d1;
}

.qty-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;

  gap: 10px;

  margin-top: 13px;

  color: var(--muted);
  font-size: 11px;
}

.qty-footer strong {
  color: var(--ink);

  font-size: 14px;
}

/* DECORATION */

.decor-grid {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 12px;
}

.decor-card {
  padding: 14px;

  background: #fbfaf7;

  border: 1px solid var(--line);
  border-radius: 14px;

  transition: 0.2s ease;
}

.decor-card.selected {
  background: var(--soft);

  border-color: #8aaa96;
}

.decor-top {
  display: grid;

  grid-template-columns: auto 1fr auto;

  align-items: center;

  gap: 10px;
}

.decor-top strong {
  display: block;

  font-size: 13px;
}

.decor-top span {
  display: block;

  margin-top: 2px;

  color: var(--muted);
  font-size: 11px;
}

.decor-top b {
  font-size: 11px;
}

.upload-box {
  min-height: 92px;

  position: relative;

  display: grid;
  place-items: center;

  margin-top: 12px;

  overflow: hidden;

  background: white;

  border: 1px dashed #b9bcb6;
  border-radius: 10px;
}

.upload-box input[type="file"] {
  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;

  opacity: 0;

  cursor: pointer;
}

.upload-copy {
  display: flex;
  align-items: center;

  gap: 10px;

  pointer-events: none;
}

.upload-icon {
  width: 30px;
  height: 30px;

  display: grid;
  place-items: center;

  background: #edf0eb;

  border-radius: 8px;

  font-weight: 800;
}

.upload-copy strong {
  display: block;

  font-size: 11px;
}

.upload-copy small {
  display: block;

  margin-top: 3px;

  color: var(--muted);
  font-size: 9px;
}

/* CUSTOMER FORM */

.form-grid {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 14px;
}

.field-block.full {
  grid-column: 1 / -1;
}

.field-block input,
.field-block textarea {
  width: 100%;

  padding: 11px 12px;

  background: #fbfaf7;

  border: 1px solid var(--line);
  border-radius: 10px;

  outline: none;
}

.field-block input:focus,
.field-block textarea:focus {
  border-color: #8aaa96;

  box-shadow: 0 0 0 3px #eef4ef;
}

.field-block textarea {
  min-height: 84px;
  max-height: 180px;

  resize: vertical;
}

/* RIGHT RAIL */

.right-rail {
  position: sticky;

  top: 92px;

  display: grid;

  gap: 14px;
}

/* PREVIEW */

.preview-card {
  padding: 18px;
}

.preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 20px;
}

.preview-head h3 {
  margin: 4px 0 0;

  font-size: 17px;
}

.segmented {
  display: flex;

  padding: 3px;

  background: #eeece7;

  border-radius: 9px;
}

.segmented button {
  padding: 7px 10px;

  background: transparent;

  border: 0;
  border-radius: 7px;

  font-size: 10px;
}

.segmented button.active {
  background: white;

  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

#mockup {
  display: block;

  width: 100%;
  height: auto;

  margin-top: 8px;

  background: #f3f0e8;

  border-radius: 12px;
}

.preview-note {
  margin: 8px 12px 2px;

  color: var(--muted);

  font-size: 9px;
  line-height: 1.45;

  text-align: center;
}

/* SUMMARY */

.summary-card {
  padding: 20px;
}

.summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 20px;
}

.summary-head > div:first-child span {
  display: block;

  margin-top: 5px;

  color: var(--muted);
  font-size: 11px;
}

.price-wrap {
  text-align: right;
}

.price {
  font-family: Georgia, "Times New Roman", serif;

  font-size: 38px;
  line-height: 1;
}

.unit {
  margin-top: 4px;

  color: var(--muted);
  font-size: 10px;
}

.quote-lines {
  display: grid;

  gap: 10px;

  margin-top: 20px;
}

.quote-lines > div {
  display: flex;
  justify-content: space-between;

  gap: 20px;

  font-size: 11px;
}

.quote-lines span {
  color: var(--muted);
}

.discount strong {
  color: #52705c;
}

.summary-divider {
  height: 1px;

  margin: 20px 0;

  background: var(--line);
}

/* MAIN CTA */

.primary {
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 15px 16px;

  background: var(--green) !important;
  color: white !important;

  border: 0;
  border-radius: 12px;

  font-size: 13px;
  font-weight: 800;

  -webkit-appearance: none;
  appearance: none;
}

.primary:hover {
  background: #102f20 !important;
}

.primary:disabled {
  opacity: 0.55;
}

.arrow {
  font-size: 18px;
  font-weight: 400;
}

.cta-note {
  margin: 9px 0 0;

  color: var(--muted);

  font-size: 9px;

  text-align: center;
}

.status {
  margin-top: 12px;

  font-size: 11px;
  line-height: 1.5;

  word-break: break-word;
}

.status.ok {
  padding: 10px;

  background: #eef5ef;
  color: #315b3e;

  border-radius: 9px;
}

.status.err {
  padding: 10px;

  background: #fff0ef;
  color: #8b2d2d;

  border-radius: 9px;
}

/* TABLET */

@media (max-width: 1050px) {

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

  .right-rail {
    position: static;

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

  .intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .trust-strip {
    flex-wrap: wrap;
  }
}

/* MOBILE */

@media (max-width: 720px) {

  .shell {
    width: calc(100% - 28px);

    padding-top: 28px;
  }

  .intro h1 {
    font-size: 38px;
  }

  .product-row {
    flex-direction: column;
    align-items: stretch;
  }

  .mini-product,
  .color-field {
    min-width: 0;
  }

  .size-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .decor-grid,
  .form-grid,
  .right-rail {
    grid-template-columns: 1fr;
  }

  .field-block.full {
    grid-column: auto;
  }

  .secure-note {
    display: none;
  }
}