/* TechHive Affiliate — shortcode styles. Uses theme tokens with fallbacks. */
.thc-card, .thc-quick, .thc-compare, .thc-note, .thc-disclosure, .thc-inline-cta {
	--_bg: var(--thc-bg, #fff);
	--_surface: var(--thc-surface, #f6f7f9);
	--_text: var(--thc-text, #14171f);
	--_muted: var(--thc-muted, #5b6475);
	--_border: var(--thc-border, #e3e6ec);
	--_accent: var(--thc-accent, #f59e0b);
	--_accent-ink: var(--thc-accent-ink, #1a1205);
	--_primary: var(--thc-primary, #0f172a);
	--_good: var(--thc-good, #16a34a);
	--_bad: var(--thc-bad, #dc2626);
	--_radius: var(--thc-radius, 14px);
	--_shadow: var(--thc-shadow, 0 1px 2px rgba(16,24,40,.06), 0 4px 16px rgba(16,24,40,.06));
	font-family: var(--thc-font, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
	box-sizing: border-box;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .thc-card, :root:not([data-theme="light"]) .thc-quick, :root:not([data-theme="light"]) .thc-compare,
	:root:not([data-theme="light"]) .thc-note, :root:not([data-theme="light"]) .thc-disclosure, :root:not([data-theme="light"]) .thc-inline-cta {
		--_bg: var(--thc-bg, #0b0f17);
		--_surface: var(--thc-surface, #121826);
		--_text: var(--thc-text, #e8ebf1);
		--_muted: var(--thc-muted, #9aa3b5);
		--_border: var(--thc-border, #232b3b);
		--_primary: var(--thc-primary, #e8ebf1);
		--_shadow: var(--thc-shadow, 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3));
	}
}
.thc-card *, .thc-quick *, .thc-compare *, .thc-note *, .thc-disclosure * { box-sizing: border-box; }
.thc-icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; flex: none; }

/* ---------- Buttons ---------- */
.thc-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .45em;
	min-height: 44px; padding: .62em 1.1em; border-radius: 10px;
	font: 600 .95rem/1.2 inherit; font-family: inherit; text-decoration: none !important;
	border: 1.5px solid transparent; cursor: pointer; white-space: nowrap;
	transition: transform .12s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.thc-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--_accent) 55%, transparent); outline-offset: 2px; }
.thc-btn--primary { background: var(--_accent); color: var(--_accent-ink) !important; box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 6px 14px -6px color-mix(in srgb, var(--_accent) 80%, transparent); }
.thc-btn--primary:hover { background: color-mix(in srgb, var(--_accent) 88%, #000); transform: translateY(-1px); }
.thc-btn--ghost { background: transparent; color: var(--_text) !important; border-color: var(--_border); }
.thc-btn--ghost:hover { border-color: var(--_text); background: var(--_surface); }
.thc-btn__arrow { display: inline-flex; transition: transform .15s ease; }
.thc-btn:hover .thc-btn__arrow { transform: translateX(2px); }
.thc-adlabel {
	display: inline-block; font-size: .7rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
	color: var(--_muted); border: 1px solid var(--_border); border-radius: 4px; padding: .1em .4em; line-height: 1.4; vertical-align: middle;
}
.thc-inline-cta { display: inline-flex; align-items: center; gap: .6em; flex-wrap: wrap; margin: .4em 0; }

/* ---------- Badges & score ---------- */
.thc-badge {
	display: inline-flex; align-items: center; padding: .28em .7em; border-radius: 999px;
	background: var(--_primary); color: var(--_bg); font-size: .75rem; font-weight: 700; letter-spacing: .02em; line-height: 1.3;
}
.thc-badge--sm { font-size: .68rem; padding: .2em .55em; margin-top: .35em; }
.thc-score {
	display: inline-flex; align-items: baseline; gap: 1px; padding: .2em .6em; border-radius: 999px;
	background: color-mix(in srgb, var(--_accent) 16%, transparent); color: var(--_text);
	font-size: .8rem; font-weight: 600; white-space: nowrap; line-height: 1.4;
}
.thc-score b { font-size: 1.05em; font-weight: 800; }

/* ---------- Product card ---------- */
.thc-card {
	display: grid; grid-template-columns: minmax(200px, 34%) 1fr;
	margin: 1.6em 0 2.2em; background: var(--_bg); color: var(--_text);
	border: 1px solid var(--_border); border-radius: var(--_radius); box-shadow: var(--_shadow);
	overflow: hidden; scroll-margin-top: 90px;
}
.thc-card__media { background: var(--_surface); display: flex; align-items: center; justify-content: center; min-height: 220px; }
.thc-card__media img { width: 100%; height: 100%; object-fit: contain; padding: 1.25rem; max-height: 360px; }
.thc-card__body { padding: 1.4rem 1.5rem 1.3rem; display: flex; flex-direction: column; gap: .85rem; min-width: 0; }
.thc-card__top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; min-height: 1.6rem; }
.thc-card__top .thc-score { margin-left: auto; }
.thc-card__title { margin: 0 !important; font-size: 1.35rem; line-height: 1.25; letter-spacing: -.01em; color: var(--_text); }
.thc-card__summary { margin: 0 !important; color: var(--_muted); font-size: .98rem; line-height: 1.55; }

/* Placeholder media */
.thc-ph {
	position: relative; width: 100%; height: 100%; min-height: 220px; display: flex; flex-direction: column;
	align-items: center; justify-content: center; gap: .7rem; color: #fff; overflow: hidden;
	background: linear-gradient(135deg, #1e293b, #0f172a);
}
.thc-ph::before {
	content: ""; position: absolute; inset: 0; opacity: .14;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='48' viewBox='0 0 28 48'%3E%3Cpath d='M14 0l14 8v16l-14 8L0 24V8z M14 32l14 8v16 M14 32L0 40v16' fill='none' stroke='%23fff' stroke-width='1.2'/%3E%3C/svg%3E");
	background-size: 28px 48px;
}
.thc-ph__icon { position: relative; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 22px; background: rgba(255,255,255,.14); backdrop-filter: blur(2px); }
.thc-ph__icon .thc-icon, .thc-ph__icon svg { width: 46px; height: 46px; }
.thc-ph__brand { position: relative; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; opacity: .92; }
.thc-ph--tv     { background: linear-gradient(135deg, #1d4ed8 0%, #0f172a 100%); }
.thc-ph--pc     { background: linear-gradient(135deg, #0891b2 0%, #0f172a 100%); }
.thc-ph--audio  { background: linear-gradient(135deg, #7c3aed 0%, #1e1b4b 100%); }
.thc-ph--music  { background: linear-gradient(135deg, #db2777 0%, #3b0764 100%); }
.thc-ph--gaming { background: linear-gradient(135deg, #16a34a 0%, #052e16 100%); }

/* Specs */
.thc-specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; margin: 0 !important; padding: 0; }
.thc-specs > div { background: var(--_surface); border-radius: 10px; padding: .55rem .75rem; min-width: 0; }
.thc-specs dt { margin: 0; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--_muted); font-weight: 600; }
.thc-specs dd { margin: .15rem 0 0; font-size: .9rem; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }

/* Pros / cons */
.thc-proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.thc-proscons__h { margin: 0 0 .35rem !important; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--_muted); }
.thc-pros, .thc-cons { list-style: none !important; margin: 0 !important; padding: 0 !important; display: grid; gap: .4rem; }
.thc-pros li, .thc-cons li { display: flex; gap: .5rem; align-items: flex-start; margin: 0 !important; padding: 0 !important; font-size: .92rem; line-height: 1.45; }
.thc-pros li::before, .thc-cons li::before { content: none !important; }
.thc-pros .thc-icon, .thc-cons .thc-icon { width: 1.15em; height: 1.15em; margin-top: .12em; padding: .14em; border-radius: 50%; stroke-width: 3; }
.thc-pros .thc-icon { color: var(--_good); background: color-mix(in srgb, var(--_good) 14%, transparent); }
.thc-cons .thc-icon { color: var(--_bad); background: color-mix(in srgb, var(--_bad) 12%, transparent); }

/* Footer: price + CTAs */
.thc-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: .9rem; border-top: 1px dashed var(--_border); margin-top: auto; }
.thc-price { display: flex; flex-direction: column; gap: .1rem; }
.thc-price__val { font-size: 1.35rem; font-weight: 800; letter-spacing: -.01em; }
.thc-price__val--na { font-size: 1rem; color: var(--_muted); }
.thc-price small { color: var(--_muted); font-size: .78rem; }
.thc-ctas { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

/* ---------- Quick picks ---------- */
.thc-quick { margin: 1.8em 0 2.4em; padding: 1.3rem 1.4rem; background: var(--_surface); border: 1px solid var(--_border); border-radius: var(--_radius); color: var(--_text); }
.thc-quick__title { margin: 0 0 .9rem !important; font-size: 1.15rem !important; display: flex; align-items: center; gap: .5rem; }
.thc-quick__title::before { content: ""; width: 14px; height: 16px; background: var(--_accent); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.thc-quick__list { list-style: none !important; margin: 0 !important; padding: 0 !important; counter-reset: thcq; display: grid; gap: .55rem; }
.thc-quick__item {
	counter-increment: thcq; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: .9rem;
	margin: 0 !important; padding: .7rem .85rem !important; background: var(--_bg); border: 1px solid var(--_border); border-radius: 12px;
}
.thc-quick__item::before { content: counter(thcq); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--_primary); color: var(--_bg); font-weight: 800; font-size: .85rem; }
.thc-quick__main { display: flex; flex-direction: column; min-width: 0; }
.thc-quick__badge { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: color-mix(in srgb, var(--_accent) 75%, var(--_text)); }
.thc-quick__name { font-weight: 700; color: var(--_text) !important; text-decoration: none !important; line-height: 1.3; }
.thc-quick__name:hover { text-decoration: underline !important; }
.thc-quick__meta { display: flex; align-items: center; gap: .6rem; }
.thc-quick__price { font-weight: 700; white-space: nowrap; font-size: .95rem; }
.thc-quick__cta .thc-btn { min-height: 40px; padding: .5em .9em; font-size: .88rem; }
.thc-quick__foot { margin: .75rem 0 0 !important; font-size: .78rem; color: var(--_muted); display: flex; align-items: center; gap: .5rem; }

/* ---------- Compare table ---------- */
.thc-compare {
	margin: 1.6em 0 2.2em; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--_border);
	border-radius: var(--_radius); background: var(--_bg); color: var(--_text); box-shadow: var(--_shadow);
}
.thc-compare:focus-visible { outline: 3px solid color-mix(in srgb, var(--_accent) 55%, transparent); outline-offset: 2px; }
.thc-compare table { width: 100%; min-width: 560px; border-collapse: separate; border-spacing: 0; margin: 0 !important; font-size: .9rem; border: 0 !important; }
.thc-compare th, .thc-compare td { padding: .7rem .85rem; text-align: left; vertical-align: top; border: 0 !important; border-bottom: 1px solid var(--_border) !important; background: var(--_bg); }
.thc-compare thead th { background: var(--_surface); font-weight: 700; vertical-align: bottom; }
.thc-compare__name { display: block; line-height: 1.3; }
.thc-compare tbody th { font-weight: 600; color: var(--_muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.thc-compare th:first-child, .thc-compare td:first-child { position: sticky; left: 0; z-index: 1; background: var(--_surface); box-shadow: 1px 0 0 var(--_border); }
.thc-compare thead th:first-child { z-index: 2; }
.thc-compare tr:last-child th, .thc-compare tr:last-child td { border-bottom: 0 !important; }
.thc-compare__ctas .thc-btn { min-height: 38px; padding: .45em .85em; font-size: .85rem; }
.thc-compare__corner { color: var(--_muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Note ---------- */
.thc-note {
	display: flex; gap: .8rem; margin: 1.5em 0; padding: 1rem 1.15rem; color: var(--_text);
	background: color-mix(in srgb, var(--_accent) 10%, var(--_bg)); border: 1px solid color-mix(in srgb, var(--_accent) 35%, transparent);
	border-left: 4px solid var(--_accent); border-radius: 12px;
}
.thc-note__icon { color: color-mix(in srgb, var(--_accent) 80%, var(--_text)); font-size: 1.3rem; line-height: 1; padding-top: .1rem; }
.thc-note__body > :first-child { margin-top: 0 !important; }
.thc-note__body > :last-child { margin-bottom: 0 !important; }
.thc-note--warn { border-left-color: var(--_bad); background: color-mix(in srgb, var(--_bad) 8%, var(--_bg)); }

/* ---------- Disclosure ---------- */
.thc-disclosure {
	margin: 0 0 1.8em; padding: .8rem 1rem; border-radius: 12px; background: var(--_surface);
	border: 1px solid var(--_border); color: var(--_muted); font-size: .85rem; line-height: 1.5;
}
.thc-disclosure__label { display: inline-block; font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--_text); margin-bottom: .2rem; }
.thc-disclosure p { margin: 0 !important; }
.thc-disclosure a { color: inherit; text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
	.thc-card { grid-template-columns: 1fr; }
	.thc-card__media, .thc-ph { min-height: 170px; }
	.thc-card__body { padding: 1.1rem 1.1rem 1.1rem; }
	.thc-proscons { grid-template-columns: 1fr; }
	.thc-card__foot { flex-direction: column; align-items: stretch; }
	.thc-ctas .thc-btn { flex: 1 1 auto; }
	.thc-ctas .thc-btn--primary { flex-basis: 100%; }
	.thc-quick { padding: 1rem; }
	.thc-quick__item { grid-template-columns: auto 1fr; gap: .5rem .75rem; }
	.thc-quick__meta { grid-column: 2; }
	.thc-quick__cta { grid-column: 1 / -1; }
	.thc-quick__cta .thc-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.thc-btn, .thc-btn__arrow { transition: none; }
	.thc-btn--primary:hover { transform: none; }
}
@media print {
	.thc-ctas, .thc-quick__cta, .thc-compare__ctas { display: none; }
	.thc-card { box-shadow: none; break-inside: avoid; }
}
