/* Cart and checkout on one page (views/checkout/index.phtml: .ck) and order confirmation (success.phtml: .ok) */
.page-main:has(.ck), .page-main:has(.ok) { max-width: 128rem; }

/* ——— Header: back to cart, title, steps ——— */
.ck-head { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 2.4rem; padding: 3.2rem 0 2.4rem; }
.ck-head h1 { margin: 0; font-size: clamp(2.56rem, 4vw, 3.36rem); font-weight: 800; letter-spacing: -.025em; }
.ck-back, .ck-back:visited { display: inline-flex; align-items: center; gap: .64rem; order: -1; flex-basis: 100%; color: var(--muted); font-size: 1.36rem; font-weight: 600; text-decoration: none; }
.ck-back svg { width: 1.6rem; height: 1.6rem; transform: rotate(180deg); transition: transform .2s; }
.ck-back:hover { color: var(--ink); text-decoration: none; }
.ck-back:hover svg { transform: rotate(180deg) translateX(3px); }
.ck-steps { display: flex; align-items: center; gap: .8rem; margin: 0 0 0 auto; padding: 0; list-style: none; color: var(--muted); font-size: 1.36rem; }
.ck-steps li { display: flex; align-items: center; gap: .64rem; margin: 0; }
.ck-steps li + li::before { content: ""; width: 2.4rem; height: 1px; margin-right: .16rem; background: var(--line); }
.ck-steps .n { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border: 1px solid var(--line); border-radius: 99px; font-size: 1.2rem; font-weight: 700; }
.ck-steps [aria-current] { color: var(--ink); font-weight: 650; }
.ck-steps [aria-current] .n { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }

/* ——— Grid: steps on the left, sticky summary on the right ——— */
.ck-grid { display: grid; grid-template-columns: minmax(0, 1fr) 40rem; align-items: start; gap: 2.4rem; padding-bottom: 4rem; }
.ck-main { display: grid; gap: 1.6rem; min-width: 0; }
.ck-card { padding: 2.4rem; border: 1px solid var(--line); border-radius: calc(var(--r) * 1.2); background: var(--surface); }
.ck-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; margin: 0 0 2rem; }
.ck-card-head h2 { margin: 0; font-size: 2rem; font-weight: 800; letter-spacing: -.015em; }
.ck-num { display: grid; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: 1rem; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); font-size: 1.52rem; font-weight: 800; transform: rotate(-6deg); }
.ck-email, .ck-secure { display: inline-flex; align-items: center; gap: .56rem; margin-left: auto; color: var(--muted); font-size: 1.32rem; }
.ck-email svg, .ck-secure svg { width: 1.6rem; height: 1.6rem; flex: none; }
.ck-secure svg { color: var(--ok); }
.ck-hint { margin: 0 0 1.6rem; color: var(--muted); font-size: 1.36rem; }

/* Fields */
.ck-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); gap: 0 1.6rem; }
.ck-row-city { grid-template-columns: 14rem minmax(0, 1fr) minmax(0, 1fr); }
.ck-fld { display: block; margin: 0 0 1.6rem; }
/* Sales to professionals only: the box to confirm it, below the billing address */
.ck-pro { display: flex; align-items: flex-start; gap: .8rem; margin: 1.6rem 0 0; font-size: 1.44rem; line-height: 1.45; cursor: pointer; }
.ck-pro input { flex: none; width: 1.8rem; height: 1.8rem; margin: .1rem 0 0; accent-color: var(--accent); }
/* Known address: a few lines and « Change », which unfolds the fields (zeste.js); without JS, the fields */
.ck-known { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.6rem; padding: 1.6rem 1.8rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); }
.ck-known p { margin: 0; color: var(--muted); font-size: 1.44rem; line-height: 1.6; }
.ck-known strong { color: var(--ink); }
.ck-change { display: inline-flex; align-items: center; gap: .64rem; height: 3.6rem; padding: 0 1.4rem; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--ink); font: 600 1.36rem/1 var(--font); cursor: pointer; transition: border-color .2s; }
.ck-change:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.ck-change svg { width: 1.6rem; height: 1.6rem; }
.ck-known[hidden] { display: none; }
.ck-fld[hidden] { display: none; }
.ck-fld > span { display: block; margin: 0 0 .56rem; color: var(--ink); font-size: 1.36rem; font-weight: 600; }
.ck-fld small { color: var(--muted); font-size: 1.2rem; font-weight: 400; }
.ck :where(input[type="text"], select) { height: 4.8rem; }
.ck :where(input, select):hover:not(:focus) { border-color: color-mix(in srgb, var(--ink) 40%, var(--line)); }
.ck select { padding-right: 3.6rem; appearance: none; -webkit-appearance: none; cursor: pointer;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0a3aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 1.2rem center / 1.6rem; }
.ck-fields > .ck-row:last-child .ck-fld, .ck-fields > .ck-row:last-child { margin-bottom: 0; }

/* Payment methods: one card per method, the selected one edged with the accent */
.ck-methods { display: grid; gap: .8rem; }
.ck-method { position: relative; display: flex; align-items: center; gap: 1.44rem; padding: 1.6rem 1.8rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); cursor: pointer;
  transition: border-color .2s, background .2s, box-shadow .2s; }
.ck-method[hidden] { display: none; }
.ck-method:hover { border-color: color-mix(in srgb, var(--ink) 28%, var(--line)); }
.ck-method input { position: absolute; opacity: 0; pointer-events: none; }
.ck-radio { flex: none; width: 2rem; height: 2rem; border: 2px solid var(--line); border-radius: 99px; transition: border-color .2s, box-shadow .2s; }
.ck-method-ico { display: grid; place-items: center; flex: none; width: 4.4rem; height: 4.4rem; border-radius: 1.2rem; background: var(--surface2); color: var(--muted); transition: color .2s, background .2s; }
.ck-method-ico svg { width: 2.24rem; height: 2.24rem; stroke-width: 1.75; }
.ck-method-txt { min-width: 0; }
.ck-method-txt strong { display: block; font-size: 1.6rem; }
.ck-method-txt small { display: block; margin-top: .24rem; color: var(--muted); font-size: 1.32rem; line-height: 1.45; }
.ck-method:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--bg)); box-shadow: 0 0 0 1px var(--accent); }
.ck-method:has(input:checked) .ck-radio { border-color: var(--accent); box-shadow: inset 0 0 0 .4rem var(--bg), inset 0 0 0 1rem var(--accent); }
.ck-method:has(input:checked) .ck-method-ico { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-ink); }
.ck-method:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ——— Summary ——— */
.ck-side { position: sticky; top: 8.8rem; }
.ck-sum { padding: 2.4rem; overflow: hidden; border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line)); border-radius: calc(var(--r) * 1.2);
  background: radial-gradient(90% 40% at 100% 0, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%), var(--surface); }
.ck-sum-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 1.6rem; }
.ck-sum-head h2 { margin: 0; font-size: 2rem; font-weight: 800; }
.ck-sum-head a, .ck-sum-head a:visited { color: var(--accent-ink); font-size: 1.36rem; font-weight: 600; text-decoration: none; }
.ck-sum-head a:hover { text-decoration: underline; }
.ck-totals { display: grid; gap: .64rem; margin: 0 0 2rem; }
.ck-totals div { display: flex; justify-content: space-between; gap: 1.2rem; color: var(--muted); font-size: 1.4rem; }
.ck-totals dt, .ck-totals dd { margin: 0; font-weight: 400; }
.ck-totals dd { font-variant-numeric: tabular-nums; }
.ck-totals .is-total { align-items: baseline; margin-top: .48rem; color: var(--ink); }
.ck-totals .is-total dt { font-size: 1.6rem; font-weight: 700; }
.ck-totals .is-total dd { font-size: 2.56rem; font-weight: 800; letter-spacing: -.02em; }
.ck-terms { margin: 0 0 1.6rem; color: var(--muted); font-size: 1.28rem; line-height: 1.5; }
.ck-terms a { color: var(--ink); text-decoration: underline; text-underline-offset: .24rem; }

/* Button: the sign-in one (.go), full width */
.ck-go { position: relative; display: flex; align-items: center; justify-content: center; gap: .96rem; width: 100%; min-height: 5.6rem; margin: 0; padding: .8rem 1.6rem; overflow: hidden; border: 0; border-radius: 99px;
  background: var(--accent); color: var(--on-accent); font: 700 1.6rem/1.2 var(--font); cursor: pointer; box-shadow: 0 14px 30px -16px color-mix(in srgb, var(--accent) 90%, transparent);
  transition: transform .2s, filter .2s, box-shadow .2s; }
.ck-go svg { width: 1.92rem; height: 1.92rem; flex: none; }
.ck-go span { text-align: center; }
.ck-go::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / .28) 50%, transparent 70%); transform: translateX(-110%); transition: transform .6s; pointer-events: none; }
.ck-go:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 18px 36px -14px color-mix(in srgb, var(--accent) 90%, transparent); }
.ck-go:hover::after { transform: translateX(110%); }
.ck-go:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.ck-go[disabled] { transform: none; filter: none; opacity: .55; cursor: not-allowed; }
.ck-go[hidden], .ck-error[hidden] { display: none; }
.ck-error { margin: 1.2rem 0 0; color: var(--danger); font-size: 1.28rem; line-height: 1.5; }

/* Reassurance below the cart (views/partials/reassure.phtml) */
.ck-reassure { margin-top: 4rem; }
.ck-reassure .reassure { margin-block: 0; }

@media (max-width: 63.99rem) {
  .ck-grid { grid-template-columns: minmax(0, 1fr); }
  .ck-side { position: static; }
  .ck-steps { margin-left: 0; flex-basis: 100%; }
}
@media (max-width: 47.99rem) {
  .ck-head { padding-top: 2rem; }
  .ck-steps span:not(.n) { display: none; }
  .ck-steps [aria-current] span:not(.n) { display: inline; }
  .ck-card, .ck-sum { padding: 2rem 1.6rem; }
  .ck-email { flex-basis: 100%; margin-left: 4.4rem; }
  /* Postcode and city, the country below */
  .ck-row-city { grid-template-columns: 12rem minmax(0, 1fr); }
  .ck-row-city > :nth-child(3) { grid-column: 1 / -1; }
  .ck-method { padding: 1.4rem; gap: 1.2rem; }
  .ck-method-ico { display: none; }
}
@media print {
  .ck-back, .ck-go { display: none; }
}

/* ——— Order confirmation (views/checkout/success.phtml) ——— */
.ok { display: grid; grid-template-columns: minmax(0, 1fr) 40rem; align-items: start; gap: 2.4rem; padding: 4rem 0; }
.ok-card { position: relative; padding: 3.6rem; overflow: hidden; border: 1px solid color-mix(in srgb, var(--ok) 30%, var(--line)); border-radius: calc(var(--r) * 1.4);
  background: radial-gradient(80% 60% at 0 0, color-mix(in srgb, var(--ok) 12%, transparent), transparent 70%), var(--surface); animation: ck-pop .5s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes ck-pop { from { opacity: 0; transform: translateY(12px) scale(.99); } }
.ok-badge { display: grid; place-items: center; width: 6.4rem; height: 6.4rem; margin: 0 0 2rem; border-radius: 99px; background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); }
.ok-badge svg { width: 3.2rem; height: 3.2rem; stroke-width: 2.5; stroke-dasharray: 30; stroke-dashoffset: 30; animation: ck-draw .5s .25s ease-out forwards; }
@keyframes ck-draw { to { stroke-dashoffset: 0; } }
.ok-card h1 { margin: 0; font-size: clamp(2.8rem, 4.5vw, 4rem); font-weight: 800; line-height: 1.1; letter-spacing: -.03em; }
.ok-lead { margin: 1.2rem 0 0; color: var(--muted); font-size: 1.6rem; line-height: 1.5; }
.ok-lead strong { color: var(--ink); }
.ok-acts { display: flex; flex-wrap: wrap; gap: 1.2rem; margin: 2.8rem 0 0; }
.ok-acts a { display: inline-flex; align-items: center; gap: .8rem; height: 4.8rem; padding: 0 2.4rem; border-radius: 99px; font-size: 1.52rem; font-weight: 700; text-decoration: none; }
.ok-acts a svg { width: 1.76rem; height: 1.76rem; }
.ok-acts .is-main, .ok-acts .is-main:visited { background: var(--accent); color: var(--on-accent); }
.ok-acts .is-main:hover { filter: brightness(1.05); color: var(--on-accent); text-decoration: none; }
.ok-acts .is-alt, .ok-acts .is-alt:visited { border: 1px solid var(--line); color: var(--ink); }
.ok-acts .is-alt:hover { border-color: var(--accent); color: var(--ink); text-decoration: none; }
@media (max-width: 63.99rem) {
  .ok { grid-template-columns: minmax(0, 1fr); padding-top: 2.4rem; }
}
@media (max-width: 47.99rem) {
  .ok-card { padding: 2.8rem 2rem; }
  .ok-acts a { flex: 1 1 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .ok-card { animation: none; }
  .ok-badge svg { animation: none; stroke-dashoffset: 0; }
}

/* Zeste: cart and checkout on one page — sign-in links in the method style (the lines of the summary: zeste.css) */
a.ck-method, a.ck-method:visited { color: var(--ink); text-decoration: none; }
a.ck-go, a.ck-go:visited, a.ck-go:hover { display: flex; align-items: center; justify-content: center; color: var(--on-accent); text-decoration: none; }
.ck-error p { margin: 0; }

/* ——— Empty cart (views/checkout/empty.phtml): a card, then the selection of the theme ——— */
.cart-empty { padding-top: 3.2rem; }
.cart-empty-head { display: flex; flex-wrap: wrap; align-items: center; gap: 1.6rem 2rem; padding: 2.4rem; border: 1px solid var(--line); border-radius: var(--r);
  background: radial-gradient(90% 120% at 0 0, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%), var(--surface); }
.cart-empty-ico { display: grid; place-items: center; flex: none; width: 5.6rem; height: 5.6rem; border-radius: 1.44rem; color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 14%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent); transform: rotate(-6deg); }
.cart-empty-ico svg { width: 2.8rem; height: 2.8rem; stroke-width: 1.75; }
.cart-empty-head > div { flex: 1 1 28rem; }
.cart-empty-head h2 { font-size: 2.24rem; font-weight: 800; letter-spacing: -.015em; }
.cart-empty-head p { margin: .32rem 0 0; color: var(--muted); font-size: 1.44rem; }
.cart-empty-all, .cart-empty-all:visited { display: inline-flex; align-items: center; gap: .8rem; height: 4.4rem; padding: 0 2rem; border: 1px solid var(--line); border-radius: 99px; color: var(--ink); font-size: 1.44rem; font-weight: 600; text-decoration: none; transition: border-color .2s; }
.cart-empty-all:hover { border-color: var(--accent); color: var(--ink); text-decoration: none; }
.cart-empty-all svg { width: 1.6rem; height: 1.6rem; transition: transform .2s; }
.cart-empty-all:hover svg { transform: translateX(3px); }

@media (max-width: 47.99rem) {
  .cart-empty-head { padding: 2rem; }
  .cart-empty-all { width: 100%; justify-content: center; }
}
