/* ============================================================
   Template Preview Pages — Bloomfolio
   Owns: all styles for /templates/:slug preview pages
   Does NOT own: shop.css, theme.css, layout styles
   ============================================================ */

/* ── Base ── */
.template-preview-page {
  min-height: 100vh;
  background: var(--bg, #faf9f7);
}

/* ── Hero ── */
.tp-hero {
  padding: 100px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.tp-hero--premed {
  background: linear-gradient(135deg, #f5f0ff 0%, #ffe8f0 50%, #fff5e8 100%);
}

.tp-hero--business {
  background: linear-gradient(135deg, #e8f4ff 0%, #f0ffe8 50%, #fff8e8 100%);
}

.tp-hero-inner {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.tp-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 20px;
}

.tp-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 600;
  line-height: 1.1;
  color: #1a1a1a;
  margin: 0 0 16px;
}

.tp-subtitle {
  font-size: 18px;
  color: #666;
  line-height: 1.5;
  margin: 0 0 36px;
}

.tp-cta-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.tp-btn-primary {
  display: inline-block;
  padding: 14px 28px;
  background: #1a1a1a;
  color: #fff !important;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.2s, transform 0.15s;
}

.tp-btn-primary:hover {
  background: #333;
  transform: translateY(-1px);
}

.tp-btn-primary--biz {
  background: #2563eb;
}

.tp-btn-primary--biz:hover {
  background: #1d4ed8;
}

.tp-btn-xl {
  padding: 18px 36px;
  font-size: 17px;
}

.tp-btn-secondary {
  display: inline-block;
  padding: 14px 24px;
  color: #555;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: rgba(255,255,255,0.7);
  transition: background 0.2s;
}

.tp-btn-secondary:hover {
  background: rgba(255,255,255,0.95);
}

/* ── Sections ── */
.tp-section {
  padding: 72px 24px;
}

.tp-section:nth-child(even) {
  background: rgba(255,255,255,0.6);
}

.tp-section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.tp-section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 600;
  color: #1a1a1a;
  text-align: center;
  margin: 0 0 12px;
}

.tp-section-lede {
  text-align: center;
  color: #777;
  font-size: 16px;
  margin: 0 0 48px;
}

/* ── Format Cards ── */
.tp-format-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.tp-format-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px 28px;
  border: 1px solid #eee;
  position: relative;
  transition: box-shadow 0.2s, transform 0.2s;
}

.tp-format-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.tp-format-card--featured {
  border: 2px solid #c084fc;
  background: linear-gradient(135deg, #fdf4ff 0%, #fff 100%);
}

.tp-format-card--biz {
  border: 2px solid #60a5fa;
  background: linear-gradient(135deg, #eff6ff 0%, #fff 100%);
}

.tp-format-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #c084fc;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 100px;
}

.tp-format-card--biz .tp-format-badge {
  background: #60a5fa;
}

.tp-format-icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.tp-format-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 10px;
}

.tp-format-card p {
  font-size: 14px;
  color: #777;
  line-height: 1.6;
  margin: 0 0 20px;
}

.tp-format-features {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tp-format-features li {
  font-size: 13px;
  color: #555;
  padding: 5px 0;
  padding-left: 18px;
  position: relative;
}

.tp-format-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #c084fc;
  font-weight: 700;
}

.tp-format-card--biz .tp-format-features li::before {
  color: #60a5fa;
}

/* ── Page Mockups Grid ── */
.tp-pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 32px;
  margin-top: 40px;
}

.tp-page-mockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.tp-page-caption {
  font-size: 13px;
  color: #888;
  text-align: center;
  margin: 0;
}

/* ── Page mockup: the "paper" ── */
.tp-page {
  width: 100%;
  max-width: 300px;
  min-height: 390px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-size: 10px;
}

.tp-page-header {
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f7f5;
  border-bottom: 1px solid #eee;
  font-size: 9px;
  font-weight: 600;
  color: #999;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tp-page-header--colored { background: #f5f0ff; color: #9333ea; border-color: #e9d5ff; }
.tp-page-header--exam { background: #fff5f0; color: #ea6c33; border-color: #fed7aa; }
.tp-page-header--schedule { background: #f0fff5; color: #16a34a; border-color: #bbf7d0; }
.tp-page-header--flash { background: #fffff0; color: #b45309; border-color: #fde68a; }
.tp-page-header--stickers { background: #fdf4ff; color: #9333ea; border-color: #e9d5ff; }
.tp-page-header--case { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.tp-page-header--finance { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.tp-page-header--project { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.tp-page-header--pres { background: #fff1f2; color: #be185d; border-color: #fecdd3; }

.tp-section-tag { font-size: 9px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.tp-page-num { font-size: 9px; font-weight: 700; opacity: 0.6; }
.tp-page-label { font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }

.tp-page-body {
  padding: 14px;
  flex: 1;
}

/* Cover page */
.tp-page--cover { background: linear-gradient(160deg, #fdf4ff 0%, #f0f9ff 100%); }
.tp-page--cover-biz { background: linear-gradient(160deg, #eff6ff 0%, #f0fdf4 100%); }
.tp-cover-body h3 {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 8px 0 6px;
  line-height: 1.2;
}
.tp-cover-sub {
  font-size: 9px;
  color: #999;
  margin: 0 0 12px;
}

.tp-tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 12px;
}

.tp-tab {
  padding: 3px 8px;
  background: rgba(0,0,0,0.06);
  border-radius: 4px;
  font-size: 9px;
  color: #666;
  font-weight: 500;
}

.tp-tab--active { background: #9333ea; color: #fff; }
.tp-tab-nav--biz .tp-tab--active { background: #2563eb; }

/* Note blocks */
.tp-note-block { margin-bottom: 10px; }
.tp-note-label {
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #aaa;
  margin-bottom: 4px;
}
.tp-note-line {
  height: 1px;
  background: #e5e5e5;
  margin-bottom: 6px;
  border-radius: 1px;
}
.tp-note-line--wide { width: 100%; }
.tp-note-line--short { width: 60%; }
.tp-note-lines { display: flex; flex-direction: column; gap: 6px; }

/* Two column layout */
.tp-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 8px 0;
}

.tp-col-header {
  font-size: 8px;
  font-weight: 700;
  color: #bbb;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.tp-diagram-box {
  border: 1px dashed #ccc;
  border-radius: 4px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: #ccc;
  background: #fafafa;
}

/* Exam tracker */
.tp-page--exams { background: #fffaf8; }
.tp-exam-row {
  display: grid;
  grid-template-columns: 2fr 1.5fr 3fr 1.5fr;
  gap: 4px;
  padding: 5px 0;
  border-bottom: 1px solid #f0ebe5;
  align-items: center;
  font-size: 8px;
}
.tp-exam-row--header {
  font-weight: 700;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid #e8ddd5;
}
.tp-exam-fill {
  height: 1px;
  background: #e0d5cc;
  border-radius: 1px;
  display: block;
}
.tp-exam-fill--wide { grid-column: span 1; }
.tp-status-dots { display: flex; gap: 3px; }
.tp-dot { width: 8px; height: 8px; border-radius: 50%; background: #e8e0d8; }
.tp-dot--active { background: #ea6c33; }
.tp-legend { font-size: 7px; color: #bbb; margin-top: 6px; display: flex; align-items: center; gap: 4px; }

/* Schedule grid */
.tp-page--schedule { background: #f8fff9; }
.tp-schedule-grid {
  display: grid;
  grid-template-columns: 50px repeat(6, 1fr);
  gap: 2px;
}
.tp-sched-header {
  font-size: 7px;
  font-weight: 700;
  color: #aaa;
  text-align: center;
  padding: 3px 0;
  text-transform: uppercase;
}
.tp-sched-time { font-size: 7px; color: #bbb; display: flex; align-items: center; }
.tp-sched-cell {
  height: 22px;
  background: #f0f0ee;
  border-radius: 2px;
}
.tp-sched-cell--filled { background: #86efac; }

/* Flashcard */
.tp-page--flash { background: #fffff8; }
.tp-flash-body { display: flex; flex-direction: column; gap: 10px; }
.tp-flashcard {
  background: #fff;
  border: 1px solid #e8e0cc;
  border-radius: 6px;
  padding: 10px;
  min-height: 60px;
}
.tp-flashcard--back { background: #fffdf0; }
.tp-fc-label {
  font-size: 7px;
  font-weight: 700;
  color: #d4b857;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.tp-fc-content { min-height: 20px; }
.tp-fc-content--lines { display: flex; flex-direction: column; gap: 5px; }
.tp-fc-tag, .tp-fc-remember {
  font-size: 7px;
  color: #bbb;
  margin-top: 6px;
  border-top: 1px solid #f0e8d0;
  padding-top: 4px;
}
.tp-flash-hint { font-size: 7px; color: #bbb; text-align: center; }

/* Sticker page */
.tp-page--stickers { background: #fdf4ff; }
.tp-page--stickers-biz { background: #eff6ff; }
.tp-sticker-body { padding: 8px; }
.tp-sticker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.tp-sticker {
  padding: 6px 4px;
  border-radius: 8px;
  font-size: 7px;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
  border: 1px solid rgba(0,0,0,0.06);
}
.tp-sticker--funny {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
}
.tp-sticker--sarcastic {
  background: linear-gradient(135deg, #fce7f3, #fbcfe8);
  color: #9d174d;
}
.tp-sticker--motivating {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #064e3b;
}

/* Case study page */
.tp-page--case { background: #f8fbff; }
.tp-page--finance { background: #f8fff9; }
.tp-finance-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 2fr;
  gap: 4px;
  padding: 5px 0;
  border-bottom: 1px solid #e8f0e8;
  font-size: 8px;
  align-items: center;
}
.tp-finance-row--header {
  font-weight: 700;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid #d0e8d0;
}
.tp-finance-row--total {
  font-weight: 700;
  border-top: 2px solid #a0d0a0;
  border-bottom: none;
}
.tp-frow-label { font-size: 8px; color: #555; font-weight: 500; }
.tp-frow-cell { height: 1px; background: #d0e8d0; display: block; border-radius: 1px; }
.tp-frow-cell--wide { flex: 2; }

/* Group project page */
.tp-page--project { background: #fffff8; }
.tp-project-header { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; margin-bottom: 8px; }
.tp-team-grid { display: grid; grid-template-columns: 2fr 1.5fr 2.5fr; gap: 2px; margin-bottom: 6px; }
.tp-team-header { font-size: 7px; font-weight: 700; color: #bbb; text-transform: uppercase; padding: 3px; border-bottom: 1px solid #eee; }
.tp-team-row { display: contents; }
.tp-team-cell { height: 16px; border-bottom: 1px solid #f0e8cc; }
.tp-milestone-section { margin-top: 6px; }
.tp-milestone { display: grid; grid-template-columns: 1fr 2fr; gap: 6px; margin-bottom: 5px; }
.tp-m-date, .tp-m-task { height: 1px; background: #e8d8a0; margin-top: 6px; display: block; }

/* Presentation page */
.tp-page--pres { background: #fff8fb; }
.tp-pres-outline { display: flex; flex-direction: column; gap: 8px; }
.tp-pres-section { display: grid; grid-template-columns: 24px 1fr; gap: 8px; align-items: start; }
.tp-pres-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fce7f3;
  color: #be185d;
  font-size: 8px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Sticker Section ── */
.tp-sticker-section {
  background: linear-gradient(135deg, #fdf4ff 0%, #fff 100%);
}

.tp-sticker-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.tp-sticker-cat {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.tp-sticker-cat-header {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.tp-sticker-cat-header--funny { color: #92400e; }
.tp-sticker-cat-header--sarcastic { color: #9d174d; }
.tp-sticker-cat-header--motivating { color: #064e3b; }

.tp-sticker-cat ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tp-sticker-cat li {
  font-size: 13px;
  color: #555;
  line-height: 1.4;
  padding: 6px 10px;
  background: #fafafa;
  border-radius: 6px;
  border: 1px solid #f0f0f0;
}

/* ── Buy Section ── */
.tp-buy-section {
  text-align: center;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d1b3d 100%);
  padding: 80px 24px;
}

.tp-buy-section--biz {
  background: linear-gradient(135deg, #1e3a5f 0%, #1a1a2e 100%);
}

.tp-buy-inner h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 4vw, 42px);
  color: #fff;
  margin: 0 0 12px;
}

.tp-buy-inner p {
  color: rgba(255,255,255,0.65);
  font-size: 16px;
  margin: 0 0 32px;
}

.tp-buy-note {
  margin-top: 20px !important;
  font-size: 13px !important;
  color: rgba(255,255,255,0.45) !important;
}

.tp-buy-note a {
  color: rgba(255,255,255,0.65);
  text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .tp-hero { padding: 80px 20px 60px; }
  .tp-pages-grid { grid-template-columns: 1fr 1fr; }
  .tp-format-grid { grid-template-columns: 1fr; }
  .tp-sticker-categories { grid-template-columns: 1fr; }
}
