:root {
  --text: #30313d;
  --muted: #737580;
  --border: #e6e7eb;
  --accent: #635bff;
  --focus: rgba(99, 91, 255, .18);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: #fff;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-block: 24px; }
body.checkout { margin: 0; font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, a, .size-options label { touch-action: manipulation; }
.size-options label, .mobile-order-toggle, .pay-now-button { -webkit-user-select: none; user-select: none; }
[hidden] { display: none !important; }

header { height: 80px; border-bottom: 1px solid var(--border); }
.checkout-logo-parent {
  max-width: 1056px;
  height: 100%;
  padding: 0 32px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.checkout-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 16px; }
.brand-icon { display: grid; place-items: center; width: 30px; height: 32px; border-radius: 7px; color: #625bb0; background: #f0effe; }
.brand-icon svg { width: 21px; height: 21px; }
.header-context { font-size: 12px; color: var(--muted); }

.checkout-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-width: 1056px; margin: auto; min-height: calc(100vh - 80px); }
.checkout-form { min-width: 0; }
.form-shell { padding: 40px 48px 48px 32px; }
.checkout-intro { margin-bottom: 32px; }
h1 { margin: 0 0 9px; font-size: 26px; font-weight: 600; letter-spacing: -.7px; }
.checkout-intro p { margin: 0; color: var(--muted); font-size: 13px; }
h2 { margin: 0 0 18px; font-size: 15px; font-weight: 600; letter-spacing: -.2px; }
.contact-section, .delivery-section, .uniform-section { margin: 0 0 30px; }
.contact-heading, .delivery-heading, .payment-heading { display: flex; align-items: center; justify-content: space-between; }
label, .size-picker legend { display: block; font-size: 12px; font-weight: 500; margin-bottom: 7px; }
input:not([type="radio"]), select {
  display: block;
  width: 100%;
  min-height: 42px;
  border: 1px solid #d6d8df;
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .035);
  transition: border-color .15s, box-shadow .15s;
  scroll-margin-block: 96px;
}
input::placeholder { color: #9a9ca6; opacity: 1; }
select { padding-right: 24px; }
input:not([type="radio"]):focus, select:focus { outline: none; border-color: #8d87ff; box-shadow: 0 0 0 3px var(--focus); }
button:focus-visible, a:focus-visible { outline: 3px solid #aaa5ff; outline-offset: 3px; }
.optional { font-weight: 400; color: var(--muted); }
.name-fields, .payment-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.location-fields { display: grid; grid-template-columns: 1.2fr 1fr .85fr; gap: 10px; }
.name-fields, .country-field, .address-field, .address-line2-field { margin-bottom: 16px; }
.field-wrapper { min-width: 0; }

.size-picker { border: 0; padding: 0; margin: 0; min-width: 0; }
.size-options { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.size-options label { margin: 0; position: relative; cursor: pointer; }
.size-options input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.size-options span { display: grid; place-items: center; min-height: 40px; background: #fff; border: 1px solid #d6d8df; border-radius: 6px; font-size: 12px; font-weight: 500; transition: background-color .12s, border-color .12s, box-shadow .12s; }
.size-options label:active span { background: #eceaff; }
.size-options input:checked + span { border-color: var(--accent); background: #f5f4ff; box-shadow: 0 0 0 1px var(--accent); color: #5147de; }
.size-options input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.embroidery-name-field { margin-top: 18px; }
.embroidery-name-field p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.payment-card-box { border: 1px solid #d6d8df; border-radius: 7px; overflow: hidden; box-shadow: 0 1px 2px rgba(0, 0, 0, .035); }
.payment-card-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 13px 15px; border-bottom: 1px solid var(--border); }
.payment-card-label { display: inline-flex; align-items: center; gap: 9px; flex-shrink: 0; font-size: 12px; font-weight: 500; }
.payment-card-label svg { width: 19px; height: 19px; color: #666575; }
.payment-card-logos { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.payment-card-logos img { display: block; width: 38px; height: 24px; border-radius: 3px; object-fit: contain; }
.payment-card-more { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 4px; border: 1px solid #d6d8df; border-radius: 3px; background: #fff; color: var(--muted); font-size: 10px; line-height: 1; }
.payment-card-fields { border: 0; padding: 16px; margin: 0; min-width: 0; background: #fcfcfd; }
.payment-card-fields > .checkout-input { margin-bottom: 14px; }
.payment-field-row + .checkout-input { margin-top: 14px; }
.payment-card-fields > .checkout-input:last-child { margin-bottom: 0; }
.payment-card-fields input:disabled { background: #f8f9fb; color: #9a9ca6; cursor: not-allowed; box-shadow: none; }
.payment-card-fields label { color: #70717e; }
.pay-now-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 13px 20px; min-height: 45px; border: 1px solid transparent; border-radius: 6px; background: var(--accent); box-shadow: 0 2px 4px rgba(45, 35, 130, .12); color: #fff; font-weight: 600; font-size: 13px; cursor: pointer; transition: background .15s; }
.pay-now-button:active:not(:disabled) { background: #4940d9; }
.payment-section > .pay-now-button { margin-top: 20px; }
.pay-now-button:disabled { opacity: .5; cursor: not-allowed; }
.pay-now-button span { font-size: 18px; font-weight: 400; }

.order-summary { min-width: 0; border-left: 1px solid var(--border); background: #fafafa; }
.summary-inner { padding: 44px 32px 40px 48px; position: sticky; top: 0; }
.summary-inner > h2 { font-size: 14px; margin-bottom: 28px; }
.summary-product { display: flex; gap: 14px; align-items: flex-start; }
.summary-product-image { display: grid; place-items: center; width: 64px; height: 68px; flex-shrink: 0; border: 1px solid #e7e5f1; border-radius: 8px; background: #f3f1fa; }
.summary-product-image svg { width: 46px; height: 46px; }
.summary-product-copy { flex: 1; min-width: 0; padding-top: 3px; }
.summary-product h3 { margin: 0 0 7px; font-size: 13px; font-weight: 600; }
.summary-product p { margin: 0 0 5px; font-size: 11px; color: var(--muted); }
.summary-product .summary-size { color: #77718f; }
.summary-product .summary-name { overflow-wrap: anywhere; }
.summary-product > strong { padding-top: 3px; font-weight: 500; font-size: 13px; }
.summary-totals { margin-top: 28px; border-top: 1px solid var(--border); padding-top: 23px; }
.summary-totals > div { display: flex; justify-content: space-between; align-items: center; gap: 14px; color: var(--muted); font-size: 12px; }
.summary-totals .summary-tax-row { margin-top: 12px; }
.summary-totals .summary-total-row { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 22px; font-size: 15px; font-weight: 500; color: var(--text); }
.summary-total-row strong { font-size: 22px; font-weight: 600; letter-spacing: -.6px; }
.summary-total-row small { color: var(--muted); font-size: 10px; font-weight: 400; margin-right: 6px; letter-spacing: 0; }
.summary-review { border-top: 1px solid var(--border); margin-top: 28px; padding-top: 22px; overflow-wrap: anywhere; }
.summary-review h3 { margin: 0 0 12px; font-size: 13px; font-weight: 600; }
.summary-review { scroll-margin-block: 24px; }
.summary-review p { margin: 0 0 6px; font-size: 12px; line-height: 1.6; color: var(--muted); }

.mobile-order-toggle { display: none; }
.mobile-order-toggle-copy { display: inline-flex; align-items: center; gap: 10px; }
.mobile-order-chevron { width: 6px; height: 6px; border-bottom: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (hover: hover) and (pointer: fine) {
  .size-options label:hover span { border-color: #aaa5ff; }
  .pay-now-button:hover:not(:disabled) { background: #554ce9; }
}
@media (max-width: 680px), (pointer: coarse) {
  .checkout-brand { min-height: 44px; }
  input:not([type="radio"]), select { min-height: 48px; font-size: 16px; }
  .size-options span { min-height: 48px; }
  .pay-now-button { min-height: 50px; }
}
@media (min-width: 1400px) {
  .form-shell { padding-top: 48px; }
  .summary-inner { padding-top: 52px; }
}
@media (max-width: 880px) {
  .form-shell { padding-right: 28px; }
  .summary-inner { padding-left: 28px; }
  .location-fields { grid-template-columns: 1fr 1fr; }
  .city-field { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  header { height: calc(68px + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px); }
  .checkout-logo-parent { padding: 0 22px; max-width: 540px; }
  .checkout-page { display: flex; flex-direction: column; max-width: 540px; min-height: calc(100vh - 121px); min-height: calc(100svh - 121px - env(safe-area-inset-top, 0px)); }
  .form-shell { padding: 28px 22px calc(40px + env(safe-area-inset-bottom, 0px)); }
  .checkout-intro { margin-bottom: 28px; }
  h1 { font-size: 24px; }
  .mobile-order-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 53px; padding: 15px 22px; border: 0; border-bottom: 1px solid var(--border); color: var(--accent); background: #fafafa; font-size: 12px; cursor: pointer; }
  .mobile-order-toggle strong { color: var(--text); font-weight: 600; }
  .mobile-order-toggle:active { background: #eeecff; }
  .order-summary { display: none; order: -1; border-left: 0; border-bottom: 1px solid var(--border); }
  body.summary-open .order-summary { display: block; }
  body.summary-open .mobile-order-chevron { transform: rotate(225deg); }
  .summary-inner { padding: 24px 22px; position: static; }
  .summary-inner > h2 { margin-bottom: 20px; }
  .contact-section, .delivery-section, .uniform-section { margin-bottom: 26px; }
  .location-fields { grid-template-columns: 1fr 1fr; }
  input:not([type="radio"]), select { font-size: 16px; }
  .size-options { gap: 7px; }
  .checkout-logo-parent, .form-shell, .summary-inner, .mobile-order-toggle { padding-left: max(22px, env(safe-area-inset-left, 0px)); padding-right: max(22px, env(safe-area-inset-right, 0px)); }
}
@media (max-width: 360px) {
  .size-options { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; animation: none !important; }
}
