/*
Theme Name: japtwo
Description: Schnelles Magazin-Theme für Amazon-Portale mit Produktboxen aus joerrens-amazon.
Author: Torge Joerrens
Author URI: https://www.joerrens.se
Version: 3.0.0
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: japtwo
*/

@font-face {
	font-family: "Schibsted Grotesk";
	src: url("assets/fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
	font-weight: 400 900;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Schibsted Grotesk";
	src: url("assets/fonts/schibsted-grotesk-latin-wght-italic.woff2") format("woff2");
	font-weight: 400 900;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "Fraunces";
	src: url("assets/fonts/fraunces-latin-wght-normal.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

:root {
	--accent: #02aeea;
	--on-accent: #1a1a1a;
	--link: color-mix(in srgb, var(--accent) 62%, #000);
	--text: #1f1f1f;
	--muted: #6b6b6b;
	--soft: #f3f4f5;
	--bg: #fff;
	--radius: 14px;
	--font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-head: "Fraunces", Georgia, "Times New Roman", serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

body.is-overview {
	background: var(--soft);
}

img,
video,
iframe {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--link);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

a:hover {
	color: var(--text);
}

:focus-visible {
	outline: 2px solid var(--link);
	outline-offset: 2px;
}

h1,
h2,
h3,
h4 {
	margin: 1.6em 0 0.5em;
	font-family: var(--font-head);
	font-weight: 600;
	line-height: 1.22;
	letter-spacing: -0.005em;
}

h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p,
ul,
ol,
figure,
table,
blockquote {
	margin: 0 0 1.2em;
}

ul,
ol {
	padding-left: 1.3em;
}

li {
	margin-bottom: 0.3em;
}

blockquote {
	padding: 16px 20px;
	border-radius: var(--radius);
	background: var(--soft);
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95em;
}

th,
td {
	padding: 0.6em 0.75em;
	text-align: left;
}

tr:nth-child(even) td {
	background: var(--soft);
}

hr {
	height: 24px;
	margin: 1em 0;
	border: 0;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.skip-link:focus {
	clip: auto;
	width: auto;
	height: auto;
	top: 8px;
	left: 8px;
	z-index: 100;
	padding: 8px 14px;
	background: var(--bg);
	color: var(--text);
}

.wrap {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* Header */

.bar {
	background: var(--accent);
	color: var(--on-accent);
}

.bar__inner {
	display: flex;
	align-items: center;
	gap: 28px;
	min-height: 112px;
}

.brand {
	flex: 0 1 auto;
	min-width: 0;
}

.brand img {
	display: block;
	width: auto;
	max-height: 64px;
}

.brand__name {
	display: block;
	overflow: hidden;
	color: var(--on-accent);
	font-size: 1.15rem;
	font-weight: 800;
	text-decoration: none;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.brand__name:hover {
	color: var(--on-accent);
}

.bar .search-form {
	flex: 1;
	max-width: 620px;
	min-width: 0;
	margin-left: auto;
}

.search-form {
	display: flex;
	padding: 4px;
	border-radius: 999px;
	background: #fff;
}

.search-form__input {
	flex: 1;
	min-width: 0;
	width: 100%;
	padding: 8px 16px;
	border: 0;
	background: transparent;
	color: var(--text);
	font: inherit;
	font-size: 16px;
}

.search-form__input:focus {
	outline: none;
}

.search-form:focus-within {
	box-shadow: 0 0 0 2px var(--on-accent);
}

.search-form__btn {
	padding: 8px 20px;
	border: 0;
	border-radius: 999px;
	background: var(--text);
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

.menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--on-accent);
	cursor: pointer;
}

.site-nav {
	background: #fff;
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.site-nav .menu {
	display: flex;
	flex-wrap: wrap;
	gap: 0 30px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav li {
	position: relative;
	margin: 0;
}

.site-nav a {
	display: block;
	padding: 14px 0;
	border-bottom: 2px solid transparent;
	color: var(--text);
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
}

.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current-menu-ancestor > a {
	border-bottom-color: var(--accent);
	color: var(--text);
}

.site-nav .sub-menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 761px) {
	.site-nav .sub-menu {
		position: absolute;
		top: 100%;
		left: -16px;
		z-index: 20;
		display: none;
		min-width: 240px;
		padding: 8px 16px;
		border-radius: var(--radius);
		background: #fff;
		box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	}

	.site-nav .sub-menu a {
		padding: 8px 0;
		border: 0;
	}

	.site-nav li:hover > .sub-menu,
	.site-nav li:focus-within > .sub-menu {
		display: block;
	}
}

@media (max-width: 760px) {
	.bar__inner {
		flex-wrap: wrap;
		gap: 0;
		min-height: 0;
		padding-top: 10px;
		padding-bottom: 12px;
	}

	.brand {
		flex: 1 1 0;
		line-height: 44px;
	}

	.menu-toggle {
		display: inline-flex;
	}

	.bar .search-form {
		order: 3;
		flex-basis: 100%;
		max-width: none;
		margin: 6px 0 0;
	}

	.site-nav {
		display: none;
	}

	.site-nav.is-open {
		display: block;
	}

	.site-nav .menu {
		display: block;
		padding: 6px 0;
	}

	.site-nav a {
		padding: 10px 0;
		border: 0;
	}

	.site-nav .sub-menu {
		padding-left: 16px;
	}
}

/* Overview pages (start page, archives, search) */

.site-main {
	flex: 1 0 auto;
	min-width: 0;
}

.wrap.site-main {
	padding-top: 44px;
	padding-bottom: 64px;
}

.hero {
	display: grid;
	gap: 28px 56px;
	align-items: center;
	margin-bottom: 40px;
}

.hero--media {
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.hero__title {
	margin: 0;
	font-size: clamp(2.1rem, 4.4vw, 3.3rem);
	line-height: 1.1;
}

.hero__lead {
	max-width: 560px;
	margin: 18px 0 0;
	color: var(--muted);
	font-size: 1.12rem;
	line-height: 1.6;
}

.hero__button {
	display: inline-block;
	margin-top: 26px;
	padding: 14px 28px;
	border-radius: 999px;
	background: var(--accent);
	color: var(--on-accent);
	font-weight: 600;
	text-decoration: none;
}

.hero__button:hover {
	background: var(--link);
	color: #fff;
}

.hero__img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 420px;
	border-radius: var(--radius);
	object-fit: cover;
	aspect-ratio: 4 / 3;
}

#produkte {
	scroll-margin-top: 24px;
}

@media (max-width: 760px) {
	.hero--media {
		grid-template-columns: 1fr;
	}

	.hero__img {
		aspect-ratio: 16 / 7;
	}
}

.intro__title {
	margin: 0 0 10px;
	font-size: clamp(2rem, 4vw, 2.8rem);
}

.intro__text {
	max-width: 720px;
	margin: 0;
	color: var(--muted);
}

.intro {
	margin-bottom: 28px;
}

.intro__content {
	margin-bottom: 28px;
	color: var(--muted);
}


.intro__content h2 {
	color: var(--text);
}

.section {
	margin-top: 48px;
}

.section__title {
	margin: 0 0 16px;
	font-size: 1.5rem;
}

.cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 20px;
}

.card {
	display: grid;
	grid-row: span 4;
	grid-template-rows: subgrid;
	row-gap: 0;
	padding: 22px;
	border-radius: var(--radius);
	background: #fff;
	color: var(--text);
	text-decoration: none;
}

.card:hover {
	color: var(--text);
}

.card:hover .card__title {
	color: var(--link);
}

.card__meta { grid-row: 1; }
.card__title { grid-row: 2; }
.card__excerpt { grid-row: 3; }
.card__more { grid-row: 4; }

.card__meta {
	margin: 0 0 6px;
	color: var(--muted);
	font-size: 0.8rem;
}

.card__title {
	display: -webkit-box;
	overflow: hidden;
	margin: 0 0 8px;
	font-size: 1.12rem;
	line-height: 1.3;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
}

.card__excerpt {
	display: -webkit-box;
	overflow: hidden;
	margin: 0 0 14px;
	color: var(--muted);
	font-size: 0.95rem;
	line-height: 1.6;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
}

.card__more {
	align-self: end;
	color: var(--link);
	font-size: 0.9rem;
	font-weight: 600;
}

.panel {
	padding: 24px;
	border-radius: var(--radius);
	background: #fff;
}

.panel > :last-child {
	margin-bottom: 0;
}

.pagination {
	margin-top: 40px;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pagination .page-numbers {
	display: inline-block;
	min-width: 44px;
	padding: 8px 14px;
	border-radius: 999px;
	background: #fff;
	color: var(--text);
	text-align: center;
	text-decoration: none;
}

.pagination .page-numbers.current {
	background: var(--accent);
	color: var(--on-accent);
}

/* Posts and pages */

.layout {
	flex: 1 0 auto;
	padding-top: 40px;
	padding-bottom: 64px;
}

.related {
	padding: 48px 0 56px;
	background: var(--soft);
}


.crumbs {
	margin: 0 0 10px;
	color: var(--muted);
	font-size: 0.85rem;
}

.crumbs a {
	color: var(--muted);
}

.entry-title {
	margin: 0 0 10px;
}

.entry-meta {
	margin: 0;
	color: var(--muted);
	font-size: 0.9rem;
}

.entry-header {
	margin-bottom: 28px;
}

.entry-content > :first-child {
	margin-top: 0;
}

.entry-content img {
	border-radius: 8px;
}

.alignleft {
	float: left;
	margin: 0.3em 1.5em 1em 0;
}

.alignright {
	float: right;
	margin: 0.3em 0 1em 1.5em;
}

.aligncenter {
	display: block;
	margin-right: auto;
	margin-left: auto;
}

.wp-caption,
.wp-caption-text,
figcaption {
	max-width: 100%;
	color: var(--muted);
	font-size: 0.85rem;
}

.entry-content::after {
	content: "";
	display: table;
	clear: both;
}

.page-links {
	margin: 24px 0;
}


/* Products (markup from joerrens-amazon 1.1.1) */

.teaserBox {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 8px 32px;
	margin: 8px 0 32px;
}

.teaserBox:not(:has(> .product:nth-of-type(4))) {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.teaserBox:not(:has(> .product:nth-of-type(3))) {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.teaserBox:not(:has(> .product:nth-of-type(2))) {
	grid-template-columns: minmax(0, 1fr);
}

.is-overview .teaserBox {
	gap: 20px;
}

.product {
	display: grid;
	grid-row: span 5;
	grid-template-rows: subgrid;
	row-gap: 0;
	padding: 8px 4px 20px;
	text-align: center;
}

.is-overview .product {
	padding: 20px 18px;
	border-radius: var(--radius);
	background: #fff;
}

.product > div:not(.provider) { grid-row: 1; }
.product > .provider { grid-row: 2; }
.product > h2 { grid-row: 3; }
.product > .description { grid-row: 4; }

.product > a:last-child {
	grid-row: 5;
	align-self: end;
	justify-self: center;
}

.product > div:not(.provider),
.productbig > div {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 200px;
	margin: 0 0 12px !important;
}

.product > div:not(.provider) > a,
.productbig > div > a {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
}

.product img,
.productbig img {
	width: auto;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.provider,
.productbig > small {
	display: block;
	margin: 0 0 4px;
	color: var(--muted);
	font-size: 0.78rem;
}

.product h2 {
	margin: 0 0 8px;
	font-size: 1.1rem;
	line-height: 1.3;
}

.product h2 a {
	color: var(--text);
	text-decoration: none;
}

.product h2 a:hover {
	color: var(--link);
}

.product .description,
.productbig .description {
	margin: 0 0 14px;
	color: var(--muted);
	font-size: 0.93rem;
	line-height: 1.55;
}

.product > a:last-child,
.productbig > a:last-child {
	text-decoration: none;
}

.product button,
.productbig button {
	padding: 9px 20px;
	border: 0;
	border-radius: 999px;
	background: var(--accent);
	color: var(--on-accent);
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
}

.product a:hover button,
.productbig a:hover button {
	background: color-mix(in srgb, var(--accent) 85%, #000);
}

.product button sup,
.teaserBox > p sup {
	font-size: 0.65em;
}

.teaserBox > p {
	grid-column: 1 / -1;
	margin: 4px 0 0;
	color: var(--muted);
}

.teaserBox > p span,
.productbig ~ span {
	color: var(--muted);
	font-size: 0.75rem !important;
}

.productbig ~ span {
	display: block;
	margin-bottom: 32px;
}

.productbig {
	padding: 8px 4px 20px;
	text-align: center;
}

.favorites {
	margin-top: 48px;
}

.favorites__title {
	margin: 0 0 16px;
	font-size: 1.4rem;
}

@media (max-width: 600px) {
	.teaserBox {
		grid-template-columns: minmax(0, 1fr) !important;
	}
}


/* Ads (markup from joerrens-ad-network) */

.site-main .cards > .joerrens-archive-block {
	grid-column: 1 / -1;
	padding: 0;
	background: none;
}

.site-main .content-promo-grid {
	gap: 20px;
	margin: 0;
}

.site-main .promo-item {
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--soft);
	box-shadow: none;
}

.is-overview .site-main .promo-item {
	background: #fff;
}

.site-main .promo-item a {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.site-main .promo-item img {
	height: auto;
	border-radius: 0;
	aspect-ratio: 16 / 9;
}

.site-main .promo-item h3 {
	margin: 0;
	padding: 16px 20px 18px;
	background: none;
	color: var(--text);
	font-family: var(--font-head);
	font-size: 1.05rem;
	line-height: 1.3;
}

.site-main .promo-item a:hover h3 {
	color: var(--link);
}

.site-main .promo-label {
	top: 12px;
	right: 12px;
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.6);
	font-size: 0.72rem;
	font-weight: 600;
}

/* Comments */

.comments {
	margin-top: 48px;
}

.comments__title,
.comment-reply-title {
	margin: 0 0 20px;
	font-size: 1.3rem;
}

.comment-list,
.comment-list .children {
	margin: 0 0 32px;
	padding: 0;
	list-style: none;
}

.comment-list .children {
	margin: 12px 0 0 24px;
}

.comment-body {
	margin-bottom: 12px;
	padding: 16px 18px;
	border-radius: var(--radius);
	background: var(--soft);
}

.comment-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 12px;
	font-size: 0.85rem;
}

.comment-author {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
}

.comment-author .avatar {
	border-radius: 50%;
}

.comment-author .says {
	display: none;
}

.comment-metadata a {
	color: var(--muted);
	text-decoration: none;
}

.comment-content p:last-child {
	margin-bottom: 0;
}

.reply {
	font-size: 0.85rem;
}

.comment-form label {
	display: block;
	margin-bottom: 4px;
	font-size: 0.9rem;
	font-weight: 600;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 10px 14px;
	border: 0;
	border-radius: 10px;
	background: var(--soft);
	font: inherit;
}

.comment-form .comment-form-cookies-consent label {
	display: inline;
	font-weight: 400;
}

.comment-form .submit {
	padding: 10px 22px;
	border: 0;
	border-radius: 999px;
	background: var(--accent);
	color: var(--on-accent);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

/* Brand ticker */

.ticker {
	padding: 40px 0 36px;
	background: #fff;
}

.ticker__title {
	margin: 0 0 14px;
	font-size: 0.9rem;
	font-weight: 700;
	text-align: center;
}

.ticker__mask {
	overflow: hidden;
	-webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
	mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}

.ticker__track {
	display: flex;
	width: max-content;
	animation: jap-ticker 90s linear infinite;
}

.ticker:hover .ticker__track,
.ticker:focus-within .ticker__track {
	animation-play-state: paused;
}

.ticker ul {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ticker li {
	margin: 0 28px;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.5rem;
	font-style: italic;
	white-space: nowrap;
}

.ticker a {
	color: #8a8a8a;
	text-decoration: none;
}

.ticker a:hover,
.ticker a:focus {
	color: var(--text);
}

@keyframes jap-ticker {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}

/* Footer */

.site-footer {
	padding: 44px 0 22px;
	background: var(--soft);
	font-size: 0.92rem;
}

.footer-cols {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 28px 32px;
	margin-bottom: 32px;
}

.footer-widget {
	margin-bottom: 24px;
}

.footer-title {
	margin: 0 0 12px;
	font-size: 1.05rem;
}

.site-footer ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer li {
	margin: 0 0 8px;
	line-height: 1.45;
}

.site-footer a {
	color: var(--text);
	text-decoration: none;
}

.site-footer a:hover {
	color: var(--link);
	text-decoration: underline;
}

.site-footer p {
	color: var(--muted);
	line-height: 1.55;
}

.footer-bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 24px;
	color: var(--muted);
	font-size: 0.82rem;
}

.footer-legal {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
}

.footer-legal a {
	color: inherit;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.ticker__track {
		width: auto;
		animation: none;
	}

	.ticker ul {
		flex-wrap: wrap;
		justify-content: center;
	}

	.ticker ul[aria-hidden] {
		display: none;
	}
}