.related-products-section {
  max-width: 1200px;
  margin: 1rem auto;
  padding: 0 1rem;
}

.related-products-section h2 {
  font-size: 5pt;
  color: #0b6583;
  margin-bottom: 1rem;
}

/* Grid Layout (like homepage mixed) */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.2rem;
  padding: 0;
}

/* Card Styles */
.template-card {
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  align-items: left;
}

.template-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Image container like mixed-image */
.template-card img {
  width: 100%;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  border-radius: 5px;
  height:100%;
}

/* Info section like mixed-info */
.template-card h3 {
  font-size: 9pt;
  color: #0b6583;
  margin: 0.3rem 0 0.25rem;
  text-align: left;
  padding-left: 8px;
  padding-top: 5px;
  padding-right: 5px;
}

.template-card p {
  font-size: 8pt;
  color: #222;
  margin: 0.1rem 0;
  text-align: left;
  padding-left: 8px;
  padding-top: 5px;
  padding-right: 5px;
  padding-bottom: 8px;
}

.template-card .info-value {
  color: #555;
  font-weight: normal;
}

/* Make card a flex column so image on top, info at bottom */
.template-card a {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  text-decoration: none;
  color: inherit;
}

/* Push title to bottom like mixed-info margin-top: auto */
.template-card h3 {
  margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
  .template-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
  .template-card img {
    max-height: 150px;
  }
  .template-card h3 {
    font-size: 0.9rem;
  }
  .template-card p {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .template-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
  .template-card img {
    max-height: 120px;
  }
  .template-card h3 {
    font-size: 0.85rem;
  }
  .template-card p {
    font-size: 0.65rem;
  }
}


.related-templates {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 1rem;
}

.related-templates h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  color: #0b6583;
  margin-bottom: 1rem;
}

/* Grid layout like homepage mixed */
.related-templates .template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.2rem;
  padding: 0;
}

/* Card styles */
.related-templates .template-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.related-templates .template-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Image container */
.related-templates .template-card img {
  width: 100%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  border-radius: 8px;
  max-height: 180px;
}

/* Info section */
.related-templates .template-card h4 {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: #0b6583;
  margin: 0.3rem 0 0.25rem;
  margin-top: auto; /* sticks title to bottom */
}

.related-templates .template-card p {
  font-size: clamp(0.75rem, 1.8vw, 0.85rem);
  color: #222;
  margin: 0.1rem 0;
}

/* Button styled like homepage mixed-info btn */
.related-templates .template-card .btn {
  margin-top: auto;
  align-self: flex-start;
  padding: 0.4rem 0.8rem;
  font-size: clamp(0.7rem, 1.6vw, 0.85rem);
  background: #23459b;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
}

.related-templates .template-card .btn:hover {
  background: #1a326b;
  transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {
  .related-templates .template-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
  .related-templates .template-card img {
    max-height: 150px;
  }
  .related-templates .template-card h4 {
    font-size: 0.9rem;
  }
  .related-templates .template-card p, 
  .related-templates .template-card .btn {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .related-templates .template-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
  .related-templates .template-card img {
    max-height: 120px;
  }
  .related-templates .template-card h4 {
    font-size: 0.85rem;
  }
  .related-templates .template-card p,
  .related-templates .template-card .btn {
    font-size: 0.65rem;
  }
}
