/* Front-end shell styling, matched to the live stiptopmaat.nl configurator:
   left 3D view with a floating toolbar, right cream config panel with accordions.
   No em dashes anywhere (client rule). */

/* The exact fonts the live configurator uses: TT Commons for body text, Neue
   Montreal for the section headings. Files are self-hosted under /assets/fonts. */
@font-face {
  font-family: 'bodyFont';
  src: url('assets/fonts/tt-commons/1592tt-commons-regular.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'headingFont';
  src: url('assets/fonts/neue-montreal/NeueMontreal-Regular.otf') format('opentype');
  font-display: swap;
}

:root {
  --panel-bg: #efeee8;
  --card: #ffffff;
  --ink: #1f2530;
  --ink-soft: #51617180;
  --info: #5d6f80;
  --accent: #b2a87f;        /* tan used by VOLGENDE / OFFERTE buttons */
  --accent-dark: #9c9269;
  --gold: #b2a87f;          /* used by contact / quote buttons + input arrows */
  --gold-dark: #9c9269;
  --line: #e0ded5;
  --sel: #2a2a2a;
  --radius: 10px;
  --tool: #ffffff;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 15px/1.5 'bodyFont', "Segoe UI", system-ui, Arial, sans-serif;
  color: var(--ink);
  display: grid;
  grid-template-columns: 1fr 420px;
  grid-template-rows: 1fr auto;
  height: 100vh;
  overflow: hidden;
  background: #ddd;
}
#stage { grid-row: 1; grid-column: 1; }
#panel { grid-row: 1; grid-column: 2; }
/* ---- bottom price bar ---- */
#pricebar {
  grid-row: 2; grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: flex-end; gap: 34px;   /* button + price together on the right */
  padding: 14px 30px; background: #adab8c; border-top: 0;   /* olive bar like the live site */
  box-shadow: 0 -2px 10px rgba(0, 0, 0, .06); z-index: 6;
}
.pb-price { display: flex; flex-direction: column; line-height: 1.2; align-items: flex-start; text-align: left; }
.pb-label { font-size: 13px; color: #fff; opacity: .9; }
.pb-amount { font-size: 30px; color: #fff; font-family: 'headingFont', 'Segoe UI', system-ui, Arial, sans-serif; line-height: 1.1; }
.pb-amount b { font-weight: 700; }
.pb-right { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pb-note { color: #fff; font-size: 14px; opacity: .95; }
.pb-quote {
  background: #9c9269; color: #fff; border: 0; border-radius: 6px;
  padding: 13px 40px; font-size: 15px; font-weight: 600; cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .18); transition: background .15s;
}
.pb-quote:hover { background: #8a8158; }

/* ---- quote request modal ---- */
.quotemodal { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; background: rgba(30, 30, 30, .5); padding: 20px; }
.quotemodal.hidden { display: none; }
.qm-box { position: relative; background: #fff; border-radius: 8px; width: 100%; max-width: 620px; max-height: 92vh; overflow-y: auto; padding: 30px 34px 34px; box-shadow: 0 18px 60px rgba(0, 0, 0, .3); }
.qm-close { position: absolute; top: 12px; right: 16px; background: none; border: 0; color: #888; font-size: 26px; line-height: 1; cursor: pointer; }
.qm-close:hover { color: #333; }
.qm-logo { display: block; width: 100%; max-width: 260px; height: auto; margin: 6px auto 14px; }
.qm-sub { margin: 0 0 22px; font-size: 16px; color: #333; text-align: center; }
.qm-row { display: flex; gap: 14px; }
.qm-row .qm-field { flex: 1; }
.qm-field { margin-bottom: 14px; display: flex; flex-direction: column; }
.qm-field label { font-size: 13px; margin-bottom: 5px; color: #444; }
.qm-field input, .qm-field select, .qm-field textarea {
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font: inherit; background: #fff; width: 100%;
}
.qm-field input:focus, .qm-field select:focus, .qm-field textarea:focus { outline: none; border-color: var(--accent); }
.qm-field textarea { resize: vertical; }
.qm-terms { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #555; margin: 4px 0 18px; }
.qm-terms a { color: var(--accent); }
.qm-submit { width: 100%; background: var(--gold); color: #fff; border: 0; border-radius: 26px; padding: 14px; font-size: 15px; font-weight: 600; cursor: pointer; transition: background .15s; }
.qm-submit:hover { background: var(--gold-dark); }
.qm-done { margin: 14px 0 0; text-align: center; color: #3c7a48; font-weight: 600; }

/* showroom appointment pop-up (reuses the .quotemodal / .qm-box shell) */
.sr-box { max-width: 500px; text-align: center; padding: 34px 44px 40px; }
.sr-box .qm-logo { max-width: 230px; margin: 4px auto 20px; }
.sr-title { margin: 0 0 12px; font-size: 22px; font-weight: 700; color: var(--ink); }
.sr-text { margin: 0 0 26px; font-size: 15px; line-height: 1.55; color: #7c7c76; }
.sr-cta { display: block; width: 100%; background: var(--gold); color: #fff; text-decoration: none; border-radius: 10px; padding: 15px 18px; font-size: 16px; font-weight: 600; transition: background .15s; }
.sr-cta:hover { background: var(--gold-dark); }
.sr-dismiss { display: block; width: 100%; margin-top: 16px; background: none; border: 0; color: #9a9a90; font-size: 14px; cursor: pointer; }
.sr-dismiss:hover { color: var(--ink); }
@media (max-width: 560px) { .qm-row { flex-direction: column; gap: 0; } }

/* ---- 3D stage ---- */
#stage { position: relative; background: #e9e9e6; }
#view { width: 100%; height: 100%; border: 0; display: block; }
/* loading overlay (logo + progress bar + percentage) */
#loader {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  background: #fbfaf7; transition: opacity .45s ease;
}
#loader.hidden { opacity: 0; pointer-events: none; }
.loader-logo { width: 300px; max-width: 55%; height: auto; }
.loader-bar { width: 340px; max-width: 60%; height: 3px; background: #e6e2d6; border-radius: 3px; overflow: hidden; }
.loader-fill { height: 100%; width: 0%; background: var(--gold); border-radius: 3px; transition: width .35s ease; }
.loader-pct { color: var(--gold); font-size: 19px; letter-spacing: .3px; }
/* measurement cm tags: HTML overlay pills projected onto the 3D view */
.measure-tag {
  position: absolute; z-index: 4; pointer-events: none;
  transform: translate(-50%, -50%); white-space: nowrap;
  background: #fff; color: #111; font: 900 13px/1 Arial, sans-serif;
  padding: 5px 12px; border-radius: 14px; box-shadow: 0 1px 5px rgba(0, 0, 0, .25);
}

#toolbar {
  position: absolute; top: 50%; left: 14px; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 10px; z-index: 5;
}
.tool {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid #e3e3e3;
  background-color: var(--tool); cursor: pointer;
  background-repeat: no-repeat; background-position: center; background-size: 24px 24px;
  box-shadow: 0 2px 6px rgba(0,0,0,.12); transition: .15s;
}
.tool:hover { background-color: #f4f4f2; }
/* active shows as a ring so the icon stays visible */
.tool.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
#btn3d       { background-image: url('assets/cabinet/ui/icons/3d-model.png'); }
#btnMeasure  { background-image: url('assets/cabinet/ui/icons/measurement.png'); }
#btnOpen     { background-image: url('assets/cabinet/ui/icons/play-button.png'); }
#btnShowDoors{ background-image: url('assets/cabinet/ui/icons/show-doors.png'); }
#envswitch {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px; z-index: 5;
}
.env {
  width: 46px; height: 46px; border-radius: 10px; border: 1px solid #e3e3e3;
  background-color: #fff; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.12);
  background-repeat: no-repeat; background-position: center; background-size: 28px 28px;
}
.env[data-bg="background1"] { background-image: url('assets/cabinet/ui/icons/livingroom.png'); }
.env[data-bg="background2"] { background-image: url('assets/cabinet/ui/icons/laundry.png'); }
.env.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
#contactBtn {
  position: absolute; right: 16px; bottom: 16px; z-index: 5;
  background: var(--gold); color: #fff; border: 0; border-radius: 24px;
  padding: 10px 18px; font-weight: 600; cursor: pointer; display: flex; gap: 8px; align-items: center;
  box-shadow: 0 3px 10px rgba(0,0,0,.2);
}
#contactBtn:hover { background: var(--gold-dark); }

/* ---- config panel ---- */
#panel { background: var(--panel-bg); overflow-y: auto; padding: 20px 22px 80px; }
#panel::-webkit-scrollbar { width: 9px; }
#panel::-webkit-scrollbar-thumb { background: #cfccc0; border-radius: 5px; }

.logo-img { display: block; width: 100%; max-width: 300px; height: auto; margin: 6px auto 18px; }
.intro { color: var(--info); font-size: 14px; margin: 0 0 18px; }
.intro a { color: var(--info); }

.acc { background: var(--card); border-radius: 14px; margin: 12px 0; overflow: hidden; box-shadow: 0 1px 0 rgba(0,0,0,.03); }
.acc > .acc-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; cursor: pointer; font-size: 22px; font-weight: 500;
  font-family: 'headingFont', 'Segoe UI', system-ui, Arial, sans-serif;  /* section titles, like the live site */
}

.acc > .acc-body { display: none; padding: 0 20px 20px; }
.acc.open > .acc-body { display: block; }
.acc .chev { transition: .2s; color: var(--gold); }
.acc.open .chev { transform: rotate(180deg); }

.sec-title { font-size: 19px; font-weight: 500; border-bottom: 2px solid var(--sel); padding-bottom: 8px; margin: 22px 0 14px; display: flex; justify-content: space-between; }
.sec-title .i { width: 22px; height: 22px; border: 1px solid #bdbdb3; border-radius: 50%; color: #9a9a8e; font-size: 13px; display: grid; place-items: center; }
.sec-title .i.clickable { cursor: pointer; transition: border-color .15s, color .15s; }
.sec-title .i.clickable:hover, .sec-title .i.clickable:focus { border-color: var(--sel); color: var(--sel); outline: none; }
.sec-note { margin: -4px 0 14px; font-size: 13px; line-height: 1.55; color: #6b6b63; }


/* dimension control: slider + numeric input */
.dim { margin: 16px 0; }
.dim label { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.dim .field { display: flex; gap: 12px; align-items: center; }
.dim input[type=range] { flex: 1; accent-color: var(--accent); }
.dim .numwrap { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.dim .numwrap input { width: 48px; border: 0; padding: 8px 4px; text-align: center; font: inherit; -moz-appearance: textfield; }
/* hide the browser's (green) default number spinner */
.dim .numwrap input::-webkit-outer-spin-button,
.dim .numwrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
/* custom tan stepper arrows */
.dim .numwrap .steppers { display: flex; flex-direction: column; }
.dim .numwrap .step {
  border: 0; background: transparent; color: var(--gold); cursor: pointer;
  font-size: 8px; line-height: 1; padding: 2px 6px; height: 17px;
}
.dim .numwrap .step:hover { color: var(--gold-dark); background: #f4f3ee; }
.dim .numwrap span { padding: 0 8px; color: #8a8a80; font-size: 12px; background: #f4f3ee; align-self: stretch; display: grid; place-items: center; }
.perpart { color: var(--info); font-size: 13px; margin-top: 4px; }

/* card grids */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 6px; }
.card-opt { position: relative; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 8px; cursor: pointer; text-align: center; font-size: 13px; transition: .15s; }
/* info "i" icon on a door-type card */
.card-i {
  position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; z-index: 2;
  border: 1px solid #bdbdb3; border-radius: 50%; color: #9a9a8e; font-size: 12px;
  display: grid; place-items: center; cursor: pointer; background: rgba(255, 255, 255, .92);
}
.card-i:hover, .card-i:focus { border-color: var(--sel); color: var(--sel); outline: none; }
.card-opt .thumb { height: 64px; border-radius: 5px; background: #b9b49a; margin-bottom: 6px; background-size: cover; background-position: center; }
.card-opt:hover { border-color: #bbb; }
.card-opt.active { border-color: var(--sel); box-shadow: 0 0 0 1px var(--sel) inset; }

/* swatch grids */
.swgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 10px 0; }
.sw { cursor: pointer; text-align: center; font-size: 11px; color: #555; }
.sw .chip { height: 78px; border-radius: 6px; border: 1px solid #ddd; background-size: cover; background-position: center; margin-bottom: 5px; }
.sw.active .chip { outline: 2px solid var(--sel); }

/* info "?" icon shown next to every swatch label */
.qmark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; margin-left: 4px;
  border-radius: 50%; background: #c4c4c4; color: #fff;
  font-size: 9px; font-weight: 700; line-height: 1;
  vertical-align: middle; cursor: pointer; user-select: none;
  transition: background .15s;
}
.qmark:hover, .qmark:focus { background: #8a9096; outline: none; }

/* small code tooltip shown on "?" hover/tap (matches the live Bootstrap tooltip:
   the board code, e.g. "W1000 ST9" — never a full-screen image) */
.qtip {
  position: fixed; z-index: 1200; pointer-events: none;
  background: #2b2b2b; color: #fff;
  padding: 5px 9px; border-radius: 4px;
  font-size: 12px; line-height: 1.2; letter-spacing: .2px; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
}
.qtip.hidden { display: none; }

/* lightbox: full handle image on "?" click */
.lb { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; background: rgba(22, 22, 22, .86); }
.lb.hidden { display: none; }
.lb-figure { margin: 0; display: flex; flex-direction: column; align-items: center; }
.lb-img { max-width: 82vw; max-height: 84vh; background: #fff; border-radius: 3px; box-shadow: 0 12px 46px rgba(0, 0, 0, .55); }
.lb-cap { margin-top: 12px; color: #eaeaea; font-size: 14px; letter-spacing: .3px; }
.lb-counter { position: absolute; top: 18px; left: 22px; color: #e8e8e8; font-size: 14px; letter-spacing: .5px; }
.lb-close { position: absolute; top: 10px; right: 16px; background: none; border: 0; color: #fff; font-size: 34px; line-height: 1; cursor: pointer; opacity: .85; }
.lb-close:hover { opacity: 1; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0, 0, 0, .32); border: 0; color: #fff; font-size: 22px; width: 46px; height: 62px; border-radius: 5px; cursor: pointer; opacity: .8; }
.lb-nav:hover { opacity: 1; background: rgba(0, 0, 0, .55); }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }

/* section info popup (the "i" icons) */
.infomodal { position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center; background: rgba(30, 30, 30, .5); padding: 20px; }
.infomodal.hidden { display: none; }
.im-box { position: relative; background: #fff; border-radius: 4px; max-width: 640px; width: 100%; padding: 32px 40px 36px; box-shadow: 0 18px 60px rgba(0, 0, 0, .3); }
.im-title { margin: 0 0 22px; font-size: 30px; font-weight: 500; color: #222; }
.im-body { margin: 0; font-size: 15px; line-height: 1.65; color: #333; }
.im-close { position: absolute; top: 14px; right: 16px; background: none; border: 0; color: #888; font-size: 26px; line-height: 1; cursor: pointer; }
.im-close:hover { color: #333; }

/* 2.1 indeling: portrait thumbnails so the tall section images show in full */
#indeling .card-opt .thumb {
  height: 120px; background-size: contain; background-repeat: no-repeat;
  background-position: center; background-color: #fff;
}
#indelingVariations .chip {
  height: 130px; background-size: contain; background-repeat: no-repeat;
  background-color: #fff;
}

/* sub accordions for colours */
.subacc { border-top: 1px solid var(--line); }
.subacc > .sa-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 2px; cursor: pointer; font-size: 17px; }
.subacc > .sa-body { display: none; padding-bottom: 10px; }
.subacc.open > .sa-body { display: block; }

/* toggles + yes/no + counters */
.toggle-row { display: flex; align-items: center; justify-content: space-between; margin: 14px 0; }
.switch { position: relative; width: 46px; height: 26px; }
.switch input { display: none; }
.switch .sl { position: absolute; inset: 0; background: #ccc; border-radius: 26px; transition: .2s; }
.switch .sl:before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .sl { background: var(--accent); }
.switch input:checked + .sl:before { transform: translateX(20px); }

.yesno button { min-width: 64px; padding: 10px 12px; border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; }
.yesno button.active { border-color: var(--sel); font-weight: 600; }
.counter { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.counter button { width: 44px; height: 40px; border: 0; background: #e7e5dd; font-size: 20px; cursor: pointer; }
.counter span { width: 48px; text-align: center; }

.optrow { display: flex; justify-content: space-between; align-items: flex-start; margin: 16px 0; }
.optrow .lbl { font-size: 18px; }
.optrow .lbl small { display: block; color: var(--info); font-size: 13px; }
/* grey "Bekijk hier meer informatie" text followed by a round "i" info button
   (the text is plain now — only the "i" opens the popup) */
.optrow .lbl .infoline { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.optrow .lbl .infoline small { display: inline; color: var(--info); font-size: 13px; text-decoration: none; cursor: default; }
.optrow .lbl .i {
  display: grid; place-items: center; flex: none;
  width: 20px; height: 20px; border: 1px solid #bdbdb3; border-radius: 50%;
  color: #9a9a8e; font-size: 12px; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.optrow .lbl .i:hover, .optrow .lbl .i:focus { border-color: var(--sel); color: var(--sel); outline: none; }
/* closing note under the extra options: bold heading + description line */
.opt-note { margin: 10px 0 0; }
.opt-note-h { display: block; color: var(--ink); font-size: 15px; font-weight: 600; }
.opt-note span { display: block; margin-top: 2px; color: var(--info); font-size: 13px; line-height: 1.5; }

/* nav */
.nav { display: flex; justify-content: space-between; margin-top: 18px; }
.btn { padding: 12px 26px; border-radius: 26px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.checkrow { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .04em; margin: 14px 0; }
.checkrow input { width: 20px; height: 20px; accent-color: var(--accent); }
.types { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.types button { padding: 9px 14px; border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; }
.types button.active { border-color: var(--sel); font-weight: 600; }
.hidden { display: none; }
.price { text-align: right; font-size: 14px; color: var(--info); margin-top: 8px; }
.price b { font-size: 20px; color: var(--ink); }

/* ================= mobile / small screens =================
   Desktop is a two-column grid (3D view | 420px panel). On a phone the 420px
   column is wider than the screen, which collapsed the 3D view to nothing and
   only showed the panel. Here we STACK it: 3D view on top, scrollable panel
   below, price bar pinned at the bottom. */
@media (max-width: 860px) {
  body {
    grid-template-columns: 1fr;
    grid-template-rows: 44vh 1fr auto;
  }
  #stage    { grid-column: 1; grid-row: 1; }
  #panel    { grid-column: 1; grid-row: 2; padding: 16px 16px 40px; }
  #pricebar { grid-column: 1 / -1; grid-row: 3; padding: 10px 16px; }

  /* touch-drag should orbit the 3D, not scroll the page */
  #view { touch-action: none; }

  /* keep the floating controls compact and inside the (shorter) 3D view */
  #envswitch { top: 10px; gap: 8px; }
  .env  { width: 40px; height: 40px; background-size: 24px 24px; }
  #toolbar { left: 10px; gap: 8px; }
  .tool { width: 40px; height: 40px; background-size: 22px 22px; }
  #contactBtn { right: 10px; bottom: 10px; padding: 8px 14px; font-size: 13px; }

  /* price bar fits on one narrow row */
  .pb-amount { font-size: 20px; }
  .pb-quote  { padding: 11px 20px; font-size: 14px; }
  .pb-note   { display: none; }   /* no room for the note on a phone */
}

/* very small phones: give the panel a touch more room */
@media (max-width: 430px) {
  body { grid-template-rows: 40vh 1fr auto; }
  .pb-label { font-size: 11px; }
  .pb-quote { padding: 10px 16px; font-size: 13px; }
}

/* Hidden on small phones, like the previous configurator (OP#1277). */
@media (max-width: 568px) {
  #contactBtn { display: none; }
}
