/* ============================================================
   aitoolcluster — Tool Detail Page Styles
   ============================================================ */

/* ── Breadcrumb ──────────────────────────────────────────── */
.tp-breadcrumb {
  padding: 16px 0;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border-light);
}
.tp-breadcrumb ol {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-secondary);
}
.tp-breadcrumb li { display: flex; align-items: center; gap: 6px; }
.tp-breadcrumb li:not(:last-child)::after {
  content: '\f054';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 9px;
  color: var(--text-secondary);
  opacity: .5;
}
.tp-breadcrumb a {
  color: var(--text-secondary);
  transition: var(--transition);
}
.tp-breadcrumb a:hover { color: var(--purple); }
.tp-breadcrumb li[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

/* ── Tool Hero ───────────────────────────────────────────── */
.tp-hero {
  padding: 40px 0 48px;
  background: var(--gradient-soft);
  border-bottom: 1px solid var(--border-light);
}
.tp-hero-grid {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}
.tp-hero-logo {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.tp-hero-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}
.tp-logo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient);
  color: #fff;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  text-transform: uppercase;
}
.tp-hero-info { flex: 1; min-width: 0; }
.tp-hero-info h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  margin: 8px 0 6px;
}
.tp-tagline {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

/* Rating */
.tp-hero-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.tp-stars { color: #FBBF24; font-size: 15px; display: flex; gap: 2px; }
.tp-rating-num { font-weight: 700; font-size: 15px; }
.tp-review-count { font-size: 13px; color: var(--text-secondary); }

.tp-hero-badges {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.tp-added {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Hero actions */
.tp-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
}

/* ── Share Panel ─────────────────────────────────────────── */
.tp-share-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow-hover);
  z-index: 60;
  min-width: 280px;
  overflow: hidden;
}
.tp-share-panel[hidden] { display: none; }
.tp-share-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  font-weight: 600;
  font-size: 14px;
}
.tp-share-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 16px;
  padding: 4px;
  transition: var(--transition);
}
.tp-share-close:hover { color: var(--text); }
.tp-share-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.tp-share-links a,
.tp-share-links button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
  background: none;
  border: none;
  font-family: inherit;
  text-align: left;
}
.tp-share-links a:hover,
.tp-share-links button:hover { background: var(--bg-lavender); color: var(--purple); }
.tp-share-links i { font-size: 16px; width: 20px; text-align: center; }

/* ── Layout: Main + Sidebar ──────────────────────────────── */
.tp-body { padding: 40px 0 0; }
.tp-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}
.tp-sidebar-sticky {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Hide/show quick info per breakpoint */
.tp-quick-info--desktop { display: block; }
.tp-quick-info--mobile  { display: none; }

/* ── Sections ────────────────────────────────────────────── */
.tp-section {
  margin-bottom: 48px;
}
.tp-section h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--text);
}
.tp-prose {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 720px;
}

/* ── Quick Info ──────────────────────────────────────────── */
.tp-quick-info {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.tp-qi-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tp-qi-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.tp-qi-label {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.tp-qi-label i { width: 16px; text-align: center; font-size: 13px; }
.tp-qi-value { font-size: 14px; font-weight: 600; }
.tp-qi-link { color: var(--purple); }
.tp-qi-link:hover { text-decoration: underline; }

/* ── Features Grid ───────────────────────────────────────── */
.tp-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.tp-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}
.tp-feature-item:hover { border-color: var(--purple-light); }
.tp-feature-item i { color: var(--purple); font-size: 16px; flex-shrink: 0; }

/* ── Benefits ────────────────────────────────────────────── */
.tp-benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.tp-benefit-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--bg-lavender);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
}
.tp-benefit-card i { color: var(--purple); font-size: 16px; flex-shrink: 0; }

/* ── Pills (Who can use) ─────────────────────────────────── */
.tp-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tp-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}
.tp-pill:hover { border-color: var(--purple-light); }
.tp-pill i { color: var(--purple); font-size: 13px; }

/* ── Use Cases ───────────────────────────────────────────── */
.tp-use-cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.tp-use-case {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}
.tp-use-case:hover { border-color: var(--purple-light); }
.tp-use-case i { color: var(--blue); font-size: 15px; flex-shrink: 0; }

/* ── Pros & Cons ─────────────────────────────────────────── */
.tp-proscons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.tp-proscons-col {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.tp-proscons-col h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tp-pros h3 i { color: #059669; }
.tp-cons h3 i { color: #D97706; }
.tp-proscons-col ul { display: flex; flex-direction: column; gap: 10px; }
.tp-proscons-col li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.tp-pros li i { color: #059669; margin-top: 3px; font-size: 13px; flex-shrink: 0; }
.tp-cons li i { color: #D97706; margin-top: 3px; font-size: 13px; flex-shrink: 0; }

/* ── Pricing Card ────────────────────────────────────────── */
.tp-pricing-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.tp-pricing-badge { margin-bottom: 14px; }
.tp-pricing-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Tool CTA Banner ─────────────────────────────────────── */
.tp-cta-banner {
  background: linear-gradient(135deg, #0F172A, #1E1250, #162044);
  color: #fff;
  padding: 48px 36px;
  border-radius: var(--radius);
  text-align: center;
  margin-bottom: 48px;
  position: relative;
  overflow: hidden;
}
.tp-cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,.25) 0%, transparent 70%);
  pointer-events: none;
}
.tp-cta-banner h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 10px;
  color: #fff;
}
.tp-cta-banner p {
  color: rgba(255,255,255,.7);
  margin-bottom: 22px;
  font-size: 15px;
}

/* ── Related Tools ───────────────────────────────────────── */
.tp-related-grid {
  grid-template-columns: repeat(2, 1fr);
}

/* ── FAQ ─────────────────────────────────────────────────── */
.tp-faq { display: flex; flex-direction: column; gap: 10px; }
.tp-faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--card-bg);
}
.tp-faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 18px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-body);
  text-align: left;
  gap: 12px;
  transition: var(--transition);
}
.tp-faq-q:hover { color: var(--purple); }
.tp-faq-q i {
  font-size: 14px;
  color: var(--text-secondary);
  transition: transform .3s ease;
  flex-shrink: 0;
}
.tp-faq-item.active .tp-faq-q i { transform: rotate(45deg); }
.tp-faq-a { padding: 0 20px 18px; }
.tp-faq-a[hidden] { display: none; }
.tp-faq-a p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Bottom Share ────────────────────────────────────────── */
.tp-bottom-share {
  text-align: center;
  padding: 32px;
  background: var(--bg-lavender);
  border-radius: var(--radius);
}
.tp-bottom-share p {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 14px;
  color: var(--text);
}
.tp-bottom-share-actions { display: flex; gap: 10px; justify-content: center; }

/* ── Sidebar ─────────────────────────────────────────────── */
.tp-sidebar-cta {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.tp-sidebar-share {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.tp-sidebar-share p {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}
.tp-sidebar-share-icons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tp-sidebar-share-icons a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-lavender);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 14px;
  transition: var(--transition);
}
.tp-sidebar-share-icons a:hover {
  background: var(--purple);
  color: #fff;
}

/* ── Toast ───────────────────────────────────────────────── */
.tp-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  z-index: 9999;
  opacity: 0;
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
[data-theme="dark"] .tp-toast { background: #fff; color: #0F172A; }
.tp-toast.tp-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.tp-toast[hidden] { display: none; }

/* ── 404 ─────────────────────────────────────────────────── */
.tp-404 {
  padding: 100px 0;
  text-align: center;
}
.tp-404-inner { max-width: 480px; margin: 0 auto; }
.tp-404-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-lavender);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--purple);
  margin: 0 auto 24px;
}
.tp-404 h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
}
.tp-404 p {
  color: var(--text-secondary);
  margin-bottom: 28px;
  font-size: 15px;
}
.tp-404-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .tp-layout {
    grid-template-columns: 1fr;
  }
  .tp-sidebar { order: -1; }
  .tp-sidebar-sticky { position: static; }
  .tp-quick-info--desktop { display: none; }
  .tp-quick-info--mobile  { display: block; margin-bottom: 32px; }
  .tp-related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .tp-hero { padding: 28px 0 32px; }
  .tp-hero-grid { flex-direction: column; gap: 20px; }
  .tp-hero-logo { width: 72px; height: 72px; border-radius: 16px; }
  .tp-hero-info h1 { font-size: 24px; }
  .tp-features-grid,
  .tp-benefits-grid,
  .tp-use-cases-grid { grid-template-columns: 1fr; }
  .tp-proscons { grid-template-columns: 1fr; }
  .tp-related-grid { grid-template-columns: 1fr; }
  .tp-cta-banner { padding: 36px 24px; }
  .tp-cta-banner h2 { font-size: 20px; }
  .tp-hero-actions { flex-direction: column; }
  .tp-hero-actions .btn { justify-content: center; }
  .tp-share-panel {
    left: 0;
    right: 0;
    min-width: unset;
  }
  .tp-body { padding: 24px 0 0; }
  .tp-section h2 { font-size: 20px; }
}

@media (max-width: 430px) {
  .tp-bottom-share-actions { flex-direction: column; }
  .tp-404 { padding: 60px 0; }
}
