/* Checkout: nav hidden (logo + Back to bag only), one page, guest-first */
.hdr-links, .hdr-menu, .hdr-cart, .hdr-icon { display: none !important; }
html { scroll-padding-bottom: 140px; } /* keep focused fields clear of the sticky Place order bar */
@media (min-width: 900px) { html { scroll-padding-bottom: 24px; } }

/* "Back to bag" sits in the header bar (the header partial is shared, so it lives in main) */
.co-back { position: fixed; z-index: 41; top: 0; right: max(calc(var(--gutter) - 8px), calc((100% - 1320px) / 2)); height: var(--hdr-h); display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; font-weight: 600; font-size: 15px; }
.co-back .i { width: 18px; height: 18px; }
.co-back:hover { color: var(--slime); }
.co-back:focus-visible { outline-offset: -6px; }

.co-wrap { padding-block: 24px 48px; }
@media (min-width: 900px) { .co-wrap { padding-block: 40px 64px; } }
.co-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.co-steps { list-style: none; display: flex; gap: 8px; color: var(--muted); }
.co-steps li { display: flex; align-items: center; gap: 8px; }
.co-steps li + li::before { content: ""; width: 16px; height: 1px; background: var(--line-2); }
.co-steps a { text-decoration: underline; text-underline-offset: 3px; display: inline-flex; min-height: 24px; align-items: center; }
.co-steps [aria-current] { color: var(--text); }
.co-demo { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1.5px dashed #ffe60088; background: #ffe6000d; font-size: 15px; }
.co-demo .i { width: 20px; height: 20px; color: var(--yellow); margin-top: 1px; }

.co-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 48px 0; }

/* grid: phones = summary bar on top, then form. Desktop = form left, sticky summary right. */
.co-grid { display: grid; gap: 24px; align-items: start; }
@media (min-width: 900px) {
  .co-grid { grid-template-columns: minmax(0, 1fr) 380px; gap: 56px; }
  .co-sum { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--hdr-h) + 24px); }
  .co-main { grid-column: 1; grid-row: 1; }
}

/* summary */
.co-sum { background: var(--s2); border: 1px solid var(--line); border-radius: 16px; }
.co-sum-bar { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 8px 16px; cursor: pointer; font-weight: 600; }
.co-sum-bar::-webkit-details-marker { display: none; }
.co-sum-bar b { font-size: 18px; }
.co-chev { width: 18px; height: 18px; transition: transform var(--d-hover) var(--ease-out); }
.co-sum[open] .co-chev { transform: rotate(180deg); }
.co-sum-body { display: flex; flex-direction: column; gap: 16px; padding: 4px 16px 16px; }
.co-sum-title { display: none; }
@media (min-width: 900px) {
  .co-sum-bar { display: none; }
  .co-sum-title { display: block; }
  .co-sum-body { padding: 24px; }
}
.co-items { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.co-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; font-size: 15px; }
.co-item-thumb { position: relative; display: grid; place-items: center; width: 56px; height: 64px; border-radius: 10px; background: var(--s4); }
.co-item-thumb > :first-child { overflow: hidden; }
.co-item-q { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--text); color: #000; font: 600 12px/22px var(--mono); text-align: center; }
.co-item-name { display: flex; flex-direction: column; font-weight: 500; line-height: 1.3; }
.co-sum .sum dd { font-family: var(--mono); }
.co-sum .sum .tot dd { color: var(--yellow); }
.co-sum .arrow-link { align-self: flex-start; }

/* guest + express */
.co-main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.co-guest { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.co-guest .link { min-height: 44px; display: inline-flex; align-items: center; }
.co-express { display: flex; flex-direction: column; gap: 12px; }
.co-express-row { display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .co-express-row { grid-template-columns: repeat(3, 1fr); } }
.co-wallet { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 52px; padding: 6px 12px; border-radius: 12px; border: 2px dashed var(--field); background: var(--s2); color: var(--muted); cursor: not-allowed; line-height: 1.2; }
.co-wallet-name { font-weight: 600; color: var(--text); }
.co-wallet-note { font: 500 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.co-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.co-or::before, .co-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* form */
.co-form { display: flex; flex-direction: column; gap: 32px; }
.co-fs { border: 0; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.co-fs legend { margin-bottom: 16px; padding: 0; }
.co-fs + .co-fs { padding-top: 32px; border-top: 1px solid var(--line); }
.co-row3 { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.co-row3 .co-city { grid-column: 1 / -1; }
@media (min-width: 560px) { .co-row3 { grid-template-columns: 1.4fr 1fr 1fr; } .co-row3 .co-city { grid-column: auto; } }
.co-row2 { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.co-form .err { display: flex; gap: 6px; align-items: flex-start; font-size: 14px; }
.co-form .err .i { width: 16px; height: 16px; margin-top: 2px; }
.co-consent { padding: 14px; border-radius: 12px; background: var(--s2); border: 1px solid var(--line); }
.co-consent .link { font-weight: 500; }

.co-radio { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; min-height: 64px; padding: 14px 16px; border-radius: 12px; border: 2px solid var(--slime); background: var(--s2); cursor: pointer; }
.co-radio input { width: 20px; height: 20px; }
.co-radio-body { display: flex; flex-direction: column; }

.co-nopay { display: flex; gap: 12px; padding: 16px; border-radius: 12px; border: 1.5px dashed #ffe60088; background: #ffe6000d; }
.co-nopay .i { color: var(--yellow); margin-top: 2px; }
.co-nopay p + p { margin-top: 4px; }
.co-card { display: flex; flex-direction: column; gap: 16px; opacity: .6; }
.co-card .input:disabled { cursor: not-allowed; border-style: dashed; }
.co-card .check { cursor: not-allowed; }

/* errors */
.co-errors { padding: 16px 18px; border-radius: 12px; border: 2px solid var(--danger); background: #ff7a8a14; }
.co-errors:focus-visible { outline-offset: 4px; }
.co-errors ul { margin-top: 8px; padding-left: 1.2em; display: flex; flex-direction: column; gap: 4px; }
.co-errors a { color: var(--danger); text-decoration: underline; text-underline-offset: 3px; display: inline-block; padding-block: 4px; }

/* Place order: sticky bar on phones, inline on desktop */
.co-place { margin-inline: calc(var(--gutter) * -1); }
.co-place-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.co-place-tot { display: flex; flex-direction: column; line-height: 1.25; font-size: 13px; flex: none; }
.co-place-tot b { font-size: 20px; color: var(--yellow); }
.co-place .btn { flex: 1; max-width: 300px; padding-inline: 16px; }
@media (min-width: 900px) {
  .co-place { position: static; margin: 0; padding: 20px 0 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; border: 0; border-top: 1px solid var(--line); }
  .co-place .btn { max-width: none; }
}
.co-after { margin-top: -16px; }
.co-after .link { font-weight: 500; }
