:root {
  --accent: #4b2922; --text: #000; --muted: #707070; --border: #dedede;
  --subdued: #f5f5f5; --tint: #f8f4f3; --error: #dd1d1d; --r: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}
* { box-sizing: border-box; }
html, body { margin: 0; background: #fff; color: var(--text); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
button { font: inherit; }

/* header */
.top { border-bottom: 1px solid var(--border); background: #fff; }
.top .wrap { max-width: 1160px; margin: 0 auto; height: 72px; padding: 0 21px; display: flex; align-items: center; justify-content: center; position: relative; }
.logo img { display: block; width: 300px; max-width: 60vw; height: auto; }
.bag { position: absolute; right: 21px; color: var(--accent); display: flex; }

/* two columns */
.layout { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - 73px); }
.left { display: flex; justify-content: flex-end; }
.right { background: var(--subdued); border-left: 1px solid var(--border); }
.left .col { width: 100%; max-width: 580px; padding: 38px 38px 0 21px; }
.right .col { width: 100%; max-width: 480px; padding: 38px 21px 38px 38px; position: sticky; top: 0; }
.mbar, .mobile-summary { display: none; }

section { margin-bottom: 32px; }
.h { display: flex; justify-content: space-between; align-items: baseline; }
h2 { font-size: 21px; font-weight: 600; margin: 0 0 14px; letter-spacing: -.01em; }
h3 { font-size: 16px; font-weight: 600; margin: 0 0 12px; }
.sub { color: var(--muted); margin: -10px 0 14px; font-size: 14px; }

/* floating-label fields */
.field { position: relative; margin-bottom: 14px; flex: 1; min-width: 0; }
.field input, .field select {
  width: 100%; height: 48px; padding: 20px 12px 6px; font: 14px var(--font); color: var(--text);
  background: #fff; border: 1px solid var(--border); border-radius: var(--r); outline: none; appearance: none;
  transition: box-shadow .1s, border-color .1s;
}
.field input:placeholder-shown { padding: 13px 12px; }
.field label { position: absolute; left: 13px; top: 14px; color: var(--muted); font-size: 14px; pointer-events: none; transition: all .1s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; right: 12px; }
.field input:not(:placeholder-shown) + label, .field input:focus + label, .field.select label { top: 5px; font-size: 12px; }
.field input:focus:placeholder-shown { padding: 20px 12px 6px; }
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.field.select.empty label { display: none; }
.field.select.empty select { padding: 13px 12px; color: var(--muted); }
.field.select::after { content: ""; position: absolute; right: 14px; top: 20px; width: 7px; height: 7px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); pointer-events: none; }
.field.invalid input, .field.invalid select { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.err { color: var(--error); font-size: 12px; margin: 5px 0 0; }
.row { display: flex; gap: 14px; }

.check { display: flex; align-items: center; gap: 10px; cursor: pointer; margin: -2px 0 0; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }

.muted-box { background: var(--subdued); color: var(--muted); border-radius: var(--r); padding: 17px; text-align: center; font-size: 14px; }
.ship { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--accent); border-radius: var(--r); background: var(--tint); }
.ship b { margin-left: auto; font-weight: 600; }
.radio { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--border); flex: none; background: #fff; }
.radio.on { border: 6px solid var(--accent); }

.paybox { border: 1px solid var(--accent); border-radius: var(--r); overflow: hidden; }
.payhead { display: flex; align-items: center; gap: 12px; padding: 15px 16px; background: var(--tint); border-bottom: 1px solid var(--border); }
.paybody { background: var(--subdued); padding: 16px; min-height: 90px; }
.muted { color: var(--muted); margin: 0; }
.dim { color: var(--muted); }
.cards { margin-left: auto; display: flex; gap: 5px; }
.cards svg { width: 38px; height: 24px; display: block; }

.pay { display: flex; align-items: center; justify-content: center; width: 100%; height: 56px; border: 0; border-radius: var(--r); background: var(--accent); color: #fff; font-size: 17px; font-weight: 600; cursor: pointer; text-decoration: none; }
.pay:disabled { opacity: .7; cursor: default; }
.brand { margin: 16px 0 0; display: flex; justify-content: center; }
.alert { border: 1px solid var(--error); background: #fff4f4; color: #8e1f0b; border-radius: var(--r); padding: 12px 14px; margin-bottom: 16px; }

.links { border-top: 1px solid var(--border); margin-top: 48px; padding: 18px 0 40px; display: flex; flex-wrap: wrap; gap: 10px 14px; font-size: 13px; }
.links a { text-decoration: underline; }

/* order summary */
.line { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.thumb { position: relative; width: 64px; height: 64px; flex: none; border: 1px solid var(--border); border-radius: var(--r); background: #fff; }
.thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--r) - 1px); }
.qty { position: absolute; top: -9px; right: -9px; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 11px; background: #000; color: #fff; font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.lname { flex: 1; min-width: 0; }
.lname p { margin: 0; font-size: 14px; }
.lname small { color: var(--muted); font-size: 12px; }
.lprice { margin: 0; font-size: 14px; text-align: right; }
.lprice s { display: block; color: var(--muted); font-size: 12px; }
.totals { margin-top: 22px; }
.totals p { display: flex; justify-content: space-between; margin: 0 0 8px; }
.totals .grand { font-size: 19px; font-weight: 600; margin-top: 14px; align-items: baseline; }
.totals .grand small { color: var(--muted); font-size: 12px; font-weight: 400; margin-right: 4px; }

.spin { width: 22px; height: 22px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 20px auto; }
.spin.light { border-color: rgba(255,255,255,.35); border-top-color: #fff; margin: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.boot { min-height: 100vh; display: flex; align-items: center; }
.empty { max-width: 380px; margin: 18vh auto 0; padding: 0 16px; text-align: center; }
.empty img { width: 260px; max-width: 70vw; }
.empty p { color: var(--muted); margin: 28px 0; }

/* mobile: one column, collapsible summary bar */
@media (max-width: 999px) {
  .layout { display: block; min-height: 0; }
  .right { display: none; }
  .left { display: block; }
  .left .col { max-width: 580px; margin: 0 auto; padding: 22px 16px 0; }
  .top .wrap { height: 64px; padding: 0 16px; }
  .logo img { width: 210px; }
  .bag { right: 16px; }
  .mbar { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 18px max(16px, calc(50% - 274px)); background: var(--subdued); border: 0; border-bottom: 1px solid var(--border); color: var(--accent); cursor: pointer; font-size: 14px; }
  .mbar b { color: var(--text); font-size: 17px; }
  .mbar svg { margin-left: 6px; vertical-align: middle; transition: transform .2s; }
  .mbar svg.up { transform: rotate(180deg); }
  .mobile-summary { display: block; background: var(--subdued); }
  .mobile-summary .summary { display: none; max-width: 580px; margin: 0 auto; padding: 22px 16px 10px; border-bottom: 1px solid var(--border); }
  .mobile-summary .summary.open { display: block; }
  .row.three { flex-wrap: wrap; }
  .row.three .field:first-child { flex-basis: 100%; }
  .row { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: 2s !important; } }
