/* ==========================================================================
   Cart + on-site checkout (slug: checkout)
   Self-contained on purpose: this file used to @import page-shop.css, but a bare
   CSS @import carries no cache-busting query, so browsers served a stale copy
   after theme updates. Everything the checkout page needs now lives here and is
   cache-busted by file mtime like every other enqueued stylesheet.
   Scoped under .ac-course, tokens declared on the wrapper (same isolation
   pattern as the course detail pages).
   ========================================================================== */

.ac-course{
  --cream:#FAF6F1; --cream-deep:#F2EBE0; --sand:#F0E9DE; --paper:#FFFFFF;
  --gold:#C4A882; --gold-deep:#8A6E32; --gold-light:#D9C4A3;
  --sage:#7D8F76; --sage-deep:#5E6E57;
  --ink:#2A2520; --text:#3E372F; --muted:#8A8177; --border:#E7DECF;
  --shadow:24px 24px 60px rgba(120,96,54,.10); --lift:0 20px 44px rgba(120,96,54,.17);
  --serif:'Cormorant Garamond',Georgia,serif;
  --sans:'Raleway','Helvetica Neue',Arial,sans-serif;

  box-sizing:border-box;
  background:var(--cream); color:var(--text);
  font-family:var(--sans); font-weight:300; line-height:1.75;
  -webkit-font-smoothing:antialiased;
}
.ac-course *, .ac-course *::before, .ac-course *::after{ box-sizing:border-box; }
.ac-course em{ font-style:italic; }

/* ---- shared primitives ---- */
.ac-course .wrap{ max-width:1080px; margin:0 auto; padding:0 24px; }
.ac-course .ac-eyebrow{ font-family:var(--sans); font-size:10.5px; font-weight:600; letter-spacing:.30em; text-transform:uppercase; color:var(--gold-deep); display:block; }
.ac-course h1, .ac-course h2, .ac-course h3{ font-family:var(--serif); font-weight:300; color:var(--ink); text-wrap:balance; margin:0; }
.ac-course p{ max-width:64ch; }
.ac-course .blk{ padding:72px 0; }
.ac-course .ac-btn{ display:inline-block; font-family:var(--sans); font-size:12.5px; font-weight:600; letter-spacing:.14em; text-transform:uppercase; color:#FBF8F3; background:var(--gold); border:1px solid var(--gold); border-radius:100px; padding:16px 34px; text-decoration:none; cursor:pointer; transition:all .3s ease; }
.ac-course .ac-btn:hover{ background:var(--sage); border-color:var(--sage); transform:translateY(-2px); box-shadow:0 14px 34px rgba(125,143,118,.34); }
.ac-course .ac-btn:focus-visible{ outline:2px solid var(--gold-deep); outline-offset:3px; }

/* ---- cart + on-site checkout ---- */
.ac-checkout .blk{ padding:36px 0 56px; }
.ac-checkout .co-wrap{ max-width:1180px; }
.ac-checkout h1{ font-size:clamp(1.8rem,2.8vw,2.35rem); line-height:1.06; margin:8px 0 2px; }
.ac-checkout .co-sub{ font-size:15px; color:var(--muted); margin:0 0 22px; max-width:52ch; }

/* two-column: order summary (left) beside the embedded payment form (right) */
.ac-checkout .co-layout{ display:grid; grid-template-columns:0.9fr 1.1fr; gap:44px; align-items:start; margin-top:18px; }
.ac-checkout .co-summary{ background:var(--paper); border:1px solid var(--border); border-radius:18px; padding:26px 26px; box-shadow:var(--shadow); position:sticky; top:80px; }
.ac-checkout .co-summary > .ac-eyebrow{ margin-bottom:6px; }

/* one block per programme in the cart */
.ac-checkout .co-item{ padding:18px 0; border-bottom:1px solid var(--border); }
.ac-checkout .co-item:last-child{ border-bottom:none; padding-bottom:2px; }
.ac-checkout .co-item-name{ font-family:var(--serif); font-weight:400; font-size:1.4rem; line-height:1.15; color:var(--ink); margin:0 0 5px; }
.ac-checkout .co-item-detail{ font-size:13px; line-height:1.6; color:var(--muted); margin:0 0 12px; max-width:none; }
.ac-checkout .co-item-foot{ display:flex; align-items:baseline; justify-content:space-between; gap:14px; }
.ac-checkout .co-item-price{ font-family:var(--serif); font-size:1.45rem; color:var(--ink); line-height:1; }
.ac-checkout .co-item-remove{ flex:none; background:none; border:none; padding:0 0 2px; font-family:var(--sans); font-size:11px; font-weight:600; letter-spacing:.14em; text-transform:uppercase; color:var(--muted); border-bottom:1px solid var(--border); cursor:pointer; transition:color .2s ease, border-color .2s ease; }
.ac-checkout .co-item-remove:hover{ color:var(--gold-deep); border-color:var(--gold-deep); }

/* payment column */
.ac-checkout .co-pay > .ac-eyebrow{ margin-bottom:8px; }
.ac-checkout .co-pay h2{ font-size:1.5rem; line-height:1.14; margin:0 0 8px; }
.ac-checkout #checkout{ margin-top:14px; min-height:320px; }
.ac-checkout .co-loading{ padding:64px 0; text-align:center; color:var(--muted); font-size:14px; }

/* centered states: empty cart, thank-you, error */
.ac-checkout .co-centered{ text-align:center; max-width:620px; margin:0 auto; }
.ac-checkout .co-centered .ac-eyebrow{ display:inline-block; }
.ac-checkout .co-centered h1{ font-size:clamp(2rem,4vw,2.8rem); line-height:1.08; margin:14px 0 12px; }
.ac-checkout .co-centered .co-sub{ margin:0 auto 26px; }
.ac-checkout .co-tick{ width:64px; height:64px; border-radius:50%; background:var(--sage); color:#FBF8F3; font-size:30px; line-height:64px; text-align:center; margin:0 auto 20px; }

@media (max-width:760px){
  .ac-checkout .co-layout{ grid-template-columns:1fr; gap:24px; }
  .ac-checkout .co-summary{ position:static; }
}
