/* ===== CART DRAWER ===== */
.cart-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(22, 18, 15, .45); backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.cart-overlay.open { opacity: 1; visibility: visible; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 310;
  width: min(420px, 100%); background: var(--bg);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .4s var(--ease-out);
}
.cart-drawer.open { transform: none; }
.cart-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border);
}
.cart-drawer-header h3 { font-size: 1.05rem; }
.cart-drawer-close { font-size: 1.6rem; line-height: 1; color: var(--muted); width: 44px; height: 44px; margin: -8px -12px -8px 0; }
.cart-drawer-close:hover { color: var(--ink); }
.cart-drawer-body { flex: 1; overflow-y: auto; padding: 1.25rem 1.5rem; }
.cart-empty { text-align: center; color: var(--muted); padding: 3rem 0; display: grid; gap: 1.25rem; justify-items: center; }

/* ===== CART LINE ITEM ===== */
.cart-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--border); align-items: start; }
.cart-item img { width: 72px; height: 72px; object-fit: contain; border-radius: 12px; background: var(--panel); }
.cart-item-name { font-size: .92rem; font-weight: 600; }
.cart-item-variant { font-size: .78rem; color: var(--muted); margin-top: .22rem; }
.cart-item-price { font-size: .88rem; color: var(--text); font-weight: 600; margin-top: .35rem; }
.cart-item-remove { font-size: .78rem; color: var(--muted); text-decoration: underline; margin-top: .5rem; padding: .3rem 0; display: inline-block; }
.cart-item-remove:hover { color: var(--accent); }

/* ===== QUANTITY STEPPER ===== */
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.qty button { width: 42px; height: 42px; color: var(--text2); font-size: 1.05rem; }
.qty button:hover { color: var(--ink); }
.qty span { min-width: 26px; text-align: center; font-size: .85rem; }

/* ===== DRAWER FOOTER ===== */
.cart-drawer-footer { padding: 1.25rem 1.5rem; border-top: 1px solid var(--border); }
/* Matches the checkout payblock: the amount needs room to read as the
   figure being agreed to, not as part of the button. */
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1.35rem; font-size: 1rem; }
.cart-total span:last-child { font-family: var(--display); font-weight: 700; font-size: 1.4rem; color: var(--ink); }
.cart-checkout-btn { width: 100%; }

/* ===== VARIANT PICKER ===== */
.variants { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0 1.5rem; }
.variant-btn {
  padding: .7rem 1.15rem; border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .6);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
          backdrop-filter: blur(10px) saturate(140%);
  font-size: .82rem; color: var(--text2); transition: all .25s;
  display: flex; flex-direction: column; align-items: flex-start; gap: .15rem;
}
.variant-btn small { font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.variant-btn:hover { border-color: var(--border-light); color: var(--text); }
.variant-btn.selected { border-color: var(--ink); color: var(--ink); background: var(--card2); }
.variant-btn.selected small { color: var(--text2); }
.variant-btn[disabled] { opacity: .4; cursor: not-allowed; text-decoration: line-through; }

/* ===== PRICE BLOCK ===== */
.price-row { display: flex; align-items: baseline; gap: .75rem; margin: 1rem 0 .25rem; flex-wrap: wrap; }
.price-now { font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--text); }
.price-mrp { font-size: 1rem; color: var(--muted); text-decoration: line-through; }
.price-off { font-size: .74rem; color: var(--accent); letter-spacing: .1em; text-transform: uppercase; }

/* ===== PRODUCT GALLERY ===== */
.gallery-main { background: var(--card); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; cursor: zoom-in; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-top: .75rem; }
.gallery-thumbs img { border: 1px solid var(--border); border-radius: 12px; cursor: zoom-in; background: var(--card); }

/* ===== LIGHTBOX ===== */
#lightbox { display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
#lightbox.open { opacity: 1; visibility: visible; }
#lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 14px; }

/* ===== TOAST ===== */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  z-index: 400; padding: .8rem 1.4rem; border-radius: 999px;
  background: var(--card2); border: 1px solid var(--border-light); color: var(--text);
  font-size: .84rem; opacity: 0; visibility: hidden; transition: all .3s var(--ease-out);
  /* one line: the pill is a confirmation, not a paragraph - it shrinks to the
     viewport and ellipsises rather than wrapping into a two-line lozenge */
  max-width: min(90vw, 30rem); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; text-align: center;
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ===== ORDER STATUS STRIP ===== */
.status-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin: 1.5rem 0; }
.status-step { text-align: center; padding-top: 1.25rem; position: relative; font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.status-step::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--border); border-radius: 999px; }
.status-step.done { color: var(--accent); }
.status-step.done::before { background: var(--accent); }

/* ===== TRACK ORDER CARD =====
   These rows carry no thumbnail, so they get their own two-column grid.
   Borrowing .cart-item put the name into the drawer's 72px image column and
   wrapped it one word per line. */
.track-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.track-date { color: var(--muted); font-size: .82rem; }

.track-items { margin-top: 1.75rem; border-top: 1px solid var(--border); }
.track-item { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: baseline; padding: .95rem 0; border-bottom: 1px solid var(--border); }
.track-item-name { font-size: .95rem; font-weight: 600; }
.track-item-variant { font-size: .82rem; color: var(--muted); margin-top: .25rem; }
.track-item-price { font-weight: 600; white-space: nowrap; }

.track-total { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-top: 1.1rem; font-size: 1.05rem; font-weight: 600; }
.track-total-amount { color: var(--accent); font-size: 1.15rem; }

.track-ship { margin-top: 1.5rem; padding: 1.1rem 1.2rem; background: var(--card2); border-radius: 14px; }
.track-ship h4 { margin: 0; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.track-ship p { margin: .45rem 0 0; color: var(--text2); font-size: .9rem; line-height: 1.55; }

/* ===== TRACK STATUS PANEL =====
   Collapsed by default. The strip above answers "which stage"; this answers
   "where is the parcel", which most visitors do not need on arrival. */
.track-toggle-row { margin-top: 1.25rem; }
/* .btn-ghost is drawn for the tinted page background - a near-white border
   and a translucent white fill. On the white card it disappears. */
.track-toggle { width: 100%; border-color: var(--border-light); background: var(--card2); color: var(--text); }
.track-toggle:hover { background: var(--panel); }
.track-panel { margin-top: 1rem; padding: 1.15rem 1.2rem; background: var(--card2); border: 1px solid var(--border); border-radius: 14px; }
.track-panel[hidden] { display: none; }
.track-panel-empty { margin: 0; color: var(--text2); font-size: .9rem; line-height: 1.55; }

.track-panel-meta { display: flex; flex-wrap: wrap; gap: 1.5rem; padding-bottom: .9rem; border-bottom: 1px solid var(--border); }
.track-panel-key { display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.track-panel-val { display: block; margin-top: .2rem; font-weight: 600; font-size: .92rem; }
.track-panel-now { margin: .9rem 0 0; font-weight: 600; color: var(--accent); }

/* The scan list. A rail down the left so the stops read as one sequence -
   the same reason the strip above is a strip and not four labels. */
.track-scans { list-style: none; margin: 1rem 0 0; padding: 0 0 0 1.15rem; position: relative; }
.track-scans::before { content: ''; position: absolute; left: 3px; top: .45rem; bottom: .45rem; width: 2px; background: var(--border); }
.track-scan { position: relative; padding: 0 0 .95rem; }
.track-scan:last-child { padding-bottom: 0; }
.track-scan::before { content: ''; position: absolute; left: -1.15rem; top: .35rem; width: 8px; height: 8px; border-radius: 50%; background: var(--border-light); }
/* Newest scan first, so the top node is the one that matters. */
.track-scan.latest::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); }
.track-scan-status { font-size: .88rem; font-weight: 600; }
.track-scan.latest .track-scan-status { color: var(--accent); }
.track-scan-when { font-size: .76rem; color: var(--muted); margin-top: .15rem; }

.track-panel-sync { margin: 1rem 0 0; font-size: .74rem; color: var(--muted); }

/* ===== PHONES =====
   The drawer becomes a near-full-height sheet. */
@media (max-width: 720px) {
  .cart-drawer { width: 100%; border-left: none; }
  .cart-drawer-body { padding: 1rem 1.15rem; }
  .cart-drawer-header, .cart-drawer-footer { padding: 1rem 1.15rem; }
  .cart-drawer-footer { padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); }
  .cart-item { grid-template-columns: 60px 1fr auto; gap: .8rem; }
  .cart-item img { width: 60px; height: 60px; }
  .cart-item-variant { font-size: .68rem; }
  .track-ship { padding: 1rem; }
  .variants { gap: .5rem; }
  .variant-btn { flex: 1 1 auto; min-height: 48px; justify-content: center; }
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .variant-btn { background: var(--card); }
}

/* ===== CHECKOUT PAYMENT METHODS ===== */
.pay-methods { display: grid; gap: .6rem; }
.pay-method {
  display: flex; align-items: flex-start; gap: .75rem;
  border: 1px solid var(--border); border-radius: 14px;
  padding: .9rem 1rem; cursor: pointer;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.pay-method:hover { border-color: var(--border-light); }
/* the whole tile is the target, not just the 16px dot */
.pay-method input { margin-top: .18rem; accent-color: var(--accent); width: 17px; height: 17px; flex: none; }
.pay-method:has(input:checked) { border-color: var(--accent); background: rgba(244, 67, 108, .05); }
.pay-method input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pay-method-body { display: block; }
.pay-method-body b { display: block; font-size: .92rem; }
.pay-method-body small { display: block; color: var(--text2); font-size: .78rem; margin-top: .15rem; line-height: 1.45; }

/* ===== CHECKOUT ORDER SUMMARY ===== */
.co-summary-head { font-family: var(--display); font-size: 1.35rem; font-weight: 500; margin-bottom: 1.1rem; }
.co-item { align-items: flex-start; gap: .9rem; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.co-item img { width: 66px; height: 66px; border-radius: 10px; object-fit: cover; flex: none; }
.co-item-meta { flex: 1; min-width: 0; }
.co-item-meta .qty { margin-top: .55rem; }
.co-item-meta .cart-item-remove { margin-top: .5rem; }
.co-item-price { font-size: .95rem; white-space: nowrap; }

.co-totals { display: grid; gap: .7rem; margin-top: 1.25rem; font-size: .92rem; }
.co-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.co-row > span:first-child { color: var(--text2); }
/* free shipping is a promise worth reading as good news, not as a zero */
.co-free { color: #2f8f5b; font-weight: 600; font-size: .85rem; text-align: right; }
.co-row-total { padding-top: .85rem; border-top: 1px solid var(--border); }
.co-row-total > span:first-child { color: var(--ink); font-size: 1.05rem; font-weight: 600; }
.co-total-amount { text-align: right; }
.co-total-amount small { color: var(--muted); font-size: .72rem; }
.co-total-amount b { color: var(--accent); font-family: var(--display); font-size: 1.35rem; font-weight: 600; }
.co-total-amount .co-tax { display: block; margin-top: .1rem; }

.co-pay { display: flex; align-items: center; justify-content: center; gap: .6rem; }
/* sized by id as well as class: an unsized inline svg in a flex button
   stretches to the container instead of staying an icon */
.co-pay svg, #placeOrder svg { width: 18px; height: 18px; flex: none; }
.co-secure {
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  color: var(--muted); font-size: .74rem; margin-top: .85rem;
}
.co-secure svg { width: 13px; height: 13px; }

/* ===== CHECKOUT LAYOUT ===== */
.co-head { margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.co-head h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); letter-spacing: -.02em; }
.co-head p { color: var(--text2); font-size: .92rem; margin-top: .5rem; max-width: 46ch; }

/* the summary is the shorter column, so it follows the form down rather than
   leaving a well of empty space beside it */
/* One column at every width, summary first.

   It used to be two columns on a desktop with the summary sticky beside the
   form. Reading order is the argument for changing it: "here is what you are
   buying and what it costs" belongs before "give us your address", and in
   two columns that order is only true on a phone. It also puts the discount
   field directly under the items it applies to, rather than in a separate
   column from them. */
.co-grid { display: grid; grid-template-columns: 1fr; gap: clamp(1.25rem, 3vw, 2rem); align-items: start; max-width: 760px; margin: 0 auto; }
.co-summary { order: -1; }

.co-form { display: grid; gap: 1rem; }
/* Pink edges on the checkout cards. Faint rather than saturated: at full
   accent the border competes with the price and the pay button, which are
   the two things on this page that should be loudest. */
.co-step, .co-summary {
  border-color: rgba(244, 67, 108, .35);
}
.co-step {
  background: var(--card); border: 1px solid rgba(244, 67, 108, .35);
  border-radius: 18px; padding: clamp(1.15rem, 2.5vw, 1.6rem);
}
.co-step h3 {
  display: flex; align-items: center; gap: .65rem;
  font-size: 1.05rem; margin-bottom: 1.25rem;
}
.co-step-num {
  display: grid; place-items: center; flex: none;
  width: 26px; height: 26px; border-radius: 999px;
  background: var(--panel-deep); color: #efe7dd;
  font-size: .78rem; font-weight: 700;
}
.co-step .field:last-of-type { margin-bottom: 0; }

/* the delivery estimate reads as information, not as an error */
.co-quote {
  margin-top: .35rem; font-size: .8rem; color: var(--text2);
  background: var(--bg2); border-radius: 10px; padding: .6rem .75rem;
}

/* An error under every field at once is a wall of red. The message stays
   quiet; the field's own border carries the alarm. */
.field .err { font-size: .72rem; color: var(--accent-dk); opacity: .9; }
.field.invalid input, .field.invalid textarea, .field.invalid select {
  border-color: var(--accent-dk); box-shadow: 0 0 0 3px rgba(201, 42, 82, .08);
}
/* The inner input carries no border of its own, so the alarm goes on the
   wrapper - otherwise a bad phone number shows no red at all. */
.field.invalid .input-prefix { border-color: var(--accent-dk); box-shadow: 0 0 0 3px rgba(201, 42, 82, .08); }
.field.invalid .input-prefix input { box-shadow: none; }

@media (max-width: 900px) {
  .co-promo { flex-wrap: wrap; }
  .co-promo .btn-ghost { flex: 1; }
}

/* ===== COLLAPSIBLE ORDER SUMMARY ===== */
/* The rule divides the heading from the contents, so it belongs to the
   contents. Collapsed, there is nothing beneath it to divide and it reads as
   a stray line under the card's own heading. */
.co-toggle {
  display: flex; align-items: center; gap: .55rem; width: 100%;
  padding: 0 0 1rem; margin-bottom: .1rem;
  border-bottom: 1px solid var(--border);
  color: var(--ink); text-align: left; cursor: pointer;
}
.co-toggle[aria-expanded="false"] { border-bottom-color: transparent; padding-bottom: 0; }
.co-toggle-cart { width: 18px; height: 18px; color: var(--accent); flex: none; }
.co-toggle-label { font-family: var(--display); font-size: 1.15rem; font-weight: 500; }
.co-toggle-chev {
  width: 16px; height: 16px; flex: none; color: var(--text2);
  transition: transform .25s var(--ease);
}
.co-toggle[aria-expanded="true"] .co-toggle-chev { transform: rotate(180deg); }
/* the total stays visible when the panel is shut - that is the one number
   worth reading in the collapsed state */
.co-toggle-total { margin-left: auto; font-weight: 600; font-size: 1rem; }
.co-toggle:hover .co-toggle-label { color: var(--accent); }
.co-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) { .co-toggle-chev { transition: none; } }

/* ===== ORDER CONFIRMATION ===== */
.co-success {
  max-width: 34rem; margin: clamp(1rem, 4vw, 3rem) auto;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 22px; padding: clamp(1.75rem, 4vw, 2.75rem);
  text-align: center;
}
.co-success-icon {
  width: 60px; height: 60px; margin: 0 auto 1.25rem;
  display: grid; place-items: center; border-radius: 999px;
  background: rgba(47, 143, 91, .1); color: #2f8f5b;
}
.co-success-icon svg { width: 28px; height: 28px; }

/* Which glyph, decided entirely by the stage class on the card. The
   confirmed tick is the default, so no script means the page looks exactly
   as it always did. */
.co-success-icon svg { display: none; }
.co-success-icon svg[data-stage="confirmed"] { display: block; }
.co-success.is-pending .co-success-icon svg { display: none; }
.co-success.is-pending .co-success-icon svg[data-stage="pending"] { display: block; }
.co-success.is-failed .co-success-icon svg { display: none; }
.co-success.is-failed .co-success-icon svg[data-stage="failed"] { display: block; }

/* The badge is green because it means "done". Neither of the other two
   states does, so neither borrows the colour: amber while a payment is
   still unaccounted for, red once it is known to have failed. The tick
   animation goes with it - a stroke drawing itself is a small reward, and
   there is nothing to reward yet. */
.co-success.is-pending .co-success-icon {
  background: rgba(180, 107, 0, .1); color: var(--warn); animation: none;
}
.co-success.is-failed .co-success-icon {
  background: rgba(201, 42, 82, .1); color: var(--accent-dk); animation: none;
}
.co-success.is-pending .co-success-icon::after,
.co-success.is-failed .co-success-icon::after { display: none; }
.co-success.is-pending .co-success-icon svg path,
.co-success.is-pending .co-success-icon svg circle,
.co-success.is-failed .co-success-icon svg path { animation: none; }
/* The heading's accent full stop reads as celebration. Kept, but in the
   text colour, so the sentence still ends the way the design intends. */
.co-success.is-pending h2 em, .co-success.is-failed h2 em { color: inherit; }

/* The tick draws itself: the badge pops in, a ring breathes out of it, then
   the stroke is drawn. About a second end to end - long enough to register
   as a small reward, short enough that nobody waits on it to read the page.

   No fill-mode anywhere, and every resting state is the finished one. An
   animation that never runs - a frozen clock in a background tab, a browser
   that ignores it - then leaves a plain visible tick rather than an empty
   circle. The sequencing lives in keyframe percentages instead of delays,
   which is what fill-mode would otherwise have been holding. */
.co-success-icon { position: relative; animation: zl-tick-pop .5s var(--ease-out); }
.co-success-icon::after {
  content: ''; position: absolute; inset: 0; border-radius: 999px;
  border: 2px solid #2f8f5b; opacity: 0;
  animation: zl-tick-ring .9s .18s var(--ease-out);
}
.co-success-icon svg { position: relative; }
.co-success-icon svg path { animation: zl-tick-draw .8s var(--ease-out); }

@keyframes zl-tick-pop {
  0%   { transform: scale(.6); opacity: 0; }
  60%  { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes zl-tick-ring {
  from { transform: scale(1); opacity: .45; }
  to   { transform: scale(1.7); opacity: 0; }
}
/* Held hidden for the first third so the badge lands before the stroke
   starts. 24 covers this 24x24 path, measured about 22.6. */
@keyframes zl-tick-draw {
  0%, 32% { stroke-dasharray: 24; stroke-dashoffset: 24; }
  100%    { stroke-dasharray: 24; stroke-dashoffset: 0; }
}

/* Someone who asked for less motion still gets the confirmation, just
   without the performance. */
@media (prefers-reduced-motion: reduce) {
  .co-success-icon, .co-success-icon svg path { animation: none; }
  .co-success-icon::after { display: none; }
}
.co-success h2 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); }
.co-success h2 em { font-style: normal; color: var(--accent); }
.co-success-msg { color: var(--text2); margin-top: .5rem; font-size: .95rem; }

.co-success-facts {
  display: grid; gap: .1rem; text-align: left;
  margin: 1.5rem 0 0; padding: 1rem 1.15rem;
  background: var(--bg2); border-radius: 14px;
}
.co-success-facts > div {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .5rem 0;
}
/* display:flex beats the hidden attribute's display:none, so a row the
   script had hidden still drew - which is why an order with no gateway
   reference yet showed an empty Payment line. */
.co-success-facts > div[hidden] { display: none; }
.co-success-facts > div + div { border-top: 1px solid var(--border); }
.co-success-facts dt { color: var(--text2); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; flex: none; padding-top: .12rem; }
.co-success-facts dd { font-size: .88rem; text-align: right; word-break: break-word; }

.co-success-note { color: var(--muted); font-size: .8rem; margin-top: 1rem; line-height: 1.55; }
.co-success-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-top: 1.5rem; }
.co-success-actions .btn-primary, .co-success-actions .btn-ghost { flex: 1 1 12rem; justify-content: center; }

/* the stepper and Remove share a row, pushed to opposite ends */
/* The stepper is alone in the middle column now, so it sits at its natural
   width rather than being pushed apart from a sibling. */
.co-item-controls { display: flex; align-items: center; gap: 1rem; margin-top: .55rem; }
/* Price above, Remove beneath, both hard against the right edge of the row. */
.co-item-side { display: flex; flex-direction: column; align-items: flex-end; gap: .55rem; }
.co-item-side .cart-item-remove { margin-top: 0; }
.co-item-controls .qty, .co-item-controls .cart-item-remove { margin-top: 0; }

/* the second summary: totals and the button, under the form where the
   journey actually ends */
.co-payblock { margin-top: .25rem; }
.co-payblock .co-totals { margin-top: 0; }
/* The total and the pay button were touching, so the amount read as part of
   the button rather than the figure it is agreeing to. */
.co-payblock .co-pay { margin-top: 1.35rem; }

/* the compact restatement of the cart above the pay button */
.co-foot-item { display: flex; align-items: center; gap: .75rem; padding-bottom: 1rem; margin-bottom: .25rem; border-bottom: 1px solid var(--border); }
.co-foot-item img { width: 46px; height: 46px; border-radius: 9px; object-fit: cover; flex: none; }
.co-foot-meta { flex: 1; min-width: 0; }
.co-foot-item .cart-item-variant { margin-top: .1rem; }

/* standing on its own page now, so it carries the vertical rhythm itself */
.co-success { margin-block: clamp(1.5rem, 6vw, 4rem); }

/* ===== DISCOUNT CODE ===== */
.co-promo { display: flex; gap: .55rem; margin-top: 1.1rem; }
.co-promo input {
  flex: 1; min-width: 0; background: var(--card2);
  border: 1px solid var(--border); border-radius: 12px;
  padding: .8rem 1rem; color: var(--text); font-family: inherit;
  font-size: .88rem; letter-spacing: .04em; text-transform: uppercase; outline: none;
  transition: border-color .25s, box-shadow .25s;
}
.co-promo input::placeholder { letter-spacing: normal; text-transform: none; color: var(--muted); }
.co-promo input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(22,18,15,.08); }
/* A solid button, not the ghost. btn-ghost is drawn for the tinted page
   background - a near-white border over a translucent white fill - so on the
   white summary card it was invisible. The button existed and worked; there
   was simply nothing to see. */
.co-promo .btn-ghost {
  flex: none; padding: .8rem 1.5rem; min-height: 0;
  background: var(--panel-deep); border-color: transparent; color: #efe7dd;
  font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.co-promo .btn-ghost:hover { background: var(--ink); color: #fff; }
.co-promo .btn-ghost:disabled { opacity: .6; cursor: wait; }
.co-promo-msg { font-size: .78rem; margin-top: .5rem; min-height: 1.1em; }
.co-promo-msg.is-good { color: #2f8f5b; }
.co-promo-msg.is-bad { color: var(--accent-dk); }
/* A saving is good news and reads as such, in the same green as free
   delivery rather than the red reserved for something being wrong. */
.co-discount { color: #2f8f5b; font-weight: 600; }
.co-row-discount[hidden] { display: none; }
