:root{
  --navy:#0a2540; --navy-2:#0d2e52;
  --primary:#0071e3; --primary-d:#005bbb;
  --bg:#f5f7fa; --card:#fff; --ink:#1d1d1f; --muted:#6e6e73; --line:#e3e8ef;
  --ok:#1f9d57; --ok-bg:#e6f6ec; --warn:#b9770a; --warn-bg:#fdf3e2;
  --err:#c0392b; --err-bg:#fdeaea; --info-bg:#eaf2fe;
  --radius:14px; --shadow:0 1px 3px rgba(10,37,64,.08),0 1px 2px rgba(10,37,64,.05);
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);min-height:100vh;display:flex;flex-direction:column;
  font:15px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif}
.container{flex:1 0 auto}
.tl-footer{flex-shrink:0;margin-top:auto}
a{color:var(--primary);text-decoration:none}
a:hover{text-decoration:underline}
h1,h2,h3{color:var(--navy)}
.muted{color:var(--muted)}.small{font-size:.85rem}.right{text-align:right}

/* ── header ── */
.topbar{position:sticky;top:0;z-index:20;background:var(--navy);color:#fff;
  display:flex;align-items:center;gap:1rem;padding:.7rem 1.2rem;box-shadow:var(--shadow);flex-wrap:wrap}
.brand{display:flex;align-items:baseline;gap:.5rem;color:#fff;font-weight:700;font-size:1.15rem}
.brand:hover{text-decoration:none}
.brand .sub{font-weight:500;font-size:.8rem;color:#9fc4f5;letter-spacing:.02em}
.searchbar{flex:1;min-width:200px;display:flex;gap:.4rem}
.searchbar input{flex:1;padding:.55rem .8rem;border:1px solid transparent;border-radius:10px;font-size:.95rem;background:#fff;color:var(--ink)}
.searchbar button{border:none;background:var(--primary);color:#fff;padding:.55rem .9rem;border-radius:10px;cursor:pointer}
.topnav{display:flex;align-items:center;gap:1.1rem;font-size:.92rem}
.topnav a{color:#dbe7f7}.topnav a:hover{color:#fff}
.cartlink{position:relative;font-weight:600;color:#fff !important}
.cartpill{background:var(--primary);color:#fff;border-radius:999px;padding:.05rem .45rem;font-size:.72rem;margin-left:.2rem}
.admin-top{background:var(--navy-2)}
.tag-dry{background:var(--warn-bg);color:var(--warn);border-radius:999px;padding:.1rem .55rem;font-size:.72rem;font-weight:700}
.tag-demo{background:#eef;color:#3651d4;border-radius:999px;padding:.1rem .55rem;font-size:.72rem;font-weight:700}

.container{max-width:1200px;margin:1.4rem auto;padding:0 1.2rem}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:1.2rem 1.3rem;margin-bottom:1.2rem;box-shadow:var(--shadow)}
.card h2{margin:.1rem 0 1rem;font-size:1.15rem}
.row{display:flex;gap:1rem;flex-wrap:wrap;align-items:center}
.spread{display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap}
.grid-2{display:grid;grid-template-columns:1.6fr 1fr;gap:1.2rem}
@media(max-width:860px){.grid-2{grid-template-columns:1fr}}

/* ── filter chips ── */
.chips{display:flex;gap:.5rem;flex-wrap:wrap;margin-bottom:1rem}
.chip{display:inline-block;padding:.4rem .85rem;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--ink);font-size:.85rem}
.chip:hover{text-decoration:none;border-color:var(--primary)}
.chip.active{background:var(--navy);color:#fff;border-color:var(--navy)}

/* ── product grid ── */
.grid-products{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:.85rem}
.product{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column;box-shadow:var(--shadow);transition:box-shadow .15s,transform .15s}
.product:hover{box-shadow:0 6px 20px rgba(10,37,64,.12);transform:translateY(-2px)}
.product .imgwrap{height:170px;background:#fff;display:flex;align-items:center;justify-content:center;color:#b8c2cf;font-size:.72rem;padding:12px;box-sizing:border-box;border-bottom:1px solid var(--line)}
.product .imgwrap img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain}
.product .body{padding:.75rem .85rem;display:flex;flex-direction:column;gap:.35rem;flex:1}
.product .brand{font-size:.72rem;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}
.product .name{font-weight:600;font-size:.92rem;line-height:1.3;color:var(--ink)}
.product .name:hover{color:var(--primary)}
.product .spacer{flex:1}
.product .price{font-weight:700;color:var(--navy);font-size:1.02rem}
.product .price .bruto{font-weight:500;font-size:.78rem;color:var(--muted);text-decoration:line-through;margin-left:.3rem}
.product .incl{font-size:.74rem;color:var(--muted)}
.product .add{display:flex;gap:.4rem;margin-top:.4rem}
.product .add input{width:3.2rem;padding:.35rem;border:1px solid #cdd5e2;border-radius:8px;text-align:center}

/* badges */
.badge{display:inline-block;padding:.12rem .5rem;border-radius:999px;font-size:.72rem;font-weight:700}
.b-in{background:var(--ok-bg);color:#14663a}
.b-out{background:var(--warn-bg);color:var(--warn)}
.b-unknown{background:#eef1f6;color:#5a6678}
.status{display:inline-block;padding:.15rem .55rem;border-radius:999px;font-size:.74rem;font-weight:600;background:#eef1f6;color:#42526b}

/* buttons */
.btn{display:inline-block;border:1px solid var(--line);background:#fff;color:var(--ink);padding:.5rem .9rem;border-radius:10px;font-size:.9rem;cursor:pointer;line-height:1.2}
.btn:hover{background:#f4f7fb;text-decoration:none}
.btn-primary{background:var(--primary);border-color:var(--primary);color:#fff}
.btn-primary:hover{background:var(--primary-d)}
.btn-navy{background:var(--navy);border-color:var(--navy);color:#fff}
.btn-navy:hover{background:var(--navy-2)}
.btn-sm{padding:.32rem .6rem;font-size:.82rem}
.btn-block{width:100%;text-align:center}
.btn-danger{color:var(--err);border-color:#f1c9c4}
.btn-danger:hover{background:var(--err-bg)}

/* forms */
label{display:flex;flex-direction:column;gap:.3rem;font-size:.85rem;color:var(--muted);margin-bottom:.6rem}
input[type=text],input[type=email],input[type=password],input[type=number],input[type=date],select,textarea{
  padding:.55rem .65rem;border:1px solid #cdd5e2;border-radius:9px;font-size:.92rem;color:var(--ink);background:#fff;font-family:inherit}
input:focus,select:focus,textarea:focus{outline:2px solid #bcd0fb;border-color:var(--primary)}
.checkbox{flex-direction:row;align-items:center;gap:.5rem;color:var(--ink)}

/* tables */
.table{width:100%;border-collapse:collapse;font-size:.9rem}
.table th{text-align:left;color:var(--muted);font-weight:600;padding:.55rem .6rem;border-bottom:2px solid var(--line)}
.table td{padding:.6rem .6rem;border-bottom:1px solid var(--line);vertical-align:middle}
.table tbody tr:hover{background:#fafbfd}

/* flashes */
.flash{padding:.7rem 1rem;border-radius:10px;margin-bottom:1rem;border:1px solid transparent}
.flash-info{background:var(--info-bg);border-color:#cfe0fc}
.flash-success{background:var(--ok-bg);border-color:#c4ead2;color:#14663a}
.flash-error{background:var(--err-bg);border-color:#f3c7c7;color:#962020}

/* login */
.auth{max-width:380px;margin:7vh auto;background:var(--card);padding:2rem;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.auth h1{margin:0 0 .3rem;font-size:1.4rem}
.auth form{margin-top:1.2rem;display:flex;flex-direction:column;gap:.3rem}
.auth .btn{margin-top:.6rem}
.demo-hint{margin-top:1rem;font-size:.82rem;color:var(--muted);background:#f7f9fc;padding:.7rem;border-radius:9px;border:1px solid var(--line)}

/* totals box */
.totals{margin-left:auto;min-width:260px}
.totals .line{display:flex;justify-content:space-between;padding:.25rem 0}
.totals .grand{border-top:1px solid var(--line);margin-top:.4rem;padding-top:.5rem;font-weight:700;font-size:1.1rem;color:var(--navy)}

/* admin sidebar layout */
.kpi{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:1rem;margin-bottom:1.2rem}
.kpi .box{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:1rem 1.1rem;box-shadow:var(--shadow)}
.kpi .num{font-size:1.8rem;font-weight:800;color:var(--navy)}
.kpi .lbl{color:var(--muted);font-size:.85rem}

/* ── catalogus met filter-sidebar ── */
.shop-layout{display:grid;grid-template-columns:248px 1fr;gap:1.5rem;align-items:start}
.filters .card{position:sticky;top:88px}
.filter-h{font-size:.8rem;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin:1rem 0 .5rem}
.filter-list{display:flex;flex-direction:column;gap:.35rem;max-height:240px;overflow-y:auto}
.fopt{display:flex;flex-direction:row;align-items:center;gap:.5rem;font-size:.9rem;color:var(--ink);margin:0;cursor:pointer}
.fopt input{margin:0;flex:none}
@media(max-width:720px){.shop-layout{grid-template-columns:1fr}.filters .card{position:static}.filter-list{max-height:200px}}

/* ── footer (Topline-stijl) ── */
.tl-footer{background:var(--navy);color:rgba(255,255,255,.7);margin-top:3rem}
.tl-footer__top{display:grid;grid-template-columns:1.6fr 1fr 1fr;gap:40px;max-width:1100px;margin:0 auto;padding:48px max(24px,5vw) 30px}
.tl-footer__brand img{height:38px;width:auto;margin-bottom:14px;filter:brightness(0) invert(1)}
.tl-footer__brand p{font-size:13px;line-height:1.7;color:rgba(255,255,255,.55)}
.tl-footer__col h4{font-size:13px;font-weight:600;color:#fff;margin:0 0 12px;letter-spacing:.03em}
.tl-footer__col ul{list-style:none;margin:0;padding:0}
.tl-footer__col li{margin-bottom:8px}
.tl-footer__col a{font-size:14px;color:rgba(255,255,255,.62)}
.tl-footer__col a:hover{color:#fff;text-decoration:none}
.tl-footer__bar{border-top:1px solid rgba(255,255,255,.1);max-width:1100px;margin:0 auto;padding:16px max(24px,5vw);display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px}
.tl-footer__bar span{font-size:12px;color:rgba(255,255,255,.42)}
.tl-footer__bar .links{display:flex;gap:18px}
.tl-footer__bar a{font-size:12px;color:rgba(255,255,255,.45)}
.tl-footer__bar a:hover{color:#fff;text-decoration:none}
.addr{line-height:1.6;margin:.3rem 0}
@media(max-width:760px){.tl-footer__top{grid-template-columns:1fr;gap:24px;text-align:center}.tl-footer__brand img{margin-left:auto;margin-right:auto}.tl-footer__bar{flex-direction:column;text-align:center}}

/* ── promobalk ── */
.promobar{background:var(--navy-2);color:#dbe7f7;display:flex;justify-content:center;gap:2rem;flex-wrap:wrap;padding:.45rem 1rem;font-size:.82rem}
@media(max-width:600px){.promobar{gap:.8rem;font-size:.72rem}}
.pricenote{background:#fff8e6;color:#6b5300;border-bottom:1px solid #f0e2b8;text-align:center;padding:.4rem 1rem;font-size:.82rem}
@media(max-width:600px){.pricenote{font-size:.74rem}}

/* ── homepage ── */
.home-hero{background:linear-gradient(120deg,#0a2540,#0d2e52);color:#fff;border-radius:var(--radius);padding:2.2rem 2rem;margin-bottom:1.4rem;box-shadow:var(--shadow)}
.home-hero h1{color:#fff;margin:0 0 .4rem;font-size:1.9rem}
.home-hero p{color:#cdd9ea;max-width:560px}
.home-sec-head{display:flex;justify-content:space-between;align-items:baseline;margin:1.4rem 0 .8rem}
.home-sec-head h2{margin:0}
.home-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:1rem}
.home-tile{display:flex;flex-direction:column;gap:.2rem;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:1.1rem 1.2rem;box-shadow:var(--shadow);color:var(--ink)}
.home-tile:hover{text-decoration:none;border-color:var(--primary)}
.home-tile-title{font-weight:700;color:var(--navy);font-size:1.05rem}

/* collectie-links in catalogus-zijbalk */
.coll-link{display:block;padding:.3rem 0;color:var(--ink);font-size:.9rem}
.coll-link:hover{color:var(--primary);text-decoration:none}
.coll-link.active{font-weight:700;color:var(--navy)}

/* ── zoek-autocomplete ── */
.searchwrap2{position:relative;flex:1;min-width:200px;display:flex}
.searchwrap2 .searchbar{flex:1;min-width:0}
.ac-drop{position:absolute;top:calc(100% + 6px);left:0;right:0;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 30px rgba(10,37,64,.18);z-index:50;overflow-y:auto;max-height:72vh}
.ac-item{display:flex;align-items:center;gap:.7rem;padding:.55rem .8rem;border-bottom:1px solid var(--line);color:var(--ink)}
.ac-item:last-child{border-bottom:none}
.ac-item:hover{background:#f4f7fb;text-decoration:none}
.ac-item img,.ac-noimg{width:42px;height:42px;border-radius:8px;object-fit:contain;background:#eef2f7;flex:none}
.ac-txt{display:flex;flex-direction:column;min-width:0;flex:1}
.ac-brand{font-size:.68rem;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}
.ac-title{font-weight:600;font-size:.9rem;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ac-sub{font-size:.75rem;color:var(--muted)}
.ac-price{font-weight:700;color:var(--navy);white-space:nowrap;font-size:.9rem}

/* ── groep-kaart (verfmatrix) ── */
.product .imgwrap{position:relative}
.grouplink{color:inherit}
.grouplink:hover{text-decoration:none}
.grouplink .name{color:var(--ink)}
.variant-badge{position:absolute;top:.5rem;right:.5rem;background:var(--navy);color:#fff;border-radius:999px;padding:.15rem .6rem;font-size:.72rem;font-weight:700}
.disc-badge{position:absolute;top:.5rem;left:.5rem;background:#e23744;color:#fff;border-radius:999px;padding:.15rem .6rem;font-size:.78rem;font-weight:800;box-shadow:0 1px 3px rgba(0,0,0,.2)}
.qo-panel{border-top:1px solid var(--line);margin-top:.45rem;padding-top:.45rem}
.qo-list{max-height:220px;overflow-y:auto}
.qo-row{display:flex;align-items:center;gap:.5rem;padding:.28rem 0;border-bottom:1px solid var(--line);font-size:.82rem;margin:0}
.qo-row:last-child{border-bottom:0}
.qo-lbl{flex:none;min-width:3.2rem;font-weight:600}
.qo-q{width:3rem;padding:.25rem;border:1px solid var(--line);border-radius:6px;text-align:center;flex:none}
.qo-pr{flex:1;text-align:right;color:var(--navy);white-space:nowrap}
.grouplink-more{color:var(--muted)!important}
.product .imgwrap{text-decoration:none}

/* ── verfmatrix ── */
.matrix{margin-top:.4rem}
.vrow{display:grid;grid-template-columns:52px 1fr auto auto;gap:1rem;align-items:center;padding:.7rem .1rem;border-bottom:1px solid var(--line)}
.vrow:last-child{border-bottom:none}
.vthumb{width:52px;height:52px;border-radius:8px;background:#eef2f7;overflow:hidden;display:flex;align-items:center;justify-content:center;flex:none}
.vthumb img{width:100%;height:100%;object-fit:contain}
.vcode{font-weight:700;color:var(--navy);font-size:1.02rem}
.vmeta{font-size:.78rem;color:var(--muted);margin-top:.1rem}
.ok-text{color:var(--ok)}
.vprice{white-space:nowrap;text-align:right}
.vprice .bruto,.bruto{color:var(--muted);text-decoration:line-through;font-size:.8rem;margin-right:.15rem}
.stepper{display:flex;align-items:center;gap:.3rem}
.step{width:2rem;height:2rem;border:1px solid #cdd5e2;background:#fff;border-radius:8px;font-size:1.2rem;cursor:pointer;line-height:1;color:var(--navy)}
.step:hover{background:#f4f7fb}
.vqty{width:3.4rem;text-align:center;padding:.4rem .2rem}
.matrix-summary{position:sticky;top:90px}
.sumrow{display:flex;justify-content:space-between;padding:.3rem 0}
.sumrow.grand{font-weight:700;color:var(--navy);border-top:1px solid var(--line);margin-top:.3rem;padding-top:.6rem;font-size:1.1rem}
#sumCount{font-weight:700;color:var(--navy)}

@media(max-width:760px){
  .topbar{gap:.5rem .8rem}.searchwrap2{order:3;width:100%;flex:1 1 100%}
  .container{padding:0 .8rem}.totals{min-width:100%}
  .matrix-summary{position:static}
  .vrow{grid-template-columns:44px 1fr auto}
  .vthumb{width:44px;height:44px}
  .vrow .vprice{grid-column:2;text-align:left}
}
