/**
 * WPC Product Bundles for WooCommerce — Clinical Luxury overrides (golden PDP).
 * Scoped to .golden-protocol and hidden sync host.
 */

/* ── Hide default WPC chrome in golden sync host ── */
.golden-protocol__woosb-host {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.golden-protocol .woosb-wrap,
.golden-protocol .woosb-products,
.golden-protocol .woosb-product,
.golden-protocol .woosb-item {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.golden-protocol .woosb-wrap {
  padding: 0 !important;
  margin: 0 !important;
}

.golden-protocol .woosb-products,
.golden-protocol .woosb-product,
.golden-protocol .woosb-item {
  margin: 0 0 var(--space-md) !important;
  padding: 0 !important;
}

/* ── Custom toggle switch (optional items 1.3 / 3.1) + WPC bundle ── */
.golden-protocol__kit-check {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  appearance: none;
  pointer-events: auto;
}

.golden-protocol__kit-check-label {
  -webkit-tap-highlight-color: transparent;
}

.golden-protocol__kit-check-ui,
.bundle-toggle {
  position: relative;
  display: block;
  flex-shrink: 0;
  width: 44px;
  height: 24px;
  border: 0;
  border-radius: 20px;
  background: rgba(138, 138, 142, 0.2);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-origin: center center;
  will-change: transform, background-color;
}

.golden-protocol__kit-check-ui::after,
.bundle-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.12), 0 2px 6px rgba(17, 17, 17, 0.08);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.golden-protocol__kit-check-label:active .golden-protocol__kit-check-ui,
.golden-protocol__kit-check:active + .golden-protocol__kit-check-ui,
.bundle-toggle:active {
  transform: scale(0.95);
}

.golden-protocol__kit-check:focus-visible + .golden-protocol__kit-check-ui,
.bundle-toggle:focus-visible {
  outline: 2px solid var(--accent-dsd-gold);
  outline-offset: 2px;
}

.golden-protocol__kit-check:checked + .golden-protocol__kit-check-ui,
.bundle-toggle.checked,
.bundle-toggle.is-checked {
  background: #111111;
}

.golden-protocol__kit-check:checked + .golden-protocol__kit-check-ui::after,
.bundle-toggle.checked::after,
.bundle-toggle.is-checked::after {
  transform: translateX(20px);
}

@media (prefers-reduced-motion: reduce) {
  .golden-protocol__kit-check-ui,
  .golden-protocol__kit-check-ui::after,
  .bundle-toggle,
  .bundle-toggle::after {
    transition: none;
  }

  .golden-protocol__kit-check-label:active .golden-protocol__kit-check-ui,
  .golden-protocol__kit-check:active + .golden-protocol__kit-check-ui,
  .bundle-toggle:active {
    transform: none;
  }
}

.golden-protocol__kit-item.is-unchecked {
  opacity: 0.55;
}

.golden-protocol__kit-item.is-unchecked .golden-protocol__kit-line-total {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* ── Required core item marker (3.4.1) ── */
.golden-protocol__kit-item--core .golden-protocol__kit-lock {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #7c5a18;
  border: 1px solid rgba(124, 90, 24, 0.5);
  border-radius: 50%;
  background: var(--surface-white);
}

.golden-protocol__kit-item--core {
  background: var(--accent-gold-soft);
}

/* ── WPC native checkboxes (when plugin markup is visible) ── */
.golden-protocol .woosb-product input[type="checkbox"],
.golden-protocol .woosb-item input[type="checkbox"] {
  appearance: none;
  opacity: 0;
  position: absolute;
  width: 1px;
  height: 1px;
}

.golden-protocol .woosb-product.woosb-item-linked input[type="checkbox"],
.golden-protocol .woosb-item.woosb-item-linked input[type="checkbox"],
.golden-protocol .woosb-product[data-qty="1"][data-optional="no"] input[type="checkbox"] {
  display: none !important;
}

.golden-protocol .woosb-product.woosb-item-linked,
.golden-protocol .woosb-item.woosb-item-linked {
  border-left: 2px solid var(--accent-dsd-gold) !important;
  padding-left: var(--space-sm) !important;
}

/* ── Total price typography ── */
.golden-protocol .woosb-total,
.golden-protocol .woosb-total .woosb-price,
.golden-protocol .woosb-total .woocommerce-Price-amount {
  font: var(--font-display) !important;
  color: var(--text-clinical-black) !important;
}

.golden-protocol .woosb-total .woosb-price-approx,
.golden-protocol .woosb-total .woosb-approx {
  display: none !important;
}

.golden-protocol__bundle-price,
.golden-protocol__bundle-price-value {
  font: var(--font-display);
  color: var(--text-clinical-black);
}

.golden-protocol__bundle-price .woocommerce-Price-currencySymbol,
.golden-protocol__bundle-price-value .approx {
  display: none;
}

/* ── CTA ── */
.golden-protocol__buy {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
