/* Tutto Print Design: the checkout page (2026-12-03). Loaded only by /checkout.html, after styles.css, whose tokens it uses.
   One calm page: a plain bar on top (logo, back to cart, who handles the payment, phone), the steps on the left, the order
   summary on the right. On a phone the summary is a fold-down bar above the steps. */
.co-body { background: var(--page); min-height: 100vh; display: flex; flex-direction: column; }
.co-body main { flex: 1; }

/* the bar: no menu */
.co-hdr { background: var(--card); border-bottom: 1px solid var(--line); }
.co-bar { display: flex; align-items: center; gap: 0.5rem 1.5rem; min-height: 64px; flex-wrap: wrap; padding-block: 0.4rem; }
.co-bar .logo img { height: 34px; width: auto; display: block; }
.co-back { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; font-weight: 600; font-size: var(--t-s); color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.co-back::before { content: "←"; text-decoration: none; display: inline-block; }
.co-secure { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0 0 0 auto; font-size: var(--t-s); font-weight: 600; color: var(--ink-2); }
.co-help { display: inline-flex; align-items: center; gap: 0.25rem 1rem; margin: 0; font-size: var(--t-s); flex-wrap: wrap; }
.co-help a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 600; }
.co-help .lang-switch { padding-inline: 0; }

.co > .wrap { padding-block: clamp(1.5rem, 4vw, 3rem) clamp(3rem, 7vw, 5rem); }
.co h1 { font-size: var(--t-4); margin-bottom: clamp(1.25rem, 3vw, 2rem); }

/* the steps on the left, the summary on the right */
.co-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.co-form { grid-column: 1; grid-row: 1; display: grid; gap: 1.5rem; min-width: 0; }
.co-sum { grid-column: 2; grid-row: 1; position: sticky; top: 1.5rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); padding: clamp(1.25rem, 2.5vw, 1.75rem); }

.co-step { margin: 0; padding: clamp(1.25rem, 2.5vw, 1.75rem); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--card); display: grid; gap: 1rem; min-width: 0; }
.co-step legend { float: left; width: 100%; padding: 0; margin-bottom: 0.25rem; display: flex; align-items: center; gap: 0.65rem; font-family: var(--display); font-weight: 600; font-size: var(--t-2); letter-spacing: -0.02em; }
.co-step legend + * { clear: both; }
.co-n { display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--ink); color: var(--card); font-size: var(--t-s); letter-spacing: 0; }

/* fields: a label above, a message below */
.co-f { display: grid; gap: 0.35rem; }
.co-f label, .co-card-l { font-weight: 600; font-size: var(--t-s); margin: 0; }
.co-f label small { font-weight: 400; color: var(--ink-2); margin-left: 0.35rem; }
.co-f input, .co-f textarea { width: 100%; min-height: 48px; padding: 0.65rem 0.85rem; border: 1px solid var(--field, #857b71); border-radius: var(--r-s); background: #fff; color: var(--ink); font: inherit; font-size: 1rem; }
.co-f textarea { min-height: 5.5rem; resize: vertical; }
.co-f input:focus-visible, .co-f textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.co-msg { margin: 0; font-size: var(--t-s); color: var(--ink-2); min-height: 0; }
.co-msg:empty { display: none; }
.co-err { color: var(--accent-deep); font-weight: 600; }
.co-f.is-bad input, .co-f.is-bad textarea { border-color: var(--accent-deep); box-shadow: 0 0 0 1px var(--accent-deep); }
.co-f.is-bad .co-hint { display: none; }

.co-pick { display: grid; gap: 0.15rem; padding: 1rem 1.1rem; border: 2px solid var(--ink); border-radius: var(--r-s); background: #fff; }
.co-pick b { font-family: var(--display); font-weight: 600; font-size: var(--t-1); }
.co-pick span { color: var(--ink-2); font-size: var(--t-s); }
/* pickup or ship (shop.json "shipping", 2026-12-04) */
.co-ways { display: grid; gap: 0.6rem; }
.co-way { display: flex; gap: 0.75rem; align-items: flex-start; padding: 1rem 1.1rem; border: 1px solid var(--field, #857b71); border-radius: var(--r-s); background: #fff; cursor: pointer; }
.co-way:has(input:checked) { border: 2px solid var(--ink); padding: calc(1rem - 1px) calc(1.1rem - 1px); }
.co-way input { width: 1.25rem; height: 1.25rem; margin: 0.15rem 0 0; accent-color: var(--ink); flex: none; }
.co-way span { display: grid; gap: 0.2rem; }
.co-way b { font-family: var(--display); font-weight: 600; font-size: var(--t-1); }
.co-way small { color: var(--ink-2); font-size: var(--t-s); line-height: 1.45; }
.co-addr { display: grid; gap: 1rem; }
.co-f select { width: 100%; min-height: 48px; padding: 0.65rem 0.85rem; border: 1px solid var(--field, #857b71); border-radius: var(--r-s); background: #fff; color: var(--ink); font: inherit; font-size: 1rem; }
.co-f select:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.co-ship-msg { color: var(--err, #b3261e); font-weight: 600; }
.co-step .fine { margin: 0; }

/* payment */
.co-wallets { display: grid; gap: 0.75rem; }
.co-apple { width: 100%; height: 48px; border: 0; border-radius: var(--r-s); cursor: pointer; -webkit-appearance: -apple-pay-button; -apple-pay-button-type: plain; -apple-pay-button-style: black; }
#google-pay-button { min-height: 48px; }
.co-or { display: flex; align-items: center; gap: 0.75rem; margin: 0.25rem 0; color: var(--ink-2); font-size: var(--t-s); }
.co-or::before, .co-or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.co-card { min-height: 92px; }
.co-card-note { display: flex; gap: 0.5rem; align-items: flex-start; }
.co-card-note svg { flex: none; margin-top: 0.15rem; }
.co-test { margin: 0; padding: 0.7rem 1rem; border-radius: var(--r-s); background: var(--ink); color: var(--card); font-weight: 600; }

.co-pay { width: 100%; min-height: 56px; font-size: var(--t-1); }
.co-pay[disabled] { opacity: 0.6; cursor: default; }
.co-proof { margin: 0; font-weight: 600; }
.co-form > .fine { margin: 0; }
.co-form > .fine a { color: inherit; }
.co-form .pay-error { margin: 0; }

/* the order summary */
.co-sum-d > summary { list-style: none; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-family: var(--display); font-weight: 600; font-size: var(--t-2); letter-spacing: -0.02em; cursor: default; }
.co-sum-d > summary::-webkit-details-marker { display: none; }
.co-sum-d > summary b { display: none; }
.co-lines { list-style: none; margin: 1rem 0; padding: 0; display: grid; gap: 0.9rem; border-bottom: 1px solid var(--line); padding-bottom: 1rem; }
.co-lines li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 0.85rem; align-items: start; }
.co-thumb.cart-thumb { width: 64px; height: 64px; }
.co-line { display: grid; gap: 0.15rem; min-width: 0; }
.co-line b { font-weight: 600; line-height: 1.3; }
.co-line small { color: var(--ink-2); font-size: var(--t-s); line-height: 1.4; overflow-wrap: anywhere; }
.co-price { font-weight: 600; white-space: nowrap; }
.co-sum .sum-row { padding: 0.2rem 0; }
.co-sum .sum-row.co-total { margin-top: 0.5rem; padding-top: 0.85rem; border-top: 1px solid var(--line); font-weight: 600; }

/* the WhatsApp path, an empty cart, a message */
.co-wa, .co-empty, .co-note { max-width: 44rem; padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--card); }
.co-wa h2 { font-size: var(--t-3); margin-bottom: 0.75rem; }
.co-wa p, .co-note p, .co-empty p { margin: 0 0 0.5rem; }
.co-note p { font-weight: 600; }
.co-wa :focus-visible, .co-note:focus-visible { outline-offset: 6px; }

.co-ftr { border-top: 1px solid var(--line); background: var(--card); font-size: var(--t-s); color: var(--ink-2); }
.co-ftr .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 2rem; padding-block: 0.75rem; align-items: center; }
.co-ftr nav { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.co-ftr a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; }

/* phone and small tablet: one column; the summary folds down from a bar above the steps */
@media (max-width: 899px) {
  .co-grid { grid-template-columns: minmax(0, 1fr); }
  .co-sum, .co-form { grid-column: 1; }
  .co-sum { grid-row: 1; position: static; padding: 0; }
  .co-form { grid-row: 2; }
  .co-sum-d > summary { min-height: 56px; padding: 0 1.1rem; align-items: center; cursor: pointer; font-size: var(--t-1); border-radius: var(--r-m); }
  .co-sum-d > summary span::after { content: ""; display: inline-block; width: 0.5em; height: 0.5em; margin-left: 0.6em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-0.2em) rotate(45deg); transition: transform 160ms var(--ease); }
  .co-sum-d[open] > summary span::after { transform: translateY(0.05em) rotate(-135deg); }
  .co-sum-d > summary b { display: inline; }
  .co-sum-d[open] > summary { border-bottom: 1px solid var(--line); border-radius: var(--r-m) var(--r-m) 0 0; }
  .co-sum-d > :not(summary) { margin-inline: 1.1rem; }
  .co-sum-d > .co-total { margin-bottom: 1rem; }
}
@media (max-width: 640px) {
  .co-bar { gap: 0 1rem; }
  .co-secure { margin-left: 0; order: 3; flex: 1 1 100%; min-height: 32px; }
  .co-help { margin-left: auto; gap: 0 0.85rem; }
  .co-step { padding: 1.1rem; }
  .co-wa .btn, .co-note .btn, .co-empty .btn { flex: 1 1 100%; white-space: normal; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .co-sum-d > summary span::after { transition: none; } }
/* preview card box (shop.json preview_checkout): drawn like Square's, not a real field */
.co-mock { display: grid; grid-template-columns: 2fr 1fr .8fr 1fr; gap: 0; border: 1px solid var(--line-2, #cfcfcf); border-radius: 8px; overflow: hidden; background: #fff; }
.co-mock-f { padding: 14px 12px; color: #8a8a8a; font-size: 15px; border-left: 1px solid var(--line, #e5e5e5); }
.co-mock-f:first-child { border-left: 0; }
@media (max-width: 560px) { .co-mock { grid-template-columns: 1fr 1fr 1fr; } .co-mock-n { grid-column: 1 / -1; border-bottom: 1px solid var(--line, #e5e5e5); } .co-mock-n + .co-mock-f { border-left: 0; } }

/* rush (2026-12-04) */
.co-rush { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--r-m); margin: 0 0 14px; cursor: pointer; min-height: 44px; }
.co-rush:has(input:checked) { border-color: var(--accent); background: var(--accent-wash); }
.co-rush:has(input:disabled) { opacity: .6; cursor: default; }
.co-rush input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.co-rush span { display: flex; flex-direction: column; gap: 2px; }
.co-rush small { color: var(--ink-2, #5a5048); }
