/* Trends Platform — "Bazaar" layout (Phase 8, reskinned v0.10.1). Vanilla CSS,
   no build step. Two themes via [data-tp-theme] on <html>: light (default,
   warm white) and dim (neutral charcoal). Signature accent is bazaar
   amber (#f97316) — deliberately distinct from any social-network chrome.
   Only loaded when the Trendz X Layout template is used or a style="x"
   feed renders. System font stack — no external requests. */

/* ---------- Theme variables ---------- */
:root,
html[data-tp-theme="light"] {
	--x-bg: #fffdf8;
	--x-bg2: #faf6ee;
	--x-panel: #faf6ee;
	--x-text: #1c1917;
	--x-muted: #7c736a;
	--x-border: #efe7d8;
	--x-border-strong: #d9cdb6;
	--x-accent: #f97316;
	--x-accent-hover: #e0650c;
	--x-accent-soft: rgba(249, 115, 22, 0.12);
	--x-like: #f97316;
	--x-like-soft: rgba(249, 115, 22, 0.12);
	--x-avatar-tx: #ffffff;
	--x-shadow: 0 8px 24px rgba(120, 80, 20, 0.14);
	--x-card-shadow: 0 1px 3px rgba(120, 80, 20, 0.08);
	--x-toast-bg: #1c1917;
	--x-toast-tx: #fffdf8;
}
html[data-tp-theme="dim"] {
	--x-bg: #16181d;
	--x-bg2: #1e2128;
	--x-panel: #1e2128;
	--x-text: #f5f2ec;
	--x-muted: #9aa1ab;
	--x-border: #2a2e37;
	--x-border-strong: #3d434e;
	--x-accent: #f97316;
	--x-accent-hover: #fb8a3d;
	--x-accent-soft: rgba(249, 115, 22, 0.14);
	--x-like: #fb8a3d;
	--x-like-soft: rgba(251, 138, 61, 0.14);
	--x-avatar-tx: #ffffff;
	--x-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
	--x-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
	--x-toast-bg: #f5f2ec;
	--x-toast-tx: #16181d;
}

/* ---------- Base / layout ---------- */
.tp-x-body {
	margin: 0;
	background: var(--x-bg);
	color: var(--x-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.45;
	-webkit-font-smoothing: antialiased;
}
.tp-x-root a { color: inherit; }
.tp-x-wrap {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	max-width: 1265px;
	margin: 0 auto;
	min-height: 100vh;
}
.tp-x-left {
	width: 232px;
	flex: 0 0 232px;
	position: sticky;
	top: 0;
	height: 100vh;
	overflow-y: auto;
	padding: 8px 12px 16px 12px;
	display: flex;
	flex-direction: column;
}
.tp-x-center {
	width: 600px;
	flex: 0 1 600px;
	min-width: 0;
	min-height: 100vh;
}
.tp-x-right {
	width: 350px;
	flex: 0 0 350px;
	position: sticky;
	top: 0;
	height: 100vh;
	overflow-y: auto;
	padding: 12px 16px 32px 28px;
}
.tp-x-bottomnav { display: none; }

/* ---------- Left nav ---------- */
.tp-x-nav { display: flex; flex-direction: column; height: 100%; }
.tp-x-logo {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	padding: 10px 12px;
	margin-bottom: 6px;
	border-radius: 9999px;
	width: fit-content;
}
.tp-x-logo:hover { background: var(--x-accent-soft); }
.tp-x-logo-mark {
	width: 34px;
	height: 34px;
	border-radius: 10px;
	background: linear-gradient(135deg, #fbbf24, #f97316);
	color: #1c1917;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 20px;
}
.tp-x-logo-word { font-size: 21px; font-weight: 800; letter-spacing: -0.4px; }
.tp-x-nav-list { list-style: none; margin: 0; padding: 0; }
.tp-x-nav-link {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	padding: 11px 14px 11px 18px;
	border-radius: 16px;
	text-decoration: none;
	font-size: 17px;
	font-weight: 500;
	color: var(--x-text);
	transition: background 0.15s;
	position: relative;
}
.tp-x-nav-link:hover { background: var(--x-accent-soft); }
.tp-x-nav-link.tp-x-nav-active {
	font-weight: 700;
	background: var(--x-accent-soft);
	color: var(--x-text);
}
.tp-x-nav-link.tp-x-nav-active::before {
	content: "";
	position: absolute;
	left: 6px;
	top: 10px;
	bottom: 10px;
	width: 4px;
	border-radius: 9999px;
	background: var(--x-accent);
}
.tp-x-nav-ico { display: inline-flex; width: 26px; height: 26px; flex: 0 0 26px; }
.tp-x-nav-ico svg { width: 100%; height: 100%; }
.tp-x-nav-active .tp-x-nav-ico svg { stroke-width: 2.4; }
.tp-x-sellbtn {
	display: block;
	text-align: center;
	background: linear-gradient(135deg, #fbbf24, #f97316);
	color: #1c1917 !important;
	font-weight: 800;
	font-size: 17px;
	border-radius: 16px;
	padding: 13px 16px;
	margin: 14px 0 8px 0;
	text-decoration: none;
	box-shadow: var(--x-shadow);
}
.tp-x-sellbtn:hover { filter: brightness(0.96); }
.tp-x-nav-foot { margin-top: auto; padding-top: 16px; }
.tp-x-legal { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 12px; padding: 0 12px; }
.tp-x-legal a { font-size: 12px; color: var(--x-muted, #71767b); text-decoration: none; }
.tp-x-legal a:hover { text-decoration: underline; }
.tp-x-theme-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 9999px;
	border: 1px solid var(--x-border);
	background: transparent;
	color: var(--x-text);
	cursor: pointer;
}
.tp-x-theme-toggle:hover { background: var(--x-accent-soft); }
.tp-x-theme-toggle svg { width: 22px; height: 22px; }
html[data-tp-theme="dim"] .tp-x-ico-sun { display: none; }
html[data-tp-theme="light"] .tp-x-ico-moon,
html:not([data-tp-theme]) .tp-x-ico-moon { display: none; }
.tp-x-ico-sun, .tp-x-ico-moon { display: inline-flex; }

/* ---------- Center timeline ---------- */
.tp-x-topbar {
	position: sticky;
	top: 0;
	z-index: 20;
	background: var(--x-bg);
	padding: 12px 16px 4px;
}
.tp-x-tabs {
	display: flex;
	gap: 4px;
	background: var(--x-panel);
	border: 1px solid var(--x-border);
	border-radius: 16px;
	padding: 4px;
}
.tp-x-tab {
	flex: 1;
	text-align: center;
	padding: 10px 8px;
	text-decoration: none;
	color: var(--x-muted);
	font-weight: 600;
	font-size: 14.5px;
	border-radius: 12px;
	transition: background 0.15s, color 0.15s;
}
.tp-x-tab:hover { color: var(--x-text); }
.tp-x-tab-active { background: var(--x-accent); color: #1c1917; font-weight: 700; }
.tp-x-tab-active:hover { color: #1c1917; }
.tp-x-timeline { padding-bottom: 60px; }
.tp-x-feed { padding: 8px 16px 0; }

/* ---------- Bazaar product cards ----------
   Commerce cards, not tweet rows: bordered 20px cards, full-bleed 16/10
   media on top, price as the visual hero, compact seller row below. */
.tp-x-card {
	border: 1px solid var(--x-border);
	border-radius: 20px;
	background: var(--x-bg);
	margin-bottom: 14px;
	overflow: hidden;
	box-shadow: var(--x-card-shadow);
	transition: box-shadow 0.15s;
	position: relative;
}
.tp-x-card:hover { box-shadow: var(--x-shadow); }
.tp-x-media {
	display: block;
	margin: 0;
	border: 0;
	border-bottom: 1px solid var(--x-border);
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--x-panel);
}
.tp-x-media img, .tp-x-card-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.tp-x-card-ph {
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 44px;
	font-weight: 800;
	color: #fff;
	background: linear-gradient(135deg, #fbbf24, #c2410c);
}
.tp-x-card-body { padding: 14px 16px 12px; }
.tp-x-avatar {
	width: 44px;
	height: 44px;
	flex: 0 0 44px;
	border-radius: 9999px;
	background: hsl(var(--x-av-h, 24) 55% 45%);
	color: var(--x-avatar-tx);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 18px;
}
.tp-x-avatar-sm { width: 36px; height: 36px; flex-basis: 36px; font-size: 15px; }
.tp-x-avatar-xs { width: 28px; height: 28px; flex: 0 0 28px; font-size: 12px; }
.tp-x-title { margin: 0 0 2px 0; font-size: 16.5px; font-weight: 700; line-height: 1.3; }
.tp-x-title a { text-decoration: none; }
.tp-x-title a:hover { text-decoration: underline; }
.tp-x-price { margin: 4px 0; font-size: 20px; font-weight: 800; color: var(--x-accent); }
.tp-x-excerpt { margin: 4px 0 0 0; color: var(--x-text); font-size: 14.5px; }
.tp-x-sellerrow {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 10px;
	font-size: 13px;
}
.tp-x-seller { font-weight: 700; font-size: 13.5px; }
.tp-x-handle, .tp-x-time, .tp-x-dot { color: var(--x-muted); font-size: 12.5px; }
.tp-x-promoted {
	margin-left: auto;
	font-size: 12px;
	font-weight: 600;
	color: var(--x-accent);
	border: 1px solid var(--x-accent);
	background: var(--x-accent-soft);
	border-radius: 6px;
	padding: 2px 8px;
}
.tp-x-newbadge {
	font-size: 12px;
	font-weight: 700;
	color: var(--x-accent);
	background: var(--x-accent-soft);
	border-radius: 9999px;
	padding: 2px 9px;
}
.tp-x-actions {
	display: flex;
	align-items: center;
	gap: 2px;
	margin-top: 10px;
	padding-top: 8px;
	border-top: 1px solid var(--x-border);
}
.tp-x-act {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: transparent;
	border: 0;
	color: var(--x-muted);
	font-size: 12.5px;
	padding: 6px 8px;
	border-radius: 9999px;
	cursor: pointer;
	text-decoration: none;
	font-family: inherit;
}
.tp-x-act:hover { background: var(--x-accent-soft); color: var(--x-accent); }
.tp-x-act-ico { display: inline-flex; width: 17px; height: 17px; }
.tp-x-act-ico svg { width: 100%; height: 100%; }
.tp-x-like.tp-act-on { color: var(--x-like); }
.tp-x-like.tp-act-on:hover { background: var(--x-like-soft); color: var(--x-like); }
.tp-x-like.tp-act-on .tp-x-act-ico svg { fill: var(--x-like); stroke: var(--x-like); }
.tp-x-buy {
	margin-left: auto;
	background: var(--x-accent);
	color: #1c1917 !important;
	font-weight: 800;
	font-size: 14px;
	border-radius: 12px;
	padding: 9px 22px;
	text-decoration: none;
}
.tp-x-buy:hover { background: var(--x-accent-hover); color: #1c1917 !important; }
.tp-x-empty {
	padding: 40px 20px;
	text-align: center;
	color: var(--x-muted);
}

/* ---------- Right rail ---------- */
.tp-x-search {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--x-panel);
	border: 1px solid var(--x-border);
	border-radius: 16px;
	padding: 9px 16px;
	margin-bottom: 16px;
}
.tp-x-search:focus-within { border-color: var(--x-accent); background: var(--x-bg); }
.tp-x-search-ico { display: inline-flex; width: 18px; height: 18px; color: var(--x-muted); flex: 0 0 18px; }
.tp-x-search-ico svg { width: 100%; height: 100%; }
.tp-x-search input {
	flex: 1;
	border: 0;
	background: transparent;
	color: var(--x-text);
	font-size: 14.5px;
	outline: none;
	font-family: inherit;
	min-width: 0;
}
.tp-x-panel {
	background: var(--x-panel);
	border: 1px solid var(--x-border);
	border-radius: 20px;
	padding: 18px;
	margin-bottom: 16px;
	box-shadow: var(--x-card-shadow);
}
.tp-x-panel-title { margin: 0 0 2px 0; font-size: 17px; font-weight: 800; letter-spacing: -0.2px; }
.tp-x-panel-title::before {
	content: "";
	display: inline-block;
	width: 4px;
	height: 15px;
	border-radius: 2px;
	background: var(--x-accent);
	margin-right: 8px;
	vertical-align: -2px;
}
.tp-x-panel-sub { margin: 0 0 8px 0; font-size: 12.5px; color: var(--x-muted); }
.tp-x-empty { color: var(--x-muted); font-size: 14px; margin: 8px 0; }
.tp-x-panel-cta {
	display: inline-block;
	margin-top: 6px;
	color: var(--x-accent);
	font-weight: 700;
	font-size: 14px;
	text-decoration: none;
}
.tp-x-trend-list, .tp-x-seller-list { list-style: none; margin: 6px 0 0 0; padding: 0; }
.tp-x-trend-list li a {
	display: block;
	padding: 9px 0;
	text-decoration: none;
	border-bottom: 1px solid var(--x-border);
}
.tp-x-trend-list li:last-child a { border-bottom: 0; }
.tp-x-trend-list li a:hover { background: var(--x-accent-soft); }
.tp-x-trend-cat { display: block; font-size: 12px; color: var(--x-muted); }
.tp-x-trend-topic { display: block; font-weight: 700; font-size: 14.5px; margin-top: 1px; }
.tp-x-seller-list li {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 0;
	border-bottom: 1px solid var(--x-border);
}
.tp-x-seller-list li:last-child { border-bottom: 0; }
.tp-x-seller-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tp-x-seller-count { font-size: 12.5px; color: var(--x-muted); white-space: nowrap; }
.tp-x-fineprint { font-size: 12px; color: var(--x-muted); line-height: 1.5; padding: 0 4px; }

/* ---------- Mobile bottom nav ---------- */
@media (max-width: 1023px) {
	.tp-x-left, .tp-x-right { display: none; }
	.tp-x-center { width: 100%; flex-basis: 100%; border-left: 0; border-right: 0; }
	.tp-x-wrap { max-width: 100%; }
	.tp-x-bottomnav {
		display: flex;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 40;
		background: color-mix(in srgb, var(--x-bg) 92%, transparent);
		backdrop-filter: blur(12px);
		-webkit-backdrop-filter: blur(12px);
		border-top: 1px solid var(--x-border);
		padding: 6px 4px calc(8px + env(safe-area-inset-bottom));
	}
	.tp-x-bnav-link {
		flex: 1;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 3px;
		padding: 8px 2px 6px;
		border-radius: 12px;
		color: var(--x-muted);
		font-size: 10.5px;
		font-weight: 600;
		line-height: 1;
		text-decoration: none;
		position: relative;
	}
	.tp-x-bnav-link.tp-x-nav-active { color: var(--x-accent); }
	.tp-x-bnav-link.tp-x-nav-active::after {
		content: "";
		width: 4px;
		height: 4px;
		border-radius: 9999px;
		background: var(--x-accent);
	}
	.tp-x-bnav-link .tp-x-nav-ico { width: 24px; height: 24px; flex-basis: 24px; }
	.tp-x-bnav-sell .tp-x-bnav-label { display: none; }
	.tp-x-bnav-sell.tp-x-nav-active::after { display: none; }
	.tp-x-bnav-sell .tp-x-nav-ico {
		background: var(--x-accent);
		color: #fff;
		border-radius: 9999px;
		width: 44px;
		height: 44px;
		flex-basis: 44px;
		align-items: center;
		justify-content: center;
	}
	.tp-x-bnav-sell .tp-x-nav-ico svg { width: 24px; height: 24px; }
	.tp-x-timeline { padding-bottom: 90px; }
}

/* ---------- Toast ---------- */
.tp-x-toast {
	position: fixed;
	left: 50%;
	transform: translateX(-50%);
	bottom: 90px;
	background: var(--x-toast-bg);
	color: var(--x-toast-tx);
	border: 1px solid var(--x-accent);
	padding: 11px 20px;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	z-index: 99;
	box-shadow: var(--x-shadow);
	max-width: 90vw;
	text-align: center;
}
.tp-x-toast[hidden] { display: none; }

/* ---------- Accessibility ---------- */
.tp-x-body a:focus-visible,
.tp-x-body button:focus-visible,
.tp-x-body input:focus-visible {
	outline: 2px solid var(--x-accent);
	outline-offset: 2px;
}
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal;
}
@media (prefers-reduced-motion: reduce) {
	.tp-x-body * { transition: none !important; }
}

/* ---------- Phase 8.2: site-wide chrome additions ---------- */

/* Slim topbar (non-feed pages): back button + title. */
.tp-x-slimbar {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 16px;
}
.tp-x-back {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--x-text);
	cursor: pointer;
	flex: 0 0 auto;
}
.tp-x-back:hover { background: var(--x-accent-soft); }
.tp-x-back svg { width: 20px; height: 20px; }
.tp-x-slimtitle {
	margin: 0;
	font-size: 19px;
	font-weight: 800;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Regular page body inside the center column. */
.tp-x-page-body {
	padding: 4px 16px 32px;
}
.tp-x-page-body > *:first-child { margin-top: 12px; }

/* Single product detail. */
.tp-x-detail { padding: 12px 16px 32px; }
.tp-x-detail-seller {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}
.tp-x-detail-sellermeta {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
	flex-wrap: wrap;
}
.tp-x-detail-title {
	margin: 0 0 6px;
	font-size: 21px;
	line-height: 1.3;
	font-weight: 800;
}
.tp-x-detail-price {
	margin: 0 0 12px;
	font-size: 19px;
	font-weight: 800;
	color: var(--x-text);
}
.tp-x-detail-media { margin: 0 0 14px; }
.tp-x-detail-media img {
	width: 100%;
	height: auto;
	border-radius: 16px;
	border: 1px solid var(--x-border);
	display: block;
}
.tp-x-detail-media .tp-x-card-ph {
	height: 220px;
	border-radius: 16px;
	border: 1px solid var(--x-border);
}
.tp-x-detail-buyrow { margin: 4px 0 14px; }
.tp-x-buy-lg {
	display: inline-block;
	padding: 10px 28px;
	font-size: 16px;
}
.tp-x-detail-actions {
	border-top: 1px solid var(--x-border);
	border-bottom: 1px solid var(--x-border);
	padding: 6px 0;
	margin-bottom: 14px;
}
.tp-x-meta-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 16px;
	font-size: 14px;
}
.tp-x-meta-table th,
.tp-x-meta-table td {
	text-align: left;
	padding: 8px 4px;
	border-bottom: 1px solid var(--x-border);
	vertical-align: top;
}
.tp-x-meta-table th {
	color: var(--x-muted);
	font-weight: 600;
	width: 34%;
}
.tp-x-detail-desc { font-size: 15px; line-height: 1.6; }
.tp-x-detail-desc img { max-width: 100%; height: auto; }
.tp-x-muted { color: var(--x-muted); font-size: 14px; }

/* Archive header + pager. */
.tp-x-arch-desc {
	color: var(--x-muted);
	font-size: 14px;
	margin: 4px 16px 12px;
}
.tp-x-pager {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px 24px;
}
.tp-x-pager a {
	color: var(--x-accent);
	text-decoration: none;
	font-weight: 700;
	font-size: 14px;
	padding: 8px 16px;
	border: 1px solid var(--x-border-strong);
	border-radius: 999px;
}
.tp-x-pager a:hover { background: var(--x-accent-soft); }
.tp-x-pager-info { color: var(--x-muted); font-size: 13px; }

/* Claim-a-Demo (v0.9.0). */
.tp-x-demobadge {
	font-size: 12px;
	font-weight: 700;
	color: var(--x-muted);
	background: var(--x-accent-soft);
	border: 1px dashed var(--x-border-strong);
	border-radius: 9999px;
	padding: 2px 9px;
}
.tp-x-claim {
	background: transparent;
	color: var(--x-accent) !important;
	font-weight: 700;
	font-size: 13.5px;
	border: 1.5px solid var(--x-accent);
	border-radius: 9999px;
	padding: 6px 16px;
	text-decoration: none;
	white-space: nowrap;
}
.tp-x-claim:hover { background: var(--x-accent-soft); }
.tp-x-detail-claimrow {
	margin: 14px 0;
	padding: 14px;
	border: 1px dashed var(--x-border-strong);
	border-radius: 14px;
	text-align: center;
}
.tp-x-claim-lg { font-size: 15px; padding: 10px 26px; display: inline-block; margin-bottom: 8px; }

/* ---------- Phase 9.2: overflow hardening ----------
   Root cause fixed: product descriptions can contain very long unbroken
   strings (e.g. full merchant URLs with no spaces). Without wrapping, the
   text's intrinsic min-content width bursts out of its card and forces a
   document-level horizontal scrollbar on narrower viewports. */
.tp-x-body { overflow-x: clip; }
.tp-x-excerpt,
.tp-x-title,
.tp-x-detail-desc,
.tp-x-page-body,
.tp-x-arch-desc { overflow-wrap: anywhere; }
.tp-x-detail-desc { word-break: break-word; }
.tp-x-page-body img { max-width: 100%; height: auto; }
.tp-x-page-body table { display: block; max-width: 100%; overflow-x: auto; }
.tp-x-page-body pre,
.tp-x-detail-desc pre { max-width: 100%; overflow-x: auto; }
.tp-x-actions { flex-wrap: wrap; row-gap: 6px; }

/* ---------- Phase 9.4: single page scroll ----------
   The right rail had its own independent scrollbar (sticky + 100vh +
   overflow-y:auto), which looked like an extra/broken scrollbar next to the
   page scrollbar. The rail now flows with the page — one scrollbar total. */
.tp-x-right {
	position: static;
	height: auto;
	overflow-y: visible;
}

/* ---------- Phase 9.5: trending rank + search counts ---------- */
.tp-x-trend-list li a { display: flex; align-items: flex-start; gap: 10px; }
.tp-x-trend-rank {
	flex: 0 0 22px;
	font-size: 13px;
	font-weight: 800;
	color: var(--x-accent);
	padding-top: 2px;
	text-align: right;
	font-variant-numeric: tabular-nums;
}
.tp-x-trend-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tp-x-trend-topic { overflow-wrap: anywhere; }
.tp-x-trend-count { display: block; font-size: 12px; color: var(--x-muted); margin-top: 1px; }

/* ---------- Phase 10.1: search-results header + smart empty state ----------
   Clicking a trending tag lands on the feed search (/?tp_s=<topic>). News
   topics rarely match products, so the results page now shows WHAT was
   searched, real trend context (rank + searches, when known), and a useful
   empty state with CTAs instead of a bare "No products found". */
.tp-x-searchhead {
	margin: 8px 16px 12px;
	padding: 16px 18px;
	background: var(--x-panel);
	border: 1px solid var(--x-border);
	border-radius: 20px;
	box-shadow: var(--x-card-shadow);
}
.tp-x-searchhead-kicker {
	margin: 0 0 4px;
	font-size: 11.5px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	color: var(--x-accent);
}
.tp-x-searchhead-q {
	margin: 0 0 6px;
	font-size: 20px;
	font-weight: 800;
	line-height: 1.3;
	overflow-wrap: anywhere;
}
.tp-x-searchhead-meta { margin: 0; font-size: 13.5px; color: var(--x-muted); }
.tp-x-empty-state {
	margin: 8px 16px;
	padding: 36px 20px;
	text-align: center;
	border: 1px dashed var(--x-border-strong);
	border-radius: 20px;
	background: var(--x-panel);
}
.tp-x-empty-title {
	margin: 0 0 6px;
	font-size: 16px;
	font-weight: 700;
	color: var(--x-text);
	overflow-wrap: anywhere;
}
.tp-x-empty-sub { margin: 0; font-size: 14px; color: var(--x-muted); }
.tp-x-empty-ctas {
	display: flex;
	gap: 10px;
	justify-content: center;
	flex-wrap: wrap;
	margin-top: 16px;
}
.tp-x-empty-cta {
	display: inline-block;
	padding: 10px 20px;
	border-radius: 12px;
	font-weight: 700;
	font-size: 14px;
	text-decoration: none;
	background: var(--x-accent);
	color: #1c1917 !important;
}
.tp-x-empty-cta:hover { background: var(--x-accent-hover); color: #1c1917 !important; }
.tp-x-empty-cta-alt {
	background: transparent;
	color: var(--x-accent) !important;
	border: 1.5px solid var(--x-accent);
}
.tp-x-empty-cta-alt:hover { background: var(--x-accent-soft); color: var(--x-accent) !important; }

/* Phase 11.1: "Related tags" row on tp_category archives. */
.tp-x-related-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin: 0 0 14px 0;
}
.tp-x-related-label {
	font-size: 13px;
	font-weight: 700;
	color: var(--x-muted);
	margin-right: 2px;
}
.tp-x-related-tag {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--x-accent-soft);
	color: var(--x-accent);
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	border: 1px solid transparent;
}
.tp-x-related-tag:hover {
	border-color: var(--x-accent);
	color: var(--x-accent-hover);
}
