/* assets/dp-cart.css — nieuwe winkelwagenpagina (snippets/dp-cart.rain) + side-cart (assets/dp-cart.js)
   Alles valt onder .dpx (#dpcart en #dpsc), zodat thema-stijlen er niet doorheen lopen. Zelfde huisstijl als dp-checkout.css. */

.dpx {
  --dpx-ink: #29384B;
  --dpx-text: #4a5566;
  --dpx-muted: #898D93;
  --dpx-line: #ECECEC;
  --dpx-field: #8D8D8D;
  --dpx-bg: #FAFAFA;
  --dpx-green: #70C067;
  --dpx-green-d: #5aa651;
  --dpx-blue: #0099E5;
  --dpx-blue-bg: #E6F5FC;
  --dpx-red: #D0342C;
  --dpx-red-bg: #fdf1f0;
  --dpx-radius: 4px;
  color: var(--dpx-text);
  font-size: 15px;
  line-height: 1.45;
}
.dpx *, .dpx *::before, .dpx *::after { box-sizing: border-box; }
.dpx [hidden] { display: none !important; }
.dpx button, .dpx input, .dpx select, .dpx label, .dpx a { float: none; }
.dpx summary { text-align: left; }
.dpx ul, .dpx dl { margin: 0; padding: 0; }
.dpx .dpc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- gedeelde onderdelen ---------- */
.dpx .dpc-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 24px; margin: 0; border-radius: var(--dpx-radius); cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 700; line-height: 1; text-decoration: none; text-align: center;
  border: 2px solid var(--dpx-green); background: var(--dpx-green); color: #fff; transition: background-color .15s, color .15s;
}
.dpx .dpc-btn:hover, .dpx .dpc-btn:focus-visible { background: #fff; color: var(--dpx-green-d); text-decoration: none; }
.dpx .dpc-btn--ghost { height: 44px; padding: 0 16px; background: #fff; color: var(--dpx-ink); border: 1px solid var(--dpx-field); font-size: 15px; }
.dpx .dpc-btn--ghost:hover { background: #fff; color: var(--dpx-ink); border-color: var(--dpx-ink); }
.dpx .dpc-btn.is-loading { color: transparent; pointer-events: none; }
.dpx .dpc-btn.is-loading::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #fff; border-right-color: transparent; animation: dpx-spin .7s linear infinite; }
.dpx .dpc-btn--ghost.is-loading::after { border-color: var(--dpx-ink); border-right-color: transparent; }
@keyframes dpx-spin { to { transform: rotate(360deg); } }
.dpx .dpc-lock { width: 16px; height: 16px; fill: currentColor; flex: none; }
.dpx .dpc-input { display: block; width: 100%; height: 44px; margin: 0; padding: 0 12px; font: inherit; font-size: 16px; color: var(--dpx-ink); background: #fff; border: 1px solid var(--dpx-field); border-radius: var(--dpx-radius); box-shadow: none; outline: 0; -webkit-appearance: none; appearance: none; }
.dpx .dpc-input:focus { border-color: var(--dpx-blue); box-shadow: 0 0 0 3px rgba(0, 153, 229, .18); }
.dpx .dpc-free { color: var(--dpx-green-d); font-weight: 600; }
.dpx .dpc-chip { display: inline-flex; align-items: center; gap: 2px; height: 22px; padding: 0 2px 0 8px; border-radius: 11px; background: #eef7ed; color: #2f6b29; font-size: 12px; font-weight: 700; letter-spacing: .02em; line-height: 1; }
.dpx .dpc-chip__x { position: relative; display: inline-block; width: 18px; height: 18px; border-radius: 50%; color: inherit; text-decoration: none; }
.dpx .dpc-chip__x::before, .dpx .dpc-chip__x::after { content: ""; position: absolute; left: 5px; top: 8px; width: 8px; height: 2px; border-radius: 1px; background: currentColor; transform: rotate(45deg); }
.dpx .dpc-chip__x::after { transform: rotate(-45deg); }
.dpx .dpc-coupon { display: flex; gap: 8px; margin-top: 10px; }
.dpx .dpc-coupon .dpc-input { text-transform: uppercase; }
.dpx .dpc-coupon__msg { font-size: 13px; margin-top: 6px; }
.dpx .dpc-coupon__msg:empty { display: none; }
.dpx .dpc-coupon__msg.is-error { color: var(--dpx-red); }
.dpx .dpc-coupon__msg.is-ok { color: var(--dpx-green-d); }
.dpx .dpc-usps { list-style: none; margin: 14px 0 0; padding: 0; font-size: 13px; color: var(--dpx-ink); }
.dpx .dpc-usps li { position: relative; padding-left: 20px; margin: 4px 0; }
.dpx .dpc-usps li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 9px; height: 5px; border: solid var(--dpx-green); border-width: 0 0 2px 2px; transform: rotate(-45deg); }

/* gratis-verzending-balk */
.dpx .dpcart-free { padding: 12px 14px; border-radius: var(--dpx-radius); background: #eef7ed; color: #2f6b29; font-size: 14px; }
.dpx .dpcart-free__bar { height: 6px; margin-top: 8px; border-radius: 3px; background: rgba(112, 192, 103, .25); overflow: hidden; }
.dpx .dpcart-free__bar span { display: block; height: 100%; background: var(--dpx-green); border-radius: 3px; transition: width .3s; }
.dpx .dpcart-free.is-done .dpcart-free__bar { display: none; }

/* ---------- productregel (snippets/dp-line.rain, ook door de side-cart nagebouwd) ---------- */
.dpx .dpl { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: start; margin: 0; padding: 12px 0; border-bottom: 1px solid var(--dpx-line); list-style: none; }
.dpx .dpl:last-child { border-bottom: 0; }
.dpx .dpl__img { position: relative; width: 56px; height: 56px; border-radius: 4px; background: #fff; border: 1px solid var(--dpx-line); overflow: hidden; }
.dpx .dpl__img a { display: block; height: 100%; }
.dpx .dpl__img img { display: block; width: 100%; height: 100%; object-fit: contain; }
.dpx .dpl__qty { position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--dpx-ink); color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }
.dpx .dpl__info { min-width: 0; font-size: 13px; color: #6b7480; line-height: 1.35; }
.dpx .dpl__title { font-size: 14px; font-weight: 600; color: var(--dpx-ink); line-height: 1.3; margin-bottom: 2px; }
.dpx .dpl__title a { color: inherit; text-decoration: none; }
.dpx .dpl__title a:hover { text-decoration: underline; }
.dpx .dpl__color { display: flex; align-items: center; gap: 7px; margin-top: 4px; color: var(--dpx-ink); font-weight: 600; }
.dpx .dpl__swatch { width: 18px; height: 18px; flex: none; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.dpx .dpl__swatch--none { background: #eef0f2; }
.dpx .dpl__swatch.is-unknown { background: #fff; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.dpx .dpl__field, .dpx .dpl__extra { margin-top: 2px; }
.dpx .dpl__note { margin-top: 4px; color: var(--dpx-ink); }
.dpx .dpl__stock { display: flex; align-items: flex-start; gap: 6px; margin-top: 4px; font-size: 12px; line-height: 1.35; color: var(--dpx-muted); }
.dpx .dpl__truck { width: 15px; height: 11px; flex: none; margin-top: 2px; fill: currentColor; }
.dpx .dpl__price { display: flex; flex-direction: column; align-items: flex-end; font-size: 15px; font-weight: 700; color: var(--dpx-ink); white-space: nowrap; text-align: right; line-height: 1.3; }
.dpx .dpl__was { font-size: 12px; font-weight: 400; color: var(--dpx-muted); }
.dpx .dpl__now.is-disc { color: #3f8a37; }
.dpx .dpl__unit { font-size: 12px; font-weight: 400; color: var(--dpx-muted); margin-top: 2px; }
.dpx .dpl__gratis { color: var(--dpx-green-d); }

/* winkelwagen-modus */
.dpx .dpl--cart { grid-template-columns: 80px minmax(0, 1fr) auto; gap: 14px; padding: 16px 0; transition: opacity .15s; }
.dpx .dpl--cart .dpl__img { width: 80px; height: 80px; }
.dpx .dpl--cart.is-busy { opacity: .5; pointer-events: none; }
.dpx .dpl__ctrl { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; }
.dpx .dpl-qty { display: inline-flex; align-items: stretch; height: 38px; border: 1px solid var(--dpx-field); border-radius: var(--dpx-radius); background: #fff; overflow: hidden; }
.dpx .dpl-qty__btn { width: 36px; margin: 0; padding: 0; border: 0; background: #fff; color: var(--dpx-ink); font-size: 18px; font-weight: 700; line-height: 1; cursor: pointer; }
.dpx .dpl-qty__btn:hover { background: var(--dpx-bg); }
.dpx .dpl-qty__btn:focus-visible { outline: 2px solid var(--dpx-blue); outline-offset: -2px; }
.dpx .dpl-qty__in { width: 48px; height: 100%; margin: 0; padding: 0; border: 0; border-left: 1px solid var(--dpx-line); border-right: 1px solid var(--dpx-line); border-radius: 0; background: #fff; color: var(--dpx-ink); font: inherit; font-size: 16px; font-weight: 700; text-align: center; -moz-appearance: textfield; -webkit-appearance: none; appearance: none; box-shadow: none; }
.dpx .dpl-qty__in::-webkit-outer-spin-button, .dpx .dpl-qty__in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dpx .dpl-qty__in:focus { outline: 2px solid var(--dpx-blue); outline-offset: -2px; }
.dpx .dpl__act { font-size: 13px; color: var(--dpx-muted); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; background: none; border: 0; padding: 0; }
.dpx .dpl__act:hover { color: var(--dpx-ink); }
.dpx .dpl__tip { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 8px; padding: 7px 10px; border-radius: var(--dpx-radius); background: #fff6e5; color: #7a4b00; font-size: 13px; line-height: 1.35; }
.dpx .dpl__tip strong { font-weight: 700; }
.dpx .dpl__tip button { margin: 0; padding: 4px 10px; border: 1px solid #e0b25c; border-radius: 3px; background: #fff; color: #7a4b00; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.dpx .dpl__tip button:hover { background: #fff0d4; }
.dpx .dpl__tip.is-best { background: #eef7ed; color: #2f6b29; }

/* ---------- winkelwagenpagina ---------- */
.dpcart { padding: 24px 16px 48px; }
.dpcart .dpcart__wrap { max-width: 1140px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 360px; grid-template-areas: "head head" "main side"; column-gap: 40px; align-items: start; }
.dpcart .dpcart__head { grid-area: head; display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 18px; }
.dpcart .dpcart__h1 { margin: 0; font-size: 28px; line-height: 1.2; font-weight: 800; color: var(--dpx-ink); }
.dpcart .dpcart__count { font-size: 16px; font-weight: 400; color: var(--dpx-muted); }
.dpcart .dpcart__back { font-size: 14px; color: var(--dpx-blue); text-decoration: underline; text-underline-offset: 2px; }
.dpcart .dpcart__main { grid-area: main; min-width: 0; }
.dpcart .dpcart__msg { margin: 0 0 12px; padding: 10px 14px; border-radius: var(--dpx-radius); background: var(--dpx-blue-bg); color: var(--dpx-ink); font-size: 14px; }
.dpcart .dpcart__msg.is-error { background: var(--dpx-red-bg); color: var(--dpx-red); }
.dpcart .dpcart__form { margin: 8px 0 0; }
.dpcart .dpcart__lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--dpx-line); }
.dpcart .dpcart__side { grid-area: side; position: sticky; top: 16px; }
.dpcart .dpcart-sum { padding: 20px; background: var(--dpx-bg); border: 1px solid var(--dpx-line); border-radius: 6px; }
.dpcart .dpcart-sum__title { margin: 0 0 12px; font-size: 18px; font-weight: 800; color: var(--dpx-ink); }
.dpcart .dpcart-sum__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 7px; font-size: 14px; }
.dpcart .dpcart-sum__row dt { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin: 0; font-weight: 400; color: var(--dpx-text); }
.dpcart .dpcart-sum__row dd { margin: 0; color: var(--dpx-ink); white-space: nowrap; text-align: right; }
.dpcart .dpcart-sum__row--disc dd { color: var(--dpx-green-d); }
.dpcart .dpcart-sum__row--total { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--dpx-line); font-size: 18px; }
.dpcart .dpcart-sum__row--total dt, .dpcart .dpcart-sum__row--total dd { font-weight: 800; color: var(--dpx-ink); }
.dpcart .dpcart-sum__row--tax { font-size: 13px; }
.dpcart .dpcart-sum__row--tax dt, .dpcart .dpcart-sum__row--tax dd { color: var(--dpx-muted); }
.dpcart .dpcart-sum__muted { color: var(--dpx-muted); }
.dpcart .dpcart-coupon { margin: 12px 0 0; }
.dpcart .dpcart-coupon > summary { display: inline-block; cursor: pointer; font-size: 14px; color: var(--dpx-blue); list-style: none; text-decoration: underline; text-underline-offset: 2px; }
.dpcart .dpcart-coupon > summary::-webkit-details-marker { display: none; }
.dpcart .dpcart-sum__cta { width: 100%; height: 56px; margin-top: 16px; font-size: 17px; }
.dpcart .dpcart-sum__pay { margin-top: 12px; }
.dpcart .dpcart-sum__pay:empty { display: none; }
.dpcart .dpcart__trust { margin-top: 12px; }
.dpcart .dpcart__empty { grid-column: 1 / -1; padding: 40px 20px; text-align: center; background: var(--dpx-bg); border: 1px solid var(--dpx-line); border-radius: 6px; }
.dpcart .dpcart__empty-t { margin: 0 0 16px; font-size: 16px; color: var(--dpx-ink); }
.dpcart .dpcart-bar { display: none; }
.dpcart.is-busy .dpcart-sum { opacity: .6; transition: opacity .15s; }
.dpcart-recom { max-width: 1140px; margin: 0 auto 40px; padding: 0 16px; }

@media (max-width: 991px) {
  .dpcart { padding: 14px 0 96px; }
  .dpcart .dpcart__wrap { display: block; }
  .dpcart .dpcart__head { padding: 0 16px; margin-bottom: 10px; }
  .dpcart .dpcart__h1 { font-size: 24px; }
  .dpcart .dpcart__main { padding: 0 16px; }
  .dpcart .dpcart__side { position: static; margin-top: 16px; padding: 0 16px; }
  .dpcart .dpcart-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: #fff; border-top: 1px solid var(--dpx-line); box-shadow: 0 -4px 16px rgba(41, 56, 75, .08);
  }
  .dpcart .dpcart-bar__tot { display: flex; flex-direction: column; line-height: 1.2; font-size: 13px; color: var(--dpx-muted); }
  .dpcart .dpcart-bar__tot strong { font-size: 18px; color: var(--dpx-ink); }
  .dpcart .dpcart-bar .dpc-btn { height: 48px; padding: 0 28px; }
}
@media (max-width: 575px) {
  .dpx .dpl--cart { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; }
  .dpx .dpl--cart .dpl__img { width: 64px; height: 64px; }
}

/* ---------- side-cart (#cart aside van het thema, inhoud door dp-cart.js) ---------- */
#cart.dpsc-on .filledCart, #cart.dpsc-on .emptyCart { display: none !important; }
#cart.dpsc-on .inner { overflow-y: auto; }
#dpsc { display: flex; flex-direction: column; min-height: 0; }
#dpsc .dpsc__lines { list-style: none; margin: 0; padding: 0 16px; }
#dpsc .dpl { grid-template-columns: 60px minmax(0, 1fr) auto; gap: 10px; }
#dpsc .dpl--cart .dpl__img { width: 60px; height: 60px; }
#dpsc .dpl__ctrl { margin-top: 8px; gap: 6px 12px; }
#dpsc .dpl-qty { height: 34px; }
#dpsc .dpl-qty__btn { width: 32px; }
#dpsc .dpl-qty__in { width: 40px; font-size: 16px; }
#dpsc .dpsc__empty { padding: 24px 16px; color: var(--dpx-ink); }
#dpsc .dpsc__foot { position: sticky; bottom: 0; z-index: 2; padding: 14px 16px 16px; background: #fff; border-top: 1px solid var(--dpx-line); box-shadow: 0 -4px 12px rgba(41, 56, 75, .05); }
#dpsc .dpsc__free { margin: 12px 16px 0; }
#dpsc .dpsc__tot { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-size: 15px; color: var(--dpx-ink); }
#dpsc .dpsc__tot strong { font-size: 18px; font-weight: 800; }
#dpsc .dpsc__btns { display: flex; flex-direction: column; gap: 8px; }
#dpsc .dpsc__btns .dpc-btn { width: 100%; height: 48px; }
#dpsc .dpsc__loading { padding: 24px 16px; color: var(--dpx-muted); font-size: 14px; }
#dpsc .dpsc__err { margin: 10px 16px 0; padding: 8px 12px; border-radius: var(--dpx-radius); background: var(--dpx-red-bg); color: var(--dpx-red); font-size: 13px; }

/* incl./excl.-schakelaar van het thema (#price-switch-input) */
.dpx [data-dpx-only="excl"] { display: none !important; }
.dpx.is-excl [data-dpx-only="excl"] { display: revert !important; }
.dpx.is-excl .dpcart-sum__row[data-dpx-only="excl"], .dpx.is-excl .dpsc__tot[data-dpx-only="excl"] { display: flex !important; }
.dpx.is-excl [data-dpx-only="incl"] { display: none !important; }
/* niet op voorraad */
.dpx .dpl__stock.is-out { color: #c0392b; font-weight: 600; }
/* meldingen voor schermlezers (buiten het blok dat steeds ververst) */
.dpcart-live { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dpx .dpc-btn.is-loading { opacity: .7; pointer-events: none; }