/**
 * Single product — JT Font Bundle type tester + font list.
 * Parity: jt-dummies/jt-typepro/previews/jt-typepro-single-font-bundle-product-dummy.html
 */

:root {
  --jt-bundle-badge: #5b8cff;
  --jt-bundle-badge-text: #ffffff;
  --jt-bundle-style-label: var(--jt-accent);
  --preview-canvas-text: #ffffff;
}

/* ── Single product shell (bundle) ── */
.jt-single-product--bundle {
  padding-bottom: 0;
  --jt-product-shell-max: 1800px;
  --jt-product-shell-width: 90%;
}

/* Semua canvas bundle: 90% · max 1800px — slider full width di jt-slider.css */
.jt-single-product--bundle .jt-product-test-layout__shell,
.jt-single-product--bundle .jt-tp-product-stack__shell,
.jt-single-product--bundle .jt-tp-product-shell,
.jt-single-product-main:has(.jt-single-product--bundle) .jt-single-product__related {
  width: var(--jt-product-shell-width);
  max-width: var(--jt-product-shell-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
  box-sizing: border-box;
}

.jt-single-product-main:has(.jt-single-product--bundle) .jt-single-product__related {
  --jt-related-band-width: var(--jt-product-shell-width);
}

.jt-single-product--bundle .jt-product-test-layout--bundle {
  margin: 32px 0 0;
}

.jt-single-product--bundle .jt-product-test-layout--bundle.jt-product-test-layout--solo {
  margin-bottom: 0;
}

.jt-single-product--bundle .jt-single-product__tester .jt-tp-product-stack {
  margin-top: 0;
  padding-top: 0;
}

/* Slider: assets/css/jt-slider.css — [jt_slider_data] marquee (sama single-font-product.php) */

.jt-product-test-layout--bundle {
  margin-top: 0;
}

.jt-product-test-layout--bundle .jt-product-bundle-tester {
  margin: 0;
  min-width: 0;
}

.jt-product-test-layout--bundle .jt-product-bundle-tester__shell {
  padding: 0;
}

/* Bundle tester — header, toolbar, font list */
.jt-bundle-fonts-included__badge {
  display: inline-block;
  flex-shrink: 0;
  margin: 0;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--jt-bundle-badge);
  color: var(--jt-bundle-badge-text);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
}

.jt-bundle-tester-header {
  margin-bottom: 0;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--jt-border);
}

.jt-bundle-tester-header__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
}

.jt-bundle-tester-header__lead {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  flex: 1 1 auto;
  min-width: 0;
}

.jt-bundle-tester-header__name,
.jt-bundle-fonts-included__bundle-name {
  margin: 0;
  flex: 0 1 auto;
  min-width: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--jt-text);
}

.jt-bundle-tester-header__actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-end;
}

.jt-bundle-tester-header__actions .jt-tp-product-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.jt-bundle-tester-header__actions .jt-tp-product-btn--buy {
  border: 1px solid var(--jt-sale, #ff5c5c);
  background: var(--jt-sale, #ff5c5c);
  color: #ffffff;
}

.jt-bundle-tester-header__actions .jt-tp-product-btn--buy:hover {
  background: #e54848;
  border-color: #e54848;
}

.jt-bundle-tester-header__actions .jt-tp-product-btn--buy:focus-visible {
  outline: 2px solid var(--jt-sale, #ff5c5c);
  outline-offset: 3px;
}

.jt-bundle-tester-header__meta {
  margin: 12px 0 0;
  font-size: clamp(1rem, 1.8vw, 1.125rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.35;
  color: var(--jt-muted);
}

.jt-bundle-tester-header__meta .jt-bundle-fonts-included__count-num {
  font-size: 1.2em;
  font-weight: 800;
  color: var(--jt-text);
  font-variant-numeric: tabular-nums;
}

/* Toolbar — jt-home-font.css + jt-product-type-tester.css (parity produk font) */
.jt-product-bundle-tester {
  --preview-size: 64px;
  --preview-lh: 1.08;
  --preview-ls: 0em;
}

.jt-product-bundle-tester__controls {
  margin-top: 20px;
  margin-bottom: 28px;
}

.jt-bundle-toolbar-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

.jt-product-bundle-tester .jt-home-toolbar.jt-bundle-toolbar {
  margin-top: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px 14px;
  overflow: visible;
}

.jt-bundle-toolbar .jt-home-toolbar__group--slider {
  flex: 1 1 200px;
  max-width: 300px;
  min-width: 168px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  min-height: 44px;
}

.jt-bundle-toolbar__slider-line {
  display: flex;
  align-items: center;
  gap: 8px 12px;
  width: 100%;
  min-width: 0;
}

.jt-bundle-toolbar__slider-label {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--jt-muted);
  white-space: nowrap;
}

.jt-bundle-toolbar__slider-line input[type="range"] {
  flex: 1 1 88px;
  min-width: 80px;
  max-width: none;
  width: auto;
  height: 18px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  accent-color: var(--jt-text);
}

.jt-bundle-toolbar__slider-line input[type="range"]::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.jt-bundle-toolbar__slider-line input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px;
  height: 11px;
  margin-top: -4.5px;
  border: none;
  border-radius: 50%;
  background: var(--jt-text);
  box-shadow: none;
  transition: transform 0.15s ease;
}

.jt-bundle-toolbar__slider-line input[type="range"]:hover::-webkit-slider-thumb {
  transform: scale(1.08);
}

.jt-bundle-toolbar__slider-line input[type="range"]::-moz-range-track {
  height: 2px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.jt-bundle-toolbar__slider-line input[type="range"]::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: none;
  border-radius: 50%;
  background: var(--jt-text);
  box-shadow: none;
}

.jt-bundle-toolbar .jt-home-toolbar__value {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 500;
  min-width: 2.6em;
  text-align: right;
  color: var(--jt-muted);
  font-variant-numeric: tabular-nums;
}

.jt-bundle-toolbar .jt-home-toolbar__group--btns {
  flex: 0 0 auto;
}

.jt-bundle-toolbar__group--text {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  align-items: center;
}

.jt-bundle-toolbar__group--text .jt-tester-selects {
  width: auto;
  max-width: 100%;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
}

.jt-bundle-toolbar > .jt-bundle-toolbar__heading {
  flex: 0 0 auto;
  order: -1;
  margin: 0;
  padding: 0 20px 0 0;
  border-right: 1px solid var(--jt-border);
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--jt-text);
  white-space: nowrap;
}

.jt-bundle-toolbar__spacer {
  flex: 1 1 12px;
  min-width: 8px;
  align-self: stretch;
}

.jt-bundle-toolbar__field--ot {
  flex: 0 0 auto;
  gap: 0;
}

.jt-bundle-toolbar__field--theme {
  flex: 0 0 auto;
  gap: 0;
}

.jt-product-bundle-tester .jt-tp-tester__theme {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.jt-single-product--theme .jt-product-bundle-tester .jt-tp-tester__theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: transparent;
  color: var(--jt-text);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s ease, border-color 0.3s ease;
}

.jt-single-product--theme .jt-product-bundle-tester .jt-tp-tester__theme-btn:hover {
  transform: scale(1.06);
}

.jt-single-product--theme .jt-product-bundle-tester .jt-tp-tester__theme-btn:active {
  transform: scale(0.94);
}

.jt-single-product--theme .jt-product-bundle-tester .jt-tp-tester__theme-btn-icons {
  position: relative;
  display: block;
  width: 20px;
  height: 20px;
}

.jt-single-product--theme .jt-product-bundle-tester .jt-tp-tester__theme-icon {
  position: absolute;
  inset: 0;
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition:
    opacity 0.38s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.jt-single-product--theme .jt-product-bundle-tester .jt-tp-tester__theme-icon--moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.jt-single-product--theme .jt-product-bundle-tester .jt-tp-tester__theme-icon--sun {
  opacity: 0;
  transform: rotate(-72deg) scale(0.45);
  pointer-events: none;
}

.jt-single-product--theme .jt-product-bundle-tester.jt-tp-tester-light .jt-tp-tester__theme-icon--moon {
  opacity: 0;
  transform: rotate(72deg) scale(0.45);
  pointer-events: none;
}

.jt-single-product--theme .jt-product-bundle-tester.jt-tp-tester-light .jt-tp-tester__theme-icon--sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
  pointer-events: auto;
}

.jt-product-bundle-tester.jt-tp-tester-light {
  --preview-canvas-text: #000000;
  --jt-bundle-list-border: rgba(0, 0, 0, 0.12);
  --jt-bundle-meta-name: rgba(0, 0, 0, 0.52);
  --jt-bundle-style-label: rgba(0, 0, 0, 0.75);
}

.jt-product-bundle-tester.jt-tp-tester-light .jt-bundle-font-list {
  border-top-color: var(--jt-bundle-list-border);
}

.jt-product-bundle-tester.jt-tp-tester-light .jt-bundle-font-row {
  background: #ffffff;
  border-bottom-color: var(--jt-bundle-list-border);
}

.jt-product-bundle-tester.jt-tp-tester-light .jt-bundle-font-row__name {
  color: var(--jt-bundle-meta-name);
}

.jt-product-bundle-tester.jt-tp-tester-light .jt-bundle-font-row__preview {
  color: var(--preview-canvas-text);
}

.jt-product-bundle-tester.jt-tp-tester-light .jt-bundle-font-row:hover {
  background: #f5f5f5;
}

@media (hover: hover) {
  .jt-product-bundle-tester.jt-tp-tester-light .jt-bundle-font-row:hover .jt-bundle-font-row__preview {
    color: #000000;
  }
}

/* OpenType — sama pola [jt_home_font_playground layout="2"]: toggle di toolbar, panel di bawah */
.jt-bundle-ot-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 118px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: var(--jt-surface-2);
  color: var(--jt-text);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.jt-bundle-ot-trigger:hover,
.jt-bundle-ot-trigger.is-open {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.05);
}

.jt-bundle-ot-trigger .jt-bundle-ot-chev {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  transition: transform 0.2s ease;
}

.jt-bundle-ot-trigger.is-open .jt-bundle-ot-chev {
  transform: rotate(180deg);
}

.jt-bundle-ot-panel {
  display: none;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--jt-border);
}

.jt-bundle-toolbar-wrap.is-ot-open .jt-bundle-ot-panel {
  display: block;
}

.jt-bundle-ot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.jt-bundle-ot-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--jt-border);
  border-radius: 8px;
  background: var(--jt-surface-2);
  cursor: pointer;
}

.jt-bundle-ot-chip:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.jt-bundle-ot-chip__label {
  font-size: 13px;
  font-weight: 500;
}

.jt-bundle-ot-switch {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 22px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease;
}

.jt-bundle-ot-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  transition: transform 0.2s ease, background 0.2s ease;
}

.jt-bundle-ot-switch.is-on {
  background: var(--jt-accent);
}

.jt-bundle-ot-switch.is-on::after {
  transform: translateX(18px);
  background: var(--jt-accent-text);
}

.jt-bundle-toolbar .jt-tester-selects {
  flex-wrap: nowrap;
  align-items: center;
}

.jt-bundle-toolbar .jt-tester-dd--style {
  flex: 0 0 136px;
  min-width: 128px;
}

.jt-bundle-toolbar .jt-tester-dd--text {
  flex: 0 0 172px;
  min-width: 160px;
  max-width: none;
}

.jt-bundle-toolbar .jt-tester-dd__trigger {
  width: 100%;
}

.jt-bundle-type-yourself {
  flex: 1 1 220px;
  width: auto;
  max-width: none;
  min-width: 180px;
}

.jt-bundle-type-yourself__input {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: transparent;
  color: var(--jt-text);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
}

.jt-bundle-type-yourself__input::placeholder {
  color: var(--jt-muted);
}

.jt-bundle-type-yourself__input:focus {
  outline: none;
  border-color: var(--jt-accent);
}

@media (max-width: 1100px) {
  .jt-product-bundle-tester .jt-home-toolbar.jt-bundle-toolbar {
    flex-wrap: wrap;
    padding: 14px;
    gap: 12px 10px;
  }

  .jt-bundle-toolbar .jt-home-toolbar__group--slider {
    flex: 1 1 calc(50% - 8px);
    max-width: none;
    min-width: 0;
  }

  .jt-bundle-toolbar .jt-tester-dd--style,
  .jt-bundle-toolbar .jt-tester-dd--text {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
  }

  .jt-bundle-toolbar__spacer {
    display: none;
  }
}

@media (max-width: 1024px) {
  .jt-bundle-ot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .jt-single-product--bundle .jt-product-test-layout__shell {
    padding-left: 0;
    padding-right: 0;
  }

  .jt-bundle-font-row {
    margin: 0;
    padding: 22px 0;
  }

  .jt-bundle-font-row__preview {
    font-size: clamp(28px, 10vw, 48px);
  }

  .jt-bundle-tester-header__title-row {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
  }

  .jt-bundle-tester-header__actions {
    align-self: flex-end;
  }

  .jt-product-bundle-tester .jt-home-toolbar.jt-bundle-toolbar {
    flex-wrap: wrap;
    padding: 14px;
    gap: 12px 10px;
  }

  .jt-bundle-toolbar__group--text {
    flex: 1 1 100%;
    width: 100%;
  }

  .jt-bundle-toolbar__group--text .jt-tester-selects {
    flex-wrap: wrap;
    width: 100%;
    gap: 10px;
  }

  .jt-bundle-toolbar .jt-home-toolbar__group--slider {
    flex: 1 1 calc(33.333% - 8px);
    max-width: none;
    min-width: 0;
  }

  .jt-bundle-toolbar__slider-line input[type="range"] {
    min-width: 48px;
  }

  .jt-bundle-toolbar__spacer {
    display: none;
  }

  .jt-bundle-toolbar > .jt-bundle-toolbar__heading {
    flex: 1 1 100%;
    order: -1;
    padding: 0 0 10px;
    border-right: none;
    border-bottom: 1px solid var(--jt-border);
  }

  .jt-bundle-toolbar .jt-tester-dd--style,
  .jt-bundle-toolbar .jt-tester-dd--text {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
    max-width: none;
  }

  .jt-bundle-type-yourself {
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .jt-bundle-toolbar__field--ot,
  .jt-bundle-toolbar__field--theme {
    flex: 0 0 auto;
    margin-left: 0;
  }

  .jt-bundle-ot-trigger {
    width: auto;
    min-width: 118px;
  }

  .jt-bundle-ot-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 399px) {
  .jt-bundle-toolbar .jt-tester-dd--style,
  .jt-bundle-toolbar .jt-tester-dd--text {
    flex: 1 1 100%;
  }
}

/* ── Fonts included list ── */
.jt-bundle-fonts-included {
  margin-top: 8px;
}

.jt-bundle-fonts-included__font-count {
  margin: 0;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--jt-muted);
  white-space: nowrap;
}

.jt-bundle-fonts-included__font-count strong,
.jt-bundle-fonts-included__font-count .jt-bundle-fonts-included__count-num {
  font-weight: 700;
  color: var(--jt-text);
  font-variant-numeric: tabular-nums;
}

.jt-bundle-font-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--jt-border);
}

.jt-bundle-font-row {
  margin: 0 -12px;
  padding: 28px 12px;
  border-bottom: 1px solid var(--jt-border);
  border-radius: var(--jt-radius);
  transition: background 0.2s ease;
}

@media (hover: hover) {
  .jt-bundle-font-row:hover {
    background: rgba(255, 255, 255, 0.04);
  }

  .jt-bundle-font-row:hover .jt-bundle-font-row__preview {
    color: #ffffff;
  }
}

.jt-bundle-font-row__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.jt-bundle-font-row__name {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--jt-muted);
  letter-spacing: 0.02em;
}

.jt-bundle-font-row__style {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--jt-bundle-style-label);
}

.jt-bundle-font-row__preview {
  margin: 0;
  font-size: var(--preview-size, 64px);
  line-height: var(--preview-lh, 1.08);
  letter-spacing: var(--preview-ls, 0em);
  text-align: left;
  color: var(--preview-canvas-text);
  word-break: break-word;
  overflow-wrap: anywhere;
  user-select: none;
  cursor: default;
  pointer-events: none;
  transition: color 0.2s ease;
}

