/* Product Bundles (Mix & Match): responsive grid/list slots, "Buy all for" card, 2-step selection modal. */
.kb-bnd {
  --kb-b-accent: var(--action-bg, var(--brand, #76217F));
  --kb-b-on-accent: var(--action-text, #ffffff);
  --kb-b-surf: var(--surface, #ffffff);
  --kb-b-surf2: var(--surface-2, #f8fafc);
  --kb-b-line: var(--line, #e2e8f0);
  --kb-b-ink: var(--ink, #1e293b);
  --kb-b-muted: var(--muted, #64748b);
  --kb-b-ok: #15803d;
  --kb-b-ok-bg: #dcfce7;
  margin: 14px 0 16px;
  font-family: inherit;
  color: var(--kb-b-ink);
}
[data-theme="dark"] .kb-bnd,
[data-theme="dark"] .kb-bm {
  --kb-b-accent: var(--action-bg, var(--accent, #c084fc));
  --kb-b-ok: #4ade80;
  --kb-b-ok-bg: rgba(34, 197, 94, 0.16);
}
.kb-bnd [hidden],
.kb-bm [hidden] {
  display: none !important;
}
.cta-grid .btn:disabled,
.cta-grid .btn.is-off,
.sticky-buy .sb-add:disabled,
.sticky-buy .sb-buy.is-off {
  opacity: 0.45 !important;
  filter: grayscale(0.45);
  cursor: not-allowed !important;
  pointer-events: none;
}
.kb-bnd-hd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.kb-bnd-hd h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}
.kb-bnd-hd small {
  font-size: 12.5px;
  color: var(--kb-b-muted);
}

/* Slot strip / grid */
.kb-bnd-slots {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 14px;
}
.kb-bnd-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 146px;
  min-height: 196px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--kb-b-line);
  background: var(--kb-b-surf);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
  text-align: center;
  box-sizing: border-box;
}
.kb-bnd.sz-small .kb-bnd-slot { width: 118px; min-height: 168px; padding: 6px; }
.kb-bnd.sz-large .kb-bnd-slot { width: 174px; min-height: 224px; padding: 10px; }
.kb-bnd-slot:hover {
  border-color: var(--kb-b-accent);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}
.kb-bnd-slot.is-empty {
  border: 1.5px dashed var(--kb-b-line);
  background: var(--kb-b-surf2);
  box-shadow: none;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.kb-bnd-slot.is-empty:hover {
  border-color: var(--kb-b-accent);
}
.kb-bnd-add-ic {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--kb-b-line);
  background: var(--kb-b-surf);
  display: grid;
  place-items: center;
  color: var(--kb-b-ink);
  font-size: 20px;
  font-weight: 500;
}
.kb-bnd-empty-lbl {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--kb-b-ink);
  line-height: 1.3;
}
.kb-bnd-slot-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--kb-b-muted);
}
.kb-bnd-opt-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--kb-b-surf2);
  border: 1px solid var(--kb-b-line);
  color: var(--kb-b-muted);
}
.kb-bnd-clear {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--kb-b-line);
  background: var(--kb-b-surf);
  color: var(--kb-b-ink);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 2;
}
.kb-bnd-clear:hover {
  border-color: #ef4444;
  color: #ef4444;
}
.kb-bnd-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--kb-b-surf2);
  margin-bottom: 6px;
}
.kb-bnd-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.kb-bnd-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 3px;
}
.kb-bnd-var {
  font-size: 11px;
  font-weight: 600;
  color: var(--kb-b-muted);
  margin-bottom: 4px;
}
.kb-bnd-pr {
  font-size: 12px;
  margin-top: auto;
  display: flex;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
}
.kb-bnd-pr s {
  color: var(--kb-b-muted);
  font-weight: 400;
}
.kb-bnd-pr b {
  color: var(--kb-b-ink);
}
.kb-bnd-qpill {
  margin: 5px auto 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid var(--kb-b-line);
  background: var(--kb-b-surf2);
  font-size: 12px;
  font-weight: 700;
}
.kb-bnd-plus {
  align-self: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--kb-b-muted);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: grid;
  place-items: center;
  flex: none;
  opacity: 0.78;
}

/* Theme variants: Compact & List */
.kb-bnd.th-compact .kb-bnd-slots { gap: 4px; }
.kb-bnd.th-compact .kb-bnd-slot { width: 120px; min-height: 162px; padding: 6px; }
.kb-bnd.th-list .kb-bnd-slots {
  flex-direction: column;
  gap: 8px;
}
.kb-bnd.th-list .kb-bnd-plus { display: none; }
.kb-bnd.th-list .kb-bnd-slot {
  width: 100%;
  min-height: 70px;
  flex-direction: row;
  align-items: center;
  text-align: left;
  gap: 10px;
  padding: 8px 10px;
}
.kb-bnd.th-list .kb-bnd-thumb {
  width: 54px;
  height: 54px;
  margin-bottom: 0;
  flex: none;
}
.kb-bnd.th-list .kb-bnd-slot.is-empty {
  justify-content: flex-start;
  padding: 12px 14px;
}
.kb-bnd.th-list .kb-bnd-pr {
  margin-top: 0;
  margin-left: auto;
  justify-content: flex-end;
}

/* Summary rows (matching OLIVER itemized breakdown under slot grid) */
.kb-bnd-rows {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}
.kb-bnd-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  padding: 4px 0;
}
.kb-bnd-rname {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.kb-bnd-rlink {
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  color: var(--kb-b-ink);
  font-weight: 500;
  word-break: break-word;
}
.kb-bnd-edit {
  border: 0;
  background: none;
  color: var(--kb-b-muted);
  cursor: pointer;
  padding: 3px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.kb-bnd-edit:hover {
  color: var(--kb-b-accent);
  background: var(--kb-b-surf2);
}
.kb-bnd-rqty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--kb-b-line);
  border-radius: 6px;
  background: var(--kb-b-surf);
  height: 28px;
  overflow: hidden;
}
.kb-bnd-rqty button {
  width: 24px;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--kb-b-ink);
  cursor: pointer;
  font-weight: 700;
}
.kb-bnd-rqty span {
  min-width: 24px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
}
.kb-bnd-rpr {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 13.5px;
}
.kb-bnd-rpr s { color: var(--kb-b-muted); }
.kb-bnd-rpr b { font-weight: 700; }

/* "Buy all for" total card */
.kb-bnd-total {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid var(--kb-b-line);
  background: var(--kb-b-surf);
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.05);
}
.kb-bnd-total.has-badge { margin-top: 8px; }
.kb-bnd-badge {
  position: absolute;
  top: -11px;
  right: 12px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #e11d48;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.25);
}
.kb-bnd-tlbl {
  font-size: 14px;
  font-weight: 700;
}
.kb-bnd-tvals {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.kb-bnd-tvals s {
  color: var(--kb-b-muted);
  font-size: 14px;
}
.kb-bnd-tvals b {
  font-size: 17px;
  font-weight: 800;
}
.kb-bnd-save {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--kb-b-ok);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}
.kb-bnd-alert {
  margin-top: 10px;
  padding: 10px 13px;
  border-radius: 10px;
  border: 1px solid #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  color: var(--kb-b-ink);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.kb-bnd-alert[hidden] { display: none !important; }

/* Cart / Checkout component sub-list */
.kb-ck-comps {
  display: grid;
  gap: 2px;
  margin: 4px 0 6px;
  padding-left: 8px;
  border-left: 2px solid var(--kb-b-line);
  font-size: 12px;
  color: var(--kb-b-muted);
}

/* 2-Step Modal Picker */
.kb-bm {
  --kb-b-accent: var(--action-bg, var(--brand, #76217F));
  --kb-b-on-accent: var(--action-text, #ffffff);
  --kb-b-surf: var(--surface, #ffffff);
  --kb-b-surf2: var(--surface-2, #f8fafc);
  --kb-b-line: var(--line, #e2e8f0);
  --kb-b-ink: var(--ink, #1e293b);
  --kb-b-muted: var(--muted, #64748b);
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(4px);
}
.kb-bm.on { display: flex; }
.kb-bm-box {
  width: 100%;
  max-width: 820px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid var(--kb-b-line);
  background: var(--kb-b-surf);
  color: var(--kb-b-ink);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}
.kb-bm-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--kb-b-line);
}
.kb-bm-head h3 {
  margin: 0;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.3;
}
.kb-bm-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--kb-b-ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
}
.kb-bm-icon.is-empty {
  visibility: hidden;
  pointer-events: none;
}
.kb-bm-icon:hover { background: var(--kb-b-surf2); }
.kb-bm-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px 6px;
}
.kb-bm-search, .kb-bm-filter {
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--kb-b-line);
  background: var(--kb-b-surf);
  color: var(--kb-b-ink);
  font: inherit;
  font-size: 13px;
}
.kb-bm-search { flex: 1; min-width: 180px; max-width: 320px; }
.kb-bm-filter { min-width: 200px; }
.kb-bm-body {
  padding: 12px 16px 18px;
  overflow-y: auto;
  flex: 1;
}
.kb-bm-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.kb-bm-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--kb-b-line);
  border-radius: 12px;
  background: var(--kb-b-surf);
  padding: 8px;
  cursor: pointer;
  text-align: center;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.kb-bm-card:hover:not(.is-oos) {
  border-color: var(--kb-b-accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}
.kb-bm-card.is-selected {
  border-color: var(--kb-b-accent);
  box-shadow: 0 0 0 2px var(--kb-b-accent);
}
.kb-bm-card.is-oos {
  opacity: 0.55;
  cursor: not-allowed;
}
.kb-bm-cimg {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--kb-b-surf2);
  margin-bottom: 8px;
}
.kb-bm-cimg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.kb-bm-oos-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.8);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
}
.kb-bm-cname {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kb-bm-cpr {
  font-size: 12.5px;
  margin-bottom: 6px;
  display: flex;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
}
.kb-bm-cpr s { color: var(--kb-b-muted); }
.kb-bm-cpr b { color: var(--kb-b-ink); }
.kb-bm-act {
  margin-top: auto;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--kb-b-accent);
  padding: 4px 0 2px;
}
.kb-bm-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--kb-b-line);
  background: var(--kb-b-surf2);
  font-size: 12.5px;
}
.kb-bm-pg {
  display: flex;
  align-items: center;
  gap: 6px;
}
.kb-bm-pg button {
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--kb-b-line);
  background: var(--kb-b-surf);
  color: var(--kb-b-ink);
  cursor: pointer;
  font-weight: 600;
}
.kb-bm-pg button:disabled { opacity: 0.45; cursor: not-allowed; }

@media (max-width: 960px) {
  .kb-bnd:not(.th-list) .kb-bnd-slot { width: 132px; min-height: 178px; }
}
@media (max-width: 860px) {
  .kb-bm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
}
@media (max-width: 640px) {
  .kb-bnd-slots { gap: 6px; }
  .kb-bnd:not(.th-list) .kb-bnd-slot,
  .kb-bnd.sz-small .kb-bnd-slot,
  .kb-bnd.sz-large .kb-bnd-slot,
  .kb-bnd.th-compact .kb-bnd-slot {
    flex: 1 1 calc(50% - 18px);
    width: auto;
    max-width: calc(50% - 4px);
    min-width: 0;
    min-height: 162px;
    padding: 7px;
  }
  .kb-bnd-plus { width: 20px; height: 20px; font-size: 12px; }
  .kb-bnd-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 8px; }
  .kb-bnd-row > * { min-width: 0; }
  .kb-bnd-rpr { grid-column: 1 / -1; justify-content: flex-end; }
  .kb-bnd-total { padding: 12px; gap: 8px; }
  .kb-bm { padding: 8px; }
  .kb-bm-box { max-height: 92dvh; border-radius: 14px; }
  .kb-bm-head { padding: 10px 12px; grid-template-columns: 34px minmax(0, 1fr) 34px; gap: 6px; }
  .kb-bm-head h3 { font-size: 13px; letter-spacing: 0.02em; }
  .kb-bm-bar { padding: 10px 12px 6px; }
  .kb-bm-search, .kb-bm-filter { flex: 1 1 100%; width: 100%; min-width: 0; max-width: 100%; }
  .kb-bm-body { padding: 10px 12px 14px; }
  .kb-bm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kb-bm-card { padding: 6px; }
  .kb-bm-foot { padding: 8px 12px; flex-wrap: wrap; justify-content: center; }
}
@media (max-width: 350px) {
  .kb-bnd:not(.th-list) .kb-bnd-slot { flex: 1 1 100%; max-width: 100%; }
  .kb-bnd-plus { display: none; }
  .kb-bm-grid { grid-template-columns: 1fr; }
}
