/* ====================================================
   Stapelkorting tracker — v1.9.26
   Huisstijl: oranje #E8520A, navy #1A2E52, Inter
==================================================== */
.msp-stapel { font-family: 'Inter', system-ui, sans-serif; color: #1A2E52; }
.msp-stapel * { box-sizing: border-box; }

.msp-stapel-section {
    background: #FFF1E8;
    border-radius: 6px;
    padding: 14px;
    margin: 0 0 16px;
}

.msp-stapel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 12px;
}
.msp-stapel-eyebrow {
    font-size: .72rem;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 600;
}
.msp-stapel-savings {
    font-size: 1.4rem;
    font-weight: 800;
    color: #C04400;
    line-height: 1.1;
    margin: 4px 0;
}
.msp-stapel-savings-label {
    font-size: .8rem;
    color: #1A2E52;
}

.msp-stapel-badge-wrap { text-align: right; }
.msp-stapel-badge {
    background: #E8520A;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.msp-stapel-badge-empty {
    background: #e5e7eb;
    color: #6b7280;
}
.msp-stapel-badge-icon { font-size: .9rem; }
.msp-stapel-badge-next {
    font-size: .68rem;
    color: #6b7280;
    margin-top: 4px;
    font-style: italic;
}
.msp-stapel-badge-next.msp-stapel-max {
    color: #059669;
    font-weight: 700;
    font-style: normal;
}

.msp-stapel-steps { margin-top: 14px; }
.msp-stapel-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-top: 1px dashed rgba(232,82,10,.3);
    font-size: .85rem;
}
.msp-stapel-step:first-child { border-top: none; }

.msp-stapel-step-check {
    width: 22px; height: 22px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    flex-shrink: 0;
    background: #e5e7eb;
    color: #6b7280;
}
.msp-stapel-step-reached .msp-stapel-step-check {
    background: #059669;
    color: #fff;
}
.msp-stapel-step-current .msp-stapel-step-check {
    background: #E8520A;
    color: #fff;
    animation: msp-pulse 1.8s infinite;
}

.msp-stapel-step-text { flex: 1; }
.msp-stapel-step-locked .msp-stapel-step-text { color: #6b7280; }
.msp-stapel-step-pct { font-weight: 700; color: #1A2E52; }
.msp-stapel-step-locked .msp-stapel-step-pct { color: #6b7280; }

.msp-stapel-step-current {
    background: #fff;
    margin: 4px -8px;
    padding: 10px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(232,82,10,.15);
    border-top: none;
}

@keyframes msp-pulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(232,82,10,.5); }
    50%     { box-shadow: 0 0 0 8px rgba(232,82,10,0); }
}

.msp-stapel-goal {
    background: #fff;
    border: 1px dashed #E8520A;
    border-radius: 4px;
    padding: 10px 12px;
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: .85rem;
}
.msp-stapel-goal-text strong { color: #E8520A; }
.msp-stapel-goal-bar {
    width: 100px;
    height: 6px;
    background: #FFF1E8;
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
}
.msp-stapel-goal-bar-fill {
    height: 100%;
    background: #E8520A;
    transition: width .5s;
}

@media (max-width: 640px) {
    .msp-stapel-goal { flex-direction: column; align-items: stretch; }
    .msp-stapel-goal-bar { width: 100%; }
}

/* =============== Product page badge (aanpak 3) ================= */
.msp-stapel-teaser {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #FFF1E8;
    color: #C04400;
    padding: 6px 10px;
    border-radius: 4px;
    margin-top: 10px;
    font-size: .78rem;
    font-weight: 600;
    cursor: help;
    position: relative;
}
.msp-stapel-teaser:hover .msp-stapel-teaser-popup,
.msp-stapel-teaser:focus .msp-stapel-teaser-popup {
    display: block;
}
.msp-stapel-teaser-popup {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 100;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px 14px;
    min-width: 240px;
    box-shadow: 0 8px 20px rgba(0,0,0,.1);
    color: #1A2E52;
    font-weight: 400;
}
.msp-stapel-teaser-popup-title {
    font-weight: 700;
    font-size: .85rem;
    margin-bottom: 8px;
    color: #1A2E52;
}
.msp-stapel-teaser-popup-tier {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: .8rem;
    border-top: 1px dashed #FFF1E8;
}
.msp-stapel-teaser-popup-tier:first-of-type { border-top: none; }
.msp-stapel-teaser-popup-tier strong { color: #E8520A; }

/* v1.9.26: integratie in cart/checkout summary — geen margin buiten de box */
.cart-summary .msp-stapel-section,
.price-summary .msp-stapel-section,
#quote-summary .msp-stapel-section,
.checkout-cart-index .msp-stapel-section {
    margin: 0 0 16px;
    padding: 14px 16px;
}

/* In de summary: minder border om visueel IN de box te voelen */
#quote-summary .msp-stapel {
    margin: -4px -4px 12px;
}

/* Zorg dat het direct na de titel komt zonder witte ruimte */
.cart-totals .msp-stapel {
    margin-bottom: 12px;
}

/* v1.9.26: integratie in cart/checkout summary */
.cart-summary .msp-stapel-section,
.price-summary .msp-stapel-section,
#quote-summary .msp-stapel-section {
    margin: 0 0 16px;
    padding: 14px 16px;
}
#quote-summary .msp-stapel {
    margin: 0 0 12px;
}
.cart-totals .msp-stapel {
    margin-bottom: 12px;
}
.msp-stapel-total-row {
    border-top: 1px solid rgba(232,82,10,0.2) !important;
    border-bottom: 1px solid rgba(232,82,10,0.2) !important;
}

/* v1.9.26: CSS-based icons via icon-key (DB-safe, geen emoji-encoding issues) */
.msp-icon { font-style: normal; line-height: 1; }
.msp-icon-bronze::before   { content: "🥉"; }
.msp-icon-silver::before   { content: "🥈"; }
.msp-icon-gold::before     { content: "🥇"; }
.msp-icon-platinum::before { content: "💎"; }
.msp-icon-crown::before    { content: "👑"; }
.msp-icon-trophy::before   { content: "🏆"; }
.msp-icon-star::before     { content: "⭐"; }
.msp-icon-check::before    { content: "✓"; }
.msp-icon-dots::before     { content: "⋯"; }

/* =============================================================
   v1.9.27 — Inline category card
============================================================= */
.msp-category-card {
    grid-column: span 1;
    background: linear-gradient(135deg, #1A2E52 0%, #2d4a7c 55%, #E8520A 100%);
    color: #fff;
    border-radius: 8px;
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 320px;
    position: relative;
    overflow: hidden;
    font-family: 'Inter', system-ui, sans-serif;
}
.msp-cat-card-label {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #ffd4b8;
    font-weight: 700;
    margin-bottom: 4px;
}
.msp-cat-card-title {
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
}
.msp-cat-card-pct {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
    color: #fff;
}
.msp-cat-card-pct-sub { font-size: .82rem; color: #ffd4b8; margin-bottom: 14px; }
.msp-cat-card-bar {
    height: 6px;
    background: rgba(255,255,255,.2);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}
.msp-cat-card-bar-fill {
    height: 100%;
    background: #fff;
    border-radius: 3px;
}
.msp-cat-card-ticks {
    display: flex;
    justify-content: space-between;
    font-size: .65rem;
    color: #ffd4b8;
    margin-bottom: 14px;
}
.msp-cat-card-ticks .reached { color: #fff; font-weight: 700; }
.msp-cat-card-next {
    background: rgba(255,255,255,.1);
    border: 1px dashed rgba(255,255,255,.35);
    border-radius: 4px;
    padding: 8px 10px;
    font-size: .78rem;
    margin-bottom: 12px;
}
.msp-cat-card-next strong { color: #fff; }
.msp-cat-card-cta {
    background: #E8520A;
    color: #fff !important;
    text-align: center;
    padding: 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: .88rem;
    text-decoration: none;
}
.msp-cat-card-cta:hover { background: #C04400; }

/* =============================================================
   v1.9.27 — Cart tracker fix: als volledig blok in cart sidebar
============================================================= */
.cart-summary .msp-stapel,
.cart-summary .msp-stapel-section {
    margin: 0 0 16px;
}

/* =============================================================
   v1.9.27 — Checkout tracker visueel geïntegreerd in summary-box
============================================================= */
#quote-summary .msp-stapel {
    margin: -4px -4px 12px;
}
#quote-summary .msp-stapel-section {
    background: #FFF1E8;
    border-radius: 6px;
    margin-bottom: 4px;
}

/* =======================================================================
   v1.9.56: category-card grid-row variant — SHARED classes (geen UID meer)
   Zo wordt CSS 1x geladen via styles.css → geen FOUC bij AJAX replace.
   ======================================================================= */
.msp-stapel-grid-row { margin: 12px 0; grid-column: 1 / -1; }
.msp-stapel-grid-row .mspc-wrap { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.04); font-family: 'Inter', system-ui, sans-serif; }
.msp-stapel-grid-row .mspc-head { background: #1A2E52; color: #fff; padding: 14px 20px; display: flex; align-items: center; gap: 14px; }
.msp-stapel-grid-row .mspc-badge { background: #FF6700; color: #fff; width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 15px; flex-shrink: 0; }
.msp-stapel-grid-row .mspc-head-text { flex: 1; }
.msp-stapel-grid-row .mspc-title { font-weight: 700; font-size: 1rem; line-height: 1.2; }
.msp-stapel-grid-row .mspc-sub { font-size: .78rem; color: #9fb0c8; margin-top: 2px; }
.msp-stapel-grid-row .mspc-body { padding: 16px 20px; display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; }
.msp-stapel-grid-row .mspc-bar { height: 8px; background: #FFF1E8; border-radius: 4px; overflow: hidden; margin-bottom: 6px; }
.msp-stapel-grid-row .mspc-bar-fill { height: 100%; background: linear-gradient(90deg, #E8520A, #FF7A33); border-radius: 4px; transition: width 1s; }
.msp-stapel-grid-row .mspc-ticks { display: flex; justify-content: space-between; font-size: .72rem; color: #6b7280; }
.msp-stapel-grid-row .mspc-ticks span.reached { color: #E8520A; font-weight: 700; }
.msp-stapel-grid-row .mspc-next { background: #FFF1E8; border-left: 3px solid #E8520A; padding: 8px 12px; border-radius: 4px; font-size: .85rem; color: #1A2E52; }
.msp-stapel-grid-row .mspc-next strong { color: #E8520A; }
.msp-stapel-grid-row .mspc-cta { background: #E8520A; color: #fff; padding: 10px 18px; border-radius: 6px; font-weight: 600; font-size: .88rem; text-decoration: none; white-space: nowrap; }
.msp-stapel-grid-row .mspc-cta:hover { background: #C04400; color: #fff; }
@media (max-width: 640px) {
    .msp-stapel-grid-row .mspc-body { grid-template-columns: 1fr; padding: 14px 16px; gap: 14px; }
    .msp-stapel-grid-row .mspc-head { padding: 12px 16px; gap: 10px; }
    .msp-stapel-grid-row .mspc-badge { width: 44px; height: 44px; font-size: 13px; }
    .msp-stapel-grid-row .mspc-title { font-size: .95rem; }
    .msp-stapel-grid-row .mspc-ticks { font-size: .65rem; gap: 4px; flex-wrap: wrap; justify-content: space-around; }
    .msp-stapel-grid-row .mspc-ticks span { white-space: nowrap; }
    .msp-stapel-grid-row .mspc-cta { width: 100%; text-align: center; display: block; }
}

/* ==================== thumbnail/productgrid variant ==================== */
.msp-stapel-thumb { background: #fff; display: flex; flex-direction: column; height: 100%; }
.msp-stapel-thumb-head { background: #1A2E52; color: #fff; padding: 10px 12px; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.msp-stapel-thumb-badge { background: #FF6700; color: #fff; width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 13px; flex-shrink: 0; }
.msp-stapel-thumb-title { font-weight: 700; font-size: .88rem; line-height: 1.2; }
.msp-stapel-thumb-sub { font-size: .68rem; color: #9fb0c8; margin-top: 1px; }
.msp-stapel-thumb-body { padding: 14px 12px 12px; background: #fff; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.msp-stapel-thumb-big-wrap { text-align: center; }
.msp-stapel-thumb-big { font-size: 2rem; font-weight: 800; color: #E8520A; line-height: 1; margin-bottom: 4px; }
.msp-stapel-thumb-bigSub { font-size: .72rem; color: #6b7280; }
.msp-stapel-thumb-progress { display: flex; flex-direction: column; }
.msp-stapel-thumb-bar { height: 6px; background: #FFF1E8; border-radius: 3px; overflow: hidden; margin-bottom: 4px; }
.msp-stapel-thumb-bar-fill { height: 100%; background: linear-gradient(90deg,#E8520A,#FF7A33); border-radius: 3px; }
.msp-stapel-thumb-ticks { display: flex; justify-content: space-between; font-size: .6rem; color: #9ca3af; }
.msp-stapel-thumb-ticks .reached { color: #E8520A; font-weight: 700; }
.msp-stapel-thumb-next { background: #FFF1E8; border-left: 3px solid #E8520A; padding: 7px 10px; border-radius: 0 4px 4px 0; font-size: .72rem; color: #1A2E52; line-height: 1.35; }
.msp-stapel-thumb-next strong { color: #E8520A; font-weight: 700; }
.msp-stapel-thumb-next small { display: block; color: #6b7280; font-size: .66rem; margin-top: 2px; font-weight: 400; }
.msp-stapel-thumb-next-max { background: #f0fdf4; border-left-color: #059669; color: #065f46; }
.msp-stapel-thumb-next-max strong { color: #059669; }
.msp-stapel-thumb-cta { display: block; text-align: center; background: #E8520A; color: #fff !important; padding: 9px 10px; border-radius: 4px; font-weight: 600; font-size: .82rem; text-decoration: none; margin-top: auto; }
.msp-stapel-thumb-cta:hover { background: #C04400; }
