/* Adapted from Danay’s catalog design. Scoped to protect other pages. */

.template-page {
      --primary-blue: #1e40af;
      --secondary-blue: #2563eb;
      --hover-blue: #1d4ed8;
      --accent-orange: #f59e0b;
      --accent-green: #22c55e;
      --dark-text: #0f172a;
      --medium-text: #64748b;
      --light-text: #94a3b8;
      --bg-body: #ffffff;
      --border-color: #f1f5f9;

      --font-body: 'Inter', sans-serif;
      --font-heading: 'Outfit', sans-serif;
      --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }
.template-page *, .template-page *::before, .template-page *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }
.template-page {
      font-family: var(--font-body);
      color: var(--dark-text);
      background-color: var(--bg-body);
      line-height: 1.6;
      -webkit-font-smoothing: antialiased;
      overflow-x: clip;
    }
.template-page .container {
      width: 100%;
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 24px;
    }
.template-page a {
      text-decoration: none;
      color: inherit;
    }
.template-page ul {
      list-style: none;
    }
.template-page .main-header {
      position: sticky;
      top: 0;
      left: 0;
      width: 100%;
      height: 74px;
      background: rgba(255, 255, 255, 0.96);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border-bottom: 1px solid #e2e8f0;
      z-index: 1000;
      display: flex;
      align-items: center;
    }
.template-page .navbar-container {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
.template-page .logo {
      display: inline-flex;
      align-items: center;
      gap: 12px;
    }
.template-page .logo-icon-wrap {
      width: 38px;
      height: 38px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
.template-page .logo-text {
      font-family: var(--font-heading);
      font-weight: 800;
      font-size: 22px;
      color: var(--dark-text);
      letter-spacing: -0.5px;
    }
.template-page .logo-text .highlight {
      color: var(--accent-orange);
    }
.template-page .main-nav ul {
      display: flex;
      gap: 32px;
    }
.template-page .main-nav a {
      font-family: var(--font-heading);
      font-size: 14.5px;
      font-weight: 600;
      color: var(--medium-text);
      padding: 6px 0;
      position: relative;
      transition: var(--transition);
    }
.template-page .main-nav a:hover, .template-page .main-nav a.active {
      color: var(--secondary-blue);
    }
.template-page .main-nav a.active::after {
      content: '';
      position: absolute;
      bottom: -2px;
      left: 0;
      width: 100%;
      height: 2.5px;
      border-radius: 4px;
      background: var(--secondary-blue);
    }
.template-page .nav-actions {
      display: flex;
      align-items: center;
      gap: 12px;
    }
.template-page .btn-login {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-family: var(--font-heading);
      font-size: 14px;
      font-weight: 700;
      color: var(--dark-text);
      background: transparent;
      border: none;
      cursor: pointer;
      padding: 8px 16px;
      transition: var(--transition);
    }
.template-page .btn-login:hover {
      color: var(--secondary-blue);
    }
.template-page .btn-primary-header {
      background: var(--secondary-blue);
      color: #ffffff;
      font-family: var(--font-heading);
      font-size: 13.5px;
      font-weight: 700;
      padding: 10px 22px;
      border-radius: 9999px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
      transition: var(--transition);
    }
.template-page .btn-primary-header:hover {
      background: var(--hover-blue);
      transform: translateY(-1px);
    }
.template-page .mobile-toggle {
      display: none;
      background: none;
      border: 1px solid #e2e8f0;
      border-radius: 8px;
      padding: 8px 12px;
      font-size: 16px;
      cursor: pointer;
    }
.template-page .templates-page-section {
      padding: 44px 0 90px;
    }
.template-page .catalog-header {
      text-align: center;
      max-width: 780px;
      margin: 0 auto 32px;
    }
.template-page .catalog-tagline-badge {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 5px 16px;
      border-radius: 9999px;
      background: #eff6ff;
      border: 1px solid #dbeafe;
      color: var(--secondary-blue);
      font-family: var(--font-heading);
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.05em;
      margin-bottom: 14px;
    }
.template-page .catalog-page-title {
      font-size: clamp(28px, 3.2vw, 40px);
      font-weight: 900;
      color: var(--dark-text);
      letter-spacing: -0.8px;
      line-height: 1.2;
      margin-bottom: 8px;
    }
.template-page .gradient-text-hero {
      background: linear-gradient(90deg, #2563eb 0%, #5b54fa 32%, #7c3aed 52%, #c2410c 78%, #e08b14 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      display: inline-block;
    }
.template-page .catalog-page-desc {
      font-size: 14.5px;
      color: var(--medium-text);
    }
.template-page .catalog-search-wrap {
      max-width: 520px;
      margin: 22px auto 0;
    }
.template-page .catalog-search-input-box {
      display: flex;
      align-items: center;
      background: #ffffff;
      border: 1px solid #e2e8f0;
      border-radius: 9999px;
      padding: 6px 18px;
      box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    }
.template-page .catalog-search-input-box:focus-within {
      border-color: var(--secondary-blue);
      box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    }
.template-page .catalog-search-input-box i {
      color: #94a3b8;
      font-size: 14px;
      margin-right: 10px;
    }
.template-page .catalog-search-input-box input {
      border: none;
      background: transparent;
      outline: none;
      font-size: 13.5px;
      color: var(--dark-text);
      width: 100%;
      padding: 6px 0;
    }
.template-page .catalog-filter-tabs-wrap {
      display: flex;
      justify-content: center;
      margin-bottom: 36px;
      overflow-x: auto;
      padding-bottom: 8px;
    }
.template-page .catalog-filter-tabs {
      display: inline-flex;
      padding: 4px;
      border-radius: 9999px;
      background: #ffffff;
      border: 1px solid #e2e8f0;
      box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
      gap: 4px;
    }
.template-page .catalog-filter-tab {
      font-family: var(--font-heading);
      font-weight: 700;
      font-size: 13px;
      color: var(--medium-text);
      padding: 7px 18px;
      border-radius: 9999px;
      cursor: pointer;
      border: none;
      background: transparent;
      transition: var(--transition);
      white-space: nowrap;
    }
.template-page .catalog-filter-tab.active {
      background: var(--secondary-blue);
      color: #ffffff;
      box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
    }
.template-page .catalog-grid-15 {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 28px;
      margin-bottom: 40px;
    }
.template-page .custom-template-card {
      background: #ffffff;
      border-radius: 20px;
      border: 1px solid #f1f5f9;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
      overflow: hidden;
      display: flex;
      flex-direction: column;
      transition: var(--transition);
    }
.template-page .custom-template-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 14px 30px rgba(15, 23, 42, 0.09);
    }
.template-page .card-thumb-container {
      width: 100%;
      height: 195px;
      overflow: hidden;
      background: #f8fafc;
      position: relative;
    }
.template-page .card-thumb-container img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: top center;
      transition: transform 0.4s ease;
    }
.template-page .custom-template-card:hover .card-thumb-container img {
      transform: scale(1.03);
    }
.template-page .card-body-content {
      padding: 20px 22px 22px;
      display: flex;
      flex-direction: column;
      flex: 1;
    }
.template-page .card-meta-row {
      display: flex;
      align-items: center;
      margin-bottom: 12px;
    }
.template-page .badge-cat-label {
      display: inline-block;
      font-family: var(--font-heading);
      font-size: 11.5px;
      font-weight: 700;
      color: #2563eb;
      background: #eff6ff;
      padding: 4px 10px;
      border-radius: 6px;
      letter-spacing: 0.2px;
    }
.template-page .card-item-title {
      font-family: var(--font-heading);
      font-size: 17px;
      font-weight: 800;
      color: #0f172a;
      margin-bottom: 6px;
      line-height: 1.35;
    }
.template-page .card-item-description {
      font-size: 13px;
      color: #64748b;
      line-height: 1.55;
      margin-bottom: 24px;
      flex: 1;
    }
.template-page .card-action-buttons {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-top: auto;
    }
.template-page .btn-preview-outline {
      font-family: var(--font-heading);
      font-size: 13.5px;
      font-weight: 700;
      color: #0f172a;
      background: transparent;
      border: none;
      padding: 8px 12px;
      border-radius: 8px;
      cursor: pointer;
      transition: color 0.2s ease;
    }
.template-page .btn-preview-outline:hover {
      color: #2563eb;
    }
.template-page .btn-select-solid {
      font-family: var(--font-heading);
      font-size: 13.5px;
      font-weight: 700;
      color: #ffffff;
      background: #1d4ed8;
      padding: 10px 24px;
      border-radius: 9999px;
      border: none;
      cursor: pointer;
      box-shadow: 0 4px 14px rgba(29, 78, 216, 0.28);
      transition: var(--transition);
    }
.template-page .btn-select-solid:hover {
      background: #1e40af;
      box-shadow: 0 6px 18px rgba(29, 78, 216, 0.38);
      transform: translateY(-1px);
    }
.template-page .main-footer {
      background: #090d16;
      color: #94a3b8;
      padding: 70px 0 0;
      border-top: 1px solid #171f2e;
    }
.template-page .footer-grid {
      display: grid;
      grid-template-columns: 1.8fr 1.1fr 1.1fr 1.4fr;
      gap: 40px;
      margin-bottom: 40px;
    }
.template-page .footer-brand-col .logo-text {
      color: #ffffff;
    }
.template-page .footer-brand-col .logo-icon-wrap {
      background: #ffffff;
      border-radius: 10px;
      padding: 6px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
.template-page .footer-desc {
      font-size: 13.5px;
      line-height: 1.65;
      color: #8b9ab0;
      margin: 18px 0 22px;
      max-width: 360px;
    }
.template-page .social-links {
      display: flex;
      gap: 10px;
    }
.template-page .social-btn {
      width: 38px;
      height: 38px;
      border-radius: 50%;
      background: #161e2e;
      color: #ffffff;
      display: grid;
      place-items: center;
      font-size: 14px;
      transition: var(--transition);
    }
.template-page .social-btn:hover {
      background: var(--secondary-blue);
      transform: translateY(-2px);
    }
.template-page .footer-title {
      font-family: var(--font-heading);
      font-size: 14px;
      font-weight: 800;
      color: #ffffff;
      letter-spacing: 0.5px;
      margin-bottom: 22px;
    }
.template-page .footer-links-col ul {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
.template-page .footer-links-col a {
      font-size: 13.5px;
      color: #8b9ab0;
      transition: var(--transition);
    }
.template-page .footer-links-col a:hover {
      color: #ffffff;
      padding-left: 2px;
    }
.template-page .footer-contact-info {
      display: flex;
      flex-direction: column;
      gap: 14px;
    }
.template-page .footer-contact-info li {
      display: flex;
      align-items: center;
      gap: 12px;
      font-size: 13.5px;
      color: #94a3b8;
    }
.template-page .icon-green { color: #22c55e; }
.template-page .icon-blue { color: #3b82f6; }
.template-page .icon-orange { color: #f59e0b; }
.template-page .footer-bottom {
      border-top: 1px solid rgba(255, 255, 255, 0.08);
      padding: 24px 0;
    }
.template-page .copyright {
      font-size: 13px;
      color: #64748b;
      text-align: left;
    }
.template-page .modal-dialog {
      border: none;
      border-radius: 20px;
      padding: 0;
      background: transparent;
      max-width: 480px;
      width: 90%;
      margin: auto;
    }
.template-page .modal-dialog::backdrop {
      background: rgba(15, 23, 42, 0.65);
      backdrop-filter: blur(6px);
    }
.template-page .modal-card {
      background: #ffffff;
      border-radius: 20px;
      padding: 28px;
      box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    }
.template-page .modal-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 20px;
    }
.template-page .modal-header h3 {
      font-family: var(--font-heading);
      font-size: 18px;
      font-weight: 800;
      color: var(--dark-text);
    }
.template-page .btn-close-modal {
      background: none;
      border: none;
      font-size: 18px;
      color: var(--light-text);
      cursor: pointer;
    }
.template-page .modal-form {
      display: flex;
      flex-direction: column;
      gap: 14px;
    }
.template-page .form-row {
      display: flex;
      gap: 12px;
    }
.template-page .form-group {
      display: flex;
      flex-direction: column;
      gap: 6px;
      flex: 1;
    }
.template-page .form-group label {
      font-size: 12px;
      font-weight: 600;
      color: var(--dark-text);
    }
.template-page .form-control {
      width: 100%;
      padding: 10px 14px;
      font-family: var(--font-body);
      font-size: 13px;
      color: var(--dark-text);
      background: #f8fafc;
      border: 1px solid #e2e8f0;
      border-radius: 8px;
      outline: none;
    }
.template-page .form-control:focus {
      border-color: var(--secondary-blue);
      background: #ffffff;
    }
.template-page .btn-submit-order {
      background: var(--secondary-blue);
      color: #fff;
      font-family: var(--font-heading);
      font-size: 14px;
      font-weight: 700;
      padding: 12px;
      border-radius: 9999px;
      border: none;
      cursor: pointer;
      margin-top: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }@media (max-width: 992px) {
.template-page .main-nav { display: none; }
.template-page .mobile-toggle { display: block; }
.template-page .catalog-grid-15 { grid-template-columns: repeat(2, 1fr); }
.template-page .footer-grid { grid-template-columns: repeat(2, 1fr); }
    }@media (max-width: 640px) {
.template-page .catalog-grid-15 { grid-template-columns: 1fr; }
.template-page .footer-grid { grid-template-columns: 1fr; }
.template-page .form-row { flex-direction: column; }
    }
  
/* Leptos integration and accessibility. */
.template-page { text-align: left; min-height: 100vh; }
.template-page button { cursor: pointer; }
.template-page button:disabled { opacity: .55; cursor: not-allowed; }
.template-page [hidden] { display: none !important; }
.template-page :focus-visible { outline: 3px solid #60a5fa; outline-offset: 4px; }
.template-page .catalog-icon { width: 18px; height: 18px; flex: 0 0 auto; display: inline-block; vertical-align: middle; }
.template-page .catalog-search-input-box .catalog-icon { margin-right: 10px; color: #94a3b8; }
.template-page .catalog-result-count { color: #64748b; font-size: 12px; margin: -16px 0 18px; }
.template-page .catalog-empty { text-align: center; padding: 30px 0 60px; }
.template-page .catalog-empty h2 { font-size: 22px; font-weight: 700; }
.template-page .catalog-empty p { color: #64748b; margin: 12px 0 24px; }
.template-page .template-image-placeholder { width: 100%; min-height: 195px; height: 100%; padding: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; color: #475569; background: linear-gradient(135deg, #eff6ff, #f5f3ff); }
.template-page .template-image-placeholder .catalog-icon { width: 28px; height: 28px; color: #6366f1; }
.template-page .template-image-placeholder strong { font-family: var(--font-heading); font-size: 16px; }
.template-page .template-image-placeholder span { font-size: 12px; }
.template-page .catalog-mobile-nav { position: absolute; left: 0; right: 0; top: 74px; padding: 20px 24px; background: white; border-bottom: 1px solid #e2e8f0; box-shadow: 0 10px 20px #0f172a12; }
.template-page .catalog-mobile-nav ul { display: flex; flex-direction: column; gap: 18px; }
.template-page .catalog-mobile-nav a.active { color: #2563eb; font-weight: 700; }
.template-page .catalog-notice { font-size: 13px; color: #64748b; margin-bottom: 16px; line-height: 1.6; }
.template-page .modal-dialog { max-height: 90dvh; overflow-y: auto; color: #0f172a; }
.template-page .modal-header h2 { font-family: var(--font-heading); font-size: 18px; font-weight: 800; }
.template-page .modal-header { gap: 16px; }
.template-page .btn-close-modal { display: grid; place-items: center; width: 32px; height: 32px; }
.template-page .preview-dialog { max-width: 840px; }
.template-page .catalog-preview-image { max-height: 55vh; overflow: auto; border-radius: 12px; margin-bottom: 20px; }
.template-page .catalog-preview-image img { width: 100%; height: auto; }
.template-page .preview-title { font-family: var(--font-heading); font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.template-page .form-group { min-width: 0; }
.template-page .footer-links-col li > span { font-size: 13.5px; }
.template-page #catalog-cards-grid { scroll-margin-top: 100px; }
@media (min-width: 993px) { .template-page .catalog-mobile-nav { display: none; } }
@media (max-width: 992px) { .template-page .catalog-filter-tabs-wrap { justify-content: flex-start; } .template-page .catalog-filter-tabs { margin-inline: auto; } }
@media (max-width: 640px) {
  .template-page .container { padding: 0 18px; }
  .template-page .nav-actions { gap: 6px; }
  .template-page .btn-primary-header { display: none; }
  .template-page .btn-login { padding: 8px; }
  .template-page .templates-page-section { padding-top: 32px; }
  .template-page .catalog-page-title { font-size: 30px; }
  .template-page .modal-card { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) { .template-page *, .template-page *::before, .template-page *::after { transition: none !important; } }

/* Card title stretches its native link across the card; order controls stay independent. */
.template-page .custom-template-card { position: relative; }
.template-page .template-card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.template-page .card-action-buttons { position: relative; z-index: 2; }
.template-page .custom-template-card:focus-within { outline: 3px solid #60a5fa; outline-offset: 3px; }
