/* ================================================================
   template-detail.css — Template Detail Pages
   Used by all 6 template-*.html pages.
   References CSS variables from styles.css.
================================================================ */

/* ── Breadcrumb ── */
.td-breadcrumb {
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  padding: 12px 0;
}
.td-breadcrumb nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  flex-wrap: wrap;
}
.td-breadcrumb a {
  color: var(--c-muted);
  transition: color var(--t-fast);
}
.td-breadcrumb a:hover { color: var(--c-accent); }
.td-breadcrumb span:last-child { color: var(--c-text); font-weight: 600; }
.td-sep { color: var(--c-muted); }

/* ── Main layout grid ── */
.td-layout { padding: 48px 0 80px; }
.td-columns {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}

/* ── Left: main content ── */
.td-main { min-width: 0; }

/* Browser mockup preview */
.td-preview-window {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--c-border);
  box-shadow: 0 8px 40px rgba(0,0,0,.1);
  margin-bottom: 40px;
}
.td-browser-bar {
  background: #f0f0f0;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #ddd;
}
.td-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.td-dot-red   { background: #ff5f57; }
.td-dot-amber { background: #febc2e; }
.td-dot-green { background: #28c840; }
.td-url-bar {
  flex: 1;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 4px 14px;
  font-size: .78rem;
  color: #666;
  font-family: monospace;
  margin-left: 8px;
}
.td-preview-body {
  height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.td-preview-emoji {
  font-size: 80px;
  line-height: 1;
}
.td-preview-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--c-muted);
  background: rgba(255,255,255,.7);
  padding: 4px 12px;
  border-radius: var(--r-pill);
}

/* Sections */
.td-section { margin-bottom: 40px; }
.td-section h2 {
  font-family: var(--f-head);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--c-border);
}
.td-desc {
  font-size: .9625rem;
  line-height: 1.85;
  color: var(--c-text);
}

/* Features list */
.td-feature-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}
.td-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: .875rem;
  color: var(--c-text);
  line-height: 1.55;
}
.tplf-ck {
  color: var(--c-green);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Tech pills */
.td-tech-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tpl-tech-pill {
  display: inline-block;
  padding: 6px 16px;
  background: var(--c-bg);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-pill);
  font-size: .8125rem;
  font-weight: 600;
  color: var(--c-text);
  transition: border-color var(--t-fast), color var(--t-fast);
}
.tpl-tech-pill:hover { border-color: var(--c-accent); color: var(--c-accent); }

/* ── Right: sticky buy card ── */
.td-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}

.td-buy-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
}

.td-buy-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.td-buy-title {
  font-family: var(--f-head);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--c-text);
  line-height: 1.2;
}
.td-buy-tagline {
  font-size: .8rem;
  color: var(--c-muted);
  line-height: 1.65;
  margin-bottom: 16px;
}

/* Quick includes */
.td-quick-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--c-border);
}
.td-quick-list li {
  font-size: .84rem;
  color: var(--c-text);
  font-weight: 500;
}

/* Price */
.td-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 18px;
}
.td-price {
  font-family: var(--f-head);
  font-size: 2rem;
  font-weight: 800;
  color: var(--c-text);
}
.td-orig {
  font-size: .9rem;
  color: var(--c-muted);
  text-decoration: line-through;
}
.td-save {
  font-size: .75rem;
  font-weight: 700;
  background: #dcfce7;
  color: #15803d;
  padding: 3px 10px;
  border-radius: var(--r-pill);
}

/* Buy button */
.td-buy-btn {
  font-size: 1rem;
  font-weight: 700;
  padding: 15px;
  margin-bottom: 10px;
}
.td-preview-btn {
  padding: 12px;
  margin-bottom: 16px;
}

/* Stats */
.td-stats {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--c-bg);
  border-radius: var(--r-md);
  padding: 12px 16px;
  margin-bottom: 20px;
}
.td-stat { flex: 1; text-align: center; }
.td-stat-num {
  display: block;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: .9375rem;
  color: var(--c-text);
}
.td-stat-lbl {
  display: block;
  font-size: .72rem;
  color: var(--c-muted);
  margin-top: 2px;
}
.td-stat-div {
  width: 1px;
  height: 32px;
  background: var(--c-border);
  flex-shrink: 0;
}

/* Info table */
.td-info-table {
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 16px;
}
.td-info-table h4 {
  font-family: var(--f-head);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-align: center;
  padding: 12px 16px;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text);
}
.td-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--c-border);
  font-size: .8125rem;
}
.td-info-row:last-child { border-bottom: none; }
.td-info-row span  { color: var(--c-muted); }
.td-info-row strong { color: var(--c-text); }

/* Questions row */
.td-questions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .8125rem;
  color: var(--c-muted);
}

/* ── More templates section ── */
.td-more {
  background: var(--c-bg);
  border-top: 1px solid var(--c-border);
  padding: 56px 0 64px;
}
.td-more-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.td-more-header h2 { font-size: 1.35rem; }
.td-more-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.td-mini-card {
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  transition: all var(--t-base);
  display: flex;
  flex-direction: column;
}
.td-mini-card:hover {
  border-color: var(--c-accent);
  box-shadow: 0 4px 20px rgba(124,58,237,.15);
  transform: translateY(-2px);
}
.td-mini-active {
  border-color: var(--c-accent);
  background: var(--c-accent-lt);
  pointer-events: none;
}
.td-mini-thumb {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.td-mini-body { padding: 8px 10px 12px; }
.td-mini-name {
  font-family: var(--f-head);
  font-size: .72rem;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.3;
  margin-bottom: 3px;
}
.td-mini-price {
  font-family: var(--f-head);
  font-size: .78rem;
  font-weight: 800;
  color: var(--c-accent);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .td-columns { grid-template-columns: 1fr; }
  .td-sidebar { position: static; }
  .td-buy-card { max-width: 560px; }
  .td-more-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  .td-feature-list { grid-template-columns: 1fr; }
  .td-more-grid { grid-template-columns: repeat(2, 1fr); }
  .td-preview-body { height: 240px; }
  .td-preview-emoji { font-size: 56px; }
}

@media (max-width: 480px) {
  .td-layout { padding: 32px 0 56px; }
  .td-more-grid { grid-template-columns: repeat(2, 1fr); }
  .td-buy-card { padding: 20px 18px; }
}
