/*
Theme Name: Trøjekongen
Description: Hurtigt, moderne tema til Trøjekongen.dk – bruges sammen med Trøjekongen-pluginnet.
Version: 1.1.2
Author: Trøjekongen
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: trojekongen-tema
*/

:root {
	--tk-accent: #0e7a43;
	--tk-dark: #0f2a1f;
	--tk-deep: #081a12;
	--tk-gold: #d4a72c;
	--tk-ink: #15201b;
	--tk-muted: #5f6a65;
	--tk-line: #e6e9e7;
	--tk-soft: #f5f6f4;
	--tk-head: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
	--wrap: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	color: var(--tk-ink);
	background: #fff;
	overflow-x: clip;
}
img { max-width: 100%; height: auto; }
a { color: var(--tk-accent); }
h1, h2, h3 { line-height: 1.1; }
h1, h2 { font-family: var(--tk-head); font-weight: 800; font-style: italic; letter-spacing: .005em; color: var(--tk-dark); }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 2em 0 .6em; }
h3 { font-size: 1.1rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 900px) { .wrap { padding: 0 28px; } }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 1000; clip: auto; width: auto; height: auto; padding: 8px 12px; background: #fff; }

/* ---------- Topbjælke ---------- */
.tkt-topbar { background: var(--tk-accent); color: #fff; font-size: .8rem; font-weight: 600; letter-spacing: .02em; }
.tkt-topbar__track { display: flex; justify-content: center; gap: 28px; padding: 7px 16px; }
.tkt-topbar__track span + span::before { content: "•"; margin-right: 28px; opacity: .6; }
@media (max-width: 860px) {
	.tkt-topbar__track { position: relative; height: 32px; padding: 0; }
	.tkt-topbar__track span { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; animation: tkt-rot 16s infinite; }
	.tkt-topbar__track span + span::before { content: none; }
	.tkt-topbar__track span:nth-child(2) { animation-delay: 4s; }
	.tkt-topbar__track span:nth-child(3) { animation-delay: 8s; }
	.tkt-topbar__track span:nth-child(4) { animation-delay: 12s; }
}
@keyframes tkt-rot { 0%, 22% { opacity: 1; } 25%, 100% { opacity: 0; } 0% { transform: translateY(4px); } 3% { transform: none; } }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--tk-line); transition: box-shadow .2s; }
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(8, 26, 18, .08); }
.site-header__bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 76px; gap: 12px; }
.site-header__side { display: flex; align-items: center; gap: 6px; }
.site-header__side--right { justify-content: flex-end; gap: 10px; }
.site-header__logo { display: flex; justify-content: center; }
.site-header .site-header__logo .custom-logo-link { display: block; }
.site-header .site-header__logo .custom-logo { max-height: 62px; width: auto; display: block; transition: transform .2s; }
.site-header .site-header__logo .custom-logo-link:hover .custom-logo { transform: rotate(-4deg) scale(1.04); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--tk-dark); text-decoration: none; font-family: var(--tk-head); font-style: italic; font-weight: 800; font-size: 1.6rem; }
.brand svg { width: 34px; height: 34px; }
.hdr-icon, .nav-toggle { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--tk-dark); background: none; border: 0; cursor: pointer; padding: 0; }
.hdr-icon:hover, .nav-toggle:hover { background: var(--tk-soft); }
.hdr-icon svg, .nav-toggle svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hdr-count { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--tk-gold); color: var(--tk-deep); font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center; }
.hdr-cta { padding: 10px 18px; border-radius: 999px; background: var(--tk-dark); color: #fff; font-weight: 700; font-size: .9rem; text-decoration: none; white-space: nowrap; transition: background .2s; }
.hdr-cta:hover { background: var(--tk-accent); }
.nav-toggle { display: none; }

.main-nav { border-top: 1px solid var(--tk-line); }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; }
.main-nav a { display: block; padding: 11px 14px; color: var(--tk-ink); text-decoration: none; font-weight: 600; font-size: .93rem; position: relative; }
.main-nav a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 2px; background: var(--tk-accent); transform: scaleX(0); transition: transform .2s; }
.main-nav a:hover::after, .main-nav .current-menu-item > a::after { transform: scaleX(1); }
.main-nav .menu-item a[href*="saelg-din-troje"] { color: var(--tk-accent); }

@media (max-width: 860px) {
	.site-header__bar { min-height: 64px; }
	.site-header .site-header__logo .custom-logo { max-height: 50px; }
	.nav-toggle { display: grid; }
	.hdr-cta { display: none; }
	.main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--tk-line); box-shadow: 0 16px 30px rgba(8, 26, 18, .12); }
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; padding: 8px 0 14px; }
	.main-nav a { padding: 12px 4px; font-size: 1.05rem; border-bottom: 1px solid var(--tk-line); }
	.main-nav a::after { display: none; }
}

/* ---------- Indhold ---------- */
.site-main { padding: 36px 0 64px; min-height: 60vh; }
.home .site-main { padding-top: 0; }
.entry-header { margin-bottom: 18px; }
.entry-header h1 { margin: 0; }
.home .entry-header { display: none; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content .alignwide { max-width: var(--wrap); }

/* Knapper */
.tkt-btn, .wp-block-button__link { display: inline-block; padding: 14px 28px; border-radius: 999px; font-weight: 700; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s; border: 2px solid transparent; }
.tkt-btn:hover, .wp-block-button__link:hover { transform: translateY(-2px); }
.tkt-btn--gold, .wp-block-button__link { background: var(--tk-gold); color: var(--tk-deep); box-shadow: 0 8px 24px rgba(212, 167, 44, .35); }
.tkt-btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .7); }
.tkt-btn--ghost:hover { background: #fff; color: var(--tk-deep); }
.tkt-btn--dark { background: var(--tk-dark); color: #fff; }
.tk-btn { border-radius: 999px; background: var(--tk-dark); }
.tk-btn:hover { background: var(--tk-accent); filter: none; }
.tkb-buy__btn { background: var(--tk-accent) !important; }

/* ---------- Hero med trøjer ---------- */
.tkt-hero { position: relative; overflow: hidden; width: 100vw; margin-left: calc(50% - 50vw); min-height: min(82vh, 680px); display: grid; place-items: center; text-align: center; background: var(--tk-deep); color: #fff; isolation: isolate; }
.tkt-hero__rows { position: absolute; inset: -12% -5%; display: flex; flex-direction: column; justify-content: center; gap: 16px; transform: rotate(-7deg); z-index: -2; }
.tkt-hero__row { display: flex; gap: 16px; width: max-content; animation: tkt-scroll 70s linear infinite; }
.tkt-hero__row--rev { animation-direction: reverse; animation-duration: 85s; }
.tkt-hero__row img { width: 170px; height: 226px; object-fit: cover; border-radius: 14px; flex: none; background: #1d3a2d; }
@keyframes tkt-scroll { to { transform: translateX(-50%); } }
.tkt-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 70% 65% at 50% 50%, rgba(8, 26, 18, .92) 0%, rgba(8, 26, 18, .72) 55%, rgba(8, 26, 18, .45) 100%); }
.tkt-hero__inner { max-width: 760px; padding: 64px 20px; }
.tkt-hero__badge { display: inline-block; margin-bottom: 18px; padding: 7px 16px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25); color: #fff; font-size: .85rem; font-weight: 600; text-decoration: none; backdrop-filter: blur(6px); }
.tkt-hero h1 { margin: 0; color: #fff; font-size: clamp(3.4rem, 13.5vw, 9rem); line-height: .88; text-transform: uppercase; text-shadow: 0 6px 40px rgba(0, 0, 0, .45); }
.tkt-hero p.tkt-hero__sub { margin: 4px auto 18px; font-family: var(--tk-head); font-style: italic; font-weight: 800; font-size: clamp(1.5rem, 5vw, 2.6rem); line-height: 1; text-transform: uppercase; letter-spacing: .03em; color: var(--tk-gold); opacity: 1; }
.tkt-hero p { margin: 0 auto 28px; max-width: 46ch; font-size: clamp(1.02rem, 2.2vw, 1.25rem); opacity: .92; }
.tkt-hero__btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 700px) {
	.tkt-hero { min-height: 78vh; }
	.tkt-hero__row img { width: 118px; height: 157px; border-radius: 10px; }
	.tkt-hero__rows, .tkt-hero__row { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { .tkt-hero__row, .tkt-topbar__track span { animation: none; } .tkt-topbar__track span:first-child { opacity: 1; } }

/* ---------- Tillidsbjælke ---------- */
.tk-trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 16px; margin: -36px auto 8px; position: relative; z-index: 2; max-width: 1060px; padding: 18px 22px; background: #fff; border-radius: 16px; box-shadow: 0 18px 50px rgba(8, 26, 18, .14); }
.tk-trust a, .tk-trust div { display: flex; align-items: center; gap: 12px; font-size: .9rem; font-weight: 600; color: var(--tk-ink); text-decoration: none; line-height: 1.3; }
.tk-trust svg { width: 26px; height: 26px; flex: none; color: var(--tk-accent); }
.tk-trust a:hover span { text-decoration: underline; }
@media (max-width: 860px) { .tk-trust { grid-template-columns: repeat(2, 1fr); margin-top: -28px; padding: 14px 16px; } .tk-trust a, .tk-trust div { font-size: .8rem; gap: 8px; } .tk-trust svg { width: 21px; height: 21px; } }

/* ---------- Sektioner ---------- */
.tkt-section { margin: 64px 0; }
.tkt-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.tkt-section__head h2 { margin: 0; }
.tkt-section__head a { font-weight: 700; text-decoration: none; white-space: nowrap; }
.tkt-section__head a:hover { text-decoration: underline; }
.tkt-kicker { display: block; margin-bottom: 4px; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--tk-accent); }

/* Karrusel */
.tkt-carousel { position: relative; }
.tkt-carousel .tk-grid { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: calc((100% - 3 * 20px) / 4); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 6px; margin: 0; }
.tkt-carousel .tk-grid::-webkit-scrollbar { display: none; }
.tkt-carousel .tk-card { scroll-snap-align: start; }
.tkt-carousel__btn { position: absolute; top: 38%; z-index: 3; width: 46px; height: 46px; border-radius: 50%; border: 0; background: #fff; color: var(--tk-dark); font-size: 28px; line-height: 44px; cursor: pointer; box-shadow: 0 6px 20px rgba(8, 26, 18, .18); }
.tkt-carousel__btn--prev { left: -18px; }
.tkt-carousel__btn--next { right: -18px; }
.tkt-carousel__btn:hover { background: var(--tk-dark); color: #fff; }
@media (max-width: 860px) { .tkt-carousel .tk-grid { grid-auto-columns: 46%; gap: 12px; } .tkt-carousel__btn { display: none; } }

/* Kort */
.tk-card__img { border-radius: 14px; border: 0; background: var(--tk-soft); box-shadow: none; }
.tk-card__img img { transition: transform .35s ease; }
.tk-card:hover .tk-card__img img { transform: scale(1.05); }
.tk-card__title { font-weight: 600; font-size: .95rem; }
.tk-card__price { color: var(--tk-ink); font-weight: 700; }

/* Ligaer */
.tkt-ligaer { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tkt-liga { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; background: var(--tk-dark); text-decoration: none; isolation: isolate; }
.tkt-liga img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; z-index: -2; transition: transform .45s ease; }
.tkt-liga::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(8, 26, 18, .92) 0%, rgba(8, 26, 18, .25) 55%, rgba(8, 26, 18, 0) 100%); }
.tkt-liga:hover img { transform: scale(1.07); }
.tkt-liga__navn { position: absolute; left: 16px; right: 16px; bottom: 36px; color: #fff; font-family: var(--tk-head); font-style: italic; font-weight: 800; font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1; text-transform: uppercase; }
.tkt-liga__antal { position: absolute; left: 16px; bottom: 14px; color: var(--tk-gold); font-size: .82rem; font-weight: 700; }
@media (max-width: 860px) { .tkt-ligaer { grid-template-columns: repeat(2, 1fr); gap: 10px; } .tkt-liga__navn { left: 12px; bottom: 32px; } .tkt-liga__antal { left: 12px; bottom: 11px; } }

/* Liga-chips på Trøjer-siden */
.tkt-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 0 18px; padding-bottom: 4px; }
.tkt-chips::-webkit-scrollbar { display: none; }
.tkt-chips a { flex: none; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--tk-line); color: var(--tk-ink); font-weight: 600; font-size: .9rem; text-decoration: none; background: #fff; }
.tkt-chips a:hover { border-color: var(--tk-dark); }
.tkt-chips a.is-active { background: var(--tk-dark); border-color: var(--tk-dark); color: #fff; }

/* Om */
.tkt-om { display: grid; grid-template-columns: 1fr 1.2fr; gap: 0; border-radius: 20px; overflow: hidden; background: var(--tk-dark); color: #e9efeb; }
.tkt-om__media { position: relative; min-height: 320px; background: radial-gradient(circle at 50% 45%, #1c4a35 0%, var(--tk-deep) 70%); display: grid; place-items: center; }
.tkt-om__media img { width: min(62%, 260px); filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .45)); }
.tkt-om__text { padding: clamp(28px, 5vw, 56px); }
.tkt-om__text h2 { color: #fff; margin: 0 0 14px; }
.tkt-om__text p { margin: 0 0 14px; }
.tkt-om__text a { color: var(--tk-gold); font-weight: 700; }
.tkt-stats { display: flex; gap: 28px; flex-wrap: wrap; margin: 22px 0; }
.tkt-stats strong { display: block; font-family: var(--tk-head); font-style: italic; font-weight: 800; font-size: 2.4rem; line-height: 1; color: var(--tk-gold); }
.tkt-stats span { font-size: .85rem; opacity: .85; }
@media (max-width: 860px) { .tkt-om { grid-template-columns: 1fr; } .tkt-om__media { min-height: 220px; } }

/* FAQ */
.tkt-faq { max-width: 820px; }
.tkt-faq details { border-bottom: 1px solid var(--tk-line); }
.tkt-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 18px 2px; font-weight: 700; font-size: 1.05rem; }
.tkt-faq summary::-webkit-details-marker { display: none; }
.tkt-faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--tk-accent); transition: transform .2s; }
.tkt-faq details[open] summary::after { transform: rotate(45deg); }
.tkt-faq details p { margin: 0 0 18px; color: var(--tk-muted); }

/* Sælg-bånd */
.tkt-saelg { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: clamp(26px, 5vw, 48px); border-radius: 20px; background: linear-gradient(120deg, var(--tk-accent), var(--tk-dark)); color: #fff; }
.tkt-saelg h2 { color: #fff; margin: 0 0 6px; }
.tkt-saelg p { margin: 0; opacity: .9; max-width: 52ch; }

/* Udtalelser */
.tk-quote { background: var(--tk-soft); border-left: 0; border-radius: 16px; position: relative; padding: 26px 22px 20px; }
.tk-quote::before { content: "★★★★★"; display: block; margin-bottom: 8px; color: var(--tk-gold); letter-spacing: 2px; }
.tk-quote blockquote { font-style: normal; font-weight: 500; }

/* Gamle forsideklasser (bruges ikke længere, men skjuler ikke noget) */
.tk-hero { background: linear-gradient(135deg, var(--tk-dark), var(--tk-accent)); color: #fff; padding: clamp(32px, 6vw, 72px) clamp(20px, 5vw, 56px) !important; border-radius: 16px; }
.tk-hero h1 { color: #fff; }
.wp-block-columns { display: flex; gap: 24px; flex-wrap: wrap; align-items: stretch; }
.wp-block-column { flex: 1 1 220px; }
.wp-block-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--tk-deep); color: #b9c7bf; padding: 56px 0 24px; font-size: .92rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer h2 { margin: 0 0 12px; font-size: 1.3rem; color: #fff; }
.site-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; }
.site-footer__brand p { margin: 12px 0 0; max-width: 30ch; }
.footer-logo { display: inline-block; }
.footer-logo img { display: block; width: 97px; height: auto; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.site-footer__contact p { margin: 0 0 8px; }
.site-footer__pay { font-size: .82rem; opacity: .75; margin-top: 14px !important; }
.site-footer__bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 40px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .82rem; }
@media (max-width: 760px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__brand { grid-column: 1 / -1; } }

/* Indlægsliste (fallback) */
.post-list article { padding: 16px 0; border-bottom: 1px solid var(--tk-line); }
