:root {
  --primary: #6C5CE7;
  --primary-dark: #5b4bd6;
  --primary-light: #F1EFFF;
  --bg: #F6F7FB;
  --surface: #FFFFFF;
  --border: #E6E8F0;
  --text: #16181D;
  --text-dim: #6B7280;
  --text-faint: #9AA1B2;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(30, 34, 60, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 10px;
  padding: 11px 20px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text-dim); }
.btn-ghost:hover { color: var(--text); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Marketing navbar ---------- */
.navbar {
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 40;
}
.navbar .bar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: .3px;
  color: var(--text);
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), #00CEC9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
}
.navbar nav.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.navbar nav.main-nav a {
  color: var(--text-dim);
  font-weight: 500;
  font-size: 14.5px;
}
.navbar nav.main-nav a:hover, .navbar nav.main-nav a.active { color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  padding: 76px 0 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.hero h1 {
  font-size: 46px;
  line-height: 1.12;
  margin: 0 0 18px;
  font-weight: 800;
}
.hero h1 span { color: var(--primary); }
.hero p {
  color: var(--text-dim);
  font-size: 17px;
  max-width: 460px;
  margin: 0 0 28px;
}
.hero-form {
  display: flex;
  gap: 10px;
  max-width: 440px;
  margin-bottom: 22px;
}
.hero-form input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 16px;
  font-size: 14px;
  outline: none;
}
.hero-form input:focus { border-color: var(--primary); }
.hero-stats {
  display: flex;
  gap: 26px;
  color: var(--text-faint);
  font-size: 13px;
}
.hero-stats span { color: var(--text-dim); font-weight: 600; }
.hero-visual {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.hero-visual .tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.hero-visual .tile img { width: 48px; height: 48px; object-fit: contain; }
.hero-visual .tile .lbl { font-weight: 700; font-size: 12px; }
.hero-visual .tile .sub { font-size: 10px; color: var(--text-faint); }
.hero-visual .tile.center { transform: scale(1.15); z-index: 2; }

/* ---------- Feature strip ---------- */
.feature-strip {
  background: var(--text);
  color: #fff;
  padding: 56px 0;
  margin-top: 40px;
}
.feature-strip .inner {
  display: grid;
  grid-template-columns: 1.1fr 2fr;
  gap: 40px;
}
.feature-strip h2 { font-size: 26px; margin: 0 0 8px; }
.feature-strip p { color: #a9adc2; margin: 0; font-size: 14px; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px 28px;
}
.feature-item { display: flex; gap: 12px; align-items: flex-start; }
.feature-item .fi-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(108,92,231,.25); color: #b7aeff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.feature-item .fi-icon svg { width: 19px; height: 19px; }
.feature-item h4 { margin: 0 0 4px; font-size: 14.5px; }
.feature-item p { margin: 0; font-size: 12.5px; color: #9296ac; }
.cta-strip {
  margin-top: 44px;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cta-strip h3 { margin: 0 0 4px; font-size: 20px; }
.cta-strip p { margin: 0; color: #9296ac; font-size: 13.5px; }

/* ---------- Category showcase (hero-style, per category) ---------- */
.category-showcase {
  padding: 46px 0;
  border-top: 1px solid var(--border);
}
.category-showcase.alt { background: #fafbff; }
.category-showcase .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.category-showcase h2 { font-size: 30px; margin: 0 0 12px; line-height: 1.2; }
.category-showcase p { color: var(--text-dim); font-size: 15px; max-width: 440px; margin: 0 0 22px; }
.category-showcase .badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-light); color: var(--primary);
  font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}

/* ---------- Homepage SEO content sections ---------- */
.content-section { padding: 56px 0; }
.content-section.alt { background: var(--surface, #fff); background: #fafbff; }
.content-section h2 {
  font-size: 28px;
  margin: 0 0 14px;
  text-align: center;
}
.content-section > .container > p.lead {
  max-width: 720px;
  margin: 0 auto 30px;
  text-align: center;
  color: var(--text-dim);
  font-size: 15.5px;
  line-height: 1.7;
}
.prose-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 980px;
  margin: 0 auto;
}
.prose-grid p {
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.75;
  margin: 0 0 16px;
}
.prose-grid h3 { font-size: 16px; margin: 0 0 8px; }

.steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 980px;
  margin: 0 auto;
}
.step-card { text-align: center; }
.step-num {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px; font-size: 16px;
}
.step-card h4 { margin: 0 0 8px; font-size: 15.5px; }
.step-card p { margin: 0; color: var(--text-dim); font-size: 13.5px; line-height: 1.6; }

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 980px;
  margin: 0 auto;
}
.testimonial-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.testimonial-stars { color: #f5a623; font-size: 13px; margin-bottom: 10px; letter-spacing: 2px; }
.testimonial-card p.quote { font-size: 13.5px; color: var(--text-dim); line-height: 1.6; margin: 0 0 16px; }
.testimonial-author { display: flex; align-items: center; gap: 10px; }
.testimonial-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
}
.testimonial-name { font-weight: 700; font-size: 13px; }
.testimonial-role { font-size: 11.5px; color: var(--text-faint); }

.faq-list { max-width: 760px; margin: 0 auto; }
.faq-accordion {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-accordion summary {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq-accordion summary::-webkit-details-marker { display: none; }
.faq-accordion summary::after { content: "+"; color: var(--text-faint); font-size: 18px; }
.faq-accordion[open] summary::after { content: "−"; }
.faq-accordion .faq-answer { padding: 0 20px 18px; color: var(--text-dim); font-size: 13.5px; line-height: 1.7; }

/* Comments */
.comments-section { max-width: 720px; margin: 0 auto; }
.comment-form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 26px;
}
.comment-form .row-2 { margin-bottom: 12px; }
.comment-form textarea {
  width: 100%;
  min-height: 90px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13.5px;
  resize: vertical;
  margin-bottom: 12px;
}
.comment-item {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.comment-item:last-child { border-bottom: none; }
.comment-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
}
.comment-body { flex: 1; }
.comment-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.comment-name { font-weight: 700; font-size: 13.5px; }
.comment-time { font-size: 11.5px; color: var(--text-faint); }
.comment-text { font-size: 13.5px; color: var(--text-dim); line-height: 1.6; }
.comment-note { font-size: 12px; color: var(--text-faint); margin-top: -18px; margin-bottom: 22px; text-align: center; }

footer.site-footer {
  background: var(--text);
  color: #9296ac;
  padding: 50px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 30px;
  padding-bottom: 36px;
}
.footer-grid .brand { color: #fff; margin-bottom: 10px; }
.footer-grid p { font-size: 13px; line-height: 1.6; color: #9296ac; max-width: 260px; }
.footer-col h5 { color: #fff; font-size: 13px; margin: 0 0 14px; }
.footer-col a { display: block; color: #9296ac; font-size: 13px; margin-bottom: 10px; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
}
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.footer-social a svg { width: 15px; height: 15px; }

/* ---------- Blog listing + article pages ---------- */
.blog-hero { padding: 52px 0 20px; text-align: center; }
.blog-hero h1 { font-size: 34px; margin: 0 0 10px; }
.blog-hero p { color: var(--text-dim); font-size: 15px; max-width: 560px; margin: 0 auto; }

.blog-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 0 60px;
}
.blog-index-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.blog-index-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.blog-index-card .cover {
  aspect-ratio: 16/9;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px;
}
.blog-index-card .body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.blog-index-card .tag {
  align-self: flex-start;
  background: var(--primary-light); color: var(--primary);
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-bottom: 10px;
}
.blog-index-card h3 { font-size: 16px; margin: 0 0 8px; line-height: 1.35; }
.blog-index-card p { font-size: 13px; color: var(--text-dim); line-height: 1.6; margin: 0 0 14px; flex: 1; }
.blog-index-card .meta-row { font-size: 11.5px; color: var(--text-faint); display: flex; justify-content: space-between; }

.article-header { padding: 44px 0 26px; border-bottom: 1px solid var(--border); }
.article-header .container { max-width: 740px; }
.article-tag {
  display: inline-block; background: var(--primary-light); color: var(--primary);
  font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; margin-bottom: 16px;
}
.article-header h1 { font-size: 32px; line-height: 1.25; margin: 0 0 14px; }
.article-meta { color: var(--text-faint); font-size: 13px; }

.article-body { max-width: 740px; margin: 0 auto; padding: 40px 24px 20px; }
.article-body p { font-size: 15.5px; line-height: 1.85; color: var(--text-dim); margin: 0 0 20px; }
.article-body h2 { font-size: 22px; margin: 40px 0 14px; color: var(--text); }
.article-body h3 { font-size: 17px; margin: 28px 0 10px; color: var(--text); }
.article-body ul, .article-body ol { margin: 0 0 20px; padding-left: 22px; color: var(--text-dim); font-size: 15.5px; line-height: 1.85; }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--text); }
.article-body blockquote {
  margin: 24px 0; padding: 16px 20px; border-left: 3px solid var(--primary);
  background: var(--primary-light); border-radius: 0 8px 8px 0; font-size: 14.5px; color: var(--text);
}
.article-cta {
  max-width: 740px; margin: 20px auto 60px; padding: 24px 6px 0;
  border-top: 1px solid var(--border);
}
.article-cta-box {
  background: linear-gradient(120deg, var(--primary-light), #eef0ff);
  border: 1px solid #e3ddff; border-radius: var(--radius);
  padding: 26px; text-align: center; margin-top: 24px;
}
.article-cta-box h3 { margin: 0 0 8px; font-size: 18px; }
.article-cta-box p { margin: 0 0 16px; font-size: 13.5px; color: var(--text-dim); }

.related-articles { max-width: 740px; margin: 0 auto 60px; padding: 0 24px; }
.related-articles h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); margin-bottom: 14px; }
.related-articles a {
  display: block; padding: 12px 0; border-bottom: 1px solid var(--border);
  font-size: 14.5px; font-weight: 600; color: var(--text);
}
.related-articles a:hover { color: var(--primary); }

/* Keyword strip */
.keyword-strip { background: #fafbff; border-top: 1px solid var(--border); padding: 30px 0; }
.keyword-strip h5 { text-align: center; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); margin: 0 0 16px; }
.keyword-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; max-width: 900px; margin: 0 auto; }
.keyword-links a {
  font-size: 12.5px; color: var(--text-dim); background: #fff; border: 1px solid var(--border);
  padding: 6px 13px; border-radius: 999px;
}
.keyword-links a:hover { color: var(--primary); border-color: var(--primary); }

/* ---------- Animations: hero entrance + scroll reveal ---------- */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero > div:first-child > * {
  opacity: 0;
  animation: heroFadeUp .7s cubic-bezier(.16,1,.3,1) forwards;
}
.hero > div:first-child > h1 { animation-delay: .05s; }
.hero > div:first-child > p { animation-delay: .18s; }
.hero > div:first-child > .hero-form { animation-delay: .3s; }
.hero > div:first-child > .hero-stats { animation-delay: .42s; }
.hero-visual {
  opacity: 0;
  animation: heroFadeUp .8s cubic-bezier(.16,1,.3,1) .22s forwards;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .55s cubic-bezier(.16,1,.3,1), transform .55s cubic-bezier(.16,1,.3,1);
}
[data-reveal-stagger].is-visible > * { opacity: 1; transform: translateY(0); }
[data-reveal-stagger].is-visible > *:nth-child(1) { transition-delay: .02s; }
[data-reveal-stagger].is-visible > *:nth-child(2) { transition-delay: .08s; }
[data-reveal-stagger].is-visible > *:nth-child(3) { transition-delay: .14s; }
[data-reveal-stagger].is-visible > *:nth-child(4) { transition-delay: .20s; }
[data-reveal-stagger].is-visible > *:nth-child(5) { transition-delay: .26s; }
[data-reveal-stagger].is-visible > *:nth-child(6) { transition-delay: .32s; }
[data-reveal-stagger].is-visible > *:nth-child(n+7) { transition-delay: .36s; }

/* Image load-in fade (tile grids populated via JS) */
.tile img {
  opacity: 0;
  transform: scale(.9);
  transition: opacity .45s ease, transform .45s ease;
}
.tile img.img-loaded { opacity: 1; transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
  .hero > div:first-child > *, .hero-visual, [data-reveal], [data-reveal-stagger] > *, .tile img {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (max-width: 860px) {
  .prose-grid, .steps-row, .testimonial-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- App shell (dashboard / templates / my-logos / etc.) ---------- */
.app-layout { display: flex; align-items: flex-start; min-height: 100vh; }
.app-sidebar {
  width: 232px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: #fff;
  padding: 20px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.app-sidebar .brand { margin-bottom: 18px; padding: 0 8px; font-size: 15px; }
.btn-create {
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  margin-bottom: 20px;
}
.btn-create:hover { background: var(--primary-dark); }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav-bottom { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); }
.sidebar-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-faint);
  padding: 14px 10px 6px;
}
.premium-card {
  display: block;
  margin-top: 14px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(150deg, var(--primary-light), #eef0ff);
  border: 1px solid #e3ddff;
}
.premium-card-icon { font-size: 20px; margin-bottom: 6px; }
.premium-card-title { font-weight: 700; font-size: 13.5px; color: var(--text); margin-bottom: 4px; }
.premium-card-sub { font-size: 11.5px; color: var(--text-dim); line-height: 1.4; margin-bottom: 10px; }
.premium-card-btn {
  background: var(--primary);
  color: #fff;
  text-align: center;
  border-radius: 8px;
  padding: 8px;
  font-size: 12.5px;
  font-weight: 700;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 10px;
  border-radius: 9px;
  color: var(--text-dim);
  font-size: 13.8px;
  font-weight: 500;
}
.sidebar-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-link:hover { background: var(--bg); color: var(--text); }
.sidebar-link.active { background: var(--primary-light); color: var(--primary); }

.app-main { flex: 1; padding: 26px 34px 60px; min-width: 0; }
.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}
.app-topbar h1 { font-size: 24px; margin: 0 0 4px; }
.app-topbar p { margin: 0; color: var(--text-dim); font-size: 13.5px; }
.app-topbar-actions { display: flex; align-items: center; gap: 14px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.icon-btn svg { width: 17px; height: 17px; color: var(--text-dim); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  margin-bottom: 22px;
  max-width: 520px;
}
.search-bar svg { width: 16px; height: 16px; color: var(--text-faint); flex-shrink: 0; }
.search-bar input { flex: 1; border: none; outline: none; font-size: 13.5px; }

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 30px 0 14px;
}
.section-heading h3 { margin: 0; font-size: 16px; }
.section-heading a { color: var(--primary); font-size: 13px; font-weight: 600; }

/* Search + Filters + Sort row (templates page) */
.search-filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.sort-select {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
}
.filters-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 8px;
  width: 260px;
  max-height: 340px;
  overflow-y: auto;
}
.filters-dropdown.open { display: block; }
.filters-dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
}
.filters-dropdown-item:hover { background: var(--bg); color: var(--text); }
.filters-dropdown-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }

/* Category chip filter */
.chip-scroll-row { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.chip-more-btn {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
}
.chip-more-btn:hover { border-color: var(--primary); color: var(--primary); }
.chip {
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
}
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.chip:hover:not(.active) { border-color: var(--primary); color: var(--primary); }

/* Template / logo card grids */
.tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}
.tpl-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.tpl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tpl-card .thumb {
  aspect-ratio: 1/1;
  background: #fafbff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}
.tpl-card .thumb img { max-width: 100%; max-height: 100%; }
.tpl-card .meta { padding: 10px 12px; border-top: 1px solid var(--border); font-size: 12.5px; font-weight: 600; color: var(--text-dim); }

.tpl-caption { padding: 4px 14px 16px; text-align: center; }
.tpl-brand { font-weight: 800; font-size: 15px; letter-spacing: .02em; }
.tpl-slogan { font-size: 10.5px; letter-spacing: .06em; color: var(--text-faint); margin-top: 2px; }

.tpl-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.tpl-fav {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
  color: var(--text-dim);
}
.tpl-fav:hover { color: #ef4444; }
.tpl-fav.faved { color: #ef4444; }

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 30px 0 10px;
}
.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.page-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }
.page-ellipsis { color: var(--text-faint); padding: 0 4px; }

/* AI / discovery banner */
.ai-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(120deg, var(--primary-light), #eef0ff);
  border: 1px solid #e3ddff;
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 10px 0 40px;
}
.ai-banner-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.ai-banner h3 { margin: 0 0 4px; font-size: 16px; }
.ai-banner p { margin: 0; font-size: 13px; color: var(--text-dim); }

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}
.category-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 16px;
  text-align: center;
  transition: transform .15s, box-shadow .15s;
}
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.category-card .icon { font-size: 30px; margin-bottom: 10px; }
.category-card .name { font-weight: 700; font-size: 14px; }
.category-card .count { color: var(--text-faint); font-size: 12px; margin-top: 3px; }

.empty-state {
  text-align: center;
  color: var(--text-dim);
  padding: 50px 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: #fff;
}
.empty-state code { background: var(--bg); padding: 2px 8px; border-radius: 6px; }

/* ---------- Editor ---------- */
.editor-shell { display: flex; height: 100vh; overflow: hidden; }
.editor-toolsidebar {
  width: 88px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 14px 8px;
  overflow-y: auto;
}
.editor-toolsidebar .tool-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 4px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
}
.editor-toolsidebar .tool-btn svg { width: 20px; height: 20px; }
.editor-toolsidebar .tool-btn:hover { background: var(--bg); }
.editor-toolsidebar .tool-btn.active { background: var(--primary-light); color: var(--primary); }

.editor-rightpanel {
  width: 300px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 18px;
  overflow-y: auto;
}
.editor-rightpanel h3 { margin: 0 0 16px; font-size: 15px; }
.panel-close { float: right; background: none; border: none; cursor: pointer; color: var(--text-faint); }

.editor-canvasarea { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.editor-topbar {
  height: 60px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}
.editor-topbar .left, .editor-topbar .right { display: flex; align-items: center; gap: 10px; }
.editor-topbar .back { display: flex; align-items: center; gap: 6px; color: var(--text-dim); font-weight: 600; font-size: 13.5px; }
.editor-topbar .back svg { width: 16px; height: 16px; }

.editor-canvas-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(45deg, #eef0f6 25%, transparent 25%),
    linear-gradient(-45deg, #eef0f6 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef0f6 75%),
    linear-gradient(-45deg, transparent 75%, #eef0f6 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  background-color: var(--bg);
}
#logoCanvas {
  max-width: min(70vh, 560px);
  max-height: 70vh;
  width: 100%;
  height: auto;
  aspect-ratio: 1/1;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(20,20,60,.16);
  background: #fff;
}

/* Panel form controls (shared with editor) */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; color: var(--text-dim); margin-bottom: 6px; font-weight: 600; }
.field input[type="text"], .field select, .field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 13.5px;
  color: var(--text);
  outline: none;
}
.field input[type="text"]:focus, .field select:focus { border-color: var(--primary); }
.field input[type="color"] { width: 100%; height: 38px; border: 1px solid var(--border); border-radius: 8px; padding: 3px; background: var(--bg); }
.field input[type="range"] { width: 100%; }
.row-2 { display: flex; gap: 10px; }
.row-2 .field { flex: 1; }
.toggle-row { display: flex; gap: 8px; }
.toggle-row button {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-dim);
}
.toggle-row button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.align-row { display: flex; gap: 6px; }
.align-row button { flex: 1; border: 1px solid var(--border); background: var(--bg); border-radius: 8px; padding: 8px; cursor: pointer; }
.align-row button.active { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }

/* Swatches */
.swatch-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 14px; }
.swatch {
  aspect-ratio: 1/1;
  border-radius: 8px;
  border: 2px solid var(--border);
  cursor: pointer;
}
.swatch.selected { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); }
.gradient-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.gradient-swatch { aspect-ratio: 1/1; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.gradient-swatch.selected { border-color: var(--primary); }

/* Icon grid */
.icon-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.icon-grid button {
  aspect-ratio: 1/1;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
}
.icon-grid button svg { width: 20px; height: 20px; }
.icon-grid button.selected { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }

/* Shape grid */
.shape-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.shape-grid button {
  aspect-ratio: 1/1;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.shape-grid button.selected { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.shape-preview { width: 22px; height: 22px; background: currentColor; }
.shape-preview.circle { border-radius: 50%; }
.shape-preview.rounded-square { border-radius: 6px; }
.shape-preview.hexagon { clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
.shape-preview.triangle { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.shape-preview.ring { background: transparent; border: 3px solid currentColor; border-radius: 50%; }
.shape-preview.none { background: transparent; border: 1px dashed currentColor; border-radius: 6px; }

/* Uploads */
.upload-drop {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 22px 12px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
  margin-bottom: 16px;
}
.upload-drop:hover { border-color: var(--primary); color: var(--primary); }
.upload-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.upload-grid .thumb { aspect-ratio: 1/1; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; cursor: pointer; background: #fff; }
.upload-grid .thumb img { width: 100%; height: 100%; object-fit: contain; }

/* Layers list */
.layer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 6px;
  background: var(--bg);
  font-size: 13px;
}
.layer-row .layer-name { flex: 1; font-weight: 600; }
.layer-row button { background: none; border: none; cursor: pointer; color: var(--text-faint); display: flex; }
.layer-row button:hover { color: var(--primary); }
.layer-row button svg { width: 15px; height: 15px; }

/* ---------- Simple sub-pages (My Logos / Saved / Brand Kit / Upgrade / Settings) ---------- */
.placeholder-page {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: 60px 24px;
  text-align: center;
  color: var(--text-dim);
}
.placeholder-page h3 { color: var(--text); margin: 12px 0 6px; }

.mylogos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.mylogos-grid .card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.mylogos-grid .thumb { aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; background: #fafbff; padding: 16px; }
.mylogos-grid .card-body { padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mylogos-grid .card-body .name { font-weight: 600; font-size: 13px; }
.mylogos-grid .card-actions { display: flex; gap: 6px; padding: 0 12px 12px; }

/* ---------- Preview page ---------- */
.preview-shell { min-height: 100vh; display: flex; flex-direction: column; }
.preview-topbar {
  height: 60px; border-bottom: 1px solid var(--border); background: #fff;
  display: flex; align-items: center; justify-content: space-between; padding: 0 20px;
}
.preview-tabs { display: flex; gap: 6px; }
.preview-tabs button {
  border: 1px solid var(--border); background: #fff; border-radius: 8px;
  padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--text-dim); cursor: pointer;
}
.preview-tabs button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.preview-body { flex: 1; display: grid; grid-template-columns: 140px 1fr; gap: 20px; padding: 24px; }
.preview-thumbs { display: flex; flex-direction: column; gap: 12px; }
.preview-thumbs .th { aspect-ratio: 1/1; border: 1px solid var(--border); border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center; padding: 10px; cursor: pointer; }
.preview-thumbs .th.active { border-color: var(--primary); }
.preview-thumbs .th img { max-width: 100%; max-height: 100%; }
.preview-main { display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }

/* Mockups (CSS/SVG based, no external stock photos) */
.mockup { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 40px; }
.mockup-card {
  width: 340px; height: 210px; background: #fff; border-radius: 12px; box-shadow: 0 20px 40px rgba(0,0,0,.12);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.mockup-card img { max-width: 55%; max-height: 55%; }
.mockup-mug {
  width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #fff, #e7e9f2);
  display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 10px #fff, 0 20px 40px rgba(0,0,0,.1);
}
.mockup-mug img { max-width: 45%; max-height: 45%; }
.mockup-tshirt {
  width: 300px; height: 320px; position: relative;
}
.mockup-tshirt .shirt-body {
  position: absolute; inset: 0; background: #eef0f6; border-radius: 30px 30px 60px 60px;
  clip-path: polygon(20% 0%, 35% 0%, 50% 14%, 65% 0%, 80% 0%, 100% 22%, 82% 36%, 82% 100%, 18% 100%, 18% 36%, 0% 22%);
}
.mockup-tshirt img { position: absolute; top: 38%; left: 50%; transform: translate(-50%,-50%); width: 30%; }
.mockup-sign {
  width: 100%; height: 100%; background: linear-gradient(160deg, #cfd6e6, #9aa4bd);
  display: flex; align-items: center; justify-content: center;
}
.mockup-sign .board {
  background: #fff; padding: 30px 46px; border-radius: 10px; box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.mockup-sign img { max-width: 220px; max-height: 120px; }

/* ---------- Download page ---------- */
.download-shell { min-height: 100vh; }
.download-topbar { height: 60px; border-bottom: 1px solid var(--border); background: #fff; display: flex; align-items: center; padding: 0 20px; gap: 12px; font-weight: 700; }
.download-body { max-width: 760px; margin: 0 auto; padding: 40px 24px; display: grid; grid-template-columns: 1fr 240px; gap: 40px; }
.format-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.format-card {
  border: 2px solid var(--border); border-radius: var(--radius-sm); padding: 16px 10px; text-align: center;
  cursor: pointer; background: #fff;
}
.format-card .fmt-name { font-weight: 800; font-size: 15px; }
.format-card .fmt-sub { font-size: 11px; color: var(--text-faint); margin-top: 2px; }
.format-card.selected { border-color: var(--primary); background: var(--primary-light); }
.format-card:disabled, .format-card.disabled { opacity: .45; cursor: not-allowed; }
.check-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 13.5px; color: var(--text-dim); }
.download-preview { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; padding: 24px; display: flex; align-items: center; justify-content: center; height: fit-content; }
.download-preview img { max-width: 100%; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .feature-strip .inner { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .app-sidebar { display: none; }
  .editor-rightpanel { position: fixed; right: 0; top: 0; bottom: 0; z-index: 30; box-shadow: -10px 0 30px rgba(0,0,0,.15); }
  .download-body { grid-template-columns: 1fr; }
}
