@charset "utf-8";

/***************************************************
 * Produktseite mobil (< 992px, auch Handy quer und *
 * Tablet hochkant), nur page=product               *
 * Ziel: Galerie, Name, Preis, Verfügbarkeit und    *
 * "In den Warenkorb" ohne Scrollen sichtbar;       *
 * Quickbuy-Leiste beim Herunterscrollen.           *
 * Markup: xtCore/pages/product/product.html        *
 * JS: javascript/ProductPage.js                    *
 * Farben: Variablen aus css/header.css             *
 ***************************************************/

/* 768-991px (Handy quer, Tablet hochkant): dieselbe Ansicht wie am Handy. Bootstrap schaltet hier sonst auf das
   Tablet-Raster (sm) um - daher Spalten untereinander und hidden-xs/visible-xs wie unter 768px */
@media (min-width: 768px) and (max-width: 991px) {
	#product .hidden-xs {
		display: none !important;
	}
	#product .visible-xs {
		display: block !important;
	}
	#product .visible-xs-inline {
		display: inline !important;
	}
	#product [class*="col-sm-"] {
		float: none;
		width: auto;
	}
	/* xs-Regeln aus stylesheet.css / Template.css, die sonst nur unter 768px greifen */
	#product .pcontent {
		clear: both;
		margin-bottom: 40px;
		padding-bottom: 20px;
		border-bottom: 1px solid #e5e5e5;
	}
	#product h1.headline {
		margin: 0 11px;
		font-size: 30px;
	}
}

/* Handy quer (niedrig): Bild links, Name/Preis/Warenkorb rechts daneben - untereinander wäre der Knopf erst nach
   dem Scrollen sichtbar. Ab 992px gilt wieder das Desktop-Layout. */
@media (min-width: 568px) and (max-width: 991px) and (max-height: 500px) {
	#product > .row > .col-sm-7 {
		float: left;
		width: 55%;
	}
	#product > .row > .col-sm-5 {
		float: left;
		width: 45%;
	}
	#product > .row > .col-sm-5 + * {
		clear: both;
	}
}

@media (max-width: 991px) {
	/* Platz sparen: Breadcrumb ausblenden */
	.product-wrap .breadcrumb-container {
		display: none !important;
	}
	/* Meldungen (z.B. "in den Warenkorb gelegt", xtCore/pages/info_handler.html) direkt unter der Suche */
	.product-wrap #content > .primary > .alert {
		margin: 10px 0;
	}
	/* Abstand unter dem Warenkorb-Button (Mindestbestellwert, Versandkosten-Hinweis) */
	#product .product-info .margin-top-50 {
		margin-top: 16px !important;
	}

	/* ---------- Galerie ---------- */
	#product .tfm-pd-gallery {
		margin-bottom: 6px !important;
		padding-left: 0;
		padding-right: 0;
	}
	#product .tfm-pd-gallery #pictureCarousel img {
		width: auto;
		max-height: 36vh;
		margin: 0 auto;
	}
	#product .tfm-pd-gallery .owl-controls {
		margin-top: 2px;
	}
	#product .tfm-pd-gallery .owl-controls .owl-page span {
		margin: 3px 5px;
	}
	#product .tfm-pd-gallery .margin-bottom-15 {
		margin-bottom: 0 !important;
	}
	/* runde Pfeile über dem Bild (Owl-Standard: halbrunde Laschen am Rand) */
	#product .tfm-pd-gallery #pictureCarousel .owl-controls .owl-buttons .owl-prev,
	#product .tfm-pd-gallery #pictureCarousel .owl-controls .owl-buttons .owl-next {
		width: 40px;
		height: 40px;
		margin-top: -20px;
		border: 0;
		border-radius: 50%;
		background-color: rgba(80, 123, 35, 0.85);
		font-size: 14px;
		line-height: 14px;
		box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	}
	#product .tfm-pd-gallery #pictureCarousel .owl-controls .owl-buttons .owl-prev {
		left: 8px;
	}
	#product .tfm-pd-gallery #pictureCarousel .owl-controls .owl-buttons .owl-next {
		right: 8px;
	}
	#product .tfm-pd-gallery #pictureCarousel .owl-controls .owl-buttons .owl-prev:before,
	#product .tfm-pd-gallery #pictureCarousel .owl-controls .owl-buttons .owl-next:before {
		margin-top: -7px;
	}
	/* Hinweis "Antippen = Vollbild" oben rechts im Bild, damit er die Punkte unten nicht verdeckt (per JS in .owl-wrapper-outer verschoben) */
	#product .tfm-pd-gallery .owl-wrapper-outer {
		position: relative;
	}
	#product .tfm-pd-zoom-hint {
		position: absolute;
		top: 8px;
		right: 8px;
		padding: 3px 8px;
		border-radius: 4px;
		background: rgba(0, 0, 0, 0.55);
		color: #ffffff;
		font-size: 12px;
		line-height: 1.4;
		pointer-events: none;
	}
	#product .tfm-pd-gallery #pictureCarousel .owl-item {
		cursor: zoom-in;
	}

	/* ---------- Name ---------- */
	#product h1.tfm-pd-title {
		margin: 4px 0 4px;
		font-size: 18px;
		font-weight: bold;
		line-height: 1.25;
		text-align: left;
	}

	/* ---------- Preis, Verfügbarkeit ---------- */
	/* Preisspalte linksbündig - auch bei Artikeln ohne .pinfo (z.B. Masterartikel), sonst stünde die USt-Zeile mittig */
	#product .row > .text-center-xs {
		text-align: left;
	}
	#product .product-info {
		display: flex;
		flex-direction: column;
	}
	#product .product-info .product-discount {
		order: 1; /* "Nur noch X Artikel" u.ä. unter den Warenkorb-Button */
		margin-top: 12px;
	}
	/* Sonderpreis kompakt: Angebotspreis groß + alter Preis daneben, "Sie sparen ..." klein darunter (2 statt 3 Zeilen) */
	#product .product-info .product-price.this {
		display: flex;
		flex-wrap: wrap;
		align-items: baseline;
		column-gap: 10px;
		margin: 0;
		font-size: 26px;
		font-weight: bold;
		line-height: 1.2;
		text-align: left;
	}
	#product .product-info .product-price.this .price {
		order: 1;
		font-size: inherit;
	}
	#product .product-info .product-price.this .before {
		order: 2;
		font-size: 15px;
		font-weight: normal;
	}
	#product .product-info .product-price.this .price-discount {
		order: 3;
		flex-basis: 100%;
		margin: 0;
		font-size: 13px;
		font-weight: normal;
		line-height: 1.4;
	}
	#product .product-info .product-base-price {
		margin: 0;
		font-size: 13px;
		line-height: 1.4;
	}
	.tfm-pd-taxinfo {
		margin: 0 0 4px;
		color: #777777;
		font-size: 12px;
		line-height: 1.4;
	}
	.tfm-pd-availability {
		display: flex;
		flex-wrap: wrap;
		gap: 2px 16px;
		margin: 0 0 8px;
		font-size: 13px;
		line-height: 1.4;
	}
	.tfm-pd-availability__delivery {
		color: #555555;
	}

	/* ---------- Menge + In den Warenkorb ---------- */
	#product .product-info .add-to-cart {
		display: flex;
		align-items: stretch;
		gap: 10px;
		margin: 4px 0 0;
	}
	#product .product-info .add-to-cart:before,
	#product .product-info .add-to-cart:after {
		display: none;
	}
	#product .tfm-pd-qty {
		display: inline-flex;
		flex: 0 0 auto;
		float: none;
		margin: 0 !important;
		overflow: hidden;
		border: 1px solid #cccccc;
		border-radius: 6px;
		background: #ffffff;
	}
	.tfm-pd-qty__btn {
		width: 40px;
		padding: 0;
		border: 0;
		background: #f5f5f5;
		color: var(--tfm-text);
		font-size: 20px;
		line-height: 1;
	}
	.tfm-pd-qty__btn:hover,
	.tfm-pd-qty__btn:focus {
		background: #e9e9e9;
	}
	#product .tfm-pd-qty .tfm-pd-qty__input {
		width: 48px !important;
		max-width: none !important;
		height: 50px !important;
		padding: 0;
		border: 0;
		border-left: 1px solid #e5e5e5;
		border-right: 1px solid #e5e5e5;
		border-radius: 0;
		box-shadow: none;
		font-size: 16px; /* kein Auto-Zoom in iOS */
		text-align: center;
		-moz-appearance: textfield;
		appearance: textfield;
	}
	.tfm-pd-qty__input::-webkit-outer-spin-button,
	.tfm-pd-qty__input::-webkit-inner-spin-button {
		margin: 0;
		-webkit-appearance: none;
	}
	#product .tfm-pd-cart-btn {
		flex: 1 1 auto;
		min-height: 52px;
		padding: 8px 12px;
		border-radius: 6px;
		font-size: 17px;
		font-weight: bold;
		white-space: normal;
	}

	/* ---------- Quickbuy-Leiste ---------- */
	.tfm-quickbuy {
		position: fixed;
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 1040;
		display: flex;
		align-items: center;
		gap: 12px;
		padding: 10px 15px;
		padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
		background: #ffffff;
		box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
		transform: translateY(110%);
		transition: transform 0.25s ease;
	}
	.tfm-quickbuy.is-visible {
		transform: none;
	}
	.tfm-quickbuy__info {
		flex: 1 1 auto;
		min-width: 0;
	}
	.tfm-quickbuy__name {
		display: -webkit-box;
		overflow: hidden;
		font-size: 13px;
		line-height: 1.3;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
	}
	.tfm-quickbuy__price {
		font-size: 17px;
		font-weight: bold;
		line-height: 1.3;
	}
	/* Sonderpreis: nur den Angebotspreis zeigen (alter Preis und "Sie sparen ..." stehen oben im Produkt) */
	.tfm-quickbuy__price .before,
	.tfm-quickbuy__price .price-discount {
		display: none;
	}
	.tfm-quickbuy__price .price {
		color: inherit;
		font-size: inherit;
	}
	.tfm-quickbuy__btn {
		flex: 0 0 auto;
		padding: 12px 16px;
		border-radius: 6px;
		font-size: 15px;
		font-weight: bold;
	}
	html.tfm-quickbuy-visible body {
		padding-bottom: 80px; /* Footer nicht verdecken */
	}
	html.tfm-quickbuy-visible #back-to-top.affix {
		bottom: 85px; /* "Nach oben" über der Leiste */
	}
	/* Trusted-Shops-Siegel: Position über Warenkorbleiste/Quickbuy steht gesammelt in css/header.css */
}

/* niedrige Handys (z.B. iPhone SE, 667px hoch, oder Handy quer): Warenkorb-Button soll ohne Scrollen sichtbar sein */
@media (max-width: 991px) and (max-height: 700px) {
	#product .tfm-pd-gallery #pictureCarousel img {
		max-height: 30vh;
	}
	.product-wrap .tfm-mh-search {
		padding: 8px 0;
	}
}
/* Handy quer: Bild steht links neben dem Text, darf daher höher sein */
@media (min-width: 568px) and (max-width: 991px) and (max-height: 500px) {
	#product .tfm-pd-gallery #pictureCarousel img {
		max-height: 55vh;
	}
}

/* Produktname ohne Silbentrennung (.text-word-wrap setzt hyphens: auto), mobil und Desktop */
#product h1.text-word-wrap {
	-webkit-hyphens: manual;
	hyphens: manual;
}

/* ---------- Shop-Bewertung unter "In den Warenkorb" ---------- */
.tfm-pd-rating {
	margin: 8px 0 0;
	color: #555555;
	font-size: 13px;
	line-height: 1.4;
	text-align: center;
}
.tfm-pd-rating__star {
	color: var(--tfm-accent);
}

/* ---------- Produktbilder im Vollbild (javascript/ProductPage.js) ---------- */
html.tfm-lb-open,
html.tfm-lb-open body {
	overflow: hidden;
}
html.tfm-lb-open [id^="trustbadge-container-"] {
	display: none !important;
}
.tfm-lb {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 1070;
	background: #000000;
}
.tfm-lb[hidden] {
	display: none;
}
/* Wischen = natives Scrollen mit Einrasten; pan-x: Zwei-Finger-Zoom übernimmt das JS statt des Browsers */
.tfm-lb__track {
	display: flex;
	width: 100%;
	height: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	overscroll-behavior: contain;
	touch-action: pan-x;
}
.tfm-lb__track::-webkit-scrollbar {
	display: none;
}
.tfm-lb.is-zoomed .tfm-lb__track {
	overflow: hidden;
	touch-action: none;
}
.tfm-lb__slide {
	display: flex;
	flex: 0 0 100%;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	scroll-snap-align: center;
	scroll-snap-stop: always;
}
.tfm-lb__img {
	max-width: 100%;
	max-height: 100%;
	transform-origin: 0 0;
	user-select: none;
	-webkit-user-select: none;
}
.tfm-lb__img.is-animating {
	transition: transform 0.2s ease;
}
.tfm-lb__close {
	position: absolute;
	top: max(8px, env(safe-area-inset-top));
	right: 8px;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.5);
	color: #ffffff;
	font-size: 32px;
	line-height: 44px;
}
.tfm-lb__counter {
	position: absolute;
	left: 50%;
	bottom: max(12px, env(safe-area-inset-bottom));
	padding: 2px 10px;
	border-radius: 12px;
	background: rgba(0, 0, 0, 0.5);
	color: #ffffff;
	font-size: 13px;
	transform: translateX(-50%);
	pointer-events: none;
}
/* Pfeile auch auf Touch-Geräten (zusätzlich zum Wischen); am ersten/letzten Bild ausgeblendet (ProductPage.js) */
.tfm-lb__nav {
	display: block;
	position: absolute;
	top: 50%;
	width: 44px;
	height: 44px;
	margin-top: -22px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55); /* dunkel wie X und Zähler: auch auf weißen Produktfotos sichtbar */
	color: #ffffff;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.tfm-lb__nav:hover,
.tfm-lb__nav:focus {
	background: rgba(0, 0, 0, 0.75);
}
.tfm-lb__nav--prev {
	left: 8px;
}
.tfm-lb__nav--next {
	right: 8px;
}
/* Pfeil als CSS-Winkel (unabhängig von der Icon-Schrift) */
.tfm-lb__nav:before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 11px;
	height: 11px;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
}
.tfm-lb__nav--prev:before {
	margin: -6px 0 0 -3px;
	transform: rotate(-135deg);
}
.tfm-lb__nav--next:before {
	margin: -6px 0 0 -8px;
	transform: rotate(45deg);
}
.tfm-lb__nav:disabled {
	visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.tfm-quickbuy {
		transition: none;
	}
	.tfm-lb__img.is-animating {
		transition: none;
	}
}

@media (min-width: 992px) {
	/* Desktop: Produktseite unverändert */
	.tfm-pd-qty__btn,
	.tfm-quickbuy {
		display: none !important;
	}
}

/* Empfehlungen "weitere Produkte passend zu Ihrer Auswahl" (Box ug_all_products_ajax): Produktnamen ohne Silbentrennung
   wie im Warenkorb (css/cart.css .tfm-cart-item__name); stylesheet.css setzt mobil hyphens: auto */
.ug_all_products_ajax .product-listing .product-info .title {
	-webkit-hyphens: manual;
	hyphens: manual;
}

/* Suchbegriffe unter dem Produkt ("Das könnte Sie auch interessieren"): kleine ruhige Kästchen in einer Zeile
   statt großer oranger Knöpfe; passen sie nicht in die Breite, lässt sich die Zeile seitlich wischen */
.tfm-pd-keywords {
	display: flex;
	gap: 6px;
	overflow-x: auto;
	padding: 2px 0 6px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}
/* mittig, solange alles passt - ohne beim Wischen links abzuschneiden (statt justify-content: center) */
.tfm-pd-keywords > :first-child {
	margin-left: auto;
}
.tfm-pd-keywords > :last-child {
	margin-right: auto;
}
.tfm-pd-keyword {
	flex: 0 0 auto;
	padding: 4px 10px;
	border: 1px solid #dddddd;
	border-radius: 4px;
	background: #ffffff;
	color: #555555;
	font-size: 13px;
	line-height: 1.4;
	white-space: nowrap;
}
.tfm-pd-keyword:hover,
.tfm-pd-keyword:focus {
	border-color: var(--tfm-primary);
	color: var(--tfm-primary);
	text-decoration: none;
}

/* Empfehlungen "weitere Produkte passend zu Ihrer Auswahl" am Handy: stylesheet.css setzt die Textspalte absolut auf
   left: 200px ohne rechte Grenze - bei 360px lief sie über den Kasten hinaus und wurde abgeschnitten.
   Bild schmaler, Text breiter mit Abstand rechts; lange Wörter nur umbrechen, wenn sie nicht passen (keine Silbentrennung) */
@media (max-width: 767px) {
	.ug_all_products_ajax .product-listing .section .image-link img {
		max-width: calc(40% - 20px);
		height: auto;
	}
	.ug_all_products_ajax .product-listing .product-info {
		left: 42%;
		right: 10px;
		padding-right: 0;
	}
	.ug_all_products_ajax .product-listing .product-info,
	.ug_all_products_ajax .product-listing .product-info * {
		overflow-wrap: break-word;
		word-wrap: break-word;
		-webkit-hyphens: manual;
		hyphens: manual;
	}
}
