/* =========================================================
   Allifnon · checkout and thank-you pages
   Same language as the product page: white hairline cards, warm charcoal, slim buttons.
   ========================================================= */
.co-wrap{ --bb-btn-r:8px; }
.co-h1{
  font-family:"Playfair Display", var(--font-display); font-weight:500; letter-spacing:-.015em; color:var(--warm);
  font-size:clamp(34px, 3.4vw, 48px); line-height:1.08;
}
.co-h2{ font-family:var(--font-display); font-weight:600; font-size:calc(21px * var(--d-scale)); line-height:1.15; color:var(--ink); margin-bottom:14px; }

/* Steps */
.co-steps{ display:flex; flex-wrap:wrap; gap:8px 26px; list-style:none; margin:0 0 22px; padding:0; font-size:13px; color:var(--muted); }
.co-steps li{ display:flex; align-items:center; gap:8px; }
.co-steps span{
  width:22px; height:22px; display:grid; place-items:center; border-radius:6px; font-size:12px; font-weight:600;
  box-shadow:inset 0 0 0 1px rgba(19,19,17,.18); color:var(--ink-2);
}
.co-steps .done span{ background:var(--tag-bg); box-shadow:none; color:var(--tag-ink); }
.co-steps .now{ color:var(--ink); font-weight:600; }
.co-steps .now span{ background:var(--btn); box-shadow:none; color:#F7F6F2; }

/* Slim layout: a narrower form, a compact summary beside it */
.co-grid{
  display:grid; grid-template-columns:minmax(0, 520px) minmax(0, 380px); justify-content:start;
  gap:clamp(20px, 3vw, 40px); align-items:start; margin-top:clamp(18px, 3vh, 26px);
}
.co-card{ background:#FFFFFF; border-radius:10px; padding:20px 22px; box-shadow:0 0 0 1px rgba(19,19,17,.11); }
.co-card + .co-card{ margin-top:14px; }
.co-summary{ position:sticky; top:calc(var(--nav-h) + 20px); }

/* Form */
.co-field + .co-field{ margin-top:14px; }
.co-field label{ display:block; margin-bottom:5px; font-size:13px; font-weight:600; color:var(--ink); }
.co-opt{ font-weight:400; color:var(--muted); }
.co-field input, .co-field textarea{
  width:100%; height:42px; padding:0 12px; border:0; border-radius:7px; background:#FFFFFF;
  font:inherit; font-size:15px; color:var(--ink);
  box-shadow:inset 0 0 0 1px rgba(19,19,17,.18); transition: box-shadow .2s var(--ease);
}
.co-field textarea{ height:auto; min-height:64px; padding:10px 12px; resize:vertical; line-height:1.45; }
.co-field input::placeholder, .co-field textarea::placeholder{ color:#A8A49C; }
.co-field input:focus, .co-field textarea:focus{ outline:none; box-shadow:inset 0 0 0 1.5px var(--btn); }
.co-field input[aria-invalid="true"], .co-field select[aria-invalid="true"]{ box-shadow:inset 0 0 0 1.5px #9B3B2E; }

/* Billing address: country list and two fields side by side */
.co-field select{
  width:100%; height:42px; padding:0 36px 0 12px; border:0; border-radius:7px; background:#FFFFFF;
  font:inherit; font-size:15px; color:var(--ink); cursor:pointer; appearance:none; -webkit-appearance:none;
  box-shadow:inset 0 0 0 1px rgba(19,19,17,.18); transition: box-shadow .2s var(--ease);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236E6A63' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 13px center; background-size:12px 8px;
}
.co-field select:focus{ outline:none; box-shadow:inset 0 0 0 1.5px var(--btn); }
.co-field select:invalid{ color:#A8A49C; }
.co-field select option{ color:var(--ink); }
.co-row{ display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:14px; }
.co-row .co-field + .co-field{ margin-top:0; }
.co-field + .co-row{ margin-top:14px; }
.co-row + .co-field{ margin-top:14px; }

/* Payment method: one slim row per option, the chosen one outlined in charcoal */
.co-pay{ display:grid; gap:8px; }
.co-pay-opt{
  position:relative; display:flex; align-items:center; gap:12px; min-height:56px; padding:10px 14px; border-radius:8px; cursor:pointer;
  box-shadow:inset 0 0 0 1px rgba(19,19,17,.14); transition: box-shadow .2s var(--ease), background .2s var(--ease);
}
.co-pay-opt:hover{ box-shadow:inset 0 0 0 1px rgba(19,19,17,.3); }
.co-pay-opt input{ position:absolute; opacity:0; pointer-events:none; }
.co-pay-opt::after{
  content:""; order:3; margin-left:auto; flex:none; width:18px; height:18px; border-radius:50%;
  box-shadow:inset 0 0 0 1.5px rgba(19,19,17,.28); transition: box-shadow .2s var(--ease);
}
.co-pay-opt:has(input:checked){ background:#FBFAF8; box-shadow:inset 0 0 0 1.5px var(--btn); }
.co-pay-opt:has(input:checked)::after{ box-shadow:inset 0 0 0 5px var(--btn); }
.co-pay-opt:has(input:focus-visible){ outline:2px solid var(--btn); outline-offset:2px; }
.co-pay-icon{ flex:none; width:36px; height:36px; display:grid; place-items:center; border-radius:7px; background:var(--band); color:var(--warm); }
.co-pay-icon svg{ width:20px; height:20px; }
.co-pay-text{ display:grid; gap:1px; min-width:0; }
.co-pay-text b{ font-size:14.5px; font-weight:600; color:var(--ink); }
.co-pay-text small{ font-size:12.5px; color:var(--muted); }

/* Online payment (Polar): the accepted methods, a status line and the lock note */
.co-accept{ list-style:none; margin:0; padding:0; display:grid; gap:8px; }
.co-accept li{ display:flex; align-items:center; gap:12px; padding:10px 14px; border-radius:8px; box-shadow:inset 0 0 0 1px rgba(19,19,17,.11); }
.co-status{ font-size:13.5px; font-weight:500; color:var(--ink); text-align:center; }
.co-secure{ display:flex; align-items:center; justify-content:center; gap:6px; text-align:center; }
.co-secure svg{ flex:none; width:14px; height:14px; color:var(--muted); }
.co-actions .btn-main:disabled{ opacity:.6; cursor:progress; }
/* Thank-you page: products still to pay */
.ty-unpaid{ box-shadow:0 0 0 1.5px var(--btn); }
.ty-unpaid-list{ list-style:none; margin:0 0 14px; padding:0; display:grid; gap:6px; }
.ty-unpaid-list li{ display:flex; justify-content:space-between; gap:12px; font-size:15px; color:var(--ink-2); }
.ty-unpaid-list b{ color:var(--ink); font-variant-numeric:tabular-nums; }
.ty-unpaid .btn-main{ width:100%; height:48px; }
.ty-unpaid .co-status{ margin-top:10px; }
.ty-deliver .ty-buttons{ margin-top:16px; }

/* I agree tick box */
.co-terms{ display:flex; align-items:flex-start; gap:10px; font-size:13.5px; line-height:1.5; color:var(--ink-2); cursor:pointer; }
.co-terms input{ flex:none; width:18px; height:18px; margin:1px 0 0; accent-color:var(--btn); cursor:pointer; }
.co-terms a{ color:var(--ink); text-decoration:underline; text-underline-offset:3px; }
.co-actions .co-error{ margin-top:-4px; }
.co-help{ margin-top:5px; font-size:12.5px; color:var(--muted); }
.co-error{ margin-top:5px; font-size:12.5px; font-weight:500; color:#9B3B2E; }

/* How payment works: a small quiet note inside the details card */
.co-how{ display:flex; gap:10px; margin-top:16px; padding:12px 14px; border-radius:8px; background:var(--band); }
.co-how svg{ flex:none; width:17px; height:17px; margin-top:2px; color:var(--warm); }
.co-how p{ font-size:13.5px; line-height:1.5; color:var(--ink-2); }
.co-how b{ font-weight:600; color:var(--ink); }

.co-actions{ display:grid; gap:8px; margin-top:16px; }
.co-actions .btn-main, .co-actions .btn-line{ height:48px; font-size:15px; }
.co-fine{ font-size:12.5px; line-height:1.5; color:var(--muted); }

/* Summary */
.co-items{ list-style:none; margin:0; padding:0; }
.co-item{ display:grid; grid-template-columns:46px minmax(0, 1fr) auto; gap:12px; align-items:center; padding:10px 0; border-bottom:1px solid var(--line-soft); }
.co-item:first-child{ padding-top:0; }
.co-thumb{ position:relative; width:46px; aspect-ratio:4/5; border-radius:8px; overflow:hidden; background:var(--surface-2); display:grid; place-items:center; container-type:inline-size; }
.co-thumb .tilt{ box-shadow:0 2px 6px -2px rgba(19,19,17,.3); }
.co-item-name{ font-family:"Playfair Display", var(--font-display); font-weight:500; font-size:16px; line-height:1.2; color:var(--warm); }
.co-item-meta{ margin-top:2px; font-size:12.5px; color:var(--muted); }
.co-item-price{ font-weight:600; color:var(--ink); font-variant-numeric:tabular-nums; text-align:right; }
.co-item-price s{ display:block; font-weight:400; font-size:13px; color:var(--muted); }
.co-totals{ margin:10px 0 0; }
.co-totals > div{ display:flex; justify-content:space-between; align-items:baseline; padding:4px 0; }
.co-totals dt{ color:var(--ink-2); }
.co-totals dd{ margin:0; font-variant-numeric:tabular-nums; }
.co-totals > div:not(.co-total){ font-size:14px; }
.co-discount dt, .co-discount dd{ color:#3F5B3F; font-weight:600; }
.co-muted{ color:var(--muted); font-size:13px; }
.co-count{ font-size:13px; color:var(--muted); }
.co-nosave dd{ color:var(--muted); }
.co-pct{
  display:inline-block; margin-left:6px; padding:2px 7px; border-radius:5px; vertical-align:1px;
  background:#E3EBDD; color:#3F5B3F; font-size:11px; font-weight:600; letter-spacing:.04em; text-transform:uppercase;
}
.co-total dd s{ margin-right:10px; font-size:15px; font-weight:400; color:var(--muted); }
.co-saved{
  display:inline-block; margin-top:10px; padding:4px 10px; border-radius:6px;
  background:#E3EBDD; color:#3F5B3F; font-size:12px; font-weight:600; letter-spacing:.04em; text-transform:uppercase;
}
.co-total{ margin-top:8px; padding-top:12px !important; border-top:1px solid var(--line-soft); }
.co-item + .co-item, .co-items + .co-totals{ border-top:0; }
.co-total dt{ font-weight:600; color:var(--ink); }
.co-total dd{ font-size:21px; font-weight:700; color:var(--ink); }
.co-edit{ margin-top:12px; font-size:13px; color:var(--ink-2); text-decoration:underline; text-underline-offset:4px; }

.co-empty{ max-width:34em; padding:clamp(24px, 6vh, 80px) 0; }
.co-empty p{ margin:14px 0 26px; color:var(--ink-2); }
.co-empty .btn-main{ width:auto; display:inline-flex; }
/* Page not found: centred like the home page's first screen, on the same white-to-warm floor, with the pen nib from the logo */
.nf-main{ display:flex; background:linear-gradient(180deg, #FFFFFF 0%, #FFFFFF 46%, #F7F4EE 100%); }
.nf{
  flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center;
  padding-top:calc(var(--nav-h, 76px) + clamp(40px, 8vh, 90px)) !important; padding-bottom:clamp(56px, 10vh, 110px) !important;
}
.nf-mark{
  width:clamp(34px, 3.2vw, 44px); aspect-ratio:431/891; margin-bottom:clamp(22px, 3.5vh, 32px); background:#3A332C;
  -webkit-mask:url("logo-mark.png") center / contain no-repeat; mask:url("logo-mark.png") center / contain no-repeat;
  filter:drop-shadow(0 10px 14px rgba(19,19,17,.14));
}
.nf .co-h1{ font-size:clamp(38px, 4.4vw, 62px); text-shadow:0 0 .22em rgba(19,19,17,.08); }
.nf-text{ max-width:30em; margin:16px auto 0; font-size:17px; line-height:1.6; color:var(--ink-2); }
.nf-actions{ display:flex; flex-wrap:wrap; justify-content:center; gap:10px; margin-top:clamp(26px, 4vh, 34px); }
.nf-actions .btn-main, .nf-actions .btn-line{ width:auto; display:inline-flex; height:48px; padding:0 24px; }

/* Thank-you page */
.ty-head{ max-width:44em; }
.ty-mark{ width:44px; height:44px; display:grid; place-items:center; margin-bottom:16px; border-radius:12px; background:#E3EBDD; color:#3F5B3F; }
.ty-mark svg{ width:24px; height:24px; }
.ty-no{ margin-top:10px; font-size:14px; color:var(--muted); }
.ty-no b{ color:var(--ink); letter-spacing:.02em; }
.ty-text{ max-width:40em; margin-top:12px; font-size:16px; line-height:1.6; color:var(--ink-2); }
/* Thank-you page only: card titles sit at the top of their card */
#thankyou .co-h2{ margin-top:0; }
.ty-main .co-card + .co-card{ margin-top:14px; }
/* What happens next: numbered steps in the same small squares as the step bar */
.ty-steps{ list-style:none; margin:0; padding:0; display:grid; gap:12px; counter-reset:ty; }
.ty-steps li{ position:relative; padding-left:34px; font-size:15px; line-height:1.5; color:var(--ink-2); counter-increment:ty; }
.ty-steps li::before{
  content:counter(ty); position:absolute; left:0; top:0; width:22px; height:22px; display:grid; place-items:center;
  border-radius:6px; background:var(--tag-bg); color:var(--tag-ink); font-size:12px; font-weight:600;
}
/* Where you will receive your files */
.ty-inbox{ display:flex; align-items:center; gap:12px; padding:12px 14px; border-radius:8px; background:var(--band); }
.ty-inbox-icon{ flex:none; width:36px; height:36px; display:grid; place-items:center; border-radius:7px; background:#FFFFFF; color:var(--warm); box-shadow:0 0 0 1px rgba(19,19,17,.08); }
.ty-inbox-icon svg{ width:20px; height:20px; }
.ty-inbox span{ display:grid; gap:1px; min-width:0; }
.ty-inbox small{ font-size:12px; color:var(--muted); }
.ty-inbox b{ font-size:15px; font-weight:600; color:var(--ink); overflow-wrap:anywhere; }
.ty-tips{ list-style:none; margin:14px 0 0; padding:0; display:grid; gap:9px; }
.ty-tips li{ position:relative; padding-left:26px; font-size:14px; line-height:1.5; color:var(--ink-2); }
.ty-tips li::before{
  content:""; position:absolute; left:3px; top:5px; width:12px; height:7px;
  border-left:1.8px solid #3F5B3F; border-bottom:1.8px solid #3F5B3F; transform:rotate(-45deg);
}
/* Payment method and billing address under the order summary */
.ty-info{ margin:16px 0 0; padding-top:14px; border-top:1px solid var(--line-soft); display:grid; gap:10px; }
.ty-info dt{ font-size:12.5px; color:var(--muted); }
.ty-info dd{ margin:2px 0 0; font-size:14px; line-height:1.5; color:var(--ink); }
.ty-resend p, .ty-review p{ font-size:15px; line-height:1.55; color:var(--ink-2); }
.ty-buttons{ display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.ty-buttons .btn-line{ width:auto; height:40px; padding:0 16px; font-size:14px; }
.ty-copied{ margin-top:10px; font-size:13px; color:#3F5B3F; }
.ty-review-links{ display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.ty-review-links a{
  display:inline-flex; align-items:center; height:36px; padding:0 14px; border-radius:8px;
  font-size:14px; font-weight:500; color:var(--ink); box-shadow:inset 0 0 0 1px rgba(19,19,17,.18);
  transition:box-shadow .2s var(--ease), background .2s var(--ease);
}
.ty-review-links a:hover{ background:var(--band); box-shadow:inset 0 0 0 1px rgba(19,19,17,.3); }
.ty-follow{ display:flex; flex-wrap:wrap; gap:10px 24px; margin-top:22px; font-size:14px; }
.ty-follow a{ display:inline-flex; align-items:center; gap:8px; color:var(--ink-2); }
.ty-follow a:hover{ color:var(--ink); text-decoration:underline; text-underline-offset:4px; }
.ty-follow svg{ width:16px; height:16px; }

/* Policy pages: Terms, Privacy, Refund */
.legal{ max-width:44em; }
.legal-date{ margin-top:10px; font-size:13.5px; color:var(--muted); }
.legal-nav{ display:flex; flex-wrap:wrap; gap:8px; margin:20px 0 6px; }
.legal-nav a{
  display:inline-flex; align-items:center; height:34px; padding:0 13px; border-radius:8px; font-size:13.5px; font-weight:500; color:var(--ink-2);
  box-shadow:inset 0 0 0 1px rgba(19,19,17,.14);
}
.legal-nav a[aria-current="page"]{ background:var(--btn); color:#F7F6F2; box-shadow:none; }
.legal-nav a:not([aria-current]):hover{ background:var(--band); }
.legal h2{ margin:30px 0 8px; font-family:var(--font-display); font-weight:600; font-size:calc(21px * var(--d-scale)); line-height:1.2; color:var(--ink); }
.legal p, .legal li{ font-size:15.5px; line-height:1.65; color:var(--ink-2); }
.legal p + p{ margin-top:10px; }
.legal ul{ margin:8px 0 0; padding-left:1.2em; display:grid; gap:6px; }
.legal ul + p{ margin-top:12px; }
.legal a{ color:var(--ink); text-decoration:underline; text-underline-offset:3px; }

@media (max-width: 520px){
  .co-row{ grid-template-columns:1fr; gap:14px; }
}
@media (max-width: 900px){
  .co-grid{ grid-template-columns:1fr; }
  .co-summary{ position:static; order:-1; }
}
