/* Reymont B2B – Feinschliff fuer WooCommerce (helles Farbschema, keine dunklen Toene) */

body {
	background-color: #FAF7F2;
}

.wp-site-blocks > main {
	background-color: #FAF7F2;
}

/* Startseite: Body-Hintergrund transparent, damit der fixe 3D-Hintergrund
   (weit im Hintergrund, negativer z-index) in den Zwischenraeumen durchscheint. */
body.page-has-3d-bg {
	background-color: transparent;
}

body.page-has-3d-bg .wp-site-blocks > main {
	background-color: transparent;
}

/* Shop-Grid */
ul.products {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 32px !important;
}

/* WooCommerce setzt auf ul.products einen ::before/::after-Clearfix fuer die
   alte Float-Anordnung (content:" "; display:table). Im Grid-Kontext zaehlt
   das als eigenes erstes Element und schiebt dadurch das erste Produkt eine
   Spalte nach rechts - daher die leere Zelle oben links. */
ul.products::before,
ul.products::after {
	content: none !important;
	display: none !important;
}

ul.products li.product {
	width: auto !important;
	float: none !important;
	margin: 0 !important;
	background: #ffffff;
	border-radius: 14px;
	padding: 20px 20px 26px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	text-align: center;
}

ul.products li.product:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

ul.products li.product img {
	border-radius: 10px;
	margin-bottom: 14px;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	background: #FAF7F2;
}

/* Startseite: Produktkarten transparent statt weisser Box, damit sie harmonisch
   mit dem 3D-Hintergrund/Rauch-Look verschmelzen statt wie Kacheln zu wirken. */
body.page-has-3d-bg ul.products li.product {
	background: transparent;
	box-shadow: none;
	padding: 10px 10px 16px;
}

body.page-has-3d-bg ul.products li.product:hover {
	box-shadow: none;
}

body.page-has-3d-bg ul.products li.product img {
	background: transparent;
	filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.1));
}

/* Startseite: Produkte als futuristisches 3D-Karussell statt statischem Raster.
   Immer eine aktive Karte in der Mitte, die vorherige/naechste schwebt seitlich
   angeschnitten und gedreht dahinter (Coverflow-Prinzip); die Buehne selbst hat
   eine feste Groesse, damit beim Weiterschalten nichts springt. Wird per JS
   (assets/js/product-carousel.js) aus dem normalen [products]-Grid aufgebaut. */
body.page-has-3d-bg .b2b-carousel-stage {
	position: relative;
	max-width: 1240px;
	height: 560px;
	margin: 0 auto 64px;
	perspective: 1400px;
	overflow: hidden;
}

body.page-has-3d-bg .b2b-carousel-stage::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 520px;
	height: 520px;
	transform: translate(-50%, -50%);
	background: radial-gradient(circle, rgba(31, 110, 88, 0.14), rgba(31, 110, 88, 0) 70%);
	pointer-events: none;
	z-index: 0;
}

body.page-has-3d-bg ul.products.b2b-carousel-track {
	display: block !important;
	position: relative;
	width: 100%;
	height: 100%;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
	transform-style: preserve-3d;
}

body.page-has-3d-bg ul.products.b2b-carousel-track li.product.b2b-carousel-item {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 320px;
	transition: transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.7s ease;
	will-change: transform, opacity;
	cursor: pointer;
}

body.page-has-3d-bg ul.products.b2b-carousel-track li.product.b2b-carousel-item.is-active {
	cursor: default;
	filter: drop-shadow(0 24px 44px rgba(31, 110, 88, 0.2));
}

body.page-has-3d-bg ul.products.b2b-carousel-track li.product.b2b-carousel-item img {
	width: 100%;
}

/* Nebenkarten (vorher/nachher) zeigen nur das Bild - Titel/Preis/Button wuerden
   sich sonst optisch mit der aktiven Karte in der Mitte ueberlagern. */
body.page-has-3d-bg ul.products.b2b-carousel-track li.product.b2b-carousel-item:not(.is-active) .woocommerce-loop-product__title,
body.page-has-3d-bg ul.products.b2b-carousel-track li.product.b2b-carousel-item:not(.is-active) .price,
body.page-has-3d-bg ul.products.b2b-carousel-track li.product.b2b-carousel-item:not(.is-active) .b2b-pending-price,
body.page-has-3d-bg ul.products.b2b-carousel-track li.product.b2b-carousel-item:not(.is-active) .b2b-flavor-tags,
body.page-has-3d-bg ul.products.b2b-carousel-track li.product.b2b-carousel-item:not(.is-active) .button {
	opacity: 0;
	pointer-events: none;
}

body.page-has-3d-bg ul.products.b2b-carousel-track li.product.b2b-carousel-item:not(.is-active) img {
	filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.1)) brightness(0.94);
}

.b2b-carousel-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	border-radius: 999px;
	border: none;
	background: rgba(255, 255, 255, 0.85);
	color: #1F6E58;
	font-size: 1.7rem;
	line-height: 1;
	cursor: pointer;
	z-index: 20;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
	transition: background-color 0.2s ease, transform 0.2s ease;
	backdrop-filter: blur(4px);
}

.b2b-carousel-nav:hover {
	background: #EAF4F1;
	transform: translateY(-50%) scale(1.08);
}

.b2b-carousel-prev {
	left: 4px;
}

.b2b-carousel-next {
	right: 4px;
}

@media (max-width: 780px) {
	body.page-has-3d-bg .b2b-carousel-stage {
		height: 500px;
	}

	body.page-has-3d-bg ul.products.b2b-carousel-track li.product.b2b-carousel-item {
		width: 250px;
	}
}

@media (max-width: 480px) {
	body.page-has-3d-bg .b2b-carousel-stage {
		height: 440px;
	}

	body.page-has-3d-bg ul.products.b2b-carousel-track li.product.b2b-carousel-item {
		width: 210px;
	}

	.b2b-carousel-nav {
		width: 44px;
		height: 44px;
		font-size: 1.4rem;
	}
}

ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.05rem;
	font-weight: 700;
	margin: 6px 0 8px;
	color: #3A3A3A;
}

ul.products li.product .price {
	font-size: 1.15rem;
	font-weight: 700;
	color: #1B6E56;
}

ul.products li.product .b2b-pending-price {
	font-size: 0.85rem;
	color: #6B6B6B;
	font-style: italic;
}

/* Buttons */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.wp-element-button {
	background-color: #1F6E58 !important;
	color: #ffffff !important;
	border-radius: 999px !important;
	border: none !important;
	padding: 12px 26px !important;
	font-weight: 600 !important;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	font-size: 0.8rem !important;
	transition: background-color 0.2s ease, transform 0.15s ease;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.wp-element-button:hover {
	background-color: #1B6E56 !important;
	color: #ffffff !important;
	transform: translateY(-1px);
}

/* Mengen-Pack-Auswahl (Einzeln / 10er Pack ...) */
.b2b-pack-selector {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin: 14px 0;
}

.b2b-pack-option {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	background: #ffffff;
	border: 1px solid #E3D9C6;
	border-radius: 12px;
	padding: 8px 16px;
	cursor: pointer;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.b2b-pack-option.is-active {
	border-color: #1F6E58;
	background: #EAF4F1;
}

.b2b-pack-label {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: #3A3A3A;
}

.b2b-pack-price {
	font-size: 0.9rem;
	font-weight: 700;
	color: #1B6E56;
}

/* Preistabellen (Staffelpreise) */
table.b2b-tier-table td {
	padding: 2px 8px 2px 0;
	color: #6B6B6B;
	white-space: nowrap;
}

/* Produktdetailseite */
.woocommerce div.product .woocommerce-tabs ul.tabs li a,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
	color: #1B6E56;
}

.woocommerce div.product div.images img {
	border-radius: 16px;
}

/* Produktbild auf der Produktdetailseite deutlich kleiner - wirkte in voller
   Spaltenbreite (Standard-WooCommerce ~48%) zu dominant gegenueber Text und
   Kaufbereich. Bildspalte schmaler, Textspalte (Zusammenfassung) breiter. */
@media (min-width: 781px) {
	.woocommerce div.product div.images {
		width: 36% !important;
	}

	.woocommerce div.product div.summary {
		width: 58% !important;
	}

	.woocommerce div.product div.images img {
		max-width: 360px;
		margin: 0 auto;
	}
}

/* Mobil: Produktgalerie auf eine handhabbare Hoehe begrenzen. Ohne das
   sprengt ein hochformatiges Produktfoto bei schmaler Viewport-Breite die
   Galerie auf ueber 1000px Hoehe (Breite schrumpft, Bild behaelt Seiten-
   verhaeltnis bei) - dadurch war der 3D-Button/Overlay auf dem Handy erst
   nach langem Scrollen erreichbar bzw. wirkte leer. */
@media (max-width: 780px) {
	.woocommerce-product-gallery {
		max-height: 70vh;
	}

	.woocommerce div.product div.images img {
		max-height: 70vh;
		width: 100%;
		object-fit: contain;
	}

	.b2b-3d-overlay {
		max-height: 70vh;
	}
}

/* Kategorie-Badge auf dem Shop */
.woocommerce-breadcrumb {
	font-size: 0.85rem;
	color: #6B6B6B;
	margin-bottom: 24px;
}

.woocommerce-breadcrumb a {
	color: #6B6B6B;
	text-decoration: none;
}

.woocommerce-breadcrumb a:hover {
	color: #1B6E56;
}

/* Header bleibt beim Scrollen oben sichtbar. "sticky" statt "fixed", damit
   kein Platzhalter/Abstandshalter fuer den Hauptinhalt noetig ist - der
   Header bleibt im normalen Fluss, bis man daran vorbeiscrollt. */
header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 1000;
}

/* Navigation im Header (heller Hintergrund) */
header.wp-block-template-part .wp-block-navigation-item > a,
header.wp-block-template-part .wp-block-navigation-item > .wp-block-navigation-item__content {
	color: #3A3A3A !important;
}

header.wp-block-template-part .wp-block-navigation-item > a:hover {
	color: #1B6E56 !important;
}

/* Footer Links (heller Hintergrund) */
footer.wp-block-template-part a {
	color: #3A3A3A;
	opacity: 0.8;
	text-decoration: none;
}

footer.wp-block-template-part a:hover {
	opacity: 1;
	color: #1B6E56;
}

/* Footer site-weit fixiert (immer sichtbar am unteren Bildschirmrand).
   Der Platzhalter unterhalb des Hauptinhalts (b2b-footer-spacer, Hoehe per
   JS gesetzt, siehe functions.php) verhindert, dass der letzte Seiteninhalt
   dauerhaft hinter dem fixierten Footer verschwindet. */
footer.wp-block-template-part {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 500;
	box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}

/* Auf schmalen Bildschirmen (Mobilgeraete) soll der Footer NICHT dauerhaft
   ueber dem Inhalt schweben - dafuer ist auf so wenig Bildschirmhoehe kein
   Platz. Stattdessen ganz normal im Seitenfluss ans Ende haengen, sichtbar
   nur wenn man bis dahin scrollt. Das zugehoerige Spacer-/FAB-Positionierungs-
   Script in functions.php prueft den berechneten position-Wert und reagiert
   entsprechend (kein Spacer, kein Hochschieben des WhatsApp-Buttons noetig,
   wenn der Footer hier gar nicht fixiert ist). */
@media (max-width: 480px) {
	footer.wp-block-template-part {
		position: static;
		box-shadow: none;
	}

	footer.wp-block-template-part .wp-block-group.alignwide {
		gap: 4px !important;
	}

	footer.wp-block-template-part p {
		margin: 0;
		line-height: 1.5;
	}

	footer.wp-block-template-part .has-small-font-size {
		font-size: 0.75rem;
	}
}

.b2b-review-disclosure {
	font-size: 0.85rem;
	color: #6B6B6B;
	background: #FAF7F2;
	border: 1px solid #E3D9C6;
	border-radius: 8px;
	padding: 10px 14px;
	margin-bottom: 16px;
}

/* Cookie-Consent-Banner (fuer WooCommerce Order-Attribution-Tracking) - sitzt
   direkt oberhalb des fixierten Footers (Hoehe wird per JS gemessen und als
   --Bottom gesetzt), unterhalb der Altersabfrage (z-index 99999) aber
   oberhalb des Footers (z-index 500). */
.b2b-cookie-banner {
	position: fixed;
	left: 0;
	right: 0;
	z-index: 600;
	display: flex;
	justify-content: center;
	padding: 0 16px;
	pointer-events: none;
	transform: translateY(12px);
	opacity: 0;
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.b2b-cookie-banner.is-visible {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.b2b-cookie-banner-inner {
	max-width: 720px;
	width: 100%;
	background: #ffffff;
	border: 1px solid #E3D9C6;
	border-radius: 14px;
	box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
	padding: 16px 20px;
	margin-bottom: 14px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
}

.b2b-cookie-banner-inner p {
	flex: 1 1 320px;
	margin: 0;
	font-size: 0.85rem;
	line-height: 1.5;
	color: #3A3A3A;
}

.b2b-cookie-banner-inner a {
	color: #1B6E56;
	text-decoration: underline;
}

.b2b-cookie-banner-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.b2b-cookie-btn {
	border-radius: 999px;
	padding: 10px 18px;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
}

.b2b-cookie-btn-primary {
	background: #1B6E56;
	color: #fff;
	border: 1px solid #1B6E56;
}

.b2b-cookie-btn-secondary {
	background: #ffffff;
	color: #3A3A3A;
	border: 1px solid #E3D9C6;
}

/* Produktkarten im Grid (Shop, Kategorien, "Ähnliche Produkte"): unterschiedlich
   lange Produktnamen/Sorten-Tags wuerden die "In den Warenkorb"-Buttons sonst
   auf verschiedenen Hoehen landen lassen. Als Flex-Spalte mit dem Button per
   margin-top:auto am unteren Rand richten sich alle Buttons einer Zeile
   zueinander aus - unabhaengig davon, wie viele Zeilen der Titel braucht. */
li.product {
	display: flex;
	flex-direction: column;
}

li.product .wp-block-woocommerce-product-button,
li.product .add_to_cart_button,
li.product a.button {
	margin-top: auto;
}

/* "Benachrichtigen, wenn wieder verfuegbar" (Produktseite, nur bei ausverkauft) */
.b2b-stock-notify {
	margin: 16px 0;
	padding: 14px 16px;
	background: #FAF7F2;
	border: 1px solid #E3D9C6;
	border-radius: 10px;
}

.b2b-stock-notify-label {
	margin: 0 0 10px;
	font-size: 0.9rem;
	color: #3A3A3A;
}

.b2b-stock-notify-success {
	margin: 0;
	color: #1B6E56;
	font-weight: 600;
}

.b2b-stock-notify-form {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.b2b-stock-notify-form input[type="email"] {
	flex: 1 1 200px;
	padding: 8px 12px;
	border: 1px solid #E3D9C6;
	border-radius: 999px;
}

.b2b-stock-notify-form button {
	background: #1B6E56;
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 8px 18px;
	font-weight: 600;
	cursor: pointer;
}

/* Sorten-/Frucht-Tags */
.b2b-flavor-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: center;
	margin: 8px 0;
}

.b2b-flavor-tag {
	display: inline-block;
	background: #EAF4F1;
	color: #1B6E56;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	padding: 4px 10px;
	border-radius: 999px;
}

div.product .b2b-flavor-tags {
	justify-content: flex-start;
}

.b2b-age-confirm {
	font-size: 0.85rem;
	color: #3a3a3a;
}

/* Grundpreisangabe (PAngV) */
.b2b-grundpreis {
	display: block;
	font-size: 0.72rem;
	color: #6B6B6B;
	font-weight: 400;
}

/* Gesetzlicher Nikotin-Warnhinweis (TabakerzV) auf der Produktseite */
/* Mindestens so gross wie der Fliesstext, nicht kleiner - der gesetzlich
   vorgeschriebene Nikotin-Warnhinweis (TabakerzV) soll am Point of Sale klar
   lesbar hervorstechen, nicht kleiner wirken als der umgebende Inhalt. */
.b2b-nicotine-warning {
	font-size: var(--wp--preset--font-size--large, 1.1rem);
	color: #7A5200;
	background: #FFF6E5;
	border: 1px solid #E8C77E;
	border-radius: 10px;
	padding: 10px 14px;
	margin: 14px 0;
}

.b2b-registration-fields .b2b-hint,
form.woocommerce-form-register p:has(#b2b_age_confirm) {
	font-size: 0.85rem;
}

/* Info-Boxen (Kontofreigabe etc.) */
.woocommerce-info {
	border-top-color: #1F6E58;
}

.woocommerce-info::before {
	color: #1F6E58;
}

/* WhatsApp-Chat-Button (schwebend, site-weit) */
.b2b-whatsapp-fab {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 9000;
	width: 56px;
	height: 56px;
	border-radius: 999px;
	background: #25D366;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.b2b-whatsapp-fab:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
}

@media (max-width: 480px) {
	.b2b-whatsapp-fab {
		right: 14px;
		bottom: 14px;
		width: 50px;
		height: 50px;
	}
}

/* Sortenfilter im Shop-Raster (Frucht/Minze/Eis) */
.b2b-flavor-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 20px auto 24px;
	max-width: 1240px;
}

.b2b-flavor-filter-btn {
	background: #ffffff;
	color: #3A3A3A;
	border: 1px solid #E3D9C6;
	border-radius: 999px;
	padding: 8px 18px;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.b2b-flavor-filter-btn:hover {
	border-color: #1F6E58;
}

.b2b-flavor-filter-btn.is-active {
	background: #1F6E58;
	color: #ffffff;
	border-color: #1F6E58;
}

.b2b-flavor-filter-empty {
	max-width: 1240px;
	margin: 0 auto 24px;
	color: #6B6B6B;
	font-style: italic;
}

/* B2B-Schnellbestellformular ("Mein Konto") */
.b2b-quick-order-table {
	width: 100%;
	border-collapse: collapse;
	margin: 18px 0;
}

.b2b-quick-order-table th {
	text-align: left;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: #6B6B6B;
	padding: 0 0 10px;
	border-bottom: 1px solid #E3D9C6;
}

.b2b-quick-order-table td {
	padding: 10px 0;
	border-bottom: 1px solid #F0EAE0;
	vertical-align: middle;
}

.b2b-quick-order-thumb {
	width: 40px;
	height: 40px;
	object-fit: contain;
	vertical-align: middle;
	margin-right: 10px;
	border-radius: 6px;
	background: #FAF7F2;
}

.b2b-quick-order-table input[type="number"] {
	width: 90px;
	padding: 8px 10px;
	border: 1px solid #E3D9C6;
	border-radius: 999px;
	text-align: center;
}

/* Suche im Header */
.b2b-header-search {
	position: relative;
	display: flex;
	align-items: center;
}

.b2b-header-search-toggle {
	background: none;
	border: none;
	padding: 6px;
	color: #3A3A3A;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.b2b-header-search-toggle:hover {
	color: #1B6E56;
}

.b2b-header-search-form {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	width: 0;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
	transition: width 0.2s ease, opacity 0.2s ease;
	background: #ffffff;
	border-radius: 999px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.b2b-header-search.is-open .b2b-header-search-form {
	width: 240px;
	opacity: 1;
	pointer-events: auto;
}

.b2b-header-search-form input[type="search"] {
	width: 100%;
	border: 1px solid #E3D9C6;
	border-radius: 999px;
	padding: 10px 16px;
	font-size: 0.85rem;
}

@media (max-width: 480px) {
	.b2b-header-search.is-open .b2b-header-search-form {
		width: 180px;
	}
}
