/* wtheme — single theme page (/theme/<slug>), ThemeForest-style item layout. Nothing on this page is sticky. */
/* Light is the default; html[data-tp-theme="dark"] switches (set by the toggle, remembered in localStorage). */
.theme-page {
	--tp-gap: 72px; --tp-leaf: #ff8a6e; --tp-green: #fb5c3a;
	--tp-bg: #f7f7f7; --tp-card: #ffffff; --tp-line: #e6e6e6; --tp-chip: #f1f1f1;
	--tp-text: #454545; --tp-muted: #737373; --tp-heading: #191919; --tp-accent: #e14a2b;
	--tp-accent-soft: rgba(251, 92, 58, .08); --tp-accent-line: rgba(251, 92, 58, .35);
	--tp-glow: rgba(251, 92, 58, .10); --tp-btn-alt-bg: #ffffff; --tp-btn-alt-fg: #191919;
}
html[data-tp-theme="dark"] .theme-page {
	--tp-bg: #141414; --tp-card: #1d1d1d; --tp-line: #2e2e2e; --tp-chip: #262626;
	--tp-text: #cfcfcf; --tp-muted: #9a9a9a; --tp-heading: #ffffff; --tp-accent: #ff7a5c;
	--tp-accent-soft: rgba(255, 122, 92, .12); --tp-accent-line: rgba(255, 122, 92, .4);
	--tp-glow: rgba(251, 92, 58, .18); --tp-btn-alt-bg: #ffffff; --tp-btn-alt-fg: #191919;
}
html[data-tp-theme="dark"] body.theme-page { background: #141414; }
.theme-page .tp-head, .theme-page .tp-body, .theme-page .tp-card { transition: background-color .25s, border-color .25s, color .25s; }
@media (max-width: 991px) { .theme-page { --tp-gap: 56px; } }
@media (max-width: 575px) { .theme-page { --tp-gap: 44px; } }
.theme-page .tp-head > .container,
.theme-page .tp-body > .container { max-width: 1200px; }

/* Light / dark switch */
.tp-head-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.tp-head-top .tp-crumbs { margin: 0; }
.tp-mode { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--tp-card); border: 1px solid var(--tp-line); }
.tp-mode button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--tp-muted); font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px; cursor: pointer; }
.tp-mode button:hover { color: var(--tp-heading); }
.tp-mode button[aria-pressed="true"] { background: var(--tp-green); color: #fff; }

/* Item header + tabs */
.tp-head { background: radial-gradient(60% 120% at 20% 0%, var(--tp-glow), transparent 70%), var(--tp-bg); border-bottom: 1px solid var(--tp-line); padding-top: 36px; }
.tp-crumbs { font-size: 13px; color: var(--tp-muted); margin-bottom: 10px; }
.tp-crumbs a { color: var(--tp-muted); }
.tp-crumbs a:hover { color: var(--tp-accent); }
.tp-crumbs span { margin: 0 6px; }
.tp-title { color: var(--tp-heading); font-size: clamp(24px, 2.6vw, 32px); font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; margin: 0 0 10px; }
.tp-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 14px; color: var(--tp-muted); }
.tp-byline a { color: var(--tp-accent); font-weight: 600; }
.tp-byline a:hover { color: var(--tp-heading); }
.tp-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--tp-line); background: var(--tp-card); color: var(--tp-text); }
.tp-badge i { font-size: 11px; color: var(--tp-accent); }
.tp-badge--green { background: #e8f8f0; border-color: #c5ecd9; color: #067a46; }
html[data-tp-theme="dark"] .tp-badge--green { background: rgba(18, 183, 106, .14); border-color: rgba(18, 183, 106, .4); color: #5fd9a0; }
.tp-sales i { margin-right: 4px; }
.tp-tabs { display: flex; gap: 4px; margin-top: 22px; overflow-x: auto; scrollbar-width: none; }
.tp-tabs::-webkit-scrollbar { display: none; }
.tp-tabs a { transition: none; padding: 11px 16px; font-size: 14px; font-weight: 600; color: var(--tp-muted); border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; white-space: nowrap; }
.tp-tabs a:hover { color: var(--tp-heading); }
.tp-tabs a.is-active { color: var(--tp-heading); background: var(--tp-bg); border-color: var(--tp-line); position: relative; top: 1px; }

/* Body */
.tp-body { background: var(--tp-bg); padding: 32px 0 var(--tp-gap); color: var(--tp-text); font-size: 15px; line-height: 1.65; }
.tp-card { background: var(--tp-card); border: 1px solid var(--tp-line); border-radius: 12px; padding: 22px; }
.tp-card + .tp-card { margin-top: 20px; }
.tp-h { color: var(--tp-heading); font-size: 18px; font-weight: 700; margin: 0 0 12px; }

.tp-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.tp-tool { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 500; color: var(--tp-text); background: var(--tp-card); border: 1px solid var(--tp-line); border-radius: 8px; padding: 7px 14px; cursor: pointer; }
.tp-tool:hover, .tp-tool .fa-solid { color: var(--tp-accent); }
.tp-share { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--tp-muted); }
.tp-share a, .tp-share button { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: var(--tp-card); border: 1px solid var(--tp-line); color: var(--tp-text); cursor: pointer; transition: .2s; }
.tp-share svg { width: 13px; height: 13px; fill: currentColor; }
.tp-share a:hover, .tp-share button:hover { background: var(--tp-green); border-color: var(--tp-green); color: #fff; }

.tp-preview { padding: 12px 12px 18px; }
.tp-shot { display: block; max-height: 520px; overflow: hidden; border-radius: 8px; border: 1px solid var(--tp-line); }
.tp-shot img { display: block; width: 100%; height: auto; transition: transform 6s ease; }
.tp-shot:hover img { transform: translateY(calc(-100% + 520px)); }
.tp-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.tp-actions .th-btn, .tp-buy .th-btn { font-size: 14px; padding: 13px 22px; gap: 8px; }
.theme-page .tp-actions .th-btn.style-border2 { background: var(--tp-btn-alt-bg); color: var(--tp-btn-alt-fg); border: 1px solid var(--tp-line) !important; }
.theme-page .tp-actions .th-btn.style-border2:hover { color: #fff; border-color: var(--tp-green) !important; }

/* Item description (ThemeForest-style long text) */
.tp-desc { padding: 26px 28px; }
.tp-desc-title { color: var(--tp-heading); font-size: 22px; font-weight: 700; margin: 0 0 14px; }
.tp-desc p, .tp-faq p, .tp-desc li { color: var(--tp-text); }
.tp-desc p { margin: 0 0 14px; }
.tp-desc h3 { color: var(--tp-heading); font-size: 17px; font-weight: 700; margin: 26px 0 10px; }
.tp-desc ul, .tp-desc ol { margin: 0 0 6px; padding-left: 22px; }
.tp-desc li { margin-bottom: 5px; }
.tp-desc li::marker { color: var(--tp-accent); }
.tp-desc a { color: var(--tp-accent); }
.tp-desc a:hover { color: var(--tp-heading); }
.tp-desc code { color: var(--tp-accent); background: var(--tp-chip); padding: 1px 6px; border-radius: 4px; font-size: 13px; }
.tp-desc strong { color: var(--tp-heading); font-weight: 600; }
.tp-desc .tp-release { margin-bottom: 6px; }

.tp-more-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.tp-more-head a { font-size: 13px; color: var(--tp-accent); }
.tp-more-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.tp-more-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: top; border-radius: 6px; border: 1px solid var(--tp-line); }
.tp-more-grid a:hover img { border-color: var(--tp-accent); }

.tp-faq { border-top: 1px solid var(--tp-line); }
.tp-faq:first-of-type { border-top: 0; }
.tp-faq summary { list-style: none; cursor: pointer; padding: 12px 30px 12px 0; position: relative; color: var(--tp-heading); font-weight: 600; font-size: 15px; }
.tp-faq summary::-webkit-details-marker { display: none; }
.tp-faq summary::after { content: "+"; position: absolute; right: 4px; top: 8px; font-size: 22px; font-weight: 400; color: var(--tp-accent); }
.tp-faq[open] summary::after { content: "−"; }
.tp-faq p { margin: 0 0 14px; }

/* Sidebar — normal flow, scrolls with the page */
.tp-side { position: static; }
.tp-buy-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--tp-heading); font-size: 16px; font-weight: 600; }
.tp-buy-head strong { color: var(--tp-accent); font-size: 26px; font-weight: 800; font-family: var(--font-head); }
.tp-buy-note { font-size: 13px; color: var(--tp-muted); margin: 6px 0 14px; line-height: 1.5; }
.tp-incl { list-style: none; margin: 0 0 18px; padding: 14px 0 0; border-top: 1px solid var(--tp-line); font-size: 14px; }
.tp-incl li { display: flex; gap: 9px; align-items: baseline; margin-bottom: 6px; }
.tp-incl i { color: var(--tp-accent); font-size: 12px; }
.tp-buy .th-btn { justify-content: center; }
.tp-buy-small { font-size: 12px; color: var(--tp-muted); text-align: center; margin: 10px 0 0; }

.tp-author { display: flex; align-items: center; gap: 12px; }
.tp-avatar { width: 46px; height: 46px; flex: none; border-radius: 10px; display: grid; place-items: center; font-weight: 900; font-size: 17px; letter-spacing: -0.04em; color: #fff; background: linear-gradient(135deg, var(--tp-green), var(--tp-leaf)); }
.tp-author strong { display: block; color: var(--tp-heading); font-size: 15px; }
.tp-author span:not(.tp-avatar) { font-size: 13px; color: var(--tp-muted); }
.tp-author-btn { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--tp-text); border: 1px solid var(--tp-line); border-radius: 8px; padding: 7px 12px; white-space: nowrap; }
.tp-author-btn:hover { border-color: var(--tp-accent); color: var(--tp-accent); }

/* Theme Details table in the sidebar */
.tp-specs { padding: 6px 20px 14px; }
.tp-table { width: 100%; margin: 0; border: 0; border-collapse: collapse; font-size: 13px; line-height: 1.5; }
.tp-table th, .tp-table td { padding: 10px 0; border: 0; border-top: 1px solid var(--tp-line); vertical-align: top; background: none; }
.tp-table tr:first-child th, .tp-table tr:first-child td { border-top: 0; }
.tp-table th { width: 42%; color: var(--tp-muted); font-weight: 400; padding-left: 1px; padding-right: 14px; }
.tp-table td { color: var(--tp-heading); overflow-wrap: anywhere; }
.tp-tags { color: var(--tp-accent) !important; }
.tp-created { margin: 0; padding-top: 10px; border-top: 1px solid var(--tp-line); font-size: 13px; color: var(--tp-muted); }
.tp-created time { color: var(--tp-heading); }

@media (max-width: 991px) {
	.tp-shot:hover img { transform: none; }
	.tp-more-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 575px) {
	.tp-desc { padding: 22px; }
	.tp-more-grid { grid-template-columns: repeat(3, 1fr); }
	.tp-author-btn { padding: 6px 10px; }
}
.tp-tool.is-on { color: var(--tp-accent); border-color: var(--tp-accent); }

/* Prebuilt designs grid */
.tp-designs-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.tp-designs-head .tp-h { margin-bottom: 4px; }
.tp-designs-head p { margin: 0; font-size: 14px; color: var(--tp-muted); max-width: 520px; }
.tp-designs-head strong { color: var(--tp-heading); }
.tp-designs-all { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--tp-accent); white-space: nowrap; }
.tp-designs-all:hover { color: var(--tp-heading); }
.tp-designs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tp-design { display: block; color: var(--tp-text); }
.tp-design-img { display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 8px; border: 1px solid var(--tp-line); background: var(--tp-chip); }
.tp-design-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; transition: transform .4s ease; }
.tp-design:hover .tp-design-img { border-color: var(--tp-accent); }
.tp-design:hover .tp-design-img img { transform: scale(1.04); }
.tp-design-group { display: block; margin-top: 10px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--tp-muted); }
.tp-design strong { display: block; color: var(--tp-heading); font-size: 14px; font-weight: 600; }
.tp-design:hover strong { color: var(--tp-accent); }
@media (max-width: 767px) { .tp-designs-grid { grid-template-columns: repeat(2, 1fr); } }

/* Edition picker (WordPress / HTML / both) */
.tp-editions { display: grid; gap: 8px; margin: 14px 0 16px; }
.tp-ed { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--tp-line); border-radius: 10px; cursor: pointer; transition: border-color .15s, background-color .15s; margin: 0; }
.tp-ed:hover { border-color: var(--tp-accent); }
.tp-ed.is-on { border-color: var(--tp-accent); background: var(--tp-accent-soft); }
.tp-ed input { position: absolute; opacity: 0; pointer-events: none; }
.tp-ed-text { flex: 1; min-width: 0; }
.tp-ed-text strong { display: block; color: var(--tp-heading); font-size: 14px; font-weight: 600; }
.tp-ed-text small { display: block; color: var(--tp-muted); font-size: 12px; line-height: 1.4; }
.tp-ed:has(input:focus-visible) { outline: 2px solid var(--tp-accent); outline-offset: 2px; }

/* New design system: headings in Plus Jakarta Sans, price in green */
.theme-page .tp-title, .theme-page .tp-h, .theme-page .tp-desc-title, .theme-page .tp-desc h3 { font-family: var(--font-head); letter-spacing: -.02em; }
.theme-page .tp-buy-head strong { color: var(--green); }
html[data-tp-theme="dark"] .theme-page .tp-buy-head strong { color: #5fd9a0; }

.tp-avatar { background: #191919 !important; }
.tp-avatar img { width: 28px; height: auto; }
