/* =====================================================================
   Pixila Studio — templates.css
   Szkice (wireframe'y) układów popularnych wizytówek + galeria szablonów.
   Korzysta z tokenów motywu z styles.css (dark/light, blue/orange).
   ===================================================================== */

/* ---------- TŁO SEKCJI SZABLONÓW ---------- */
.tpl-page-hero {
  position: relative;
  padding: clamp(40px, 7vw, 80px) 0 clamp(28px, 4vw, 44px);
  text-align: center;
  overflow: hidden;
}
.tpl-page-hero .hero-bg { position: absolute; inset: 0; z-index: -1; }
.tpl-breadcrumb {
  font-family: var(--mono); font-size: .85rem; color: var(--text-dim);
  margin-bottom: 14px;
}
.tpl-breadcrumb a { color: var(--blue-light); }
.tpl-breadcrumb .sep { color: var(--text-dim); margin: 0 6px; }
.tpl-page-hero h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); margin-bottom: 14px; }
.tpl-page-hero .lead { color: var(--text-dim); font-size: 1.08rem; max-width: 60ch; margin: 0 auto; }
.tpl-meta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 20px; }
.tpl-meta span {
  font-family: var(--mono); font-size: .8rem; color: var(--text);
  border: 1px solid var(--border); background: var(--bg-elev);
  border-radius: 30px; padding: 6px 14px;
}

/* ---------- GALERIA SZABLONÓW ---------- */
.tpl-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.tpl-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; text-decoration: none;
  display: flex; flex-direction: column;
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
}
.tpl-card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--blue) 50%, var(--border)); box-shadow: var(--shadow); }
.tpl-thumb {
  --sk: color-mix(in srgb, var(--text) 12%, transparent);
  --sk2: color-mix(in srgb, var(--text) 22%, transparent);
  --sk-acc: color-mix(in srgb, var(--blue) 55%, transparent);
  --sk-acc2: color-mix(in srgb, var(--orange) 55%, transparent);
  height: 190px; padding: 14px; background: var(--bg-elev);
  border-bottom: 1px solid var(--border); overflow: hidden;
  display: flex; flex-direction: column; gap: 8px;
}
.tpl-card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tpl-card-body h3 { font-size: 1.12rem; }
.tpl-card-body .for { font-family: var(--mono); font-size: .76rem; color: var(--orange-light); }
.tpl-card-body p { color: var(--text-dim); font-size: .92rem; }
.tpl-card .more { margin-top: auto; padding-top: 6px; color: var(--blue-light); font-weight: 600; font-size: .92rem; }
.tpl-card:hover .more { color: var(--orange-light); }

/* ---------- WIREFRAME — KANWA / RAMKA ---------- */
.wf-wrap { max-width: 940px; margin: 0 auto; }
.wf-switch { display: flex; gap: 8px; justify-content: center; margin-bottom: 18px; }
.wf-switch span {
  font-family: var(--mono); font-size: .78rem; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 20px; padding: 5px 14px; background: var(--bg-elev);
}
.wf-stage { display: grid; grid-template-columns: 1fr; gap: 26px; align-items: start; justify-items: center; }
@media (min-width: 920px) { .wf-stage.with-phone { grid-template-columns: 1fr 280px; } }

.wf {
  --sk: color-mix(in srgb, var(--text) 12%, transparent);
  --sk2: color-mix(in srgb, var(--text) 22%, transparent);
  --sk-acc: color-mix(in srgb, var(--blue) 55%, transparent);
  --sk-acc2: color-mix(in srgb, var(--orange) 55%, transparent);
  width: 100%;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow);
}
.wf-topbar {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px; background: var(--bg-elev); border-bottom: 1px solid var(--border);
}
.wf-topbar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.wf-topbar i:nth-child(1) { background: #ff5f56; }
.wf-topbar i:nth-child(2) { background: #ffbd2e; }
.wf-topbar i:nth-child(3) { background: #27c93f; }
.wf-topbar .url {
  margin-left: 8px; flex: 1; font-family: var(--mono); font-size: .72rem; color: var(--text-dim);
  background: var(--bg); border: 1px solid var(--border); border-radius: 20px; padding: 3px 12px;
}

/* Telefon (mobile mock) */
.wf-phone { width: 280px; max-width: 100%; border-radius: 26px; border: 1px solid var(--border); }
.wf-phone .wf-topbar { border-radius: 25px 25px 0 0; justify-content: center; }
.wf-phone .wf-topbar .notch { width: 70px; height: 7px; border-radius: 10px; background: var(--border); }

/* ---------- SEKCJE WEWNĄTRZ SZKICU ---------- */
.wf-sec { padding: 20px; border-bottom: 1px dashed var(--border); position: relative; }
.wf-sec:last-child { border-bottom: none; }
.wf-sec.alt { background: color-mix(in srgb, var(--text) 4%, transparent); }
.wf-tag {
  display: inline-block; font-family: var(--mono); font-size: .68rem; letter-spacing: .03em;
  color: var(--blue-light); margin-bottom: 12px;
}
.wf-tag::before { content: "// "; color: var(--green); }

/* ---------- PRYMITYWY SZKICU (skeleton) ---------- */
.sk { background: var(--sk); border-radius: 6px; display: block; }
.sk-line { height: 11px; }
.sk-line + .sk-line { margin-top: 8px; }
.sk-title { height: 20px; border-radius: 6px; background: var(--sk2); }
.sk-h1 { height: 30px; border-radius: 7px; background: var(--sk2); }
.sk-accent { background: var(--sk-acc); }
.sk-accent2 { background: var(--sk-acc2); }

.sk-btn { height: 34px; width: 130px; border-radius: 8px; background: var(--grad); }
.sk-btn.ghost { background: transparent; border: 1.6px solid var(--blue); }
.sk-btn.sm { height: 26px; width: 92px; }

.sk-circle { border-radius: 50%; background: var(--sk2); flex: none; }
.sk-circle.sm { width: 34px; height: 34px; }
.sk-circle.md { width: 54px; height: 54px; }
.sk-circle.lg { width: 96px; height: 96px; }

.sk-img {
  width: 100%; border-radius: 8px; min-height: 90px;
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, transparent calc(50% - 1px), var(--border) calc(50% - 1px), var(--border) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(45deg, transparent calc(50% - 1px), var(--border) calc(50% - 1px), var(--border) calc(50% + 1px), transparent calc(50% + 1px)),
    color-mix(in srgb, var(--text) 7%, transparent);
}
.sk-img.tall { min-height: 150px; }
.sk-img.hero { min-height: 210px; }
.sk-img.sq { aspect-ratio: 1/1; min-height: 0; }

.sk-card {
  border: 1px solid var(--border); border-radius: 10px; padding: 14px;
  background: color-mix(in srgb, var(--text) 4%, transparent);
  display: flex; flex-direction: column; gap: 9px;
}
.sk-pill { height: 24px; border-radius: 20px; background: var(--sk); }

/* ---------- UKŁADY POMOCNICZE ---------- */
.wf-row { display: flex; gap: 16px; align-items: center; }
.wf-row.top { align-items: flex-start; }
.wf-col { flex: 1; min-width: 0; }
.wf-grid { display: grid; gap: 12px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-6 { grid-template-columns: repeat(6, 1fr); }
.center { display: flex; flex-direction: column; align-items: center; text-align: center; }
.center .sk { margin-inline: auto; }
.gap-sm { gap: 8px; }
.mt-sm { margin-top: 10px; }
.mt { margin-top: 16px; }

/* szkic paska nawigacji */
.wf-nav { display: flex; align-items: center; justify-content: space-between; }
.wf-nav .logo-sk { width: 90px; height: 16px; border-radius: 5px; background: var(--sk2); }
.wf-nav .links { display: flex; gap: 12px; }
.wf-nav .links .sk { width: 42px; height: 9px; }

/* szerokości */
.w-100 { width: 100%; } .w-90 { width: 90%; } .w-80 { width: 80%; }
.w-70 { width: 70%; } .w-60 { width: 60%; } .w-50 { width: 50%; }
.w-45 { width: 45%; } .w-40 { width: 40%; } .w-35 { width: 35%; }
.w-30 { width: 30%; } .w-25 { width: 25%; } .w-20 { width: 20%; }

/* ---------- CTA POD SZKICEM ---------- */
.tpl-cta {
  margin-top: 40px; text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: clamp(26px, 4vw, 44px);
}
.tpl-cta h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 10px; }
.tpl-cta p { color: var(--text-dim); margin-bottom: 22px; max-width: 52ch; margin-inline: auto; }
.tpl-cta .cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* nawigacja między szablonami */
.tpl-nav-prevnext { display: flex; justify-content: space-between; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.tpl-nav-prevnext a { font-family: var(--mono); font-size: .9rem; color: var(--text-dim); border: 1px solid var(--border); border-radius: 10px; padding: 10px 16px; }
.tpl-nav-prevnext a:hover { border-color: var(--blue); color: var(--blue-light); }

/* ---------- RESPONSYWNOŚĆ ---------- */
@media (max-width: 900px) { .tpl-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
  .tpl-grid { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
  .cols-3, .cols-4, .cols-6 { grid-template-columns: repeat(2, 1fr); }
  .wf-row { flex-direction: column; align-items: stretch; }
  .wf-nav { flex-direction: row; }
}
