/* checkout-enhance.css — RideParts ronde3/checkout (agent CHECKOUT) — v=rd0724c
   Alleen op checkout.html. Voegt toe zonder bestaande blokken te slopen:
   1. Vaak-samen-gekocht upsell-rail (foto groot op wit + naam + prijs + plusknop)
   2. Trust-icon-regel (bestaande .trust-row wordt hergebruikt) + stap-iconen
   3. Prijs-focus: ordertotaal prominent
   4. Drempelbalk: gratis-verzending-voortgang (accent -> groen boven de drempel)
   Volgt het bestaande design-token-systeem (--accent, --ok, --line, --r ...). */

/* ---------- Prijs-focus: ordertotaal prominent ---------- */
.order-summary .summary-row.total{
  font-size:var(--fs-xl);
  align-items:baseline;
  padding-top:.8rem;
}
.order-summary .summary-row.total > span:last-child{
  font-family:var(--font-display);
  font-weight:800;
  color:var(--accent-700);
  letter-spacing:-.01em;
}
#pay-btn-total{font-weight:800}

/* ---------- Drempelbalk: gratis-verzending-voortgang ---------- */
.co-ship{
  margin:.15rem 0 var(--s4);
  padding:.7rem .8rem;
  border-radius:var(--r);
  background:var(--bg-2);
  border:1px solid var(--line);
  transition:background .3s var(--ease),border-color .3s var(--ease);
}
.co-ship__msg{
  display:flex;align-items:center;gap:.4rem;
  font-size:var(--fs-sm);font-weight:700;line-height:1.3;
  color:var(--accent-700);
  margin-bottom:.55rem;
}
.co-ship__msg svg{
  width:16px;height:16px;flex:none;
  stroke:currentColor;fill:none;stroke-width:2.6;
}
.co-ship__msg .amt{color:var(--accent-700);font-family:var(--font-display);font-weight:800}
.co-ship__track{
  height:8px;border-radius:999px;background:var(--bg-3);overflow:hidden;
}
.co-ship__fill{
  height:100%;width:0;border-radius:999px;
  background:linear-gradient(90deg,var(--accent-700),var(--accent));
  transition:width .55s var(--ease),background .3s var(--ease);
}
.co-ship.is-free{background:var(--ok-bg);border-color:#BFE4CD}
.co-ship.is-free .co-ship__msg{color:var(--ok);margin-bottom:0}
.co-ship.is-free .co-ship__track{display:none}

/* ---------- Vaak samen gekocht (checkout upsell) ---------- */
.co-upsell{
  margin:var(--s5) 0 0;
  padding-top:var(--s4);
  border-top:1px solid var(--line);
}
.co-upsell__h{
  display:flex;align-items:center;gap:.45rem;
  font-family:var(--font-display);font-weight:700;font-size:var(--fs-lg);
  color:var(--ink);margin:0;
}
.co-upsell__h .ic{width:18px;height:18px;color:var(--accent)}
.co-upsell__sub{font-size:var(--fs-xs);color:var(--ink-3);margin:.15rem 0 .75rem}
.co-upsell__rail{
  display:flex;gap:.6rem;
  overflow-x:auto;overflow-y:hidden;
  scroll-snap-type:x proximity;
  padding:0 .15rem .5rem;margin:0 -.15rem;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:thin;scrollbar-color:var(--line-2) transparent;
}
.co-upsell__rail::-webkit-scrollbar{height:7px}
.co-upsell__rail::-webkit-scrollbar-thumb{background:var(--line-2);border-radius:99px}
.co-up{
  scroll-snap-align:start;
  flex:0 0 130px;width:130px;
  display:flex;flex-direction:column;
  border:1px solid var(--line);border-radius:var(--r);
  background:var(--surface);overflow:hidden;
  transition:box-shadow .18s var(--ease),border-color .18s var(--ease);
}
.co-up:hover{box-shadow:var(--shadow);border-color:var(--line-2)}
.co-up__imgwrap{
  aspect-ratio:1/1;background:#fff;
  display:grid;place-items:center;padding:7px;
}
.co-up__imgwrap img{
  width:100%;height:100%;object-fit:contain;background:#fff;
  display:block;
}
.co-up__body{
  padding:.5rem .55rem .55rem;
  display:flex;flex-direction:column;gap:.4rem;flex:1;
}
.co-up__name{
  font-size:var(--fs-xs);line-height:1.3;color:var(--ink);
  display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;min-height:2.55em;
}
.co-up__foot{
  display:flex;align-items:center;justify-content:space-between;gap:.3rem;
  margin-top:auto;
}
.co-up__price{font-family:var(--font-display);font-weight:800;font-size:var(--fs-sm);color:var(--ink)}
.co-up__add{
  flex:none;width:44px;height:44px;border-radius:9px;
  background:var(--accent);color:#fff;
  display:grid;place-items:center;
  box-shadow:0 3px 9px rgba(255,90,30,.30);
  transition:transform .14s var(--ease),background .15s var(--ease);
}
.co-up__add:hover{background:var(--accent-700);transform:translateY(-1px)}
.co-up__add:active{transform:scale(.9)}
.co-up__add svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2.6}
.co-up__add.is-added{background:var(--ok);box-shadow:0 3px 9px rgba(14,122,69,.30)}
.co-up__add:disabled{cursor:default}

/* ---------- Stap-iconen bij de formulierstappen ---------- */
.co-form h2 .co-stepic{
  display:inline-grid;place-items:center;
  width:15px;height:15px;margin-left:.5rem;
  color:var(--ink-3);vertical-align:-2px;
}
.co-form h2 .co-stepic svg{width:100%;height:100%;stroke:currentColor;fill:none;stroke-width:2}

/* ---------- Trust-icon-regel iets luchtiger ---------- */
.order-summary .trust-row div{font-weight:600}

@media(max-width:1040px){
  .co-up{flex-basis:118px;width:118px}
}

/* ---------- Mobiele checkout: niets buiten de viewport clippen ---------- */
.checkout{
  grid-template-columns:minmax(0,1.3fr) minmax(0,.7fr);
}
.checkout,.co-form,.order-summary,.grid2,.grid2 > *{
  min-width:0;
}
.co-form,.order-summary{
  width:100%;
}

@media(max-width:760px){
  .checkout{
    grid-template-columns:minmax(0,1fr);
    gap:var(--s5);
  }
  .grid2{
    grid-template-columns:minmax(0,1fr);
  }
  .co-form input,.co-form select,.co-form textarea,#pay-btn{
    min-width:0;
    max-width:100%;
    width:100%;
  }
  .order-summary{
    position:static;
  }
}

/* ---------- Geldpad #22: betaalactie blijft bereikbaar ----------
   De originele submitknop en checkout-validatie blijven de enige orderroute.
   Deze balk activeert die knop alleen wanneer hij buiten het werkelijk zichtbare
   scherm valt en schuift boven de consentbalk zodra die aanwezig is. */
.co-sticky-pay{
  position:fixed;
  z-index:1450;
  left:0;
  right:0;
  bottom:calc(var(--co-consent-offset, 0px) + env(safe-area-inset-bottom, 0px) + 8px);
  padding:8px clamp(12px, 3vw, 24px);
  pointer-events:none;
}
.co-sticky-pay[hidden]{display:none}
.co-sticky-pay__inner{
  width:min(100%, 680px);
  min-height:64px;
  margin-inline:auto;
  padding:8px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border:1px solid rgba(255,255,255,.16);
  border-radius:14px;
  background:rgba(18,20,23,.96);
  color:#fff;
  box-shadow:0 16px 38px rgba(20,32,54,.28);
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
  pointer-events:auto;
}
.co-sticky-pay__total{
  min-width:0;
  padding-left:8px;
  display:flex;
  flex-direction:column;
  line-height:1.15;
}
.co-sticky-pay__total span{
  color:#d5dae0;
  font-size:12px;
  font-weight:600;
}
.co-sticky-pay__total strong{
  color:#fff;
  font-family:var(--font-display);
  font-size:20px;
  font-weight:800;
  white-space:nowrap;
}
.co-sticky-pay__btn{
  flex:0 1 340px;
  min-width:210px;
  min-height:48px;
  padding-inline:18px;
}
.co-sticky-pay__btn:disabled{opacity:.72;cursor:progress}
body.has-co-sticky-pay{padding-bottom:88px}
/* De secundaire chatknop mag de primaire geldpadknop niet afdekken. Zodra de
   originele betaalactie in beeld staat, verschijnt WhatsApp automatisch weer. */
body.has-co-sticky-pay .rpx-wa{display:none!important}

@media(max-width:520px){
  .co-sticky-pay{padding-inline:8px}
  .co-sticky-pay__inner{min-height:60px;gap:8px;padding:6px}
  .co-sticky-pay__total{padding-left:6px}
  .co-sticky-pay__total strong{font-size:18px}
  .co-sticky-pay__btn{
    flex:1 1 auto;
    min-width:0;
    min-height:48px;
    padding-inline:12px;
    font-size:16px;
  }
  body.has-co-sticky-pay{padding-bottom:82px}
}

@media(prefers-reduced-motion:reduce){
  .co-sticky-pay{scroll-behavior:auto}
}
