/* Compact Template Showcase — FE + JV affiliate (replaces stacked tshow gallery) */

.sf-showcase {
  --sf-sc-purple: #6b46fe;
  --sf-sc-purple-deep: #4b16d8;
  --sf-sc-navy: #1e1b4b;
  --sf-sc-muted: #64748b;
  --sf-sc-line: rgba(107, 70, 254, 0.16);
  --sf-sc-yellow: #ffd400;
  --sf-sc-shadow: 0 14px 36px rgba(75, 22, 216, 0.10);
  --sf-sc-radius: 18px;
  --sf-sc-img-radius: 5px;
  --sf-sc-visual-h: 200px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 56px;
}

body.sf-v2 .sf-showcase,
body.affiliate-center.sf-v2 .sf-showcase {
  position: relative;
}

.sf-showcase__shell {
  padding: 8px 0 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(167, 139, 250, 0.28), transparent 55%),
    linear-gradient(180deg, #f7f3ff 0%, #f4f0ff 50%, #efe9ff 100%);
  border-top: 1px solid rgba(107, 70, 254, 0.08);
  border-bottom: 1px solid rgba(107, 70, 254, 0.08);
}

.sf-showcase__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 18px;
  font-weight: 800;
  color: var(--sf-sc-navy);
  letter-spacing: -.02em;
}

.sf-showcase__mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #8b5cf6, var(--sf-sc-purple));
  box-shadow: 0 8px 18px rgba(107, 70, 254, .28);
}

.sf-showcase__head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 22px;
}

.sf-showcase__title {
  margin: 0 0 10px;
  font-size: clamp(1.55rem, 3.4vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -.03em;
  color: var(--sf-sc-navy);
}

.sf-showcase__title em {
  font-style: normal;
  background: linear-gradient(90deg, var(--sf-sc-purple-deep), #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sf-showcase__lead {
  margin: 0 auto;
  max-width: 58ch;
  color: var(--sf-sc-muted);
  font-size: .98rem;
}

.sf-showcase__filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 22px;
}

.sf-showcase__filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(107, 70, 254, 0.16);
  background: #fff;
  color: #4338ca;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(75, 22, 216, 0.05);
  transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.sf-showcase__filter svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.sf-showcase__filter:hover {
  border-color: rgba(107, 70, 254, 0.35);
  background: rgba(107, 70, 254, 0.04);
}

.sf-showcase__filter.is-active {
  background: linear-gradient(135deg, var(--sf-sc-purple), var(--sf-sc-purple-deep));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 22px rgba(107, 70, 254, 0.28);
}

.sf-showcase__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0 0 18px;
  align-items: stretch;
}

.sf-showcase .sf-tcard {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  min-height: 0;
  height: 100%;
  padding: 12px 12px 14px;
  background: #fff;
  border: 1px solid var(--sf-sc-line);
  border-radius: var(--sf-sc-radius);
  box-shadow: var(--sf-sc-shadow);
}

.sf-showcase .sf-tcard[hidden] {
  display: none !important;
}

.sf-tcard__tag {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(107, 70, 254, 0.18);
  color: var(--sf-sc-purple-deep);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
  pointer-events: none;
}

.sf-showcase__empty {
  text-align: center;
  color: var(--sf-sc-muted);
  font-weight: 600;
  margin: 0 0 18px;
}

/*
 * Formal desktop + mobile device stage — identical size on every card.
 * Laptop + overlapping phone (mock reference). Screen content uses 5px radius.
 */
.sf-tcard__visual {
  position: relative;
  width: 100%;
  height: var(--sf-sc-visual-h);
  min-height: var(--sf-sc-visual-h);
  max-height: var(--sf-sc-visual-h);
  border-radius: 14px;
  background:
    radial-gradient(ellipse 70% 80% at 30% 40%, rgba(167, 139, 250, 0.22), transparent 60%),
    linear-gradient(160deg, #ede9fe, #f8fafc 55%, #eef2ff);
  border: 1px solid rgba(107, 70, 254, 0.10);
  overflow: hidden;
}

.sf-tcard__laptop {
  position: absolute;
  left: 6%;
  top: 18%;
  width: 64%;
  aspect-ratio: 16 / 10;
  max-height: 68%;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, #1e293b, #0f172a);
  padding: 5px 5px 9px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, .28);
  box-sizing: border-box;
  z-index: 1;
}

.sf-tcard__laptop::after {
  content: "";
  position: absolute;
  left: -7%;
  right: -7%;
  bottom: -8px;
  height: 8px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(180deg, #cbd5e1, #94a3b8 55%, #64748b);
  box-shadow: 0 2px 0 rgba(15, 23, 42, .15);
}

.sf-tcard__laptop img,
.sf-tcard__phone img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  background: #fff;
  border-radius: var(--sf-sc-img-radius);
}

.sf-tcard__phone {
  position: absolute;
  right: 5%;
  bottom: 10%;
  width: 29%;
  aspect-ratio: 9 / 18;
  max-height: 78%;
  border-radius: 12px;
  background: linear-gradient(180deg, #1e293b, #0f172a);
  padding: 7px 4px 5px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .34);
  border: 1.5px solid rgba(255, 255, 255, .22);
  box-sizing: border-box;
  z-index: 2;
}

.sf-tcard__phone::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 34%;
  height: 3px;
  border-radius: 999px;
  background: #334155;
  z-index: 1;
}

.sf-tcard__device-cap {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(107, 70, 254, 0.22);
  box-shadow: 0 4px 12px rgba(15, 23, 42, .16);
  color: #4c1d95;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
}

.sf-tcard__phone .sf-tcard__device-cap {
  top: 12px;
}

.sf-tcard__body {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 14px 4px 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.sf-tcard__title {
  margin: 0 0 6px;
  font-size: 1.02rem;
  line-height: 1.25;
  letter-spacing: -.02em;
  color: var(--sf-sc-navy);
}

.sf-tcard__desc {
  margin: 0 0 14px;
  color: var(--sf-sc-muted);
  font-size: .88rem;
  line-height: 1.45;
  flex: 1 1 auto;
}

.sf-tcard__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.sf-tcard__preview,
.sf-tcard__use {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 800;
  text-decoration: none;
  line-height: 1.2;
}

.sf-tcard__preview {
  border: 1.5px solid var(--sf-sc-purple);
  color: var(--sf-sc-purple-deep);
  background: #fff;
}

.sf-tcard__preview svg,
.sf-tcard__use svg {
  width: 15px;
  height: 15px;
}

.sf-tcard__preview:hover { background: rgba(107, 70, 254, 0.06); }

.sf-tcard__use {
  border: 1.5px solid transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--sf-sc-purple), var(--sf-sc-purple-deep));
  box-shadow: 0 8px 18px rgba(107, 70, 254, 0.22);
}

.sf-tcard__use:hover { filter: brightness(1.04); }

.sf-showcase__package {
  margin: 0 0 18px;
  padding: 20px 20px 18px;
  background: #fff;
  border: 1px solid var(--sf-sc-line);
  border-radius: var(--sf-sc-radius);
  box-shadow: var(--sf-sc-shadow);
}

.sf-showcase__package-head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 16px;
}

.sf-showcase__package-head h3 {
  margin: 0 0 6px;
  font-size: 1.08rem;
  letter-spacing: -.02em;
  color: var(--sf-sc-navy);
}

.sf-showcase__package-head p {
  margin: 0;
  color: var(--sf-sc-muted);
  font-size: .9rem;
}

.sf-showcase__package-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 20px;
}

.sf-showcase__package-col h4 {
  margin: 0 0 10px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--sf-sc-purple-deep);
}

.sf-showcase__package-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

.sf-showcase__package-list li {
  position: relative;
  padding-left: 1.15rem;
  font-size: .88rem;
  line-height: 1.4;
  color: #334155;
  font-weight: 600;
}

.sf-showcase__package-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .42em;
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sf-sc-purple), var(--sf-sc-purple-deep));
  box-shadow: 0 0 0 3px rgba(107, 70, 254, 0.12);
}

.sf-showcase__benefits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 18px;
  background: #fff;
  border: 1px solid var(--sf-sc-line);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(75, 22, 216, 0.06);
  overflow: hidden;
}

.sf-showcase__benefit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 10px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--sf-sc-navy);
  border-right: 1px solid rgba(107, 70, 254, 0.10);
}

.sf-showcase__benefit:last-child { border-right: 0; }

.sf-showcase__benefit svg {
  width: 16px;
  height: 16px;
  color: var(--sf-sc-purple);
  flex: 0 0 auto;
}

.sf-showcase__cta-wrap { text-align: center; }

.sf-showcase__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(100%, 360px);
  padding: 14px 28px;
  border-radius: 999px;
  background: #fff;
  color: var(--sf-sc-purple-deep);
  border: 1.5px solid rgba(107, 70, 254, 0.45);
  font-size: .98rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(75, 22, 216, 0.08);
}

.sf-showcase__cta:hover {
  background: rgba(107, 70, 254, 0.05);
  transform: translateY(-1px);
}

.sf-showcase__cta--static,
.sf-showcase__cta.sf-showcase__cta--static:hover {
  cursor: default;
  transform: none;
  pointer-events: none;
  margin: 0;
}

.sf-showcase__wave {
  margin-top: 36px;
  height: 48px;
  background:
    radial-gradient(ellipse 80% 120% at 50% 120%, rgba(76, 29, 149, .45), transparent 60%),
    linear-gradient(180deg, transparent, rgba(49, 16, 110, .14));
  border-radius: 40% 40% 0 0 / 100% 100% 0 0;
}

@media (max-width: 1020px) {
  .sf-showcase__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sf-showcase__package-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sf-showcase__benefits { grid-template-columns: 1fr 1fr; }
  .sf-showcase__benefit:nth-child(2) { border-right: 0; }
  .sf-showcase__benefit:nth-child(1),
  .sf-showcase__benefit:nth-child(2) {
    border-bottom: 1px solid rgba(107, 70, 254, 0.10);
  }
}

@media (max-width: 640px) {
  .sf-showcase {
    --sf-sc-visual-h: 190px;
    width: min(100% - 24px, 1180px);
    padding: 36px 0 48px;
  }
  .sf-showcase__filters {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    margin-left: -4px;
    margin-right: -4px;
    padding-left: 4px;
    padding-right: 4px;
  }
  .sf-showcase__filter { flex: 0 0 auto; }
  .sf-showcase__grid { grid-template-columns: 1fr; gap: 14px; }
  .sf-showcase__package-grid { grid-template-columns: 1fr; }
  .sf-showcase__benefits { grid-template-columns: 1fr; }
  .sf-showcase__benefit {
    justify-content: flex-start;
    padding-left: 18px;
    border-right: 0;
    border-bottom: 1px solid rgba(107, 70, 254, 0.10);
  }
  .sf-showcase__benefit:last-child { border-bottom: 0; }
  .sf-showcase__cta { width: 100%; min-width: 0; }
  .sf-tcard__actions { flex-direction: column; align-items: stretch; }
  .sf-tcard__preview,
  .sf-tcard__use { width: 100%; }
}

/* JV affiliate shell sets img { height: auto } — restore formal device screens */
body.affiliate-center .sf-showcase .sf-tcard__laptop img,
body.affiliate-center .sf-showcase .sf-tcard__phone img {
  max-width: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  border-radius: var(--sf-sc-img-radius);
}

body.affiliate-center .sf-showcase .sf-tcard__laptop,
body.affiliate-center .sf-showcase .sf-tcard__phone {
  overflow: hidden;
}

body.affiliate-center .sf-showcase .sf-tcard__visual {
  height: var(--sf-sc-visual-h);
  min-height: var(--sf-sc-visual-h);
  max-height: var(--sf-sc-visual-h);
}
