* { box-sizing: border-box; }

:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1c2430;
  background: #f4f6f8;
}

body {
  margin: 0;
  min-height: 100vh;
}

button, input, select {
  font: inherit;
}

.page-shell {
  width: min(1100px, calc(100% - 32px));
  margin: 40px auto;
  display: grid;
  grid-template-columns: 1.1fr 1.6fr 0.9fr;
  gap: 20px;
  align-items: start;
}

.card {
  background: white;
  border: 1px solid #d9dee5;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 5px 18px rgba(31, 42, 55, 0.06);
}

.product-card {
  position: sticky;
  top: 24px;
}

.product-placeholder {
  height: 210px;
  display: grid;
  place-items: center;
  background: #e8edf2;
  border-radius: 10px;
  margin-bottom: 18px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #657284;
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: .1em;
  color: #687588;
}

h1, h2 {
  margin-top: 0;
}

h1 { margin-bottom: 8px; }
h2 { font-size: 19px; margin-bottom: 20px; }

.muted, .hint {
  color: #6d7888;
}

.price {
  font-weight: 800;
  font-size: 26px;
}

.field {
  margin-bottom: 20px;
}

.field label,
.field-label,
legend {
  display: block;
  font-weight: 650;
  margin-bottom: 8px;
}

input[type="text"],
select {
  width: 100%;
  height: 42px;
  border: 1px solid #bdc5d0;
  border-radius: 8px;
  padding: 0 11px;
  background: #fff;
}

/* Intentional UI issue: focus state exists but is very subtle */
input[type="text"]:focus,
select:focus,
button:focus {
  outline: none;
  border-color: #c8d0da;
  box-shadow: 0 0 0 1px rgba(200, 208, 218, 0.45);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}


.inline {
  display: flex;
  gap: 8px;
}

.inline input {
  flex: 1;
}


.quantity-control {
  display: grid;
  grid-template-columns: 42px 70px 42px;
  gap: 6px;
}

.quantity-control button,
.size-btn,
.secondary {
  border: 1px solid #bdc5d0;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
}

.quantity-control input {
  text-align: center;
}

.hint, .message, .error, .success {
  margin: 7px 0 0;
  font-size: 13px;
  min-height: 18px;
}

.error { color: #b3261e; }
.success { color: #15763a; }

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

.size-btn {
  height: 42px;
}

/* Intentional UI issue: selected state is too subtle */
.size-btn.selected {
  background: #f1f4f7;
  color: #1c2430;
  border-color: #cfd6df;
}

fieldset {
  border: 0;
  padding: 0;
}

.radio-row,
.terms-row {
  display: grid !important;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-weight: 400 !important;
}

.terms-row {
  grid-template-columns: auto 1fr;
}

.summary-card {
  position: sticky;
  top: 24px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
}

.summary-row strong {
  font-weight: 650;
}

.total-row {
  border-top: 1px solid #d9dee5;
  margin-top: 8px;
  padding-top: 16px;
  font-size: 19px;
}

.total-row strong {
  font-weight: 800;
}

.primary {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 9px;
  background: #1f2a38;
  color: white;
  font-weight: 750;
  cursor: pointer;
  margin-top: 18px;
}

.secondary {
  padding: 0 16px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #1f2a38;
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(10px);
  transition: .15s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .product-card, .summary-card {
    position: static;
  }
}

@media (max-width: 560px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 16px;
  }

  .summary-row { padding: 8px 0; }
}
