.template-shell {
  display: grid;
  gap: 24px;
}

.template-hero,
.template-highlight-grid,
.template-detail-grid,
.template-library-grid,
.template-cta-grid,
.template-proof-grid,
.template-pack-grid,
.template-mini-grid {
  display: grid;
  gap: 18px;
}

.template-hero {
  grid-template-columns: minmax(0, 1.08fr) 480px;
  align-items: stretch;
}

.template-panel,
.template-stat,
.template-card,
.template-side-card,
.template-cta-card,
.template-proof-card,
.template-pack-card,
.template-stack-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
}

.template-panel,
.template-side-card,
.template-card,
.template-cta-card,
.template-proof-card,
.template-pack-card,
.template-stack-card {
  padding: 24px;
}

.template-panel h1 {
  margin: 14px 0 14px;
  font-size: clamp(40px, 4vw, 62px);
  line-height: 1.02;
}

.template-panel p,
.template-card p,
.template-side-card p,
.template-cta-card p,
.template-proof-card p,
.template-pack-card p,
.template-stack-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.template-topline,
.template-chip-row,
.template-meta-row,
.template-proof-tags,
.template-file-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.template-chip,
.template-flag {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: #f6f8ff;
  color: #495a83;
  font-size: 12px;
  font-weight: 800;
}

.template-flag.live {
  background: var(--green-soft);
  color: var(--green);
  border-color: rgba(24, 179, 107, 0.14);
}

.template-price {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, #0f2340, #19385f);
  color: #fff;
  box-shadow: 0 18px 42px rgba(15, 35, 64, 0.24);
}

.template-price strong {
  font-size: 34px;
  line-height: 1;
}

.template-hero-media {
  display: grid;
  gap: 18px;
}

.template-hero-media .ionhive-image-card,
.template-pack-card .ionhive-image-card {
  height: 100%;
}

.template-highlight-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.template-stat {
  padding: 20px;
  display: grid;
  gap: 10px;
}

.template-stat strong {
  font-size: 28px;
  line-height: 1;
}

.template-stat span,
.template-stat p {
  margin: 0;
  color: var(--muted);
}

.template-detail-grid {
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  align-items: start;
}

.template-pack-grid,
.template-mini-grid,
.template-library-grid,
.template-proof-grid,
.template-cta-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.template-card h2,
.template-side-card h2,
.template-cta-card h2,
.template-pack-card h2,
.template-stack-card h2 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.1;
}

.template-list,
.template-links,
.template-file-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding-left: 18px;
  color: #40507e;
  line-height: 1.58;
}

.template-links a {
  color: var(--blue);
  font-weight: 700;
}

.template-workflow {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.template-step {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: #f8faff;
  border: 1px solid #e7edff;
}

.template-step strong {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #4b52ff, #7d45ff);
  color: #fff;
  font-size: 15px;
}

.template-step p {
  margin: 0;
}

.template-side-card {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 20px;
}

.template-side-card .cta,
.template-side-card .ghost-btn {
  width: 100%;
}

.template-proof-card,
.template-pack-card,
.template-cta-card {
  display: grid;
  gap: 12px;
}

.template-proof-card strong,
.template-pack-card strong,
.template-cta-card strong,
.template-stack-card strong {
  font-size: 20px;
}

.template-proof-card img,
.template-stack-card img {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
}

.template-library-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-soft);
}

.template-library-card img {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.template-library-card strong {
  font-size: 20px;
}

.template-library-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

.template-section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}

.template-section-head h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.08;
}

.template-section-head p {
  margin: 0;
  max-width: 700px;
  color: var(--muted);
  line-height: 1.6;
}

.template-note {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid #e7edff;
  background: #f8faff;
  color: #51618a;
  line-height: 1.58;
}

@media (max-width: 1180px) {
  .template-hero,
  .template-detail-grid {
    grid-template-columns: 1fr;
  }

  .template-side-card {
    position: static;
  }

  .template-highlight-grid,
  .template-pack-grid,
  .template-mini-grid,
  .template-library-grid,
  .template-proof-grid,
  .template-cta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .template-panel,
  .template-side-card,
  .template-card,
  .template-cta-card,
  .template-proof-card,
  .template-pack-card,
  .template-stack-card {
    padding: 20px;
  }

  .template-highlight-grid,
  .template-pack-grid,
  .template-mini-grid,
  .template-library-grid,
  .template-proof-grid,
  .template-cta-grid {
    grid-template-columns: 1fr;
  }

  .template-section-head {
    display: grid;
  }
}
