/**
 * Jelek Type — Newest fonts grid (V5 B&W)
 *
 * Cards use .jt-featured-card from jt-featured-fonts.css
 * Dummy preview: [jt_font_grid_dummy]
 * Live data:      [jt_font_grid] / [jt_latest_fonts]
 */

/* ── View toggle (List / Grid toolbar) ── */
.jt-view-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto 32px;
  padding: 0;
  border: none;
  background: transparent;
}

.jt-newest > .jt-view-toolbar {
  display: flex;
  width: fit-content;
}

.jt-view-toolbar .jt-view-btn {
  width: 48px;
  height: 48px;
  min-width: 48px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--jt-border);
  background: var(--jt-surface);
  color: var(--jt-text);
  font-size: 16px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.jt-view-toolbar .jt-view-btn:hover {
  border-color: var(--jt-text);
}

.jt-view-toolbar .jt-view-btn.active {
  background: var(--jt-primary);
  color: var(--jt-primary-text);
  border-color: var(--jt-primary);
}

/* ── Section ── */
.jt-newest,
.jt-newest-fonts {
  width: var(--jt-home-band-width, 80%);
  max-width: var(--jt-home-band-width, 80%);
  margin-inline: auto;
  padding: 0 0 80px;
}

.jt-featured-fonts + .jt-newest,
.jt-featured-fonts + .jt-newest-fonts,
.jt-featured-fonts + .jt-section.jt-newest-fonts,
.jt-home-bundles + .jt-featured-fonts,
.jt-newest-fonts.jt-home-bundles + .jt-featured-fonts {
  margin-top: 0;
  padding-top: 0;
}

.jt-newest-fonts.jt-home-bundles {
  width: var(--jt-home-band-width, 80%);
  max-width: var(--jt-home-band-width, 80%);
  margin-inline: auto;
  padding: 0 0 80px;
}

/* Homepage FONT BUNDLES — gunakan .jt-home-bundles-wrap (bukan .jt-home-wrap) */
.jt-home-bundles-wrap {
  width: var(--jt-home-band-width, 80%);
  max-width: var(--jt-home-band-width, 80%);
  margin-left: auto;
  margin-right: auto;
  padding: 0;
}

.jt-home-bundles-wrap .jt-section.jt-home-bundles {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  margin-bottom: 40px;
  padding: 0 0 32px;
}

.jt-home-bundles-wrap .jt-home-bundles .jt-section-head,
.jt-home-bundles-wrap .jt-home-bundles__head {
  margin-bottom: 20px;
}

.jt-home-bundles-wrap .jt-home-bundles .jt-grid-footer {
  margin-top: 24px;
}

.jt-home-bundles-wrap + .jt-featured-fonts,
.jt-home-bundles-wrap + .jt-section.jt-featured-fonts {
  margin-top: 0;
}

/* Shortcode wrap di dalam section Elementor yang masih pakai jt-home-wrap */
.jt-home-wrap > .jt-home-bundles-wrap {
  width: 100%;
  max-width: none;
}

.jt-home-bundles-wrap .jt-home-bundles-wrap {
  width: 100%;
  max-width: none;
  margin: 0;
}

.jt-home-bundles .jt-grid-wrap .jt-featured-card {
  height: 100%;
  min-width: 0;
}

.jt-home-bundles .jt-grid-wrap > .jt-featured-card,
.jt-home-bundles__grid > .jt-featured-card {
  min-width: 0;
}

.jt-home-bundles .jt-featured-card__preview--has-cover {
  position: relative;
  aspect-ratio: 4 / 3;
}

.jt-home-bundles .jt-featured-card__preview--has-cover .jt-featured-card__cover {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}

.jt-home-bundles .jt-featured-card__badge--bundle {
  background: var(--jt-bundle-badge, #5b8cff);
  color: var(--jt-bundle-badge-text, #ffffff);
}

.jt-home-wrap .jt-newest,
.jt-home-wrap .jt-newest-fonts,
.jt-home-wrap .jt-new-grid {
  width: 100%;
  max-width: none;
  padding: 0 0 80px;
}

.jt-newest-fonts__head,
.jt-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.jt-newest-fonts__eyebrow,
.jt-section-head span,
.jt-section-head .jt-section-eyebrow {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--jt-muted);
}

.jt-section-head span,
.jt-section-head .jt-section-eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  padding: 0;
  border: none;
  background: transparent;
}

.jt-newest-fonts__title,
.jt-section-head h2,
.jt-section-head .jt-section-title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--jt-text);
}

.jt-newest-fonts__shop-link,
.jt-home-bundles__head .jt-newest-fonts__shop-link {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--jt-text);
  text-decoration: none;
}

.jt-newest-fonts__shop-link:hover,
.jt-home-bundles__head .jt-newest-fonts__shop-link:hover {
  opacity: 0.65;
}

/* ── Grid ── */
.jt-grid-wrap,
.jt-newest-fonts__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 0;
  padding-top: 0 !important;
}

.jt-newest.jt-grid-mode .jt-grid-wrap,
.jt-new-grid.jt-grid-mode .jt-grid-wrap {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* WooCommerce loop helpers */
.jt-grid-wrap ul.products {
  display: contents;
  list-style: none;
  margin: 0;
  padding: 0;
}

.jt-grid-wrap ul.products li.product {
  width: 100% !important;
  margin: 0 !important;
  float: none !important;
}

.jt-grid-wrap .product img {
  display: none;
}

/* ── Show More ── */
.jt-grid-footer {
  text-align: center;
  margin-top: 32px;
  padding-bottom: 0;
}

.jt-grid-footer .jt-show-more {
  display: inline-flex;
}

/* ── Responsive ── */
@media (max-width: 1200px) {
  .jt-newest,
  .jt-newest-fonts,
  .jt-newest-fonts.jt-home-bundles,
  .jt-home-bundles-wrap {
    width: var(--jt-home-band-width-md, 92%);
    max-width: var(--jt-home-band-width-md, 92%);
  }
}

@media (max-width: 1100px) {
  .jt-grid-wrap,
  .jt-newest-fonts__grid,
  .jt-home-bundles__grid,
  .jt-newest.jt-grid-mode .jt-grid-wrap,
  .jt-new-grid.jt-grid-mode .jt-grid-wrap,
  .jt-home-bundles.jt-grid-mode .jt-grid-wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .jt-home-bundles-wrap .jt-home-bundles .jt-grid-wrap {
    gap: 14px;
  }
}

@media (max-width: 767px) {
  .jt-newest,
  .jt-newest-fonts,
  .jt-newest-fonts.jt-home-bundles {
    width: var(--jt-home-band-width-sm, calc(100% - 32px));
    max-width: none;
    padding: 0 0 64px;
  }

  .jt-home-bundles-wrap {
    width: var(--jt-home-band-width-sm, calc(100% - 32px));
    max-width: none;
  }

  .jt-home-bundles-wrap .jt-section.jt-home-bundles {
    padding: 0 0 24px;
    margin-bottom: 32px;
  }

  .jt-home-wrap .jt-newest,
  .jt-home-wrap .jt-newest-fonts,
  .jt-home-wrap .jt-new-grid {
    padding: 0 0 64px;
  }

  .jt-newest-fonts__head,
  .jt-section-head,
  .jt-home-bundles__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .jt-home-bundles__head .jt-newest-fonts__shop-link {
    align-self: flex-start;
  }

  .jt-grid-wrap,
  .jt-newest-fonts__grid,
  .jt-home-bundles__grid,
  .jt-newest.jt-grid-mode .jt-grid-wrap,
  .jt-new-grid.jt-grid-mode .jt-grid-wrap,
  .jt-home-bundles.jt-grid-mode .jt-grid-wrap {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .jt-home-bundles-wrap .jt-home-bundles .jt-grid-footer {
    margin-top: 20px;
  }

  .jt-home-bundles-wrap .jt-home-bundles .jt-grid-footer .jt-show-more {
    width: 100%;
    max-width: 100%;
    justify-content: center;
  }
}
