/* Template showcase — horizontal scroller of template cards.
   Figma: cloudairy.com file, node 21012:5238 ("Diagram templates").
   Replaces the old scaled "mindmap-swiper" carousel. */
@import url("https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400&display=swap");

.tpl-showcase {
  background: #FAFAFB;
  padding: clamp(56px, 6.25vw, 120px) clamp(16px, 8.333vw, 160px);
}

.tpl-showcase__inner {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 2.5vw, 48px);
  max-width: 1600px;
  margin: 0 auto;
}

.tpl-showcase__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.tpl-showcase .tpl-showcase__eyebrow {
  margin: 0;
  font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace !important;
  font-size: 16px;
  line-height: normal;
  font-weight: 400;
  letter-spacing: 1.28px;
  text-transform: uppercase;
  color: #6762FE;
}

.tpl-showcase .tpl-showcase__title {
  margin: 0;
  padding: 0;
  font-size: clamp(30px, 3.125vw, 60px);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #0E0E10;
  text-align: center;
}

.tpl-showcase .tpl-showcase__subtitle {
  max-width: 997px;
  margin: 0 auto;
  font-size: clamp(16px, 1.05vw, 20px);
  line-height: 1.6;
  font-weight: 400;
  color: #6D7988;
  text-align: center;
}

/* prev / next */
.tpl-showcase__nav {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.tpl-showcase__btn {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #0E0E10;
  border-radius: 999px;
  background: #0E0E10 url("/assets/image/template-showcase/chevron-right.svg") center / 20px 20px no-repeat;
  cursor: pointer;
  transition: opacity 160ms ease;
}

.tpl-showcase__btn--prev {
  transform: scaleX(-1);
}

.tpl-showcase__btn:hover {
  opacity: 0.85;
}

.tpl-showcase__btn:disabled {
  border-color: #E4E4E8;
  background-color: #fff;
  background-image: url("/assets/image/template-showcase/chevron-left.svg");
  cursor: default;
  opacity: 1;
  transform: none;
}

.tpl-showcase__btn--next:disabled {
  transform: scaleX(-1);
}

.tpl-showcase__btn:focus-visible,
.tpl-showcase__card:focus-visible {
  outline: 2px solid #6762FE;
  outline-offset: 2px;
}

/* scroller */
.tpl-showcase__track {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.tpl-showcase__track::-webkit-scrollbar {
  display: none;
}

.tpl-showcase__item {
  flex: 0 0 auto;
  width: min(388px, 86vw);
  scroll-snap-align: start;
  list-style: none;
}

.tpl-showcase__card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #ECECEF;
  border-radius: 14px;
  overflow: hidden;
  color: #16161C;
  text-decoration: none;
  transition: border-color 180ms ease;
}

.tpl-showcase__card:hover {
  border-color: #6762FE;
  color: #16161C;
  text-decoration: none;
}

.tpl-showcase__preview {
  display: block;
  padding: 14px;
  background: #F4F4F6;
}

/* 360 x 216 preview window holding the page's real template thumbnail.
   Thumbnails are wide canvas shots with empty margin, so each <img> can set
   --tpl-zoom / --tpl-origin / --tpl-pos inline to frame its diagram. */
.tpl-showcase__stage {
  position: relative;
  display: block;
  aspect-ratio: 360 / 216;
  background: #fff;
  border-radius: 7.2px;
  overflow: hidden;
}

.tpl-showcase__stage img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--tpl-pos, 50% 50%);
  transform: scale(var(--tpl-zoom, 1));
  transform-origin: var(--tpl-origin, 50% 50%);
}

.tpl-showcase__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.tpl-showcase__name {
  font-size: 16px;
  line-height: 1.3;
  font-weight: 500;
  color: #16161C;
}

.tpl-showcase__arrow {
  flex: none;
  font-size: 14px;
  line-height: 1;
  color: #6762FE;
  transition: transform 180ms ease;
}

.tpl-showcase__card:hover .tpl-showcase__arrow {
  transform: translateX(3px);
}

@media (max-width: 600px) {
  .tpl-showcase .tpl-showcase__eyebrow {
    font-size: 13px;
    letter-spacing: 1.04px;
  }

  .tpl-showcase__header {
    gap: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tpl-showcase__track {
    scroll-behavior: auto;
  }

  .tpl-showcase__card,
  .tpl-showcase__arrow,
  .tpl-showcase__btn {
    transition: none;
  }
}
