/* ───────────────────────────────────────────────
   PepTek · Build-Your-Own Kit (/build-a-kit)
   ─────────────────────────────────────────────── */

.kb-wrap { padding-top: 34px; padding-bottom: 90px; }

/* page head */
.kb-head { max-width: 760px; margin-bottom: 34px; }
.kb-badge {
  display: inline-block; font-family: "Montserrat", system-ui, sans-serif; font-size: 12px;
  letter-spacing: .14em; color: var(--pp); background: var(--pp-tint);
  padding: 6px 14px; border-radius: var(--r-pill); margin-bottom: 16px;
}
.kb-head h1 {
  font-family: "Poppins", sans-serif; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: clamp(28px, 4.2vw, 46px); line-height: 1.08;
}
/* light page: gradient starts darker so the top doesn't wash out on bone bg */
.kb-head h1 em {
  font-style: normal;
  background: linear-gradient(180deg, #C448D2 0%, #9D27A9 50%, #4A1052 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.kb-head p { color: var(--ink-3); font-size: 15px; margin-top: 14px; max-width: 620px; }

/* layout */
.kb-builder { display: grid; grid-template-columns: 1fr 360px; gap: 26px; align-items: start; }
@media (max-width: 1020px) { .kb-builder { grid-template-columns: 1fr; } }

.kb-panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: clamp(18px, 3vw, 32px); box-shadow: var(--clay-w-sm);
}

.kb-step {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: "Montserrat", system-ui, sans-serif; font-size: 12px; color: var(--pp);
  background: var(--pp-tint); padding: 5px 14px; border-radius: var(--r-pill); margin-bottom: 14px;
}
.kb-step b {
  background: var(--pp); color: #fff; width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px;
}

/* size cards */
.kb-sizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 6px; }
@media (max-width: 640px) { .kb-sizes { grid-template-columns: 1fr; } }
.kb-size {
  position: relative; border: 2px solid var(--line); border-radius: var(--r-md);
  padding: 20px 18px 18px; cursor: pointer; background: var(--surface); text-align: left;
  font-family: inherit; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.kb-size:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(157,39,169,.10); }
.kb-size.on { border-color: var(--pp); box-shadow: 0 10px 28px rgba(157,39,169,.16); }
.kb-pop {
  position: absolute; top: -11px; right: 14px; background: var(--pp); color: #fff;
  font-family: "Montserrat", system-ui, sans-serif; font-size: 10px; letter-spacing: .08em;
  padding: 4px 10px; border-radius: var(--r-pill);
}
.kb-size h3 { font-family: "Poppins", sans-serif; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.kb-size-sub { color: var(--ink-3); font-size: 12.5px; margin: 2px 0 12px; }
.kb-save {
  display: inline-block; background: #E6F4EA; color: #1F5933; font-weight: 700;
  font-size: 13px; padding: 4px 12px; border-radius: var(--r-pill);
}
.kb-bac { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 12px; color: var(--ink-3); }
.kb-bac svg { flex: none; }

/* filter chips */
.kb-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 16px; }
.kb-chip {
  border: 1.5px solid var(--line); background: var(--surface); border-radius: var(--r-pill);
  padding: 7px 16px; font-size: 13px; cursor: pointer; font-family: inherit; color: var(--ink);
  transition: all .12s;
}
.kb-chip:hover { border-color: var(--pp-soft); }
.kb-chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* product grid */
.kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.kb-tile {
  border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 14px;
  background: var(--surface); display: flex; flex-direction: column; gap: 8px;
  position: relative; transition: border-color .15s, box-shadow .15s;
}
.kb-tile.picked { border-color: var(--pp); box-shadow: 0 6px 20px rgba(157,39,169,.10); }
.kb-dot {
  position: absolute; top: -9px; right: -6px; background: var(--pp); color: #fff;
  font-family: "Poppins", sans-serif; font-weight: 700; font-size: 12px; min-width: 24px; height: 24px;
  border-radius: var(--r-pill); display: inline-flex; align-items: center; justify-content: center;
  padding: 0 7px; box-shadow: 0 4px 10px rgba(157,39,169,.35); z-index: 1;
}
.kb-thumb {
  height: 110px; border-radius: 14px; background: var(--pp-tint-2);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.kb-thumb img { width: 100%; height: 100%; object-fit: contain; }
.kb-thumb-ph { color: var(--ink-3); font-size: 12px; padding: 8px; text-align: center; }
.kb-cat {
  font-family: "Montserrat", system-ui, sans-serif; font-size: 10px; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .1em;
}
.kb-tile h4 { font-family: "Poppins", sans-serif; font-size: 15px; font-weight: 700; line-height: 1.2; }
.kb-strengths { display: flex; gap: 5px; flex-wrap: wrap; }
.kb-strength {
  border: 1.5px solid var(--line); border-radius: var(--r-pill); font-size: 11.5px;
  padding: 3px 10px; cursor: pointer; background: var(--surface);
  font-family: "Montserrat", system-ui, sans-serif; color: var(--ink);
}
.kb-strength.on { background: var(--pp-tint); border-color: var(--pp); color: var(--pp); font-weight: 700; }
.kb-dose-single { font-family: "Montserrat", system-ui, sans-serif; font-size: 11.5px; color: var(--ink-3); }
.kb-tile-row { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 6px; }
.kb-price { font-family: "Poppins", sans-serif; font-weight: 800; font-size: 16px; }
.kb-stepper {
  display: flex; align-items: center; gap: 2px; border: 1.5px solid var(--line);
  border-radius: var(--r-pill); overflow: hidden;
}
.kb-stepper button {
  border: 0; background: transparent; width: 30px; height: 30px; font-size: 17px;
  cursor: pointer; color: var(--pp); font-family: "Poppins", sans-serif; line-height: 1;
}
.kb-stepper button:disabled { color: #D8D3DE; cursor: default; }
.kb-stepper .q { min-width: 20px; text-align: center; font-family: "Poppins", sans-serif; font-weight: 700; font-size: 14px; }

/* summary rail */
.kb-rail { position: sticky; top: 18px; }
@media (max-width: 1020px) { .kb-rail { position: static; } }
.kb-rail-h { font-family: "Poppins", sans-serif; font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.kb-rail-sub { font-size: 12.5px; color: var(--ink-3); margin: 0 0 14px; }
.kb-slots { display: flex; gap: 7px; flex-wrap: wrap; min-height: 56px; margin-bottom: 18px; }
.kb-slot {
  width: 34px; height: 56px; border-radius: 9px 9px 12px 12px;
  border: 2px dashed var(--pp-soft); background: var(--pp-tint); transition: all .2s; position: relative;
}
.kb-slot.full { border: 2px solid var(--pp); background: linear-gradient(180deg, #fff 22%, var(--pp-soft) 22%); }
.kb-slot.full::before {
  content: ""; position: absolute; top: -6px; left: 8px; right: 8px; height: 8px;
  border-radius: 4px 4px 0 0; background: var(--pp);
}
.kb-slot.bac { border: 2px solid #8FBFF5; background: linear-gradient(180deg, #fff 22%, #BFDCFA 22%); }
.kb-slot.bac::before {
  content: ""; position: absolute; top: -6px; left: 8px; right: 8px; height: 8px;
  border-radius: 4px 4px 0 0; background: #3D7CC9;
}
.kb-slot.bac::after {
  content: "FREE"; position: absolute; bottom: -16px; left: 50%; transform: translateX(-50%);
  font-family: "Montserrat", system-ui, sans-serif; font-size: 8px; color: #3D7CC9; letter-spacing: .05em;
}
.kb-progress { height: 8px; background: var(--pp-tint); border-radius: var(--r-pill); margin: 8px 0; overflow: hidden; }
.kb-progress i {
  display: block; height: 100%; width: 0; border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--pp-soft), var(--pp)); transition: width .25s;
}
.kb-prog-txt { font-family: "Montserrat", system-ui, sans-serif; font-size: 11.5px; color: var(--ink-3); }
.kb-picked { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; max-height: 180px; overflow-y: auto; }
.kb-picked-row { display: flex; justify-content: space-between; font-size: 13px; gap: 10px; }
.kb-picked-row .d { color: var(--ink-3); }
.kb-picked-row .p { font-family: "Montserrat", system-ui, sans-serif; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.kb-math { border-top: 1px dashed var(--line); margin-top: 14px; padding-top: 14px; display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; }
.kb-math .r { display: flex; justify-content: space-between; gap: 10px; }
.kb-math .r .lab { color: var(--ink-3); }
.kb-math .r.disc { color: #1F5933; font-weight: 700; }
.kb-math .r.disc .lab { color: #1F5933; }
.kb-math .r.bac span:last-child { color: #3D7CC9; font-weight: 700; }
.kb-math .r.bac s { color: var(--ink-3); font-weight: 400; margin-right: 6px; }
.kb-math .r.total {
  border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px;
  font-family: "Poppins", sans-serif; font-weight: 800; font-size: 19px;
}
.kb-flag {
  background: #E6F4EA; color: #1F5933; border-radius: var(--r-sm); text-align: center;
  font-weight: 700; font-size: 13px; padding: 9px; margin-top: 12px;
}
.kb-stack {
  background: var(--pp-tint); color: var(--pp-2); border-radius: var(--r-sm);
  font-size: 12.5px; padding: 9px 12px; margin-top: 10px; text-align: center;
}
.kb-warn {
  background: #FDECEC; color: #8C2B2B; border-radius: var(--r-sm);
  font-size: 12.5px; padding: 9px 12px; margin-top: 10px;
}
.kb-cta {
  position: relative;
  width: 100%; border-radius: var(--r-pill); padding: 17px; margin-top: 14px;
  font-family: "Poppins", sans-serif; font-weight: 700; font-size: 15.5px; cursor: pointer;
  background: linear-gradient(180deg, #B23BBE 0%, #9D27A9 45%, #7E1F88 100%);
  color: #fff;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 6px 16px -6px rgba(111,27,121,.65), inset 0 1px 0 rgba(255,255,255,.28), inset 0 -3px 6px rgba(0,0,30,.28);
  transition: transform .15s, box-shadow .15s, background .2s;
}
.kb-cta::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px;
  background: conic-gradient(from -90deg, #F3D9F6 0deg, #F3D9F6 var(--pt-snake, 0deg), transparent var(--pt-snake, 0deg) 360deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  filter: drop-shadow(0 0 4px rgba(232,183,238,.7));
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.kb-cta:hover:not(:disabled)::after, .kb-cta:focus-visible:not(:disabled)::after {
  opacity: 1; animation: pt-snake-draw .55s ease-out forwards;
}
.kb-cta:hover:not(:disabled) { transform: translateY(-2px); text-shadow: 0 0 8px rgba(255,255,255,.8); }
@media (prefers-reduced-motion: reduce) {
  .kb-cta:hover:not(:disabled)::after { animation: none; background: conic-gradient(#F3D9F6 0deg 360deg); }
}
.kb-cta:disabled { background: #E4DCE8; color: #9B93A6; cursor: default; box-shadow: none; }
.kb-hint { text-align: center; font-size: 11.5px; color: var(--ink-3); margin-top: 8px; }

/* mobile sticky bar */
.kb-mobile-bar {
  display: none; position: fixed; left: 10px; right: 10px; bottom: 10px;
  background: var(--ink); color: #fff; border-radius: var(--r-md); padding: 12px 16px;
  z-index: 50; align-items: center; justify-content: space-between; gap: 12px;
  box-shadow: 0 12px 30px rgba(11,10,20,.35);
}
.kb-mobile-bar .m-total { font-family: "Poppins", sans-serif; font-weight: 800; font-size: 17px; }
.kb-mobile-bar .m-sub { font-family: "Montserrat", system-ui, sans-serif; font-size: 10.5px; color: var(--pp-soft); }
.kb-mobile-bar button {
  border: 0; background: var(--pp); color: #fff; font-family: "Poppins", sans-serif;
  font-weight: 700; border-radius: var(--r-pill); padding: 11px 20px; font-size: 13.5px;
}
.kb-mobile-bar button:disabled { background: #3A3648; color: #8B8798; }
@media (max-width: 1020px) { .kb-mobile-bar.show { display: flex; } }

/* ───────────────────────────────────────────────
   Dark treatment (body.pt-dark) — matches site-wide
   glass vocabulary in clay.css
   ─────────────────────────────────────────────── */
body.pt-dark .kb-badge { background: rgba(233,107,240,.14); color: #E96BF0; }
body.pt-dark .kb-head h1 { color: #fff; }
body.pt-dark .kb-head h1 em {
  background: linear-gradient(180deg, #FBD3FC 0%, #E96BF0 30%, #A62BB2 64%, #4A1052 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
body.pt-dark .kb-head p { color: rgba(237,231,239,.85); }

body.pt-dark .kb-panel {
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.09); backdrop-filter: blur(6px);
  box-shadow: 0 6px 16px -6px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.12), inset 0 -3px 6px rgba(0,0,0,.3);
}
body.pt-dark .kb-step { background: rgba(233,107,240,.14); color: #E96BF0; }
body.pt-dark .kb-step b { background: linear-gradient(135deg, #9D27A9, #6F1B79); }

body.pt-dark .kb-size {
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.03));
  border-color: rgba(255,255,255,.12);
}
body.pt-dark .kb-size:hover {
  background: linear-gradient(180deg, rgba(157,39,169,.28), rgba(157,39,169,.10));
  border-color: rgba(213,140,221,.35);
  box-shadow: 0 26px 54px -22px rgba(157,39,169,.5);
}
body.pt-dark .kb-size.on { border-color: #D58CDD; box-shadow: 0 10px 28px rgba(157,39,169,.45); }
body.pt-dark .kb-size h3 { color: #fff; }
body.pt-dark .kb-size-sub, body.pt-dark .kb-bac { color: rgba(237,231,239,.65); }
body.pt-dark .kb-save { background: rgba(46,160,90,.18); color: #7BE0A0; }

body.pt-dark .kb-chip { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); color: rgba(255,255,255,.7); }
body.pt-dark .kb-chip:hover { border-color: rgba(213,140,221,.35); }
body.pt-dark .kb-chip.on { background: linear-gradient(135deg, #9D27A9, #6F1B79); border-color: transparent; color: #fff; }

body.pt-dark .kb-tile {
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.03));
  border-color: rgba(255,255,255,.09); backdrop-filter: blur(6px);
}
body.pt-dark .kb-tile.picked { border-color: #D58CDD; box-shadow: 0 6px 20px rgba(157,39,169,.35); }
body.pt-dark .kb-thumb { background: rgba(255,255,255,.06); }
body.pt-dark .kb-thumb-ph { color: rgba(255,255,255,.5); }
body.pt-dark .kb-cat { color: rgba(255,255,255,.5); }
body.pt-dark .kb-tile h4 { color: #fff; }
body.pt-dark .kb-price { color: #fff; }
body.pt-dark .kb-strength { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: rgba(255,255,255,.75); }
body.pt-dark .kb-strength.on { background: rgba(233,107,240,.16); border-color: #D58CDD; color: #E96BF0; }
body.pt-dark .kb-dose-single { color: rgba(237,231,239,.6); }
body.pt-dark .kb-stepper { border-color: rgba(255,255,255,.18); }
body.pt-dark .kb-stepper button { color: #D58CDD; }
body.pt-dark .kb-stepper button:disabled { color: rgba(255,255,255,.25); }
body.pt-dark .kb-stepper .q { color: #fff; }

body.pt-dark .kb-rail-h { color: #fff; }
body.pt-dark .kb-rail-sub, body.pt-dark .kb-prog-txt, body.pt-dark .kb-hint { color: rgba(237,231,239,.6); }
body.pt-dark .kb-slot { border-color: rgba(213,140,221,.4); background: rgba(233,107,240,.10); }
body.pt-dark .kb-progress { background: rgba(255,255,255,.08); }
body.pt-dark .kb-picked-row .d, body.pt-dark .kb-picked-row .p { color: rgba(237,231,239,.6); }
body.pt-dark .kb-math { border-top-color: rgba(255,255,255,.14); }
body.pt-dark .kb-math .r .lab { color: rgba(237,231,239,.65); }
body.pt-dark .kb-math .r.disc, body.pt-dark .kb-math .r.disc .lab { color: #7BE0A0; }
body.pt-dark .kb-math .r.bac span:last-child { color: #8FBFF5; }
body.pt-dark .kb-math .r.bac s { color: rgba(237,231,239,.45); }
body.pt-dark .kb-math .r.total { border-top-color: rgba(255,255,255,.14); color: #fff; }
body.pt-dark .kb-flag { background: rgba(46,160,90,.18); color: #7BE0A0; }
body.pt-dark .kb-stack { background: rgba(233,107,240,.12); color: #E9A8EF; }
body.pt-dark .kb-warn { background: rgba(200,60,60,.16); color: #F2A0A0; }
body.pt-dark .kb-cta:disabled { background: rgba(255,255,255,.08); color: rgba(255,255,255,.35); }
body.pt-dark .kb-mobile-bar { background: rgba(11,10,20,.9); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(10px); }
