/**
 * WooCommerce – Shop-Übersicht, Produktseite, Produktkarten.
 * Wird nur auf WooCommerce-Seiten geladen (siehe functions.php).
 */

/* ---------- Allgemein ---------- */

.jkc-eyebrow,
.jkc-eyebrow a {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent-2);
	text-decoration: none;
}

.woocommerce-breadcrumb,
.wc-block-breadcrumbs {
	color: var(--wp--preset--color--contrast-2);
}

.wc-block-breadcrumbs a {
	color: inherit;
}

/* ---------- Shop-Übersicht ---------- */

.jkc-shop__intro .wp-block-query-title {
	margin-top: 0;
	margin-bottom: var(--wp--preset--spacing--10);
}

.jkc-shop__intro .wp-block-term-description {
	color: var(--wp--preset--color--contrast-2);
}

/* Kategorie-Navigation als Chips */
.jkc-shop__categories {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.jkc-shop__categories li {
	flex: none;
	margin: 0;
}

/* Mobil: Chips in einer horizontal scrollbaren Zeile */
@media (max-width: 781px) {
	.jkc-shop__categories {
		flex-wrap: nowrap;
		overflow-x: auto;
		padding-block: 0.25rem;
		scrollbar-width: none;
	}

	.jkc-shop__categories::-webkit-scrollbar {
		display: none;
	}
}

.jkc-shop__categories a {
	display: inline-block;
	padding: 0.45em 1em;
	border: 1px solid var(--wp--preset--color--contrast-3);
	border-radius: 999px;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	line-height: 1.2;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.jkc-shop__categories a:hover,
.jkc-shop__categories a:focus-visible {
	border-color: var(--wp--preset--color--contrast);
}

.jkc-shop__categories .current-cat > a {
	background: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

.jkc-shop__toolbar {
	padding-top: var(--wp--preset--spacing--10);
	border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast) 12%, transparent);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--contrast-2);
}

.jkc-shop__toolbar .woocommerce-result-count,
.jkc-shop__toolbar .woocommerce-ordering {
	margin: 0;
}

.jkc-shop__toolbar select {
	padding: 0.4em 0.6em;
	border: 1px solid var(--wp--preset--color--contrast-3);
	border-radius: 0.33rem;
	background: var(--wp--preset--color--base-2);
	font: inherit;
	color: var(--wp--preset--color--contrast);
}

/* ---------- Produktkarten (Shop + „Das könnte Sie auch interessieren“) ---------- */

/* Eigenes Raster: das responsive WC-Raster rechnet mit festem 1.25em-Abstand */
.jkc-product-grid .wc-block-product-template {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--40) var(--wp--preset--spacing--20);
}

@media (min-width: 782px) {
	.jkc-product-grid .wc-block-product-template {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		column-gap: var(--wp--preset--spacing--30);
	}
}

@media (min-width: 1080px) {
	.jkc-product-grid .wc-block-product-template {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.jkc-product-grid .wc-block-product {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	text-align: left;
}

.jkc-product-grid .wc-block-components-product-image {
	margin-bottom: 0.6rem;
	padding: 1.25rem;
	border-radius: 0.75rem;
	background: var(--wp--preset--color--base-2);
	transition: box-shadow 0.2s;
}

.jkc-product-grid .wc-block-components-product-image img {
	filter: drop-shadow(0 6px 10px rgb(28 26 23 / 0.18));
}

/* Platzhalter ohne Schatten, er ist selbst schon eine Fläche */
.jkc-product-grid .wc-block-components-product-image img[src*="placeholder-product"] {
	filter: none;
}

.jkc-product-grid .wc-block-product:hover .wc-block-components-product-image {
	box-shadow: 0 0 0 1px color-mix(in srgb, var(--wp--preset--color--contrast) 15%, transparent);
}

.jkc-product-card__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
	line-height: 1.35;
}

.jkc-product-card__title a {
	color: inherit;
	text-decoration: none;
}

.jkc-product-card__title a:hover {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.jkc-product-card__price {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	color: var(--wp--preset--color--contrast-2);
}

/* Paginierung */
.jkc-product-grid .wp-block-query-pagination {
	gap: 0.5rem;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--small);
}

.jkc-product-grid .wp-block-query-pagination a,
.jkc-product-grid .wp-block-query-pagination .current {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.4em;
	height: 2.4em;
	padding: 0 0.8em;
	border: 1px solid var(--wp--preset--color--contrast-3);
	border-radius: 999px;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.jkc-product-grid .wp-block-query-pagination .current {
	background: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

.jkc-product-grid .wp-block-query-pagination-numbers {
	display: flex;
	gap: 0.5rem;
}

/* ---------- Produktseite ---------- */

.jkc-product__media .woocommerce-product-gallery {
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: var(--wp--preset--spacing--30);
	border-radius: 0.75rem;
	background: var(--wp--preset--color--base-2);
}

.jkc-product__media .woocommerce-product-gallery__image img {
	width: auto;
	max-height: 70vh;
	margin-inline: auto;
	filter: drop-shadow(0 10px 18px rgb(28 26 23 / 0.2));
}

.jkc-product__media .woocommerce-product-gallery__trigger {
	top: 1rem;
	right: 1rem;
}

/* „Blick ins Buch“ (inc/book-preview.php) */
.jkc-book-preview {
	display: flex;
	gap: 0.5em;
	align-items: center;
	margin: var(--wp--preset--spacing--20) auto 0;
	padding: 0.65em 1.3em;
	border: 1px solid var(--wp--preset--color--contrast);
	border-radius: 999px;
	background: transparent;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	line-height: 1.2;
	color: var(--wp--preset--color--contrast);
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s;
}

.jkc-book-preview:hover,
.jkc-book-preview:focus-visible {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

.jkc-book-preview__count {
	font-weight: 400;
	opacity: 0.7;
}

.pswp__img {
	background: #fff;
	box-shadow: 0 10px 30px rgb(0 0 0 / 0.35);
}

.jkc-product__summary .wp-block-post-title {
	margin-top: 0;
	line-height: 1.15;
}

.jkc-product__price {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
}

.jkc-product__excerpt {
	font-size: 1.15rem;
	color: var(--wp--preset--color--contrast-2);
}

.jkc-product__summary form.cart {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: stretch;
	margin: var(--wp--preset--spacing--10) 0;
}

.jkc-product__summary .quantity .qty {
	width: 4.5em;
	height: 100%;
	padding: 0.6em;
	border: 1px solid var(--wp--preset--color--contrast-3);
	border-radius: 0.33rem;
	background: var(--wp--preset--color--base-2);
	font: inherit;
	text-align: center;
}

.jkc-product__summary .wp-block-woocommerce-product-meta {
	padding-top: var(--wp--preset--spacing--10);
	border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast) 12%, transparent);
	color: var(--wp--preset--color--contrast-2);
}

.jkc-product__details {
	padding-top: var(--wp--preset--spacing--40);
	border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast) 12%, transparent);
}

.jkc-product__details .wp-block-heading {
	margin-top: 0;
}

/* Bibliografische Angaben als ruhige Definitionsliste */
.jkc-product__specs table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--wp--preset--font-size--small);
}

.jkc-product__specs th,
.jkc-product__specs td {
	padding: 0.55rem 0;
	border: 0;
	border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast) 10%, transparent);
	text-align: left;
	vertical-align: top;
	background: none;
}

.jkc-product__specs th {
	width: 38%;
	padding-right: 1rem;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	color: var(--wp--preset--color--contrast-2);
}

.jkc-product__specs td p {
	margin: 0;
}

/* Germanized-Pflichtangaben (Blöcke im Template) */
.jkc-price-notes {
	margin: -0.25rem 0 0;
	font-size: 0.8rem;
	line-height: 1.4;
	color: var(--wp--preset--color--contrast-2);
}

.jkc-price-notes a {
	color: inherit;
}

.jkc-product__summary .jkc-price-notes {
	margin-top: 0.25rem;
	font-size: var(--wp--preset--font-size--small);
}

.jkc-product__summary .jkc-price-notes + .jkc-price-notes {
	margin-top: 0;
}

.jkc-grid-tax-notice {
	margin-top: var(--wp--preset--spacing--20);
	font-size: 0.8rem;
	color: var(--wp--preset--color--contrast-2);
}
