/**
 * Int-Markt – Einzelprodukt (Layout wie int-markt.de Referenz)
 */

/* ——— Breadcrumb ——— */
.single-product .jm-product-breadcrumb {
	margin: 0 0 1.25rem;
}

.single-product .jm-product-breadcrumb .woocommerce-breadcrumb {
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.5rem;
	margin: 0;
	padding: 0;
	font-size: 0.82rem;
	color: #6b7280;
	background: transparent;
	border: 0;
}

.single-product .jm-product-breadcrumb .woocommerce-breadcrumb a {
	color: #6b7280;
	text-decoration: none;
}

.single-product .jm-product-breadcrumb .woocommerce-breadcrumb a:hover {
	color: var(--jm-primary);
}

.single-product .jm-breadcrumb-sep {
	color: #9ca3af;
	font-size: 0.9em;
}

/* ——— Zwei-Spalten-Layout (Grid erzwingt Bild | Infos nebeneinander) ——— */
@media (min-width: 768px) {
	.single-product div.product {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		grid-template-rows: auto;
		align-items: start;
		column-gap: clamp(1.25rem, 3vw, 2.75rem);
		row-gap: 2rem;
		flex-wrap: unset !important;
		width: 100%;
		max-width: 100%;
	}

	.single-product div.product > .woocommerce-product-gallery {
		grid-column: 1;
		grid-row: 1;
		flex: unset !important;
		width: 100% !important;
		max-width: none !important;
		min-width: 0;
		margin: 0 !important;
		order: unset;
	}

	.single-product div.product > .summary.entry-summary {
		grid-column: 2;
		grid-row: 1;
		flex: unset !important;
		width: 100% !important;
		max-width: none !important;
		min-width: 0;
		margin: 0 !important;
		order: unset;
	}

	/* Alles unter Galerie + Kurzinfo über volle Breite (sonst nur 1 Grid-Spalte ≈ 50 %) */
	.single-product div.product > *:not(.woocommerce-product-gallery):not(.summary.entry-summary):not(.onsale) {
		grid-column: 1 / -1 !important;
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
	}
}

@media (min-width: 900px) {
	.single-product div.product {
		column-gap: clamp(1.5rem, 3vw, 3rem);
	}
}

/* ——— Galerie: Thumbnails links, Hauptbild rechts ——— */
.single-product div.product .woocommerce-product-gallery {
	display: grid;
	grid-template-columns: clamp(56px, 8vw, 76px) minmax(0, 1fr);
	grid-template-rows: auto;
	gap: 0.75rem;
	align-items: start;
	padding: clamp(0.75rem, 1.5vw, 1.25rem);
}

.single-product div.product .woocommerce-product-gallery .flex-viewport,
.single-product div.product .woocommerce-product-gallery > .woocommerce-product-gallery__wrapper {
	grid-column: 2;
	grid-row: 1;
	min-width: 0;
}

.single-product div.product .woocommerce-product-gallery ol.flex-control-thumbs,
.single-product div.product .woocommerce-product-gallery .flex-control-nav.flex-control-thumbs {
	grid-column: 1;
	grid-row: 1;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin: 0 !important;
	padding: 0;
	list-style: none;
	width: 100%;
	max-height: min(520px, 70vh);
	overflow-y: auto;
	scrollbar-width: thin;
}

.single-product div.product .woocommerce-product-gallery ol.flex-control-thumbs li,
.single-product div.product .woocommerce-product-gallery .flex-control-nav.flex-control-thumbs li {
	width: 100% !important;
	float: none !important;
	margin: 0 !important;
}

.single-product div.product .woocommerce-product-gallery ol.flex-control-thumbs li img,
.single-product div.product .woocommerce-product-gallery .flex-control-nav.flex-control-thumbs li img {
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: contain;
	border: 2px solid var(--jm-border);
	border-radius: 4px;
	background: #fff;
	opacity: 1;
	transition: border-color 0.15s;
}

.single-product div.product .woocommerce-product-gallery ol.flex-control-thumbs li.flex-active img,
.single-product div.product .woocommerce-product-gallery .flex-control-nav.flex-control-thumbs li.flex-active img {
	border-color: var(--jm-primary);
}

.single-product div.product .woocommerce-product-gallery .flex-direction-nav a {
	width: 2.25rem;
	height: 2.25rem;
	line-height: 2.25rem;
	background: rgba(255, 255, 255, 0.95);
	border: 1px solid var(--jm-border);
	border-radius: 4px;
	color: var(--jm-secondary);
	opacity: 0.9;
}

.single-product div.product .woocommerce-product-gallery .flex-direction-nav a:hover {
	opacity: 1;
	color: var(--jm-primary);
}

/* ——— Summary: cleaner ohne Karten-Rahmen ——— */
.single-product div.product .summary.entry-summary {
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
}

/* ——— NEU-Badge ——— */
.single-product .jm-product-badge--new {
	display: inline-block;
	margin: 0 0 0.65rem;
	padding: 0.2rem 0.55rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #166534;
	background: #e4f4e4;
	border-radius: 4px;
}

/* ——— Titel ——— */
.single-product div.product .summary .product_title {
	font-size: clamp(1.35rem, 1.2rem + 0.8vw, 1.85rem);
	font-weight: 700;
	margin: 0 0 0.85rem;
	color: #111827;
	line-height: 1.2;
}

/* ——— Preisblock ——— */
.single-product .jm-product-price-block {
	margin-bottom: 0.85rem;
}

.single-product div.product .summary p.price {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.2rem;
}

.single-product div.product .summary p.price .woocommerce-Price-amount,
.single-product div.product .summary p.price > .amount {
	order: 2;
}

.single-product div.product .summary p.price .woocommerce-price-suffix,
.single-product div.product .summary p.price .wc-gzd-additional-info {
	order: 1;
}

.single-product div.product .summary .tax-info,
.single-product div.product .summary .shipping-costs-info,
.single-product div.product .summary p.price .woocommerce-price-suffix,
.single-product div.product .summary .wc-gzd-additional-info {
	order: unset;
}

.single-product div.product .summary .tax-info,
.single-product div.product .summary .shipping-costs-info,
.single-product div.product .summary .wc-gzd-additional-info p {
	font-size: 0.82rem;
	color: #6b7280;
	margin: 0 0 0.25rem;
	line-height: 1.4;
}

.single-product div.product .summary .wc-gzd-additional-info {
	padding: 0;
	border: 0;
	background: transparent;
	margin-bottom: 0.35rem;
}

.single-product div.product .summary p.price {
	font-size: clamp(1.65rem, 1.4rem + 1vw, 2.1rem);
	font-weight: 700;
	color: var(--jm-primary);
	margin: 0 0 0.35rem;
	order: unset;
}

.single-product div.product .summary p.price .woocommerce-price-suffix {
	display: block;
	margin: 0 0 0.15rem;
	padding: 0;
	border: 0;
	background: transparent;
	font-size: 0.82rem;
	font-weight: 500;
	color: #6b7280;
}

.single-product div.product .summary .jm-grundpreis-wrap {
	margin-top: 0.15rem;
}

.single-product div.product .summary .jm-grundpreis-wrap .jm-grundpreis {
	font-size: 0.82rem;
	font-weight: 500;
	color: #6b7280;
}

/* ——— Lagerstatus ——— */
.single-product div.product .summary .stock,
.single-product div.product .summary .delivery-time-info,
.single-product div.product .summary p.stock {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	margin: 0.85rem 0 1rem;
	font-size: 0.92rem;
	font-weight: 600;
	color: #166534;
}

.single-product div.product .summary .stock::before,
.single-product div.product .summary .delivery-time-info::before,
.single-product div.product .summary p.in-stock::before {
	content: "";
	flex: 0 0 auto;
	width: 0.55rem;
	height: 0.55rem;
	border-radius: 50%;
	background: #22c55e;
}

.single-product div.product .summary .stock.out-of-stock,
.single-product div.product .summary p.out-of-stock {
	color: #b42318;
}

.single-product div.product .summary .stock.out-of-stock::before,
.single-product div.product .summary p.out-of-stock::before {
	background: #ef4444;
}

/* ——— Warenkorb-Zeile ——— */
.single-product div.product .summary form.cart {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
	order: unset;
}

.single-product div.product .summary form.cart:has(> .quantity) {
	grid-template-columns: auto 1fr;
	column-gap: 0.75rem;
}

.single-product div.product .summary form.cart .quantity .qty {
	min-width: 4.25rem;
	width: 4.75rem;
	padding: 0.55rem 0.25rem;
	font-size: 1rem;
	border-radius: 4px;
}

.single-product div.product .summary form.cart .single_add_to_cart_button {
	min-height: 3rem;
	padding: 0.75rem 1.25rem;
	font-size: 0.88rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	border-radius: 4px;
	background: var(--jm-primary);
	border-color: var(--jm-primary);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
}

.single-product div.product .summary form.cart .single_add_to_cart_button::before {
	content: "";
	display: inline-block;
	width: 1.1rem;
	height: 1.1rem;
	background: currentColor;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'/%3E%3C/svg%3E") center / contain no-repeat;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.single-product div.product .summary form.cart .single_add_to_cart_button:hover {
	background: var(--jm-primary-hover);
	border-color: var(--jm-primary-hover);
	color: #fff;
}

/* ——— Vertrauensbox ——— */
.single-product .jm-product-trust-box,
.single-product .jm-product-trust-widgets {
	margin: 1.25rem 0 1rem;
	padding: 0.85rem 1rem;
	background: #f9f9f9;
	border: 1px solid #ececec;
	border-radius: 4px;
}

.single-product .jm-product-trust-box__row {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.35rem 0;
	font-size: 0.88rem;
	font-weight: 600;
	color: #374151;
}

.single-product .jm-product-trust-box__icon {
	flex: 0 0 auto;
	width: 1.15rem;
	height: 1.15rem;
	background: #6b7280;
	mask-size: contain;
	mask-repeat: no-repeat;
	mask-position: center;
	-webkit-mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: center;
}

.single-product .jm-product-trust-box__icon--shield {
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E");
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E");
}

.single-product .jm-product-trust-box__icon--return {
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M3 12a9 9 0 1 0 3-6.7L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3C/svg%3E");
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M3 12a9 9 0 1 0 3-6.7L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3C/svg%3E");
}

.single-product .jm-product-trust-box__icon--support {
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M3 11h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H3v-6z'/%3E%3Cpath d='M21 11h-3a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2h3v-6z'/%3E%3Cpath d='M7 12V8a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M3 11h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H3v-6z'/%3E%3Cpath d='M21 11h-3a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2h3v-6z'/%3E%3Cpath d='M7 12V8a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
}

/* ——— Kategorie ——— */
.single-product div.product .summary .product_meta {
	margin-top: 0.75rem;
	padding-top: 0;
	border: 0;
	font-size: 0.82rem;
	color: #6b7280;
	order: unset;
}

.single-product div.product .summary .product_meta > span:not(.posted_in) {
	display: none;
}

.single-product div.product .summary .product_meta .posted_in a {
	color: #374151;
	text-decoration: none;
	font-weight: 600;
}

.single-product div.product .summary .product_meta .posted_in a:hover {
	color: var(--jm-primary);
}

/* ——— Tabs ——— */
.single-product div.product .woocommerce-tabs {
	margin-top: 0.5rem;
	padding-top: 0;
	border-top: 0;
}

.single-product div.product .woocommerce-tabs ul.tabs {
	display: flex;
	flex-wrap: nowrap;
	gap: 0;
	margin: 0;
	padding: 0;
	border-bottom: 1px solid #e5e7eb;
	background: transparent;
}

.single-product div.product .woocommerce-tabs ul.tabs::before,
.single-product div.product .woocommerce-tabs ul.tabs::after {
	display: none;
}

.single-product div.product .woocommerce-tabs ul.tabs li {
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	border-radius: 0;
}

.single-product div.product .woocommerce-tabs ul.tabs li a {
	display: block;
	padding: 0.85rem 1.15rem;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #6b7280;
	background: transparent;
	border: 0;
	border-bottom: 3px solid transparent;
	border-radius: 0;
}

.single-product div.product .woocommerce-tabs ul.tabs li.active a,
.single-product div.product .woocommerce-tabs ul.tabs li a:hover {
	color: var(--jm-primary);
	background: transparent;
}

.single-product div.product .woocommerce-tabs ul.tabs li.active a {
	border-bottom-color: var(--jm-primary);
}

.single-product div.product .woocommerce-tabs .panel {
	padding: 1.5rem 0 0;
	border: 0;
}

.single-product div.product .woocommerce-tabs .panel h2:first-child {
	font-size: 1.1rem;
	font-weight: 700;
	margin: 0 0 0.75rem;
	color: #111827;
}

/* ——— Nährwerttabelle (Zebra) ——— */
.single-product .jm-nutrition-table-wrap {
	max-width: 28rem;
}

.single-product .jm-nutrition-table {
	border: 0;
	border-radius: 0;
}

.single-product .jm-nutrition-table th,
.single-product .jm-nutrition-table td {
	border: 0;
	border-bottom: 1px solid #e5e7eb;
	padding: 0.55rem 0.75rem;
}

.single-product .jm-nutrition-table tbody tr:nth-child(even) th,
.single-product .jm-nutrition-table tbody tr:nth-child(even) td {
	background: #f9f9f9;
}

.single-product .jm-nutrition-table tbody tr:nth-child(odd) th,
.single-product .jm-nutrition-table tbody tr:nth-child(odd) td {
	background: #fff;
}

.single-product .jm-nutrition-table th {
	width: 58%;
	font-weight: 600;
	color: #374151;
	background: transparent;
}

.single-product .jm-tab-section h3 {
	font-size: 1rem;
	font-weight: 700;
	color: #111827;
}

.single-product .jm-nutrition-table caption {
	caption-side: top;
	text-align: left;
	font-weight: 700;
	padding: 0 0 0.5rem;
	color: #374151;
}

/* ——— Seitenbreite: kein Horizontal-Scroll, Footer bleibt volle Breite ——— */
body.single-product {
	overflow-x: clip;
}

.single-product .jm-site-main {
	width: 100%;
	max-width: min(100%, 1340px) !important;
}

.single-product .woocommerce div.product {
	max-width: 100%;
	min-width: 0;
	overflow-x: visible;
}

body.single-product .jm-site-footer {
	width: 100%;
	max-width: none;
	margin-left: 0;
	margin-right: 0;
	box-sizing: border-box;
}

/* ——— Ähnliche Produkte ——— */
.single-product .related.products {
	margin-top: 2.75rem;
	padding-top: 0;
	border-top: 0;
	position: relative;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	clear: both;
}

.single-product .related.products > h2 {
	font-size: 1.05rem;
	font-weight: 700;
	color: #111827;
	margin: 0 0 1.15rem;
}

.single-product .related.products ul.products {
	display: flex !important;
	flex-wrap: wrap;
	justify-content: flex-start;
	align-items: stretch;
	gap: 1rem;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
	width: 100%;
	max-width: 100%;
	overflow: visible;
}

.single-product .related.products ul.products::before,
.single-product .related.products ul.products::after {
	display: none;
	content: none;
}

.single-product .related.products ul.products li.product {
	box-sizing: border-box;
	flex: 0 0 calc(50% - 0.5rem) !important;
	width: calc(50% - 0.5rem) !important;
	max-width: calc(50% - 0.5rem) !important;
	min-width: 0 !important;
	margin: 0 !important;
	float: none !important;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

@media (min-width: 768px) {
	.single-product .related.products ul.products li.product {
		flex: 0 0 calc(25% - 0.75rem) !important;
		width: calc(25% - 0.75rem) !important;
		max-width: calc(25% - 0.75rem) !important;
	}
}

.single-product .related.products ul.products li.product .button {
	box-sizing: border-box;
	width: calc(100% - 1.3rem);
	max-width: calc(100% - 1.3rem);
	margin: auto 0.65rem 0.65rem !important;
	align-self: center;
	text-align: center;
	font-size: clamp(0.62rem, 2.8vw, 0.75rem);
	padding: 0.55rem 0.35rem;
	line-height: 1.25;
	white-space: normal;
	min-height: 2.6rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.single-product .related.products ul.products li.product img {
	width: 100%;
	height: auto;
	object-fit: contain;
}

@media (max-width: 899px) {
	.single-product div.product .woocommerce-product-gallery {
		grid-template-columns: 1fr;
	}

	.single-product div.product .woocommerce-product-gallery ol.flex-control-thumbs,
	.single-product div.product .woocommerce-product-gallery .flex-control-nav.flex-control-thumbs {
		grid-column: 1;
		grid-row: 2;
		flex-direction: row;
		max-height: none;
		overflow-x: auto;
		overflow-y: hidden;
	}

	.single-product div.product .woocommerce-product-gallery ol.flex-control-thumbs li,
	.single-product div.product .woocommerce-product-gallery .flex-control-nav.flex-control-thumbs li {
		flex: 0 0 4.25rem;
		width: 4.25rem !important;
	}
}
