:root{
  --black:#111111;
  --white:#ffffff;
  --accent:#EACDB7;
  --soft:#FAF8F6;
  --line:#E6E6E6;
  --muted:#686868;
}

*{box-sizing:border-box}

html,body{
  margin:0;
  padding:0;
  background:var(--white);
  color:var(--black);
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

button,input{font:inherit}

.page{
  min-height:100vh;
  padding:32px 20px 56px;
}

.shell{
  width:min(1120px,100%);
  margin:0 auto;
}

.brand{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding-bottom:22px;
  border-bottom:1px solid var(--line);
}

.brand-mark{
  font-size:20px;
  font-weight:700;
  letter-spacing:.08em;
}

.brand span{
  color:var(--muted);
  font-size:13px;
}

.checkout-grid{
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(340px,.85fr);
  gap:34px;
  margin-top:34px;
}

.panel,.summary{
  border:1px solid var(--line);
  background:var(--white);
}

.panel{padding:30px}

.summary{
  align-self:start;
  padding:26px;
  background:var(--soft);
  position:sticky;
  top:24px;
}

.eyebrow{
  margin:0 0 10px;
  font-size:11px;
  font-weight:700;
  letter-spacing:.12em;
  text-transform:uppercase;
}

h1{
  margin:0;
  font-size:38px;
  line-height:1.08;
  letter-spacing:-.035em;
}

.intro{
  max-width:620px;
  margin:14px 0 0;
  color:var(--muted);
  font-size:14px;
  line-height:1.65;
}

.field-group{margin-top:30px}

.field-group h2{
  margin:0 0 16px;
  font-size:18px;
}

label{
  display:grid;
  gap:7px;
  margin-bottom:14px;
  font-size:12px;
  font-weight:600;
}

input{
  width:100%;
  min-height:48px;
  padding:0 13px;
  border:1px solid #CFCFCF;
  border-radius:0;
  background:#fff;
  color:#111;
  outline:none;
}

input:focus{
  border-color:#111;
  box-shadow:0 0 0 1px #111;
}

input.invalid{border-color:#A33A3A}

.two-col{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.summary-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  padding-bottom:16px;
  border-bottom:1px solid var(--line);
}

.summary-head .eyebrow{margin-bottom:5px}

.summary-head strong{
  display:block;
  font-size:16px;
  font-weight:600;
}

.summary-head > span{
  color:var(--muted);
  font-size:12px;
  white-space:nowrap;
}

.order-items{display:grid}

.order-item,.empty-item{
  display:grid;
  grid-template-columns:76px minmax(0,1fr) auto;
  gap:14px;
  align-items:center;
  padding:16px 0;
  border-bottom:1px solid var(--line);
}

.empty-item{
  grid-template-columns:76px minmax(0,1fr);
}

.order-item-media,.image-placeholder{
  width:76px;
  height:76px;
  background:#EEEEEE;
}

.order-item-media{overflow:hidden}

.order-item-media img{
  width:100%;
  height:100%;
  display:block;
  object-fit:contain;
}

.image-placeholder{
  display:grid;
  place-items:center;
  color:#999;
  font-size:10px;
  font-weight:700;
  letter-spacing:.08em;
}

.order-item-copy strong,
.order-item-copy span,
.empty-item strong,
.empty-item span{
  display:block;
}

.order-item-copy strong,.empty-item strong{
  color:#111;
  font-size:13px;
  font-weight:600;
  line-height:1.4;
}

.order-item-copy span,.empty-item span{
  margin-top:4px;
  color:var(--muted);
  font-size:11px;
  line-height:1.4;
}

.order-item-price{
  color:#111;
  font-size:13px;
  font-weight:600;
  white-space:nowrap;
  text-align:right;
}

.payment-method-row{
  display:flex;
  justify-content:space-between;
  gap:16px;
  padding:16px 0;
  border-bottom:1px solid var(--line);
  color:#666;
  font-size:12px;
}

.payment-method-row strong{
  color:#111;
  text-align:right;
  font-weight:600;
}

.totals{
  display:grid;
  gap:10px;
  padding:20px 0;
}

.totals > div{
  display:flex;
  justify-content:space-between;
  gap:18px;
  color:#555;
  font-size:13px;
}

.totals strong{
  color:#111;
  font-weight:600;
}

.totals .pay-now{
  margin-top:4px;
  padding-top:14px;
  border-top:1px solid var(--line);
  align-items:baseline;
}

.totals .pay-now span{
  color:#111;
  font-weight:600;
}

.totals .pay-now strong{font-size:22px}

.summary button{
  width:100%;
  min-height:52px;
  padding:10px 16px;
  border:1px solid var(--black);
  border-radius:0;
  background:var(--black);
  color:var(--white);
  font-size:13px;
  font-weight:600;
  cursor:pointer;
}

.summary button:disabled{
  opacity:.45;
  cursor:not-allowed;
}

.summary small{
  display:block;
  margin-top:10px;
  color:var(--muted);
  font-size:11px;
  line-height:1.45;
  text-align:center;
}

.toast{
  position:fixed;
  left:50%;
  bottom:26px;
  z-index:100;
  max-width:calc(100% - 30px);
  padding:11px 15px;
  border-radius:999px;
  background:#111;
  color:#fff;
  font-size:12px;
  text-align:center;
  transform:translate(-50%,16px);
  opacity:0;
  visibility:hidden;
  transition:.2s ease;
}

.toast.show{
  transform:translate(-50%,0);
  opacity:1;
  visibility:visible;
}

@media(max-width:820px){
  .page{padding:20px 14px 40px}
  .checkout-grid{grid-template-columns:1fr;gap:18px}
  .panel,.summary{padding:20px}
  .summary{position:static}
  h1{font-size:30px}
}

@media(max-width:520px){
  .two-col{grid-template-columns:1fr}
  .brand{align-items:flex-start;flex-direction:column}
  .order-item{grid-template-columns:64px minmax(0,1fr);gap:11px}
  .order-item-media,.image-placeholder{width:64px;height:64px}
  .order-item-price{grid-column:2;text-align:left}
}
